create-typescript-x402-facilitator

Build TypeScript x402 facilitator services that verify and settle Algorand payments with optional Bazaar discovery.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @x402-avm/core, @x402-avm/avm, @x402-avm/extensions, algosdk, express, and includes references (resource) components.

What problem does it solve? Building an x402 payment facilitator on Algorand requires correctly implementing transaction verification, on-chain settlement, fee co-signing, and simulation handling, which involves many error-prone details. This Skill provides the complete workflow, interface implementations, and troubleshooting guidance to stand up a working facilitator service. ## Core Features & Use Cases - FacilitatorAvmSigner Implementation: Implement the signer interface covering transaction signing, simulation with mixed signed/unsigned groups, submission, and confirmation waiting. - Express.js Facilitator Server: Create /verify, /settle, and /supported endpoints backed by the x402Facilitator class with registered AVM exact payment schemes. - Bazaar Discovery Extension: Optionally catalog x402-protected resources by declaring discovery metadata on resource servers and extracting it in after-settle hooks. - Use Case: A developer wants to run a payment facilitator on Algorand testnet that verifies USDC payments for API access, settles them on-chain, and indexes discovered paid APIs for a public discovery endpoint. ## Quick Start Create an x402 facilitator server on Algorand testnet with verify and settle endpoints using my AVM private key.

Frequently Asked Questions about create-typescript-x402-facilitator

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

FAQPage Schema
How do I create an x402 facilitator on Algorand?▼

Install @x402-avm/core, @x402-avm/avm, algosdk, and express, then implement the FacilitatorAvmSigner interface and register it via registerExactAvmScheme from @x402-avm/avm/exact/facilitator. Expose /verify, /settle, and /supported endpoints through an Express server.

What is the FacilitatorAvmSigner interface?▼

FacilitatorAvmSigner bridges the facilitator to Algorand with six methods: getAddresses, signTransaction, getAlgodClient, simulateTransactions, sendTransactions, and waitForConfirmation. It handles signing, simulation, submission, and confirmation of payment transaction groups.

Does the x402 facilitator support Algorand mainnet?▼

Yes, register the facilitator with ALGORAND_MAINNET_CAIP2 instead of ALGORAND_TESTNET_CAIP2 when calling registerExactAvmScheme. Use the network constants from @x402-avm/avm rather than string literals.

Why does transaction simulation fail in my facilitator?▼

Simulation fails when the group mixes signed and unsigned transactions without wrapping. Wrap unsigned transactions with new algosdk.SignedTransaction({ txn }) and set allowEmptySignatures: true in the SimulateRequest.

What is the Bazaar discovery extension in x402?▼

Bazaar is an optional extension that catalogs x402-protected resources. Resource servers declare discovery metadata with declareDiscoveryExtension, and facilitators extract it in onAfterSettle hooks using extractDiscoveryInfo to build a discovery API.

Why does my facilitator fail to settle payments?▼

Common causes include insufficient ALGO in the facilitator address for fee-payer transactions, improperly concatenated signed bytes, or missing scheme registration. Concatenate signed transactions with Buffer.concat before sendRawTransaction and ensure registerExactAvmScheme was called.