r402-tvm 0.17.1

TON (TVM) chain support for the x402 payment protocol.
docs.rs failed to build r402-tvm-0.17.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

r402-tvm

TON (TVM) chain support for the x402 payment protocol, part of the r402 workspace.

Highlights

  • Exact scheme — one TEP-74 jetton_transfer authorized as a W5R1 internal_signed message. The facilitator Highload V3 wallet relays the signed body and sponsors gas.
  • CAIP-2 networkstvm:-239 (mainnet) and tvm:-3 (testnet). The signed integer reference is preserved through ChainId.
  • Sponsored feesprice_tag copies areFeesSponsored: true from /supported. Clients must set the same extra.
  • In-process facilitator — Toncenter / TonAPI REST verify and settle. Duplicate settle is blocked by SettlementCache (120s TTL) keyed by the settlement BoC hash. Failed and successful sends keep the key until TTL.

Cargo Features

Feature Surface
client Buyer-side W5R1 settlement BoC signing.
server Server-side PriceTag generation.
facilitator On-chain verify and Highload V3 batch settle.
telemetry tracing instrumentation.
full All of the above.

Quick Start (server price tag)

use r402_tvm::{TvmExact, USDT};

let tag = TvmExact::price_tag(pay_to, USDT::tvm_testnet().amount(10_000u128));

Documentation

License

Dual-licensed under MIT and Apache-2.0.