@lumenwipe/sdk package wraps these endpoints.
Base URL
mainnet or testnet, for example /v1/testnet/close/plan. Any other value returns 400 invalid_network.
Authentication
Send your API key as a bearer token:GET /, the health routes, and GET /config/exchange-registry need no key. Everything else does. Get an API key with the self-service page.
Errors
Every error uses the same envelope, whichever endpoint produced it:code. The message is written for people and may be reworded, and details appears only when there is more to say. Responses never include stack traces or raw SDK errors.
Each endpoint page lists the codes that endpoint can return.
Rate limits
Requests are limited per API key. The default is 120 requests per minute. Rate limiting applies before authentication, so requests without a valid key are limited too. Exceeding the limit returns429 rate_limited.
The close loop
A close is a sequence of calls. The API keeps no state between them, so a close can resume after an interruption.POST /v1/{network}/close/planreturns the full plan and any decisions you must answer.POST /v1/{network}/close/transactionsreturns the next unsigned transactions. Verify and sign them.POST /v1/{network}/submitsubmits the signed transaction.- Repeat from step 2 while the response says another call is required.
POST /{network}/mediator/sign co-signs the mediator’s forward payment. To plan several accounts at once, use POST /v1/{network}/close/batch-plan. See how a close works for the flow from a user’s side.