Skip to main content
Version: 1.x

API Reference

The Protocol tab describes the semantic model: envelope structure, channel lifecycle, state-and-ledger model, enforcement guarantees, and other conceptual pieces. API Reference catalogs the concrete RPC methods that bind that model to the wire. Most app builders never read this tab directly: the TypeScript and Go SDKs build the envelopes, sign requests, and surface every method below as a typed function call. Reach for hand-rolled RPC only when you are integrating from a language without an official SDK, building a thin proxy or wire debugger, or generating code against docs/api.yaml.

This is the canonical Nitrolite v1 RPC surface, sourced from docs/api.yaml in the Nitrolite repository. Method names are grouped by namespace and version, for example channels.v1.submit_state.

RPC messages use the compact wire envelope described in Interaction Model: [type, requestId, method, payload, timestamp]. A request uses type 1, a successful response uses type 2, an event uses type 3, and an error response uses type 4.

[1, 1001, "channels.v1.get_home_channel", { "wallet": "0x...", "asset": "usdc" }, 1741344819012]

:::info Migrating from 0.5.3? New integrations should use the v1 SDKs, not @erc7824/[email protected]. For a full rewrite, start with the native TypeScript SDK. For a lower-risk migration that preserves selected 0.5.3 helper shapes while you move to v1, start with the TypeScript compat SDK. This section documents the v1 RPC methods, not the legacy helper surface. :::

Use the SDKs first

The official SDKs are the recommended way to call every method documented here:

  • TypeScript: @yellow-org/sdk for new apps, or @yellow-org/sdk-compat for migrations from @erc7824/[email protected]. You get IDE autocomplete, parameter checking, discriminated-union response types, and correct amount-unit handling out of the box.
  • Go: github.com/layer-3/nitrolite/sdk/go for backends and CLI tooling, with typed structs for every request and response.
  • MCP server (@yellow-org/sdk-mcp, coming soon): ask lookup_rpc_method for a method by name, for example channels.v1.submit_state, and lookup_method to find the matching SDK call. The MCP indexes the same docs/api.yaml surface and is intended for agentic browsing inside coding tools.

The SDKs handle the [type, requestId, method, payload, timestamp] envelope, signing, response correlation, event streams, auth/session-key plumbing, and amount-unit conversions. Reach for the catalogue below when you genuinely need to inspect or generate against the wire surface.

Groups

GroupPagePurpose
channels.v1ChannelsChannel queries, state submission, channel session keys, and channel events.
app_sessions.v1App SessionsApp-session creation, updates, deposits, rebalancing, and app-session keys.
apps.v1AppsApp registry lookup and application registration.
user.v1UserBalances, transaction history, and action allowances.
node.v1NodeConnectivity, node configuration, and supported assets.
TypesTypesField tables for all shared request and response types.
ErrorsErrorsAggregated error messages and suggested user-facing handling.