Rust SDK
Rust SDK for the RWA Protocol on KiiChain
Important Links
KiiChain RWA SDK
Features
Usage Example
use rwa_sdk::RwaClient;
use cosmrs::crypto::secp256k1::SigningKey;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize the client
let client = RwaClient::new(
"http://rpc.example.com:26657",
"my-chain-id",
"cosmos1token...",
"cosmos1identity...",
"cosmos1compliance...",
"sei",
"gas_price"
)?;
// Perform a token transfer
let signer = SigningKey::from_slice(&[/* your private key */])?;
let transfer_result = client.transfer(TransferMessageRequest {
from: "cosmos1sender...".to_string(),
to: "cosmos1recipient...".to_string(),
amount: 100,
signer,
gas_limit
}).await?;
println!("Transfer hash: {}", transfer_result.hash);
// Check a balance
let balance = client.balance(TokenInfoRequest {
address: "cosmos1address...".to_string(),
}).await?;
println!("Balance: {}", balance.balance);
Ok(())
}Last updated