Vana SDK - v4.4.0
    Preparing search index...

    Interface EscrowGatewayClient

    Minimal client for the gateway's escrow endpoints.

    Construct with createEscrowGatewayClient.

    interface EscrowGatewayClient {
        submitDeposit(
            params: SubmitDepositParams,
        ): Promise<DepositSubmissionResult>;
        getEscrowBalance(account: `0x${string}`): Promise<EscrowBalanceResult>;
        syncEscrowBalance(account: `0x${string}`): Promise<EscrowBalanceSyncResult>;
        payForOp(params: PayForOpParams): Promise<EscrowPayResult>;
        withdraw(params: WithdrawFromEscrowParams): Promise<EscrowWithdrawalResult>;
        getWithdrawNonce(account: `0x${string}`): Promise<WithdrawNonceResponse>;
    }
    Index

    Methods

    • Force a reconciliation pass then return the updated balance.

      Triggers the gateway's lazy-confirmation worker for the account — any submitted deposits that have reached the configured confirmation level are credited before the balance is returned. Prefer this over getEscrowBalance when you need a fresh view after a deposit.

      Parameters

      • account: `0x${string}`

      Returns Promise<EscrowBalanceSyncResult>

    • Read the authoritative next withdrawal nonce for an account.

      The gateway is the authority on what nonce to use; use the value from nextWithdrawNonce when signing a withdrawal authorization.

      Do NOT generate or cache nonces client-side; concurrent callers cannot be safely coordinated without durable shared state. Query this endpoint immediately before signing/submitting to reduce staleness risk. However, stale_nonce errors can still occur; if rejected, re-query and re-sign.

      Parameters

      • account: `0x${string}`

      Returns Promise<WithdrawNonceResponse>