@lelantos-org/sdk / advanced / ViemChainReaderOpts
Interface: ViemChainReaderOpts
Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:7
Extended by
Properties
cacheTimeMs?
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?
optional chainId?: bigint;Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:17
fetch?
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.
Parameters
| Parameter | Type |
|---|---|
input | RequestInfo | URL |
init? | RequestInit |
Returns
Promise<Response>
maspAddress
maspAddress: string;Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:9
nativeAdapterAddress?
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?
optional permit2Address?: string;Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:10
rpcUrl
rpcUrl: string;Defined in: @lelantos-org/sdk/dist/chain/viem/reader.d.ts:8