teach-algorand-x402

Explains the x402 HTTP payment protocol and its Algorand AVM integration architecture.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Rudhrakoushik10/RootNode --skill teach-algorand-x402-rudhrakoushik10
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: teach-algorand-x402
Source: https://github.com/Rudhrakoushik10/RootNode/tree/main/projects/.opencode/skill/teach-algorand-x402
Command: npx skills add https://github.com/Rudhrakoushik10/RootNode --skill teach-algorand-x402-rudhrakoushik10

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers struggle to understand how the x402 protocol turns the HTTP 402 status code into a machine-readable payment flow on Algorand, including how the client, resource server, and facilitator components interact and how Algorand-specific features like fee abstraction and ASA payments work. ## Core Features & Use Cases - Protocol Explanation: Teaches the full HTTP 402 payment flow, from initial request through X-PAYMENT header retry to on-chain settlement, with sequence diagrams. - Component Architecture: Details the three components (client, resource server, facilitator) and their TypeScript and Python package ecosystems such as @x402-avm/express and x402-avm[fastapi]. - Algorand-Specific Guidance: Covers CAIP-2 network identifiers, fee abstraction via atomic transaction groups, ASA/USDC support, and common troubleshooting errors. - Use Case: A developer asks "how does x402 work with Algorand" and receives a structured walkthrough of the payment flow, package installation commands, environment variable setup, and scheme registration code. ## Quick Start Ask the assistant to explain how the x402 payment protocol works with Algorand and walk through the client, server, and facilitator roles.

Frequently Asked Questions about teach-algorand-x402

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the x402 payment protocol work with Algorand?

x402 turns the HTTP 402 status code into a machine-readable payment flow on Algorand. The client requests a resource, receives 402 with payment requirements, builds and signs an Algorand transaction group, then retries with an X-PAYMENT header that a facilitator verifies and settles on-chain.

What are the three components of x402 architecture?

The three components are the client, which requests resources and signs payment transactions; the resource server, which gates endpoints behind payment requirements; and the facilitator, which verifies, simulates, and settles transactions on the Algorand network.

How do I install x402-avm packages for TypeScript or Python?

For TypeScript, install @x402-avm/core and @x402-avm/avm plus a server middleware like @x402-avm/express or a client like @x402-avm/fetch. For Python, use pip install x402-avm with extras such as [avm,fastapi] or [avm,httpx].

Does x402 on Algorand support USDC and fee abstraction?

Yes, x402-avm supports native ALGO and ASAs like USDC (testnet ASA ID 10458941, mainnet 31566704). Fee abstraction uses a 2-transaction atomic group where the facilitator pays fees via a zero-amount self-payment while the client's ASA transfer carries zero fee.

Why do I get an invalid network error with x402 Algorand?

The invalid network error occurs when using a V1 identifier where V2 is expected. Use the CAIP-2 format, such as algorand:SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI= for testnet, though V1 names like algorand-testnet are still mapped automatically.