# x402-algorand reference

> The Algorand (AVM) exact payment scheme as a plugin for the official x402 Python SDK.

Every public object of the `x402_algorand` module ([`x402-algorand` on PyPI](https://pypi.org/project/x402-algorand/)), generated from the docstrings in [x402-avm/x402-algorand](https://github.com/x402-avm/x402-algorand).

## Registration

| Object | Kind | Summary |
|---|---|---|
| [`register_exact_avm_client`](https://x402-avm.github.io/reference/python/x402-algorand/register-exact-avm-client) | function | Register AVM exact payment schemes to x402Client. |
| [`register_exact_avm_server`](https://x402-avm.github.io/reference/python/x402-algorand/register-exact-avm-server) | function | Register AVM exact payment schemes to x402ResourceServer. |
| [`register_exact_avm_facilitator`](https://x402-avm.github.io/reference/python/x402-algorand/register-exact-avm-facilitator) | function | Register AVM exact payment schemes to x402Facilitator. |

## Schemes

| Object | Kind | Summary |
|---|---|---|
| [`ExactAvmClientScheme`](https://x402-avm.github.io/reference/python/x402-algorand/exact-avm-client-scheme) | class | AVM client implementation for the Exact payment scheme (V2). |
| [`ExactAvmServerScheme`](https://x402-avm.github.io/reference/python/x402-algorand/exact-avm-server-scheme) | class | AVM server implementation for the Exact payment scheme (V2). |
| [`ExactAvmFacilitatorScheme`](https://x402-avm.github.io/reference/python/x402-algorand/exact-avm-facilitator-scheme) | class | AVM facilitator implementation for the Exact payment scheme (V2). |

## Signers

| Object | Kind | Summary |
|---|---|---|
| [`PayerAvmSigner`](https://x402-avm.github.io/reference/python/x402-algorand/payer-avm-signer) | class | Client-side signer (`ClientAvmSigner`) for a single Algorand account. |
| [`ServerAvmSigner`](https://x402-avm.github.io/reference/python/x402-algorand/server-avm-signer) | class | Facilitator-side signer (`FacilitatorAvmSigner`) backed by private keys and algod. |

## Signer protocols

| Object | Kind | Summary |
|---|---|---|
| [`ClientAvmSigner`](https://x402-avm.github.io/reference/python/x402-algorand/client-avm-signer) | class | Protocol for AVM client-side signing operations. |
| [`FacilitatorAvmSigner`](https://x402-avm.github.io/reference/python/x402-algorand/facilitator-avm-signer) | class | Protocol for AVM facilitator-side signing operations. |

## Types

| Object | Kind | Summary |
|---|---|---|
| [`ExactAvmPayload`](https://x402-avm.github.io/reference/python/x402-algorand/exact-avm-payload) | class | Exact payment payload for AVM networks. |
| [`DecodedTransactionInfo`](https://x402-avm.github.io/reference/python/x402-algorand/decoded-transaction-info) | class | Information extracted from a decoded Algorand transaction. |
| [`TransactionGroupInfo`](https://x402-avm.github.io/reference/python/x402-algorand/transaction-group-info) | class | Information about a decoded transaction group. |

## Network utilities

| Object | Kind | Summary |
|---|---|---|
| [`caip2_from_genesis_hash`](https://x402-avm.github.io/reference/python/x402-algorand/caip2-from-genesis-hash) | function | Derive CAIP-2 network identifier from an Algorand genesis hash. |
| [`normalize_network`](https://x402-avm.github.io/reference/python/x402-algorand/normalize-network) | function | Normalize network identifier to CAIP-2 format. |
| [`register_network`](https://x402-avm.github.io/reference/python/x402-algorand/register-network) | function | Register a custom Algorand network (e.g. |
| [`get_genesis_hash`](https://x402-avm.github.io/reference/python/x402-algorand/get-genesis-hash) | function | Get the full base64 genesis hash for a network. |
| [`network_from_genesis_hash`](https://x402-avm.github.io/reference/python/x402-algorand/network-from-genesis-hash) | function | Determine CAIP-2 network from genesis hash. |
| [`is_valid_network`](https://x402-avm.github.io/reference/python/x402-algorand/is-valid-network) | function | Check if a network identifier is valid. |
| [`get_network_config`](https://x402-avm.github.io/reference/python/x402-algorand/get-network-config) | function | Get configuration for a network. |
| [`get_usdc_asa_id`](https://x402-avm.github.io/reference/python/x402-algorand/get-usdc-asa-id) | function | Get the USDC ASA ID for a network. |

## Transaction utilities

| Object | Kind | Summary |
|---|---|---|
| [`decode_transaction_bytes`](https://x402-avm.github.io/reference/python/x402-algorand/decode-transaction-bytes) | function | Decode transaction bytes to DecodedTransactionInfo. |
| [`decode_base64_transaction`](https://x402-avm.github.io/reference/python/x402-algorand/decode-base64-transaction) | function | Decode a base64-encoded transaction. |
| [`decode_payment_group`](https://x402-avm.github.io/reference/python/x402-algorand/decode-payment-group) | function | Decode a payment group from base64 strings. |
| [`encode_transaction_group`](https://x402-avm.github.io/reference/python/x402-algorand/encode-transaction-group) | function | Encode a list of transaction bytes to base64 strings. |
| [`validate_no_security_risks`](https://x402-avm.github.io/reference/python/x402-algorand/validate-no-security-risks) | function | Validate that a transaction has no security risks (per-transaction checks). |
| [`validate_fee_payer_transaction`](https://x402-avm.github.io/reference/python/x402-algorand/validate-fee-payer-transaction) | function | Validate a fee payer transaction. |
| [`is_valid_address`](https://x402-avm.github.io/reference/python/x402-algorand/is-valid-address) | function | Validate an Algorand address format. |

## Amount utilities

| Object | Kind | Summary |
|---|---|---|
| [`parse_money_to_decimal`](https://x402-avm.github.io/reference/python/x402-algorand/parse-money-to-decimal) | function | Parse money value to decimal. |
| [`to_atomic_amount`](https://x402-avm.github.io/reference/python/x402-algorand/to-atomic-amount) | function | Convert decimal amount to atomic units. |
| [`from_atomic_amount`](https://x402-avm.github.io/reference/python/x402-algorand/from-atomic-amount) | function | Convert atomic units to decimal amount. |

## Errors

| Object | Kind | Summary |
|---|---|---|
| [`X402AlgorandError`](https://x402-avm.github.io/reference/python/x402-algorand/x402-algorand-error) | class | Base class for all exceptions raised by x402-algorand. |
| [`NetworkError`](https://x402-avm.github.io/reference/python/x402-algorand/network-error) | class | A network identifier is malformed, unsupported, or not registered. |
| [`NetworkMismatchError`](https://x402-avm.github.io/reference/python/x402-algorand/network-mismatch-error) | class | An algod node is connected to a different network than the one requested. |
| [`TransactionDecodeError`](https://x402-avm.github.io/reference/python/x402-algorand/transaction-decode-error) | class | Bytes or base64 text could not be decoded as an Algorand transaction. |
| [`SigningError`](https://x402-avm.github.io/reference/python/x402-algorand/signing-error) | class | A signer could not sign: bad key material or an address it does not manage. |
| [`SimulationError`](https://x402-avm.github.io/reference/python/x402-algorand/simulation-error) | 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, ...`](https://x402-avm.github.io/reference/python/x402-algorand/constants) | constants | Network ids, genesis hashes, USDC asset ids and protocol limits exported by x402_algorand. |

Source: https://x402-avm.github.io/reference/python/x402-algorand/index
