Skip to main content

DepositVerifier

@totemsdk/chain-provider


@totemsdk/chain-provider / DepositVerifier

Interface: DepositVerifier

Optional funding-truth extension port. Providers that can attest deposits implement this; withDepositVerifier(provider) provides a default that uses the base provider's getCoin for the live path.

Methods

depositAddressFor()

depositAddressFor(lp, opts?): string

Deterministic deposit address the LP funds the pool/channel from.

Parameters

lp

string

opts?

DepositAddressOptions

Returns

string


getMmrRoot()

getMmrRoot(): Promise<string | null>

Chain MMR root for offline proof verification; null when unavailable.

Returns

Promise<string | null>


verifyDeposit()

verifyDeposit(params): Promise<DepositVerification>

Parameters

params

VerifyDepositParams

Returns

Promise<DepositVerification>


verifyMmrDeposit()?

optional verifyMmrDeposit(params): Promise<boolean>

Offline (root-anchored) proof check; falls back to the live path when absent.

Parameters

params
expectedRoot

Uint8Array

leafPubkey

Uint8Array

proof

MmrChunkProof

Returns

Promise<boolean>