Documentation Index
Fetch the complete documentation index at: https://docs.ryvo.network/llms.txt
Use this file to discover all available pages before exploring further.
@ryvonetwork/sdk is the official TypeScript SDK for the Ryvo Protocol. It wraps the live Anchor program into a small set of typed helpers so you can integrate the protocol without hand-rolling IDLs, PDAs, or message encoders.
The SDK is developed in the open at Ryvonetwork/ryvo-protocol-sdk.
What is inside
The package exposes five composable layers:| Layer | What it gives you |
|---|---|
RyvoClient | A thin, typed wrapper around the Anchor program with one method per instruction. |
| PDA helpers | Deterministic derivations for every account the program uses (global-config, token-registry, participant, vault-token-account, channel-v2). |
| Message builders | ryvo-cmt-v5 commitment and clearing-round message encoders, plus signing helpers. |
| Account helpers | Convenience readers for participant token balances and for computing the next commitment amount from a channel. |
| Constants & IDL | RYVO_PROTOCOL_PROGRAM_ID, RYVO_CHAIN_IDS, seed strings, and the generated Anchor IDL. |
@coral-xyz/anchor, @solana/web3.js, and @noble/curves, all standard in the Solana TypeScript ecosystem. It has no hidden RPC behavior: every call you make goes through the AnchorProvider you construct it with.
Install
- Node.js
>= 18 - An Anchor-compatible
AnchorProvider(browser wallet adapter, backend keypair, test ledger, etc.)
"type": "module"). In CommonJS codebases, use a dynamic import() or switch to ESM.
Quick start
RyvoClient uses the live program ID baked into the IDL (3UyUFeNsUYPpM6hMRf7H8wg3MKEXQ82rqnsXhZrUwgSD on devnet). To target a different deployment, pass a programId override:
Sign a commitment and settle
The following snippet is the full direct-settlement flow, compressed. See Recipes for the expanded version with participant setup, deposits, and channel creation.- The commitment is signed off-chain by the payer. The payee is the one who submits it on-chain.
createEd25519Instructionmust be added to the same transaction assettleIndividual; Ryvo verifies it through theinstructionssysvar.
Versioning
The SDK is on the0.2.x line while the protocol surface stabilises. Breaking changes are signalled in the npm changelog and tracked against the program’s IDL. The package ships the generated IDL and TypeScript program type, so upgrading the SDK is always aligned with a protocol upgrade.
Agentic tooling
If you are building agent workflows, pair the SDK with the agentic toolchain:- protocol CLI for state inspection and unsigned action prep
- protocol MCP for tool-calling integrations
- gateway CLI and MCP for route discovery and payment flows
- reusable skills for Codex-style agent workflows
Where to go next
RyvoClient
Every instruction the SDK can build, initialize, deposit, lock, settle, withdraw.
PDAs & constants
Derive every account the program uses, deterministically and off-chain.
Messages
Build
ryvo-cmt-v5 and cooperative-round messages.Recipes
End-to-end flows: register, fund, sign, settle, withdraw.
Agentic tools
Protocol CLI, MCP, skills, and LLM text built on the SDK.
