{"openapi":"3.1.0","info":{"title":"NectarPay - x402-paid Hive account creation","description":"NectarPay creates Hive blockchain accounts for agents and developers from sponsor claim tickets after a one-time x402 USDC payment. Runtime 402 payment challenges are authoritative.","version":"0.1.0","summary":"Create Hive blockchain accounts with x402","x-guidance":"NectarPay creates Hive blockchain accounts for agents and developers. Use GET /api/check-username/{username} to check availability, derive or generate Hive authority keys client-side, then call the paid POST /api/accounts/create endpoint with username, owner_key, active_key, posting_key, and memo_key. If the paid endpoint returns HTTP 402, satisfy the x402 v2 PAYMENT-REQUIRED challenge and retry the same request with PAYMENT-SIGNATURE. Do not send passphrases or private keys.","contact":{"name":"Sustainable Resource and Business Development Enterprise","url":"https://github.com/TheCrazyGM/nectarpay","email":"support@crypto-dreamr.com"},"x-icon":"https://nectarpay.crypto-dreamr.com/favicon.ico","x-logo":{"url":"https://nectarpay.crypto-dreamr.com/favicon.ico","altText":"NectarPay Logo"}},"paths":{"/api/keys/generate":{"post":{"summary":"Generate Keys","description":"Generate or derive public and private Hive keys for a username and password/passphrase.","operationId":"generate_keys_api_keys_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateKeysRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateKeysResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/sponsor/claims":{"get":{"summary":"Get Sponsor Claims","description":"Retrieve the number of pending claimed account creation tokens for the sponsor account.","operationId":"get_sponsor_claims_api_sponsor_claims_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SponsorClaimsResponse"}}}}},"security":[]}},"/api/config":{"get":{"summary":"Get Public Config","description":"Return non-secret settings needed by browser clients.","operationId":"get_public_config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicConfigResponse"}}}}},"security":[]}},"/api/purchases/{purchase_id}":{"get":{"summary":"Get Purchase Status","description":"Return purchase status without exposing private key material.","operationId":"get_purchase_status_api_purchases__purchase_id__get","parameters":[{"name":"purchase_id","in":"path","required":true,"schema":{"type":"string","title":"Purchase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/health":{"get":{"summary":"Get Health","description":"Run basic non-secret application, facilitator, and Hive checks.","operationId":"get_health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"security":[]}},"/api/check-username/{username}":{"get":{"summary":"Check Username","description":"Check format validity and blockchain availability for a desired Hive username.","operationId":"check_username_api_check_username__username__get","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsernameCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/accounts/create":{"post":{"summary":"Create a Hive account with x402","description":"Create one Hive blockchain account from a sponsor claim ticket. This x402-paid endpoint is intended for agents and API clients. Submit a desired Hive username and all four Hive public authority keys. The server does not accept passphrases or private keys.","operationId":"createHiveAccount","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountResponse"}}}},"402":{"description":"Payment Required"}},"security":[],"tags":["Blockchain","Hive","Account Creation"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"username":{"title":"Username","type":"string"},"owner_key":{"title":"Owner Key","type":"string"},"active_key":{"title":"Active Key","type":"string"},"posting_key":{"title":"Posting Key","type":"string"},"memo_key":{"title":"Memo Key","type":"string"}},"required":["username","owner_key","active_key","posting_key","memo_key"],"title":"CreateAccountRequest","type":"object"}}}},"x-payment-info":{"x402Version":2,"price":{"mode":"fixed","currency":"USD","amount":"1.00"},"protocols":[{"x402":{}}],"accepts":[{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000000","payTo":"0x4293f75E69b22Ee68AfA0F464dE86E5CD80BED75","maxTimeoutSeconds":300,"extra":{"name":"USD Coin","version":"2"}},{"scheme":"exact","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amount":"1000000","payTo":"AbQsXUjYCSMRXB3FvuzccGiJHLnaFrpm5VkdWphkTLJB","maxTimeoutSeconds":300,"extra":{"name":"USD Coin"}}],"offers":[{"intent":"charge","method":"x402","scheme":"exact","network":"eip155:8453","amount":"1000000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"One-time $1.00 x402 payment to create one Hive account."},{"intent":"charge","method":"x402","scheme":"exact","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","amount":"1000000","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","description":"One-time $1.00 x402 payment to create one Hive account."}],"description":"One-time $1.00 x402 payment to create one Hive account."}}},"/api/checkout":{"post":{"summary":"Create Browser Checkout","description":"Create a pending browser checkout using public keys only.","operationId":"create_browser_checkout_api_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}}},"components":{"schemas":{"CheckoutRequest":{"properties":{"username":{"type":"string","title":"Username"},"owner_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Key"},"active_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Key"},"posting_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posting Key"},"memo_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo Key"}},"additionalProperties":false,"type":"object","required":["username"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"checkout_id":{"type":"string","title":"Checkout Id"},"username":{"type":"string","title":"Username"},"pay_url":{"type":"string","title":"Pay Url"}},"type":"object","required":["checkout_id","username","pay_url"],"title":"CheckoutResponse"},"CreateAccountResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"username":{"type":"string","title":"Username"},"tx_id":{"type":"string","title":"Tx Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","username","tx_id","message"],"title":"CreateAccountResponse"},"GenerateKeysRequest":{"properties":{"username":{"type":"string","title":"Username"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}},"type":"object","required":["username"],"title":"GenerateKeysRequest"},"GenerateKeysResponse":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"keys":{"additionalProperties":{"$ref":"#/components/schemas/KeyPair"},"type":"object","title":"Keys"}},"type":"object","required":["username","password","keys"],"title":"GenerateKeysResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"checks":{"additionalProperties":{"type":"string"},"type":"object","title":"Checks"}},"type":"object","required":["status","checks"],"title":"HealthResponse"},"KeyPair":{"properties":{"public":{"type":"string","title":"Public"},"private":{"type":"string","title":"Private"}},"type":"object","required":["public","private"],"title":"KeyPair"},"PublicConfigResponse":{"properties":{"account_price_usd":{"type":"string","title":"Account Price Usd"},"account_price_label":{"type":"string","title":"Account Price Label"},"blockchain_network":{"type":"string","title":"Blockchain Network"},"evm_network_id":{"type":"string","title":"Evm Network Id"},"blockchain_solana_network":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blockchain Solana Network"},"solana_network_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Solana Network Id"},"solana_wallet_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Solana Wallet Address"}},"type":"object","required":["account_price_usd","account_price_label","blockchain_network","evm_network_id"],"title":"PublicConfigResponse"},"PurchaseResponse":{"properties":{"id":{"type":"string","title":"Id"},"username":{"type":"string","title":"Username"},"status":{"type":"string","title":"Status"},"hive_tx_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hive Tx Id"},"payment_network":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Network"},"payment_transaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Transaction"},"payment_payer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Payer"},"request_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Mode"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","username","status","hive_tx_id","payment_network","payment_transaction","payment_payer","request_mode","error","created_at","updated_at"],"title":"PurchaseResponse"},"SponsorClaimsResponse":{"properties":{"sponsor":{"type":"string","title":"Sponsor"},"claims":{"type":"integer","title":"Claims"}},"type":"object","required":["sponsor","claims"],"title":"SponsorClaimsResponse"},"UsernameCheckResponse":{"properties":{"username":{"type":"string","title":"Username"},"valid":{"type":"boolean","title":"Valid"},"available":{"type":"boolean","title":"Available"},"message":{"type":"string","title":"Message"}},"type":"object","required":["username","valid","available","message"],"title":"UsernameCheckResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 payment signature header. Runtime 402 challenges are authoritative."},"siwx":{"type":"apiKey","in":"header","name":"Authorization","description":"SIWX wallet authentication header for identity-gated routes."}}},"x-discovery":{"ownershipProofs":["0x4293f75E69b22Ee68AfA0F464dE86E5CD80BED75","AbQsXUjYCSMRXB3FvuzccGiJHLnaFrpm5VkdWphkTLJB"]},"servers":[{"url":"https://nectarpay.crypto-dreamr.com","description":"NectarPay API"}],"externalDocs":{"description":"LLM-friendly NectarPay API guide","url":"https://nectarpay.crypto-dreamr.com/llms.txt"},"x-service-info":{"name":"NectarPay","summary":"Create Hive blockchain accounts with x402","description":"NectarPay creates Hive blockchain accounts for agents and developers from sponsor claim tickets after a one-time x402 USDC payment.","categories":["developer-tools","blockchain"],"docs":{"homepage":"https://nectarpay.crypto-dreamr.com/","llms":"https://nectarpay.crypto-dreamr.com/llms.txt","apiReference":"https://nectarpay.crypto-dreamr.com/openapi.json"},"provider":{"name":"Sustainable Resource and Business Development Enterprise","url":"https://nectarpay.crypto-dreamr.com/","contact":"TheCrazyGM, Vice President"},"x402":{"version":2,"network":"eip155:8453","price":"$1.00","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}}