Registry / networking / ckb-sdk

ckb-sdk

JSON →
library5.1.0rscratesunverified

Rust SDK for CKB

# Cargo.toml [dependencies] ckb-sdk = "5.1.0"
INSTALL
IMPORT
SIG · CKB-SDK
C
ckb-sdk
networkingrustv5.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CkbRpcClient
✓ use ckb_sdk::CkbRpcClient;

Connects to a CKB node and fetches the tip block number.

use ckb_sdk::CkbRpcClient; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let client = CkbRpcClient::new("http://localhost:8114")?; let block_number = client.get_tip_block_number().await?; println!("Tip block number: {}", block_number); Ok(()) }
Debug
Known issues
gotchaRequires a running CKB node and async runtime (tokio).
fix
Ensure a CKB node is running and add `tokio` as a dependency.
affects: >=5.0.0
Upgrade
Version history
5.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
28
Amazon
1
OpenAI (training)
1
Resources
ckb-sdk — cargo add ckb-sdk · libregistry