okx-agent-payments-protocol

安装量: 672
排名: #5617

安装

npx skills add https://github.com/okx/onchainos-skills --skill okx-agent-payments-protocol

OKX Agent Payments Protocol (Dispatcher) Unified entry point for three payment paths, distinguished by HTTP signature: accepts -based 402 (challenge in body for v1 or PAYMENT-REQUIRED header for v2), WWW-Authenticate: Payment 402 (channel-capable, with intent="charge" or "session" ), and a2a-pay (paymentId-based agent-to-agent links, no 402 required). This file owns the shared steps — protocol detection, payload decode, user confirmation gate, wallet status check — then dispatches into the right scheme/intent reference. User-facing terminology — IMPORTANT Rule 1 — Always call it "OKX Agent Payments Protocol", and always render it bolded. Use the exact English term OKX Agent Payments Protocol in user-visible messages regardless of the user's language, and always wrap it in markdown bold ( OKX Agent Payments Protocol ) so the user sees it emphasized. Keep it as a fixed English noun phrase even inside otherwise-Chinese sentences. Reserve protocol literals and internal identifiers for CLI invocations, HTTP headers, JSON payloads, and code — never speak them to the user. Rule 2 — Do not narrate internal protocol detection. The dispatch logic (which header was detected, which reference is being loaded, which scheme/intent was selected, TEE vs local-key path) is internal — keep it internal. The user only needs to see: (a) what is being paid, (b) what they need to confirm, (c) the result. Rule 3 — Externally-defined protocol literals stay byte-for-byte exact. The JSON field x402Version , the HTTP headers X-PAYMENT / PAYMENT-SIGNATURE / PAYMENT-REQUIRED / WWW-Authenticate: Payment , and the reference URL https://x402.org MUST appear verbatim wherever the protocol/server requires them — these are externally defined and changing them breaks interop. CLI subcommand names ( onchainos payment pay / pay-local / charge / session ... / a2a-pay ... ) are this CLI's own surface and may evolve; refer to them by their current name in CLI invocations and code, but never speak them to the user (Rule 2). Example (中) 准备通过 OKX Agent Payments Protocol 完成本次支付,下面是扣款明细,请确认…… (EN) Preparing a payment via the OKX Agent Payments Protocol. Here are the charge details — please confirm before I proceed… Progress narration counts as user-visible — Rules 1-3 still apply. Show more

返回排行榜