MCPcopy Index your code
hub / github.com/0xPlaygrounds/rig-onchain-kit

github.com/0xPlaygrounds/rig-onchain-kit @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
341 symbols 760 edges 66 files 10 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Rig Onchain Kit

A rig companion crate for building AI-powered applications that interact natively with blockchain networks built in partnership with listen. Combines LLM capabilities with secure blockchain operations to create intelligent agents capable of executing complex on-chain interactions across Solana and EVM networks.

Features

  • Dual-chain Support - Native support for Solana and EVM ecosystems
  • Secure by Design - Thread-local signer isolation and Privy-based authentication
  • Real-time Streaming - SSE-enabled HTTP service for concurrent user sessions
  • Extensible Tool System - Combine prebuilt DeFi operations with custom logic
  • Wallet Agnostic - Supports local key management and Privy-embedded wallets

Quick Start

# Add to your project
cargo add rig-onchain-kit --features full

# For custom tools
cargo add rig-tool-macro

Basic usage:

use rig_onchain_kit::agent::create_solana_agent;
use rig_onchain_kit::signer::SignerContext;
use rig_onchain_kit::signer::solana::LocalSolanaSigner;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let private_key = std::env::var("SOLANA_PRIVATE_KEY")?;
    let signer = LocalSolanaSigner::new(private_key);

    SignerContext::with_signer(Arc::new(signer), async {
        let agent = create_solana_agent();
        let response = agent.prompt("what is my public key?")?);
        println!("{}", response);
    });

    Ok(())
}

Documentation

Read the full documentation to learn more

License

MIT


build with <3 by listen

Extension points exported contracts — how you extend this code

TransactionSigner (Interface)
(no doc) [3 implementers]
src/signer/mod.rs
KVStore (Interface)
(no doc) [1 implementers]
src/wallet_manager/kv_store.rs

Core symbols most depended-on inside this repo

get
called by 24
src/cross_chain/lifi/client.rs
pubkey
called by 23
src/signer/privy.rs
make_provider
called by 14
src/evm/util.rs
wrap_unsafe
called by 13
src/common.rs
parse
called by 12
src/solana/pump.rs
address
called by 11
src/signer/evm.rs
get_blockhash
called by 10
src/solana/blockhash.rs
env
called by 9
src/solana/util.rs

Shape

Function 174
Class 93
Method 65
Enum 7
Interface 2

Languages

Rust100%

Modules by API surface

src/solana/deploy_token.rs29 symbols
src/solana/pump.rs27 symbols
src/solana/util.rs15 symbols
src/cross_chain/lifi/quote.rs15 symbols
src/cross_chain/lifi/mod.rs15 symbols
src/wallet_manager/types.rs14 symbols
src/solana/jup.rs13 symbols
src/wallet_manager/mod.rs12 symbols
src/solana/tools.rs12 symbols
src/signer/mod.rs12 symbols
src/dexscreener/mod.rs10 symbols
src/signer/privy.rs9 symbols

For agents

$ claude mcp add rig-onchain-kit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact