Import
Signature
Protocol for AVM facilitator-side signing operations. Used by x402Facilitator to verify, sign, simulate, and settle transactions. The facilitator signer is responsible for:
  • Providing the fee payer addresses it manages
  • Signing fee payer transactions
  • Simulating transaction groups
  • Sending transaction groups to the network
  • Confirming transaction finality

Methods

get_addresses

Get all managed fee payer addresses. Returns
list[str]
List of 58-character Algorand addresses that can be used as fee payers. Enables load distribution across multiple signers.

sign_transaction

Sign a single transaction with the fee payer’s key. Parameters
bytes
required
Unsigned transaction bytes (msgpack encoded).
str
required
Algorand address of the fee payer.
str
required
CAIP-2 network identifier.
Returns
bytes
Signed transaction bytes (msgpack encoded).
Raises
  • ValueError: If fee_payer is not managed by this signer.

sign_group

Sign specified transactions in a group with the fee payer’s key. Parameters
list[bytes]
required
List of transaction bytes (some signed, some unsigned).
str
required
Algorand address of the fee payer.
list[int]
required
Indexes of transactions the fee payer should sign.
str
required
CAIP-2 network identifier.
Returns
list[bytes]
List of transaction bytes with fee payer’s transactions now signed.
Raises
  • ValueError: If fee_payer is not managed by this signer.

simulate_group

Simulate a transaction group to verify it will succeed. Uses Algorand’s simulate endpoint to dry-run the transaction group without committing it to the network. Parameters
list[bytes]
required
List of signed/unsigned transaction bytes.
str
required
CAIP-2 network identifier.
Raises
  • Exception: If simulation fails (contains error message).

send_group

Send a transaction group to the network. Parameters
list[bytes]
required
List of fully-signed transaction bytes.
str
required
CAIP-2 network identifier.
Returns
str
Transaction ID of the first transaction in the group.
Raises
  • Exception: If sending fails.

confirm_transaction

Wait for transaction confirmation. Algorand has instant finality - once a transaction is in a block, it is final and will never be reverted. Parameters
str
required
Transaction ID to confirm.
str
required
CAIP-2 network identifier.
int
default:"4"
Maximum rounds to wait (default 4).
Raises
  • Exception: If confirmation times out or transaction fails.
Source: x402_algorand/signer.py