Import
Signature
Register an Algorand network in x402’s network tables (no-op for MainNet/TestNet, which are built in).

Parameters

str
required
Network name, bare 44-character genesis hash, legacy long CAIP-2 ID, or canonical short CAIP-2 ID.
str
default:"'dockernet-v1'"
Genesis ID string associated with the network (e.g. “mainnet-v1.0”).
str | None
default:"None"
Custom Algod REST endpoint URL. If omitted, uses default endpoint.
str | None
default:"None"
Custom Indexer REST endpoint URL. If omitted, uses default endpoint.

Raises

  • ConfigurationError: (a ValueError) If network is not a string.
  • UnknownNetworkError: (a ValueError) If an unknown short CAIP-2 ID is passed without the full genesis hash; use network_from_algod instead.

Examples

See also

  • network_from_algod: Discovers and registers network parameters from Algod.
Source: ai_economy_sdk/network.py