T402 API Reference - v2.9.0
    Preparing search index...

    Type Alias FacilitatorStellarSigner

    FacilitatorStellarSigner - Used by t402 facilitators to verify and settle payments

    This interface combines Soroban RPC capabilities with verification:

    • Verify signed transactions match expected parameters
    • Submit transactions to the Soroban RPC
    • Wait for transaction confirmations
    • Query token balances
    type FacilitatorStellarSigner = {
        getAddresses(): readonly string[];
        getCurrentLedger(): Promise<number>;
        getTokenBalance(
            params: { accountAddress: string; tokenContract: string },
        ): Promise<string>;
        verifyTransaction(
            params: VerifyTransactionParams,
        ): Promise<VerifyTransactionResult>;
        submitTransaction(signedTransactionXdr: string): Promise<string>;
        waitForConfirmation(
            txHash: string,
            timeoutMs?: number,
        ): Promise<TransactionConfirmation>;
        accountExists(address: string): Promise<boolean>;
    }
    Index

    Methods

    • Query token balance for an account

      Parameters

      • params: { accountAddress: string; tokenContract: string }

        Account and token contract addresses

      Returns Promise<string>

      Balance in smallest units

    • Submit a signed transaction to the Soroban RPC

      Parameters

      • signedTransactionXdr: string

        Base64 encoded signed transaction XDR

      Returns Promise<string>

      Transaction hash

    • Check if an account exists on the network

      Parameters

      • address: string

        G-account address to check

      Returns Promise<boolean>

      true if account exists