You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
@metamask/phishing-controller 18.1.0
Added
Add extractSignatureAddresses utility, plus ExtractedSignatureAddresses and ExtractSignatureAddressesOptions types, to collect the address-typed values from an EIP-712 typed-data message for real-time address scanning (#10170)
Walks the types schema from primaryType, matching fields by declared type (address/address[], including nested structs and arrays) rather than by field name, so custom and unknown message shapes are covered without per-protocol handling.
Normalizes non-canonical address encodings (variable-length hex and decimal strings) into canonical lower-case 20-byte hex by taking the leading 20 bytes of the signer-compatible big-endian encoding, and de-duplicates case-insensitively.
Excludes the zero address, a caller-provided exclude list (e.g. the signer), and caller-provided top-level excludeFields.
Bounds work with a distinct-address cap (default 10, caller-overridable via maxAddresses, hard ceiling 50), a traversal depth limit, and a node budget, reporting overflow when the message could not be fully walked. Exports DEFAULT_MAX_SIGNATURE_ADDRESSES and MAX_SIGNATURE_ADDRESSES_CEILING.
Returns the field name each address was found under so callers can attribute alerts.