TypeScript SDK
A typed, namespaced client for every v2 route, generated from the platform's own declaration, with TanStack Query factories and a matching Effect surface.
Overview
The DALP TypeScript SDK is one object shaped like the Platform API. dalp.api.token.list(), dalp.api.token.transfer({ assetId: tokenAddress, transfers }), dalp.api.party.users.me(). Every route the platform declares is reachable that way, typed end to end.
The SDK and OpenAPI contract are generated from the same route declaration for a release. Match the SDK version to the deployment version: a newer client can name a route an older deployment does not serve.
The declaration is read once and emits a route table and a type registry. The promise client, the Effect client, and the CLI are generated from those two artifacts, so their definitions share one source for that release.
The SDK runs anywhere a modern JavaScript runtime does. In a browser it authenticates with the session cookie; on a server it authenticates with an API key, and it refuses the second combination in the first place. It has no framework dependency: React, TanStack Start, Next.js, a plain Node service, and a worker all use the same client, and the framework-shaped conveniences are opt-in.
Read this family if you are building against the Platform API in TypeScript. Calling the API from another language, or after the endpoint schemas themselves, the API reference has the spec-rendered routes and the integration guides cover the header contracts every client shares.
Settlement, credentials, and caching
Three SDK behaviors affect application design: writes can remain pending, browser clients reject API keys, and query factories derive cache keys.
A write can resolve before the chain does. dalp.api.token.transfer(...) asks the platform to wait for a bounded time, set through settlementTimeoutMs. The call returns either the settled record or a handle for an instruction still in progress. A handle is not a failed write, and treating it as one tells a user their transfer was rejected while it is still in flight. Mutations and settlement covers both shapes and how to follow a handle.
An API key cannot reach a browser. Constructing a browser client with a key throws at construction rather than at the first request. A key carries the full authority of the identity it belongs to, and a key in a browser bundle is readable by every visitor, so the check is deliberately the loudest thing in the constructor. Install and configure covers which credential belongs where.
Cache keys are derived, not written. queryOptions builds its key from route identity plus canonicalized input, so two callers passing the same parameters in different key order share one cache entry. Hand-written keys are where cache bugs come from: one character of difference is a second entry that never invalidates, and a collision is one entry serving two things. TanStack Query covers the key shape and invalidation.
What the SDK is not
It is not a validation library. The platform validates every request on the way in and every response on the way out. The SDK checks each success response against the route's declared response and throws sdk.response.MALFORMED_SUCCESS on a mismatch; it loads those response schemas on the first call rather than at import, and it does not validate input. Validating user input before you send it stays your choice of library, and the Console's own approach is one worked example.
The SDK is not a state manager either. It returns promises and, for the routes that stream, async iterables. The TanStack Query factories are plain objects in the shapes that library expects, so nothing forces you into it and nothing stops you using something else.
The installed SDK includes the routes declared for its release. Upgrade the SDK when you adopt routes added by a newer platform release.
Feeds
Read the on-chain price-feed directory, latest values, rounds, and staleness windows, and submit a signed observation as a trusted issuer on V1 or V2.
Install and configure
Install the SDK from npm, construct a client against your instance, and choose the credential for where the code runs: a session cookie or an API key.