Fuyu API
Read deployment configuration, submit prepared proofs and track payment state.
Choose an interface#
The onchain contracts settle funds. The app runtime serves configuration, proof files, relay submission and status. The payment SDK runs in your process to manage accounting and rail lifecycle.
The queue API and disposable-fork setup are development services. Run them locally or use an operator's reviewed runtime. These docs provide no production base URL or shared bearer credential.
Prepare purchases, accept resource requests and recover settlement after a restart.
Signed Request ReferenceSign the resource ID, content, price and deadline separately from a purchase voucher.
Errors & RecoveryHandle SDK errors and check whether the original operation reached the chain.
Runtime endpoints#
| Method and route | Use |
|---|---|
| GET /api/queue/config | Read deployment, asset and relay fee configuration |
| GET /api/queue/assets | Read funding assets at an authenticated block |
| POST /api/queue/quote | Quote an approved external action |
| POST /api/queue/send-relay | Submit a prepared private send |
| GET /api/queue/send-status | Check a private send's state |
| POST /api/queue/withdraw-relay | Submit a prepared withdrawal |
| GET /api/queue/withdraw-status | Check a withdrawal's state |
| POST /api/queue/finalize | Finalize a reserved action output |
Read the deployment configuration#
Fetch the runtime configuration before preparing a request. Compare its chain, Pool, verifier and contract hashes with your application's reviewed deployment data. An HTTP 200 response still needs those identity checks.
// runtimeBaseUrl is the local or explicitly reviewed runtime origin.
const response = await fetch(new URL("/api/queue/config", runtimeBaseUrl));
if (!response.ok) throw new Error(`Configuration failed: ${response.status}`);
const config = await response.json();
// Validate chain, Pool, verifier and contract pins before using config.Keep private inputs in the client#
Send the relayer proofs and public execution fields. Keep note openings, spend secrets, passkey material and audit witnesses in the holder's browser or encrypted backup. The server does not need those secrets to submit the transaction.
For paid resource APIs, build a transport around SessionManager or the low-level client and gateway. HTTP 402 and vendor billing endpoints need application implementations; they are not supplied by this SDK.