SDK機能一覧
TypeScript・Go・Python各SDKのx402 V2機能対応状況の一覧です。
以下の表は3つのSDKにおける機能の対応状況を示しています。✓ = 対応、△ = 一部対応、— = 未対応。
コアコンポーネント
サーバー・クライアント・ファシリテーター
| 機能 | TypeScript | Go | Python |
|---|---|---|---|
| ResourceServer | ✓ | ✓ | ✓ |
| HTTPResourceServer | ✓ | ✓ | ✓ |
| x402Client | ✓ | ✓ | ✓ |
| HTTPClient | ✓ | ✓ | ✓ |
| Facilitator | ✓ | ✓ | ✓ |
HTTPフレームワーク対応
フレームワーク
| フレームワーク | TypeScript | Go | Python |
|---|---|---|---|
| Express | ✓ | — | — |
| Hono | ✓ | — | — |
| Next.js | ✓ | — | — |
| Fastify | ✓ | — | — |
| Gin | — | ✓ | — |
| net/http | — | ✓ | — |
| Echo | — | ✓ | — |
| FastAPI | — | — | ✓ |
| Flask | — | — | ✓ |
ネットワーク対応
ネットワーク
| ネットワーク | TypeScript | Go | Python |
|---|---|---|---|
| EVM(eip155:*) | ✓ | ✓ | ✓ |
| Solana(solana:*) | ✓ | ✓ | ✓ |
| Algorand | ✓ | — | — |
| Stellar | ✓ | — | — |
| Aptos | ✓ | — | — |
転送メカニズム
メカニズム
| メカニズム | TypeScript | Go | Python |
|---|---|---|---|
| exact / EVM(EIP-3009) | ✓ | ✓ | ✓ |
| exact / EVM(Permit2) | ✓ | ✓ | △ |
| exact / SVM(SPL Transfer) | ✓ | ✓ | ✓ |
| upto / EVM(EIP-3009) | ✓ | ✓ | ✓ |
| upto / EVM(Permit2) | ✓ | ✓ | — |
エクステンション対応
エクステンション
| エクステンション | TypeScript | Go | Python |
|---|---|---|---|
| Bazaar(サービスディスカバリー) | ✓ | ✓ | ✓ |
| EIP-2612 ガス代スポンサー | ✓ | ✓ | ✓ |
| ERC-20承認 ガス代スポンサー | ✓ | ✓ | ✓ |
| 支払い識別子(冪等性) | ✓ | ✓ | ✓ |
| オファーレシート | ✓ | △ | — |
| Sign in with X(CAIP-122) | ✓ | — | — |
ライフサイクルフック
フック
| フック | TypeScript | Go | Python |
|---|---|---|---|
| onBeforeVerify(サーバー) | ✓ | ✓ | ✓ |
| onAfterVerify(サーバー) | ✓ | ✓ | ✓ |
| onAfterSettle(サーバー) | ✓ | ✓ | ✓ |
| onProtectedRequest(HTTP) | ✓ | ✓ | △ |
| onBeforePaymentCreation(クライアント) | ✓ | ✓ | ✓ |
| onPaymentCreationFailure(クライアント) | ✓ | ✓ | ✓ |
| ファシリテーターフック | ✓ | ✓ | △ |