x402_algorand module (x402-algorand on PyPI), generated from the docstrings in x402-avm/x402-algorand.
Registration
| Object | Kind | Summary |
|---|---|---|
register_exact_avm_client | function | Register AVM exact payment schemes to x402Client. |
register_exact_avm_server | function | Register AVM exact payment schemes to x402ResourceServer. |
register_exact_avm_facilitator | function | Register AVM exact payment schemes to x402Facilitator. |
Schemes
| Object | Kind | Summary |
|---|---|---|
ExactAvmClientScheme | class | AVM client implementation for the Exact payment scheme (V2). |
ExactAvmServerScheme | class | AVM server implementation for the Exact payment scheme (V2). |
ExactAvmFacilitatorScheme | class | AVM facilitator implementation for the Exact payment scheme (V2). |
Signers
| Object | Kind | Summary |
|---|---|---|
PayerAvmSigner | class | Client-side signer (ClientAvmSigner) for a single Algorand account. |
ServerAvmSigner | class | Facilitator-side signer (FacilitatorAvmSigner) backed by private keys and algod. |
Signer protocols
| Object | Kind | Summary |
|---|---|---|
ClientAvmSigner | class | Protocol for AVM client-side signing operations. |
FacilitatorAvmSigner | class | Protocol for AVM facilitator-side signing operations. |
Types
| Object | Kind | Summary |
|---|---|---|
ExactAvmPayload | class | Exact payment payload for AVM networks. |
DecodedTransactionInfo | class | Information extracted from a decoded Algorand transaction. |
TransactionGroupInfo | class | Information about a decoded transaction group. |
Network utilities
| Object | Kind | Summary |
|---|---|---|
caip2_from_genesis_hash | function | Derive CAIP-2 network identifier from an Algorand genesis hash. |
normalize_network | function | Normalize network identifier to CAIP-2 format. |
register_network | function | Register a custom Algorand network (e.g. |
get_genesis_hash | function | Get the full base64 genesis hash for a network. |
network_from_genesis_hash | function | Determine CAIP-2 network from genesis hash. |
is_valid_network | function | Check if a network identifier is valid. |
get_network_config | function | Get configuration for a network. |
get_usdc_asa_id | function | Get the USDC ASA ID for a network. |
Transaction utilities
| Object | Kind | Summary |
|---|---|---|
decode_transaction_bytes | function | Decode transaction bytes to DecodedTransactionInfo. |
decode_base64_transaction | function | Decode a base64-encoded transaction. |
decode_payment_group | function | Decode a payment group from base64 strings. |
encode_transaction_group | function | Encode a list of transaction bytes to base64 strings. |
validate_no_security_risks | function | Validate that a transaction has no security risks (per-transaction checks). |
validate_fee_payer_transaction | function | Validate a fee payer transaction. |
is_valid_address | function | Validate an Algorand address format. |
Amount utilities
| Object | Kind | Summary |
|---|---|---|
parse_money_to_decimal | function | Parse money value to decimal. |
to_atomic_amount | function | Convert decimal amount to atomic units. |
from_atomic_amount | function | Convert atomic units to decimal amount. |
Errors
| Object | Kind | Summary |
|---|---|---|
X402AlgorandError | class | Base class for all exceptions raised by x402-algorand. |
NetworkError | class | A network identifier is malformed, unsupported, or not registered. |
NetworkMismatchError | class | An algod node is connected to a different network than the one requested. |
TransactionDecodeError | class | Bytes or base64 text could not be decoded as an Algorand transaction. |
SigningError | class | A signer could not sign: bad key material or an address it does not manage. |
SimulationError | class | An algod simulate call reported that the transaction group would fail. |
Constants
| Object | Kind | Summary |
|---|---|---|
ALGORAND_MAINNET_CAIP2, ALGORAND_TESTNET_CAIP2, MAINNET_GENESIS_HASH, ... | constants | Network ids, genesis hashes, USDC asset ids and protocol limits exported by x402_algorand. |