Skip to content

@lelantos-org/sdk / advanced / ViemChainAdapterOpts

Interface: ViemChainAdapterOpts ​

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

Extends ​

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.

Inherited from ​

ViemChainReaderOpts.cacheTimeMs


chainId? ​

ts
optional chainId?: bigint;

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

Inherited from ​

ViemChainReaderOpts.chainId


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>

Inherited from ​

ViemChainReaderOpts.fetch


maspAddress ​

ts
maspAddress: string;

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

Inherited from ​

ViemChainReaderOpts.maspAddress


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.

Inherited from ​

ViemChainReaderOpts.nativeAdapterAddress


permit2Address? ​

ts
optional permit2Address?: string;

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

Inherited from ​

ViemChainReaderOpts.permit2Address


rpcUrl ​

ts
rpcUrl: string;

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

Inherited from ​

ViemChainReaderOpts.rpcUrl


signer ​

ts
signer: EthSigner;

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