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

    Cosmos client implementation for the Exact-Direct payment scheme.

    Executes a Cosmos MsgSend and returns the transaction hash as proof.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    scheme: "exact-direct" = SCHEME_EXACT_DIRECT

    Methods

    • Creates a payment payload by executing the transfer.

      Unlike other schemes where the client creates a signed message for the facilitator to execute, the exact-direct scheme has the client execute the transfer directly. The transaction hash is then used as proof of payment.

      Parameters

      • t402Version: number

        The t402 protocol version

      • paymentRequirements: PaymentRequirements

        The payment requirements

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

      Promise resolving to a payment payload with transaction hash