Skip to main content

Crate r402_hedera

Crate r402_hedera 

Source
Expand description

Hedera chain support for the x402 payment protocol.

This crate implements the x402 "exact" scheme for Hedera: the buyer signs a TransferTransaction that credits payTo, and a facilitator fee payer submits it after Mirror Node preflight.

§Features

  • CAIP-2 Addressing: hedera:mainnet and hedera:testnet
  • HBAR and HTS: native tinybars (0.0.0) and USDC token ids
  • Fee-payer sponsorship: extra.feePayer is copied from /supported
  • In-process facilitator: verify and settle via Hiero SDK

§Feature Flags

  • server — server-side price tag generation
  • client — client-side transfer signing
  • facilitator — facilitator-side payment verification and settlement
  • telemetrytracing instrumentation

Re-exports§

pub use chain::inspect_hedera_transaction;client or facilitator
pub use chain::HederaChainProvider;facilitator
pub use chain::HederaFeePayer;facilitator
pub use chain::HederaMirrorClient;facilitator
pub use exact::HederaExact;
pub use exact::client::HederaExactClient;client
pub use exact::client::HederaSigner;client
pub use exact::facilitator::AliasPolicy;facilitator
pub use exact::facilitator::HederaExactFacilitator;facilitator
pub use exact::facilitator::HederaExactFacilitatorConfig;facilitator

Modules§

chain
Hedera chain support for x402 payments.
exact
Hedera "exact" payment scheme implementation.

Structs§

HBAR
Ergonomic accessors for native HBAR on well-known Hedera chains.
USDC
Ergonomic accessors for USDC token deployments on well-known Hedera chains.

Statics§

HEDERA_NETWORKS
Well-known Hedera networks with their names and CAIP-2 identifiers.

Functions§

hbar_deployment
Returns the HBAR deployment for a specific Hedera chain.
usdc_hedera_deployment
Returns the USDC deployment for a specific Hedera chain, if known.
usdc_hedera_deployments
Returns all known USDC deployments on Hedera chains.