DecodeOptions
Defined in: packages/sdk/src/decode/types.ts:355
Per-call decode settings. Omitted trust means officialOnlyPolicy.
Omitted registry is whatever the caller passed; clearSign fills the pinned registry.
Properties
Section titled “Properties”builtins?
Section titled “builtins?”
optionalbuiltins?:boolean
Defined in: packages/sdk/src/decode/types.ts:371
ERC-20, ERC-721, and WETH builtins after registry and trustedTokens.
WETH matches only its deployments. Default true.
officialOnlyPolicy() rejects this source, so confidence stays "low".
officialOrLocalPolicy() accepts it at "medium". Never "high".
externalDataProvider?
Section titled “externalDataProvider?”
optionalexternalDataProvider?:ExternalDataProvider
Defined in: packages/sdk/src/decode/types.ts:359
Injected token, name, NFT, and chain reads. No network inside the SDK.
fromBlock?
Section titled “fromBlock?”
optionalfromBlock?:bigint|LogBlockTag
Defined in: packages/sdk/src/decode/types.ts:416
Factory getLogs range forwarded to matchContext. Factory matching is
skipped (FACTORY_RANGE_UNBOUNDED) unless fromBlock is a block number or
a tag other than earliest. An unset toBlock becomes latest.
loadVerifiedAbi?
Section titled “loadVerifiedAbi?”
optionalloadVerifiedAbi?: (chainId,address) =>Promise<VerifiedContractAbi|null>
Defined in: packages/sdk/src/decode/types.ts:399
Verified-ABI loader used when useSourcifyFallback is true.
Import it from @erc7730/sdk/sourcify and call the factory.
There is no process-wide loader. The root entry does not include the client.
Parameters
Section titled “Parameters”chainId
Section titled “chainId”number
address
Section titled “address”`0x${string}`
Returns
Section titled “Returns”Promise<VerifiedContractAbi | null>
locale?
Section titled “locale?”
optionallocale?:string
Defined in: packages/sdk/src/decode/types.ts:405
BCP-47 locale for dates / amounts only. Descriptor intent strings are
never translated — string form, else en, else the first string value.
Default
Section titled “Default”"en"
optionalnow?:number| (() =>number)
Defined in: packages/sdk/src/decode/types.ts:410
Unix time in seconds for expired_deadline. Tests inject a frozen clock.
Default
Section titled “Default”Math.floor(Date.now() / 1000)
onEvent?
Section titled “onEvent?”
optionalonEvent?: (event) =>void
Defined in: packages/sdk/src/decode/types.ts:422
Observability hook. Nested decodes emit their own events with the same callback. Does not open a network connection.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
provider?
Section titled “provider?”
optionalprovider?:Provider|null
Defined in: packages/sdk/src/decode/types.ts:356
registry?
Section titled “registry?”
optionalregistry?:OfficialRegistry|DecodeRegistry
Defined in: packages/sdk/src/decode/types.ts:357
signatures?
Section titled “signatures?”
optionalsignatures?:Record<string,string>
Defined in: packages/sdk/src/decode/types.ts:388
Selector → Solidity declaration for this call only.
Overrides COMMON_SIGNATURES on a match. There is no process-wide signature map.
spenderAllowlist?
Section titled “spenderAllowlist?”
optionalspenderAllowlist?:`0x${string}`[]
Defined in: packages/sdk/src/decode/types.ts:383
Wallet-known spenders / operators. Suppresses untrusted_spender when the
approve / permit / setApprovalForAll target is on this list (case-insensitive).
toBlock?
Section titled “toBlock?”
optionaltoBlock?:bigint|LogBlockTag
Defined in: packages/sdk/src/decode/types.ts:417
trust?
Section titled “trust?”
optionaltrust?:TrustPolicy
Defined in: packages/sdk/src/decode/types.ts:378
Wallet-supplied policy. When omitted, decode uses officialOnlyPolicy():
official-registry and attested are accepted; local overrides, Sourcify,
generated, inferred, and basic are rejected. Pass officialOrLocalPolicy()
to accept app extend() overrides.
trustedTokens?
Section titled “trustedTokens?”
optionaltrustedTokens?:TrustedTokens
Defined in: packages/sdk/src/decode/types.ts:364
Bundled ERC-20 / ERC-721 templates when no registry descriptor matches.
Never confidence: "high" under officialOnlyPolicy().
useSourcifyFallback?
Section titled “useSourcifyFallback?”
optionaluseSourcifyFallback?:boolean
Defined in: packages/sdk/src/decode/types.ts:393
Opt-in Sourcify ABI fallback. Default false: decode does not touch the network.
Also requires loadVerifiedAbi on this call. Never confidence: "high".