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

    TON client implementation for the Exact payment scheme.

    Creates signed Jetton transfer messages that can be broadcast by a facilitator to complete the payment.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates a new ExactTonScheme instance.

      Parameters

      • signer: ClientTonSigner

        The TON signer for client operations

      • getJettonWalletAddress: (ownerAddress: string, jettonMasterAddress: string) => Promise<string>

        Function to derive Jetton wallet address

      • config: ExactTonSchemeConfig = {}

        Optional configuration overrides

      Returns ExactTonScheme

    Properties

    scheme: "exact" = SCHEME_EXACT

    Methods

    • Creates a payment payload for the Exact scheme.

      The payload contains a pre-signed external message that performs a Jetton transfer from the client to the recipient.

      Parameters

      • t402Version: number

        The t402 protocol version

      • paymentRequirements: PaymentRequirements

        The payment requirements

      Returns Promise<Pick<PaymentPayload, "t402Version" | "payload">>

      Promise resolving to a payment payload