Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docs/nitrolite/build/getting-started/prerequisites.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,23 @@ Create `.env` for sensitive values:
# .env - never commit this file
USER_PRIVATE_KEY=0x...
APP_PRIVATE_KEY=0x...
NITRONODE_WS_URL=<sandbox-url-coming-soon>
NITRONODE_WS_URL=wss://nitronode-sandbox.yellow.org/v1/ws
RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
CHAIN_ID=11155111
ASSET=yellow
```

:::info Test endpoint
`NITRONODE_WS_URL` should point at a v1 Nitronode endpoint for the environment you are testing against. Use the current sandbox or test endpoint provided for your environment until the public sandbox URL is pinned.
:::info Public Nitronode endpoints
`NITRONODE_WS_URL` should point at a v1 Nitronode endpoint for the environment you are testing against:

- Sandbox: `wss://nitronode-sandbox.yellow.org/v1/ws`
- Production/mainnet: `wss://nitronode.yellow.org/v1/ws`

Use sandbox for development wallets and faucet-funded test assets. Use production only when you intentionally connect to mainnet assets.
:::

:::tip Builder Toolkit
Need a consolidated list of live examples, source repositories, Playground, faucet, MCP, and SDK entry points? Open the [Builder Toolkit](/nitrolite/builder-toolkit).
:::

Add local files to `.gitignore`:
Expand Down Expand Up @@ -248,5 +257,6 @@ Use `withApplicationID(appID)` when you want Nitronode records tagged with the a
## Next Steps

- [Quickstart](./quickstart) - run the native v1 channel and app-session lifecycle.
- [Builder Toolkit](/nitrolite/builder-toolkit) - find live examples, Playground, faucet, MCP, and SDK entry points.
- [Key Terms & Mental Models](./key-terms) - learn the vocabulary used across the docs.
- [TypeScript SDK](../sdk/typescript/getting-started) - read the full SDK guide.
10 changes: 9 additions & 1 deletion docs/nitrolite/build/getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ You need:

See [Prerequisites & Environment](./prerequisites) for the full setup checklist.

:::tip Public Nitronode endpoints
Use `wss://nitronode-sandbox.yellow.org/v1/ws` while testing on sandbox assets. Use `wss://nitronode.yellow.org/v1/ws` only when you intentionally connect to production/mainnet assets.
:::

:::info Builder Toolkit
Need a consolidated list of live examples, source repositories, Playground, faucet, MCP, and SDK entry points? Open the [Builder Toolkit](/nitrolite/builder-toolkit).
:::

## Step 1: Install and configure

Clone the docs repo, enter the tested example package, and install its isolated dependencies:
Expand All @@ -39,7 +47,7 @@ Edit `.env`:
```bash title=".env"
USER_PRIVATE_KEY=0x...
APP_PRIVATE_KEY=0x...
NITRONODE_WS_URL=<sandbox-url-coming-soon>
NITRONODE_WS_URL=wss://nitronode-sandbox.yellow.org/v1/ws
RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
CHAIN_ID=11155111
ASSET=yellow
Expand Down
8 changes: 5 additions & 3 deletions docs/nitrolite/build/sdk/cerebro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ go build -o cerebro ./cerebro
Start Cerebro with an explicit Nitronode endpoint:

```bash
cerebro wss://nitronode.example.com/v1/ws
cerebro wss://nitronode-sandbox.yellow.org/v1/ws
```

If you built from source:

```bash
./cerebro wss://nitronode.example.com/v1/ws
./cerebro wss://nitronode-sandbox.yellow.org/v1/ws
```

When no endpoint is passed, Cerebro uses the stored endpoint if one exists. Otherwise it connects to:
Expand Down Expand Up @@ -87,9 +87,11 @@ cerebro> config
Persist a different Nitronode endpoint:

```text
cerebro> config node set-ws-url wss://nitronode.example.com/v1/ws
cerebro> config node set-ws-url wss://nitronode.yellow.org/v1/ws
```

Use `wss://nitronode.yellow.org/v1/ws` only when you intentionally connect Cerebro to production/mainnet assets.

## Quickstart Flow

This example uses Polygon Amoy chain ID `80002` and an `usdc` asset symbol. Use the chain IDs and asset symbols returned by your connected Nitronode.
Expand Down
9 changes: 6 additions & 3 deletions docs/nitrolite/build/sdk/go/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ go get github.com/layer-3/nitrolite/sdk/go

## Quick Start

:::info Sandbox URL - coming soon
Use your Nitronode WebSocket URL in `sdk.NewClient()`. The public sandbox URL is intentionally shown as `<sandbox-url-coming-soon>` until the canonical host is pinned.
:::info Public Nitronode endpoints
Use the sandbox endpoint in `sdk.NewClient()` while testing. Switch to production only when your service intentionally connects to mainnet assets.

- Sandbox: `wss://nitronode-sandbox.yellow.org/v1/ws`
- Production/mainnet: `wss://nitronode.yellow.org/v1/ws`
:::

```go
Expand Down Expand Up @@ -61,7 +64,7 @@ func main() {
}

client, err := sdk.NewClient(
"<sandbox-url-coming-soon>",
"wss://nitronode-sandbox.yellow.org/v1/ws",
stateSigner,
txSigner,
sdk.WithBlockchainRPC(chainID, "https://ethereum-sepolia-rpc.example"),
Expand Down
11 changes: 7 additions & 4 deletions docs/nitrolite/build/sdk/multi-party-app-sessions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ You need two disposable wallets, a Nitronode WebSocket URL, a chain RPC URL, and
```bash
USER_1_PRIVATE_KEY=0x...
USER_2_PRIVATE_KEY=0x...
NITRONODE_WS_URL=<sandbox-url-coming-soon>
NITRONODE_WS_URL=wss://nitronode-sandbox.yellow.org/v1/ws
RPC_URL=https://polygon-amoy.g.alchemy.com/v2/YOUR_KEY
CHAIN_ID=80002
ASSET=usdc
```

:::info Sandbox URL - coming soon
Use your Nitronode WebSocket URL for `NITRONODE_WS_URL`. The public sandbox URL is intentionally shown as `<sandbox-url-coming-soon>` until the canonical host is pinned.
:::info Public Nitronode endpoints
Use the sandbox endpoint for disposable wallets and test assets. Use production/mainnet only when you intentionally connect to live assets.

- Sandbox: `wss://nitronode-sandbox.yellow.org/v1/ws`
- Production/mainnet: `wss://nitronode.yellow.org/v1/ws`
:::

## Step 1: Connect both participants
Expand All @@ -60,7 +63,7 @@ import {
} from '@yellow-org/sdk';
import Decimal from 'decimal.js';

const wsURL = process.env.NITRONODE_WS_URL ?? '<sandbox-url-coming-soon>';
const wsURL = process.env.NITRONODE_WS_URL ?? 'wss://nitronode-sandbox.yellow.org/v1/ws';
const chainId = BigInt(process.env.CHAIN_ID ?? '80002');
const asset = process.env.ASSET ?? 'usdc';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {
} from '@yellow-org/sdk-compat';

const client = await NitroliteClient.create({
wsURL: '<sandbox-url-coming-soon>',
wsURL: 'wss://nitronode-sandbox.yellow.org/v1/ws',
walletClient,
chainId: 11155111,
blockchainRPCs: blockchainRPCsFromEnv(),
Expand Down Expand Up @@ -74,6 +74,8 @@ window.addEventListener('beforeunload', () => {
});
```

This example uses the sandbox Nitronode endpoint. Use `wss://nitronode.yellow.org/v1/ws` only when the migrated app is ready for production/mainnet assets.

## Intervals

Use `2000` to `5000` ms during active deposits, withdrawals, or app-session transitions. Use `5000` to `10000` ms for normal dashboards, and `15000` to `30000` ms for background views. Switch intervals as the user moves between active and passive flows:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ If an on-chain helper needs an RPC URL for a chain, pass `blockchainRPCs` when c

```typescript
const client = await NitroliteClient.create({
wsURL: '<sandbox-url-coming-soon>',
wsURL: 'wss://nitronode-sandbox.yellow.org/v1/ws',
walletClient,
chainId: 11155111,
blockchainRPCs: {
Expand All @@ -108,6 +108,8 @@ const client = await NitroliteClient.create({
});
```

This example uses the sandbox Nitronode endpoint. Use `wss://nitronode.yellow.org/v1/ws` only when migration code is ready for production/mainnet assets.

## Approval Helpers

Compat exposes allowance helpers for migration code that still thinks in raw token units:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const parsed = parseGetChannelsResponse(raw);
import { NitroliteClient, blockchainRPCsFromEnv } from '@yellow-org/sdk-compat';

const client = await NitroliteClient.create({
wsURL: '<sandbox-url-coming-soon>',
wsURL: 'wss://nitronode-sandbox.yellow.org/v1/ws',
walletClient,
chainId: 11155111,
blockchainRPCs: blockchainRPCsFromEnv(),
Expand All @@ -78,8 +78,8 @@ const client = await NitroliteClient.create({
const channels = await client.getChannels();
```

:::info Sandbox URL - coming soon
Use the same Nitronode URL placeholder pattern as the native v1 quickstart. Replace `<sandbox-url-coming-soon>` only when the canonical sandbox host is pinned.
:::info Public Nitronode endpoints
Use `wss://nitronode-sandbox.yellow.org/v1/ws` for migration tests with sandbox assets. Use `wss://nitronode.yellow.org/v1/ws` only when you intentionally connect migrated code to production/mainnet assets.
:::

## Migration Matrix
Expand Down
9 changes: 6 additions & 3 deletions docs/nitrolite/build/sdk/typescript-compat/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ npm install @yellow-org/sdk-compat
npm install @yellow-org/sdk viem
```

:::info Sandbox URL - coming soon
Use your Nitronode WebSocket URL in the `wsURL` field below. The public sandbox URL is intentionally shown as `<sandbox-url-coming-soon>` until the canonical host is pinned.
:::info Public Nitronode endpoints
Use the sandbox endpoint in the `wsURL` field below while testing a migration. Use production/mainnet only when you intentionally connect to live assets.

- Sandbox: `wss://nitronode-sandbox.yellow.org/v1/ws`
- Production/mainnet: `wss://nitronode.yellow.org/v1/ws`
:::

## Quick Start
Expand All @@ -63,7 +66,7 @@ Use your Nitronode WebSocket URL in the `wsURL` field below. The public sandbox
import { NitroliteClient, blockchainRPCsFromEnv } from '@yellow-org/sdk-compat';

const client = await NitroliteClient.create({
wsURL: '<sandbox-url-coming-soon>',
wsURL: 'wss://nitronode-sandbox.yellow.org/v1/ws',
walletClient, // viem WalletClient with account
chainId: 11155111, // Sepolia
blockchainRPCs: blockchainRPCsFromEnv(),
Expand Down
11 changes: 7 additions & 4 deletions docs/nitrolite/build/sdk/typescript/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ sidebar_position: 3

Configuration is passed as variadic options to `Client.create()`:

:::info Sandbox URL - coming soon
Use your Nitronode WebSocket URL for `wsURL`. The public sandbox URL is intentionally shown as `<sandbox-url-coming-soon>` until the canonical host is pinned.
:::info Public Nitronode endpoints
Use the sandbox endpoint for local development and test assets. Use production/mainnet only when your app is ready for live assets.

- Sandbox: `wss://nitronode-sandbox.yellow.org/v1/ws`
- Production/mainnet: `wss://nitronode.yellow.org/v1/ws`
:::

```typescript
Expand All @@ -24,7 +27,7 @@ import {
} from '@yellow-org/sdk';

const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner,
withBlockchainRPC(chainId, rpcURL), // Blockchain RPC (required for checkpoint)
Expand Down Expand Up @@ -70,7 +73,7 @@ import Decimal from 'decimal.js';
const { stateSigner, txSigner } = createSigners(process.env.PRIVATE_KEY as `0x${string}`);

const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner,
withBlockchainRPC(80002n, process.env.POLYGON_AMOY_RPC!),
Expand Down
16 changes: 8 additions & 8 deletions docs/nitrolite/build/sdk/typescript/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ sidebar_position: 4

# Examples

:::info Sandbox URL - coming soon
Use your Nitronode WebSocket URL in each `Client.create()` call below. The public sandbox URL is intentionally shown as `<sandbox-url-coming-soon>` until the canonical host is pinned.
:::info Public Nitronode endpoints
The examples below use the sandbox endpoint. Use `wss://nitronode.yellow.org/v1/ws` only when you intentionally connect to production/mainnet assets.
:::

## Basic Deposit and Transfer
Expand All @@ -20,7 +20,7 @@ async function basicExample() {
const { stateSigner, txSigner } = createSigners(process.env.PRIVATE_KEY as `0x${string}`);

const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner,
withBlockchainRPC(80002n, process.env.RPC_URL!)
Expand Down Expand Up @@ -66,7 +66,7 @@ async function multiChainExample() {
const { stateSigner, txSigner } = createSigners(process.env.PRIVATE_KEY as `0x${string}`);

const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner,
withBlockchainRPC(80002n, process.env.POLYGON_RPC!),
Expand Down Expand Up @@ -100,7 +100,7 @@ import { Client, createSigners } from '@yellow-org/sdk';
async function queryTransactions() {
const { stateSigner, txSigner } = createSigners(process.env.PRIVATE_KEY as `0x${string}`);
const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner
);
Expand Down Expand Up @@ -150,7 +150,7 @@ async function appSessionExample() {
);

const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner,
withBlockchainRPC(80002n, process.env.RPC_URL!)
Expand Down Expand Up @@ -294,7 +294,7 @@ async function connectWithWallet() {
const txSigner = new BrowserTransactionSigner(walletClient);

const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner,
withBlockchainRPC(11155111n, 'https://rpc.sepolia.io'),
Expand Down Expand Up @@ -451,7 +451,7 @@ async function monitorConnection() {
const { stateSigner, txSigner } = createSigners(process.env.PRIVATE_KEY as `0x${string}`);

const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner,
withErrorHandler((error) => {
Expand Down
9 changes: 6 additions & 3 deletions docs/nitrolite/build/sdk/typescript/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ pnpm add @yellow-org/sdk

## Quick Start

:::info Sandbox URL - coming soon
Use your Nitronode WebSocket URL in the `Client.create()` call below. The public sandbox URL is intentionally shown as `<sandbox-url-coming-soon>` until the canonical host is pinned.
:::info Public Nitronode endpoints
Use the sandbox endpoint in the `Client.create()` call below while testing. Switch to production only when your app intentionally connects to mainnet assets.

- Sandbox: `wss://nitronode-sandbox.yellow.org/v1/ws`
- Production/mainnet: `wss://nitronode.yellow.org/v1/ws`
:::

```typescript
Expand All @@ -47,7 +50,7 @@ async function main() {

// 2. Create unified client
const client = await Client.create(
'<sandbox-url-coming-soon>',
'wss://nitronode-sandbox.yellow.org/v1/ws',
stateSigner,
txSigner,
withBlockchainRPC(80002n, 'https://polygon-amoy.alchemy.com/v2/KEY')
Expand Down
1 change: 1 addition & 0 deletions docs/nitrolite/learn/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The v1 protocol uses ChannelHub, Nitronode, channel states, home ledgers, and ap
After completing the Learn section, continue to:

- **[Build](/nitrolite/build/getting-started/quickstart)**: Implement complete Yellow applications.
- **[Builder Toolkit](/nitrolite/builder-toolkit)**: Find a consolidated list of live examples, source repositories, Playground, faucet, MCP, and SDK entry points.
- **[Protocol](/nitrolite/protocol/introduction)**: Read the authoritative protocol specification.
- **[Yellow SDK MCP](/nitrolite/build/sdk/mcp)**: Connect Yellow SDK to your AI coding tool so you can ask guided questions while you learn and build.

Expand Down
Loading
Loading