Skip to main content

Install

Requires Node.js 18 or later. The package ships dual CJS/ESM builds with full TypeScript declarations.

Initialize

The API key determines which instance the client operates against - development instances run on Sepolia, production instances on Ethereum mainnet. Create and manage keys in the Issuer Platform under your instance settings.
Store API keys in environment variables or a secrets manager. Never commit them to source control.

Configuration

All options beyond apiKey are optional.
string
required
Instance API key from the Issuer Platform. Keys start with trusset_.
string
default:"https://api.trusset.org"
API base URL. Override only if directed by Trusset support.
number
default:30000
Request timeout in milliseconds. Increase for batch operations or slow networks. On-chain write methods enforce higher floors regardless (180s; proof claims 420s), because the backend waits for block confirmations inside the request.
number
default:3
Maximum retry attempts on transient failures. Applies to read requests (5xx, 408, 429, network errors); write requests retry only on 429. Set to 0 to disable retries.
Logger
Custom logger implementing debug, info, warn, and error methods. Defaults to silent. Pass console for quick debugging.

CommonJS usage

The SDK works with require for Node.js backends that don’t use ES modules.

Module structure

After initialization, product modules are available as properties on the client. Each module groups related operations.
Additional modules (tokenization, trading, lending) will follow the same pattern as they become available.