KiiChain
  • Learn
    • What is KiiChain?
    • KiiChain
      • Vision of KiiChain
      • The Problems We Solve
      • Use Cases
      • Roadmap
      • Whitepaper
      • Business Model
    • Tokenomics
      • Intro Coin Details
      • Coin Unlocking Schedule
      • Utility
      • Evergreen Model
    • Getting Started
      • Get a Wallet
      • Download a Mobile Wallet
      • Set Up a Web Wallet
      • Connect Wallet to Explorer App
  • BUILD ON KIICHAIN
    • Developer Hub
    • Testnet Oro
    • Endpoints - Cosmos
      • EVM
        • VM
        • ERC20
        • FeeMarket
      • IBC
      • Kiichain
        • TokenFactory
      • Cosmwasm
      • Cosmos
        • Auth
        • Authz
        • Bank
        • Tendermint
        • Consensus
        • Distribution
        • Evidence
        • Feegrant
        • Gov
        • Slashing
        • Staking
        • Tx
        • Upgrade
    • Developer Tools
      • RWA Protocol
      • Rust SDK
      • JS/TS SDK
        • Kiijs-evm
        • Kiijs-proto
      • Deploy a smart contract
      • Deploy a dApp
      • Testnet faucet
    • Smart Contracts
    • Modules
      • TokenFactory
      • EVM
  • Validate the Network
    • Getting Started
      • What is a delegator?
      • What is a validator?
    • Run a Validator / Full Node
      • Getting started
      • Step-by-Step Guide
        • Becoming a Validator
        • Recovering Legacy Addresses
      • Maintaining a validator
      • Incentive
      • Technical requirements
      • Validator Security
    • Economics
      • Staking Requirements
      • Delegation / Staking
      • Rewards
      • Block Rewards Formula
      • APR
    • Delegator Information
      • Choosing a validator
      • Directives of delegators
      • Incentive to stake
      • Security considerations
      • Risks to consider
  • KII AMBASSADORS
    • What does it mean to be a KiiAmbassador?
    • Your Core Responsibilities
    • Participation Perks
    • Points System & Performance
    • How to lose the Role
    • Evaluation Process
  • KIIEX
    • Set Up KIIEX Account
      • Contact OTC Desk
    • Connect to KIIEX APIs
      • Introduction
        • New endpoints
        • Revised calls
        • Behavior Changes
        • Revised Calls 3.5.0
      • Background Information
        • Message Frame
        • Standard Response Objects and Common Error Codes
        • Modules
        • Users, Accounts, and Permissions
        • Products and Instruments
        • Quotes and Orders
        • Time– and Date-Stamp Formats
        • The Trading Day
      • Users
        • Activate2FA
        • AddUserAffiliateTag
        • Authenticate2FA
        • AuthenticateUser
        • CancelUserReport
        • GetAllUnredactedUserConfigsForUser
        • GetL2Snapshot
        • GetLevel1
        • GetUnredactedUserConfigByKey
        • GetUserAccountInfos
        • GetUserAccounts
        • GetUserAffiliateCount
        • GetUserAfilliateTag
        • GetUserConfig
        • GetUserDevices
        • GetUserReportTickets
        • GetUserReportWriterResultRecords
        • GetValidate2FARequiredEndpoints
        • LogOut
        • RegisterNewDevice
        • SubscribeAccountEvents
        • SubscribeBlockTrades
        • SuscribeLevel1
        • SubscribeLevel2
        • SubscribeTicker
        • SubscribeTrades
        • UnsuscribeBlockTrades
        • UnsubscribeLevel1
        • UnsubscribeLevel2
        • UnsubscribeTicket
        • UnsuscribeTrades
        • UpdateUserAffiliateTag
        • Validate2FA
      • Accounts
        • GetAccountInfo
        • GenerateTransactionActivityReport
        • GenerateTradeActivityReport
        • GenerateTreasuryActivityReport
        • GetAllAccountConfigs
        • GetAccountPositions
        • GetTreasuryProductsForAccount
        • ScheduleTradeActivityReport
      • Trades
        • GetAccountTrades
        • GetAccountTransactions
        • GetAllOpenTradeReports
        • GetOpenTradeReports
        • GetTickerHistory
        • GetTradesHistory
      • OMS Orders
        • CancelAllOrders
        • CancelOrder
        • CancelQuote
        • CancelReplaceOrder
        • CreateQuote
        • GetOMSFeeTiers
        • GetOpenOrders
        • GetOpenQuotes
        • GetOrderFee
        • GetOrderHistory
        • GetOrderHistoryByOrderId
        • GetOrdersHistory
        • GetOrderStatus
        • ModifyOrder
        • SendOrder
        • SubmitBlockTrade
        • UpdateQuote
      • Products
        • GetProduct
        • GetProducts
      • Instruments
        • GetInstrument
        • GetInstruments
      • Tickets
        • CreateDepositTicket
        • CancelWithdraw
        • CreateWithdrawTicket
        • Deposit withdraw template
        • GetAccountDepositTransactions
        • GetAccountWithdrawTransactions
        • GetAllDepositRequestInfoTemplates
        • GetDeposits
        • GetDepositInfo
        • GetDepositTicket
        • GetDepositRequestInfoTemplate
        • GetOMSWithdrawFees
        • GetStandardTemplateExample
        • GetTetherRPCWithdrawTemplateExample
        • GetWithdrawFee
        • GetWithdraws
        • GetWithdrawTemplate
        • GetWithdrawTemplateTypes
        • GetWithdrawTicket
        • GetWithdrawTickets
        • SubmitDepositTicketComment
        • SubmitWithdrawTicketComment
      • Misc
        • Ping
Powered by GitBook
LogoLogo
On this page
  • Important Links
  • KiiChain RWA SDK
Export as PDF
  1. BUILD ON KIICHAIN
  2. Developer Tools

Rust SDK

Rust SDK for the RWA Protocol on KiiChain

PreviousRWA ProtocolNextJS/TS SDK

Last updated 4 months ago

Note: This project is still under development so future changes will be made.

Important Links

KiiChain RWA SDK

The RWA (Real World Asset) SDK is a Rust library for interacting with tokenized real-world assets on Cosmos-based blockchains. It provides functionality for token operations, identity management, and compliance handling.

Features

  • Token transfers and balance checks

  • Identity registration and management

  • Compliance module integration

  • Blockchain interaction via RPC

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(())
}

This example demonstrates how to initialize the RwaClient, perform a token transfer, and check an account balance. Error handling and proper setup of the signing key are crucial for production use.

For more detailed information on each function and module, please refer to their respective documentation.

Github RWA Repo
Rust SDK Repo