stoka-go
Official Go client for the stoka x402 storage API.
Stoka is a paid key/value blob store you hit with an HTTP request and pay for per byte in USDC on Stellar. No accounts. No monthly bill. A failed 402 tells you exactly what to pay, and this client signs it for you in-process.
What it does
- Native x402 "exact" scheme signer for Stellar USDC payments — no subprocess, no JavaScript runtime, no
bun. - Drives the
store/retrieve/update402 retry loop automatically: first request triggers the 402, the client signs a Soroban authorization entry, retries, returns the body. - Typed errors you can branch on:
*stoka.PaymentRequiredwhen auto-pay fails,*stoka.StokaErrorfor everything else.
Next steps
- Quickstart — 20 lines of code, real testnet USDC
- API reference — every exported symbol
- Source
Requirements
- Go 1.24 or later
- A Stellar secret seed (
S…, 56 chars) with a funded USDC trustline - Network egress to the Soroban RPC (the client hits
soroban-testnet.stellar.orgby default for testnet)