@ryvonetwork/sdk helpers. If you want the low-level protocol walkthrough, start there.
All examples target the live devnet deployment (program
3UyUFeNsUYPpM6hMRf7H8wg3MKEXQ82rqnsXhZrUwgSD, chain ID 1). Replace the programId and RYVO_CHAIN_IDS.* value for other environments.Prerequisites
1. Register two participants
Register both sides of the payment relationship. Each owner pays a one-time registration fee defined inGlobalConfig.
2. Deposit into the vault
The payer moves tokens from their own SPL account into the protocol vault.3. Open a channel
Channels are one-way and per-token. One channel per(payer, payee, token) tuple.
4. Direct settlement of one commitment
Alice signs a new cumulative total off-chain; Bob submits it.5. Bundle settlement
Bob settles multiple commitments at once, typically many signed messages from Alice, or a mix of payers who have open channels with Bob.count must match the number of entries in the pre-instruction.
6. Clearing round (multi-party channel advancement)
Clearing rounds compress many channel settlements between N participants into a single transaction that every participant signs.payeeRef is a 0-based index into the participant list in the order the round is signed. See Settlement → Clearing rounds for the full protocol behaviour.
7. Withdraw
Requests and executes the timelocked withdrawal flow. Fees are routed tofeeRecipientTokenAccount.
8. Authorized signer delegation
If Alice wants a service key to sign commitments on her behalf (without giving it custody of funds), pass the delegate when creating the channel:9. Inbound channel policy
Payees can gate who is allowed to open channels to them:ConsentRequired, createChannel now requires Bob’s signature as well.
Where to go next
Messages
Full details on the message layout and each Ed25519 helper.
Instructions reference
Every on-chain instruction, its accounts, and its semantics.
Settlement modes
When to pick direct, bundle, or clearing-round settlement.
Errors
The full protocol error code table.
