Client SDKs
| Language | Package | Install |
|---|---|---|
| Python | mandate-ward |
pip install mandate-ward |
| JavaScript / TypeScript | @mandatelabs/ward |
npm install @mandatelabs/ward |
Both clients:
- read the key from
WARD_API_KEY(or take it as an argument) and send it inX-API-Key; - retry
429and5xxwith backoff, honouringRetry-After, and send anIdempotency-Keyon/decideso a retry never decides or bills twice; - never retry calls that send or check a KYC code;
- raise typed errors (
InsufficientBalanceError,RateLimitError, …) carryingcode,request_idanddetails; - read and base64-encode statement files for you;
- wait for async jobs.
Use them server-side only. The REST API is the contract: anything the SDKs do, you can do with plain HTTP.
Publishing
The packages are being published to PyPI and npm. Until then install from the repository: pip install ./sdk/ward-python or npm install ./sdk/ward-js.