SDK Overview
Yellow Network provides official SDKs for building applications on top of Nitrolite payment channels. All SDKs share the same two-step architecture: build and co-sign states off-chain, then settle on-chain when needed.
Choose your SDK
| Builder type | Package | Import | Notes |
|---|---|---|---|
| New TypeScript app | @yellow-org/[email protected] | import { Client, createSigners } from '@yellow-org/sdk' | Native v1 SDK; uses Decimal amounts. |
| Migrating from 0.5.3 (TS) | @yellow-org/[email protected] | import { NitroliteClient } from '@yellow-org/sdk-compat' | Minimal-diff bridge for @erc7824/[email protected]; see the compat codemod workflow. |
| Go integration | github.com/layer-3/nitrolite/sdk/go | import "github.com/layer-3/nitrolite/sdk/go" | Standard Go package; run go get github.com/layer-3/nitrolite/sdk/go. |
| Agentic IDE / AI agents | @yellow-org/[email protected] | npx -y @yellow-org/sdk-mcp | MCP server with binary yellow-sdk-mcp; coming soon on npm. |
| 0.5.3 codemod | @yellow-org/[email protected] | npx -y @yellow-org/nitrolite-codemod | One-time migration tool; use the source workflow until the npm package publishes. |
Architecture
All SDKs follow a unified design:
- State Operations (off-chain):
deposit(),withdraw(),transfer(),closeHomeChannel(),acknowledge(). Build and co-sign channel states without touching the blockchain. - Blockchain Settlement:
checkpoint(). The single entry point for all on-chain transactions. Routes to the correct contract method based on transition type and channel status. - Low-Level Operations: Direct RPC access for app sessions, session keys, queries, and custom flows.
Choosing an SDK
- New TypeScript projects: Use
@yellow-org/sdkdirectly. - Migrating from v0.5.3: Use
@yellow-org/sdk-compatto minimise code changes, then migrate to the main SDK at your own pace. - Go projects: Use the Go SDK for backend services and CLI tooling.