Design principles
Zero dependencies. The SDK uses nativefetch and ships no runtime dependencies. It works in Node.js 18+ and any runtime with a standard fetch implementation.
KYC data stays with you. KYC hashing happens in the separate trusset-kyc-zk-proofs tool you run locally. Only the resulting root hash and proof manifest ever reach Trusset - see KYC proofs.
Fail early. Inputs are validated before requests are sent. Invalid addresses, missing fields, malformed hashes, and out-of-range values throw a ValidationError immediately rather than producing a 400 from the server.
Safe retries. Read requests retry transient failures (5xx, 408, 429, network errors) with exponential backoff. Write requests are never blindly retried - identity writes execute on-chain transactions, and repeating an ambiguous failure could submit a transaction twice. Writes retry only on 429.
Instance-scoped. Each TrussetClient is bound to one API key, which is scoped to one instance. If you operate multiple instances, create one client per instance.
Installation
Install the SDK and initialize a client
KYC Proofs
From local zk-STARK proofs to a verified customer
Customers
Customer management, verification, and database sync
Error Handling
Error types, codes, and retry behavior
