Import
Signature
Query an algod client for its current suggested transaction parameters and return its CAIP-2 identifier. Works with any Algorand node, including LocalNet instances and private testnets where the genesis hash cannot be known in advance.

Parameters

algosdk.Algodv2
required
Algodv2 client instance.

Returns

Promise<string>
Promise resolving to the canonical CAIP-2 network identifier.

Throws

  • X402AvmError: If the algod node does not return a genesisHash (network errors from algod propagate unchanged).

Example

Source: src/index.ts