DecodeOptions
Defined in: packages/sdk/src/decode/types.ts:194
Properties
Section titled “Properties”externalDataProvider?
Section titled “externalDataProvider?”
optionalexternalDataProvider?:ExternalDataProvider
Defined in: packages/sdk/src/decode/types.ts:198
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:246
Factory getLogs range forwarded to matchContext.
Defaults: earliest → latest. Bound this on public RPCs.
loadVerifiedAbi?
Section titled “loadVerifiedAbi?”
optionalloadVerifiedAbi?: (chainId,address) =>Promise<VerifiedContractAbi|null>
Defined in: packages/sdk/src/decode/types.ts:226
Verified-ABI loader used when useSourcifyFallback is true.
Pass sourcifyVerifiedAbiLoader, or omit this after enableSourcifyAbiLoader().
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:236
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:241
Unix time in seconds for expired_deadline. Tests inject a frozen clock.
Default
Section titled “Default”Math.floor(Date.now() / 1000)
provider?
Section titled “provider?”
optionalprovider?:Provider|null
Defined in: packages/sdk/src/decode/types.ts:195
registry?
Section titled “registry?”
optionalregistry?:OfficialRegistry|DecodeRegistry
Defined in: packages/sdk/src/decode/types.ts:196
spenderAllowlist?
Section titled “spenderAllowlist?”
optionalspenderAllowlist?:`0x${string}`[]
Defined in: packages/sdk/src/decode/types.ts:215
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:247
trust?
Section titled “trust?”
optionaltrust?:TrustPolicy
Defined in: packages/sdk/src/decode/types.ts:210
Wallet-supplied policy. When omitted, decode uses a stub
(policy: "unspecified") that accepts official-registry / attested /
local-override and rejects Sourcify / generated / inferred / basic.
Production should pass officialOnlyPolicy().
trustedTokens?
Section titled “trustedTokens?”
optionaltrustedTokens?:TrustedTokens
Defined in: packages/sdk/src/decode/types.ts:203
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:221
Opt-in Sourcify ABI fallback. Default false: decode does not touch the network.
Also requires a loader: loadVerifiedAbi, or enableSourcifyAbiLoader() first.
Importing @erc7730/sdk does not register one. Never confidence: "high".