Skip to content

@lelantos-org/sdk / advanced / ViemChainReaderOpts

Interface: ViemChainReaderOpts ​

Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:7

Extended by ​

Properties ​

cacheTimeMs? ​

ts
optional cacheTimeMs?: number;

Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:30

How long viem may answer eth_blockNumber from its cache, in ms. Default 0: every blockNumber() reads the chain. viem's own default (4s) lets a spend's cooldown check and a consolidation wait act on a stale tip; raise it only where read volume matters more than freshness.


chainId? ​

ts
optional chainId?: bigint;

Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:17


fetch? ​

ts
optional fetch?: (input, init?) => Promise<Response>;

Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:23

Replaces fetch for RPC traffic, mirroring HttpOptions.fetch, to instrument or redirect reads. To replace the whole transport, pass a pre-built chain adapter to connect() instead.

MDN Reference

Parameters ​

ParameterType
inputRequestInfo | URL
init?RequestInit

Returns ​

Promise<Response>


maspAddress ​

ts
maspAddress: string;

Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:9


nativeAdapterAddress? ​

ts
optional nativeAdapterAddress?: string;

Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:16

NativeAdapter deployed alongside the pool. Required for native-coin deposits and unshields: the pool is ERC-20 only, so without it those paths are reported as unsupported.


permit2Address? ​

ts
optional permit2Address?: string;

Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:10


rpcUrl ​

ts
rpcUrl: string;

Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:8