Skip to main content

Installation

Requires Node.js 20+. Zero runtime dependencies (uses built-in fetch and crypto).

Initialize

Auth0 M2M tokens are fetched automatically and cached in memory. Tokens refresh 60 seconds before expiry to avoid interruptions.

Configuration

Environment URLs

Staging is the environment to integrate against today. https://api-staging.keystoneos.xyz is live and serves testnet settlements. The production host is reserved and not yet serving; requests to it will fail. api-dev is for KeyStone-internal use and does not resolve publicly.

Resources

The client exposes typed resource namespaces:

Idempotency Keys

Always use idempotency keys for create/submit operations. The SDK provides a helper, whose UUIDv4 keys are outside the match- prefix that is reserved for keys KeyStone derives and refused with 422:

Pagination

All list methods return PaginatedResponse<T>: