SDK

Type-safe clients for every stack.

Three first-party SDKs covering 95% of integrations. All open source, semantically versioned, and generated directly from on-chain ABIs.

Install


            

Works in browser, Node 20+, Bun, and Deno. Ships as ESM with `.d.ts` declarations.

MSRV 1.78. Async via Tokio. `serde`-compatible types throughout.

Python 3.11+. Sync and async APIs. Native pandas DataFrames for analytics queries.

Quickstart

import { RivrClient } from "@rivr/sdk";

const rivr = new RivrClient({
  rpc: process.env.RPC_URL,
});

const apr = await rivr.staking.currentApr();
console.log(`APR: ${apr}%`);
use rivr::Client;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let rivr = Client::new(&std::env::var("RPC_URL")?)?;
    let apr = rivr.staking().current_apr().await?;
    println!("APR: {apr}%");
    Ok(())
}
from rivr import RivrClient

rivr = RivrClient(rpc=os.environ["RPC_URL"])

apr = rivr.staking.current_apr()
print(f"APR: {apr}%")

Modules

staking

Stake & redeem

Deposit RIVR, mint stRIVR, and queue redemptions. Includes APR queries, validator routing, and slashing checks.

vaults

Yield strategies

Discover and interact with Nimbus vaults. Position queries, deposit and withdraw flows, performance history.

bridge

Cross-chain

Send stRIVR or any wrapped asset across the six supported chains. Tracking, retries, and refund flows built in.

governance

DAO actions

Read proposals, cast or delegate votes, and subscribe to live tallies.

indexer

Historical data

Query indexed events, yield history, and position-level PnL. Backed by a public GraphQL endpoint.

webhooks

Event streams

Subscribe to position changes, redemption completion, and proposal state transitions with signed webhooks.

Current versions

@rivr/sdk 3.4.1 · 4 days ago
rivr (crates.io) 2.7.0 · 11 days ago
rivr (PyPI) 1.9.2 · 2 days ago