@tetlith/ts-sdk wraps the REST API
in a typed client: request and response shapes come straight from the
same OpenAPI spec that generates the API reference,
and the signed-request auth described in Authentication
is handled for you.
Quickstart
Resources
A named method per endpoint, grouped the way the API reference groups them:entities, accounts, transactions, activity,
compliance, policies, treasury, reconciliation.
tetlith.api is still there underneath — the same typed openapi-fetch
client, usable directly (tetlith.api.POST("/v1/entities", { body })) as
an escape hatch for an endpoint the resources haven’t caught up to yet.
Auth
Bearer
{ apiKey }. Simple, and enough for anything read-only.Signed
{ keyId, signingPrivateKey }. Binds each request to its method, path,
body, a timestamp and a nonce with an Ed25519 signature, so a captured
request can’t be replayed or altered. Required for anything that moves
money.Errors
Every non-2xx response throws aTetlithError carrying the API’s own
code and status, rather than a response you have to check manually.
Webhooks
constructWebhookEvent verifies the signature and timestamp before
handing back the parsed payload — see Webhooks for
the event types it carries.
Source and issues
The SDK is open source — read the code, file an issue, or open a PR.