Giant dump of info:
About Stacks
- Bitcoin L2 with 100% Bitcoin finality for smart contracts and DeFi
- Proof of Transfer (PoX) consensus anchored to Bitcoin's security
- Fast blocks (~5 seconds) with multiple Stacks blocks per Bitcoin block
- Clarity smart contracts with native Bitcoin state visibility
- sBTC for decentralized, programmable BTC; STX for gas
- Stacks Website | sBTC | Docs
x402 Ecosystem Entries
| Entry | Category | Description |
|---|
| x402Stacks | Client-Side Integrations | TypeScript SDK (x402-stacks on npm) |
| x402Stacks Facilitator | Facilitators | Transaction settlement service |
| x402StacksScan | Infrastructure & Tooling | Ecosystem explorer and stats |
| AIBTC Sponsor Relay | Infrastructure & Tooling | Sponsored / gasless transaction relay |
| STX402 | Endpoints | x402 powered registry (mainnet) |
| AIBTC x402 API | Endpoints | AI inference and app storage (mainnet + testnet) |
| x402 Biwas | Endpoints | AI-powered DeFi analytics |
x402 Supported Tokens
| Token | Mainnet | Testnet |
|---|
| STX | Native | Native |
| sBTC | SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token::sbtc-token | ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-token::sbtc-token |
| USDCx | SP120SBRBQJ00MCWS7TM5R8WJNTTKD5K0HFRC2CNE.usdcx::usdcx-token | Not yet deployed |
Link Dump
Protocol / facilitator:
Sponsored / gasless TX relay:
stx402 endpoints:
AIBTC endpoints:
Biwas endpoints:
First Integration Issue Details
Overview
Add Stacks as a third supported blockchain alongside EVM and Solana. The settlement model mirrors Solana (pre-signed transaction broadcast, not EVM-style authorization), making it a natural fit for the existing architecture. This brings three new payment tokens: STX, sBTC, and USDCx.
There's an existing Stacks x402 facilitator written in Go (x402-stacks-facilitator) and a TypeScript client/server library (x402-stacks). The goal here is to implement Stacks settlement natively in TypeScript within OpenFacilitator's core, following the same pattern as the existing EVM and Solana modules. A working crosschain example demonstrates EVM + Stacks in a single app using the x402 v2 protocol.
Stacks Settlement Model
| Aspect | Detail |
|---|
| Settlement | Pre-signed transaction broadcast via Hiro API |
| Verification | Deferred to settlement — poll Hiro API for tx confirmation |
| Key format | Hex (secp256k1, via @stacks/transactions) |
| Address format | Principal — SP…/SM… (mainnet), ST…/SN… (testnet) |
| Token standard | SIP-010 fungible tokens (transfer contract call) |
| Fee payer | Sender pays by default — co-signing supported for sponsored transactions (see x402-sponsor-relay) |
| CAIP-2 IDs | stacks:1 (mainnet), stacks:2147483648 (testnet) |
Supported tokens:
| Token | Type | Mainnet Contract | Testnet Contract |
|---|
| STX | Native | — | — |
| sBTC | SIP-010 | SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token | ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-token |
| USDCx | SIP-010 | SP120SBRBQJ00MCWS7TM5R8WJNTTKD5K0HFRC2CNE.usdcx | ST2Y455NJPETB2SRSD0VDZP3KJE50WNHY0BN3TWY5.usdcx ¹ |
Settlement Implementation Details
The settlement flow has been validated against the existing Go facilitator implementation.
Hiro API endpoints needed:
GET /extended/v1/tx/{txid} — fetch transaction details (status, recipient, amount)POST /v2/transactions — broadcast signed transaction bytes (Content-Type: application/octet-stream)
Free API keys with generous rate limits are available at https://platform.hiro.so.
Transaction parsing — two transaction types to handle:
- STX (native):
tx_type: "token_transfer" — read token_transfer.recipient_address and token_transfer.amount directly - SIP-010 tokens (sBTC, USDCx):
tx_type: "contract_call", function_name: "transfer" — parse function args for amount (format: u1000000) and recipient/to (format: 'SP… with quote prefix)
Verification rules — after broadcast, poll until confirmed, then verify:
- Transaction status is not
failed, abort_by_response, or abort_by_post_condition - Transaction is confirmed (
status: "success", block_height > 0) - Recipient matches expected address
- Amount >= required minimum
- Optional: sender match, memo match
Reference Implementations
Giant dump of info:
About Stacks
x402 Ecosystem Entries
x402 Supported Tokens
SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token::sbtc-tokenST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-token::sbtc-tokenSP120SBRBQJ00MCWS7TM5R8WJNTTKD5K0HFRC2CNE.usdcx::usdcx-tokenLink Dump
Protocol / facilitator:
Sponsored / gasless TX relay:
stx402 endpoints:
AIBTC endpoints:
Biwas endpoints:
First Integration Issue Details
Overview
Add Stacks as a third supported blockchain alongside EVM and Solana. The settlement model mirrors Solana (pre-signed transaction broadcast, not EVM-style authorization), making it a natural fit for the existing architecture. This brings three new payment tokens: STX, sBTC, and USDCx.
There's an existing Stacks x402 facilitator written in Go (x402-stacks-facilitator) and a TypeScript client/server library (x402-stacks). The goal here is to implement Stacks settlement natively in TypeScript within OpenFacilitator's core, following the same pattern as the existing EVM and Solana modules. A working crosschain example demonstrates EVM + Stacks in a single app using the x402 v2 protocol.
Stacks Settlement Model
@stacks/transactions)SP…/SM…(mainnet),ST…/SN…(testnet)transfercontract call)stacks:1(mainnet),stacks:2147483648(testnet)Supported tokens:
SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-tokenST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-tokenSP120SBRBQJ00MCWS7TM5R8WJNTTKD5K0HFRC2CNE.usdcxST2Y455NJPETB2SRSD0VDZP3KJE50WNHY0BN3TWY5.usdcx¹Settlement Implementation Details
The settlement flow has been validated against the existing Go facilitator implementation.
Hiro API endpoints needed:
GET /extended/v1/tx/{txid}— fetch transaction details (status, recipient, amount)POST /v2/transactions— broadcast signed transaction bytes (Content-Type: application/octet-stream)Free API keys with generous rate limits are available at https://platform.hiro.so.
Transaction parsing — two transaction types to handle:
tx_type: "token_transfer"— readtoken_transfer.recipient_addressandtoken_transfer.amountdirectlytx_type: "contract_call",function_name: "transfer"— parse function args foramount(format:u1000000) andrecipient/to(format:'SP…with quote prefix)Verification rules — after broadcast, poll until confirmed, then verify:
failed,abort_by_response, orabort_by_post_conditionstatus: "success",block_height > 0)Reference Implementations