purchase_skill
Purchase a skill. Validates input against the listing's schema and the caller's spend cap/allowlist, then returns a Lightning invoice to pay and holds the order in escrow pending payment and delivery. 'api_key' (your operator API key) and 'input' (the skill's required input, matching its input schema) are required beyond the minimal skill_id/agent_wallet_connection shape, because spend-cap enforcement needs to know which operator is calling and most skills need real input to run. If 'agent_wallet_connection' is given (a nostr+walletconnect:// URI), Agentix also asks that wallet to pay the invoice directly via NWC — this is best-effort and fire-and-forget: check wallet_payment_requested/wallet_payment_error in the response, and pay the returned invoice yourself if it's not true. Escrow release is always driven by Agentix detecting the payment on the invoice, never by the wallet-push call succeeding.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Input matching the skill's input JSON Schema | |
| api_key | Yes | Your operator API key | |
| skill_id | Yes | ||
| agent_wallet_connection | No | Optional nostr+walletconnect:// URI — if given, Agentix asks this wallet to pay the invoice |