From 482dd1efe4485958610955a18d58d0e3cf8e3f47 Mon Sep 17 00:00:00 2001 From: mattkii <142337545+mattkii@users.noreply.github.com> Date: Fri, 7 Aug 2026 07:29:42 -0700 Subject: [PATCH 1/3] chore: add Kiichain mainnet and testnet links --- README.md | 37 ++++++++++++++++++++----------- examples/asset_tokenization.rs | 6 ++--- examples/compliance.rs | 22 +++++++++---------- examples/identity.rs | 40 +++++++++++++++++----------------- examples/token_transfer.rs | 18 +++++++-------- src/lib.rs | 24 ++++++++++---------- 6 files changed, 79 insertions(+), 68 deletions(-) diff --git a/README.md b/README.md index 83804ce..2e4e619 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,20 @@ ## 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. +real-world assets on Kiichain. It provides functionality for token operations, +identity management, and compliance handling. + +### Networks + +| Network | Chain ID | Cosmos RPC | Denom | +| ------- | -------- | ---------- | ----- | +| Mainnet | `kiichain_1783-1` | `https://rpc.kiivalidator.com` | `akii` | +| Testnet Oro | `oro_1336-1` | `https://rpc.uno.sentry.testnet.v3.kiivalidator.com` | `akii` | + +Bech32 prefix: `kii` + +- Mainnet configs: [KiiChain/mainnets](https://github.com/KiiChain/mainnets/tree/main/kiichain) +- Testnet configs: [KiiChain/testnets](https://github.com/KiiChain/testnets/tree/main/testnet_oro) ### Features @@ -19,23 +31,22 @@ use cosmrs::crypto::secp256k1::SigningKey; #[tokio::main] async fn main() -> Result<(), Box> { - // Initialize the client + // Mainnet — use testnet RPC / oro_1336-1 for Oro let client = RwaClient::new( - "http://rpc.example.com:26657", - "my-chain-id", - "cosmos1token...", - "cosmos1identity...", - "cosmos1compliance...", - "sei", + "https://rpc.kiivalidator.com", + "kiichain_1783-1", + "kii1token...", + "kii1identity...", + "kii1compliance...", + "akii", "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(), + from: "kii1sender...".to_string(), + to: "kii1recipient...".to_string(), amount: 100, signer, gas_limit @@ -44,7 +55,7 @@ async fn main() -> Result<(), Box> { // Check a balance let balance = client.balance(TokenInfoRequest { - address: "cosmos1address...".to_string(), + address: "kii1address...".to_string(), }).await?; println!("Balance: {}", balance.balance); diff --git a/examples/asset_tokenization.rs b/examples/asset_tokenization.rs index 7b514cc..6ff875f 100644 --- a/examples/asset_tokenization.rs +++ b/examples/asset_tokenization.rs @@ -114,7 +114,7 @@ impl AssetTokenization { // Set up country restriction module for geographic compliance let cr_module_request = ComplianceModuleRequest { from: self.issuer_address.clone(), - module_addr: "cosmos1cr...".to_string(), + module_addr: "kii1cr...".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 10, }; @@ -188,7 +188,7 @@ impl AssetTokenization { ) -> Result> { // Verify investor's compliance status let compliance_check = CheckUserForTokenComplianceRequest { - token_address: "cosmos1token...".to_string(), + token_address: "kii1token...".to_string(), from: investor_address.to_string(), }; @@ -232,7 +232,7 @@ impl AssetTokenization { // Verify current compliance status let compliance_check = CheckUserForTokenComplianceRequest { - token_address: "cosmos1token...".to_string(), + token_address: "kii1token...".to_string(), from: investor_address.to_string(), }; let is_compliant = self.client.check_token_compliance(compliance_check).await?; diff --git a/examples/compliance.rs b/examples/compliance.rs index 62cb2ba..0acba28 100644 --- a/examples/compliance.rs +++ b/examples/compliance.rs @@ -4,18 +4,18 @@ use erc3643sdk::{compliance::request::ComplianceModuleRequest, RwaClient}; #[tokio::main] async fn main() -> Result<(), Box> { let client = RwaClient::new( - "rpc_url", - "chain_id", - "token_address", - "identity_address", - "compliance_address", - "sei", + "https://rpc.kiivalidator.com", + "kiichain_1783-1", + "kii1token...", + "kii1identity...", + "kii1compliance...", + "akii", 10, )?; // Add a compliance module let add_module_request = ComplianceModuleRequest { - from: "cosmos1sender...".to_string(), + from: "kii1sender...".to_string(), module_addr: "kyc_module_addr...".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 5000, @@ -30,8 +30,8 @@ async fn main() -> Result<(), Box> { // Update a compliance module (set to active) let update_module_request = ComplianceModuleRequest { - from: "cosmos1sender...".to_string(), - module_addr: "cosmos1module...".to_string(), + from: "kii1sender...".to_string(), + module_addr: "kii1module...".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 5000, }; @@ -45,8 +45,8 @@ async fn main() -> Result<(), Box> { // Remove a compliance module let remove_module_request = ComplianceModuleRequest { - from: "cosmos1sender...".to_string(), - module_addr: "cosmos1module...".to_string(), + from: "kii1sender...".to_string(), + module_addr: "kii1module...".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 5000, }; diff --git a/examples/identity.rs b/examples/identity.rs index 362e307..68dc5f9 100644 --- a/examples/identity.rs +++ b/examples/identity.rs @@ -9,20 +9,20 @@ use erc3643sdk::RwaClient; #[tokio::main] async fn main() -> Result<(), Box> { - // Initialize the client + // Mainnet — use testnet RPC / oro_1336-1 for Oro let client = RwaClient::new( - "http://rpc.example.com:26657", - "my-chain-id", - "cosmos1token...", - "cosmos1identity...", - "cosmos1compliance...", - "sei", + "https://rpc.kiivalidator.com", + "kiichain_1783-1", + "kii1token...", + "kii1identity...", + "kii1compliance...", + "akii", 10, )?; // Add a new identity let add_identity_request = AddIdentityRequest { - from: "cosmos1sender...".to_string(), + from: "kii1sender...".to_string(), country: "US".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 5000, @@ -32,9 +32,9 @@ async fn main() -> Result<(), Box> { // Update an identity let update_identity_request = UpdateIdentityRequest { - from: "cosmos1sender...".to_string(), + from: "kii1sender...".to_string(), new_country: "CA".to_string(), - identity_owner: "cosmos1owner...".to_string(), + identity_owner: "kii1owner...".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 5000, }; @@ -46,14 +46,14 @@ async fn main() -> Result<(), Box> { // Add a claim to an identity let add_claim_request = AddClaimRequest { - from: "cosmos1issuer...".to_string(), + from: "kii1issuer...".to_string(), claim: Claim { topic: Uint128::new(1), - issuer: "cosmos1issuer...".to_string(), + issuer: "kii1issuer...".to_string(), data: Binary::from(b"claim data"), uri: "https://example.com/claim".to_string(), }, - identity_owner: "cosmos1owner...".to_string(), + identity_owner: "kii1owner...".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 5000, }; @@ -62,16 +62,16 @@ async fn main() -> Result<(), Box> { // Get validated claims for an identity let get_claims_request = GetValidatedClaimsRequest { - identity_owner: "cosmos1owner...".to_string(), + identity_owner: "kii1owner...".to_string(), }; let claims = client.get_validated_claims(get_claims_request).await?; println!("Validated claims: {:?}", claims); // Remove a claim from an identity let remove_claim_request = RemoveClaimRequest { - from: "cosmos1issuer...".to_string(), + from: "kii1issuer...".to_string(), claim_topic: Uint128::new(1), - identity_owner: "cosmos1owner...".to_string(), + identity_owner: "kii1owner...".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 5000, }; @@ -83,8 +83,8 @@ async fn main() -> Result<(), Box> { // Remove an identity let remove_identity_request = RemoveIdentityRequest { - from: "cosmos1sender...".to_string(), - identity_owner: "cosmos1owner...".to_string(), + from: "kii1sender...".to_string(), + identity_owner: "kii1owner...".to_string(), signer: SigningKey::from_slice(&[/* your private key */])?, gas_limit: 5000, }; @@ -96,8 +96,8 @@ async fn main() -> Result<(), Box> { // Check token compliance for a user let compliance_request = CheckUserForTokenComplianceRequest { - token_address: "cosmos1token...".to_string(), - from: "cosmos1user...".to_string(), + token_address: "kii1token...".to_string(), + from: "kii1user...".to_string(), }; let is_compliant = client.check_token_compliance(compliance_request).await?; println!("Is user compliant: {}", is_compliant); diff --git a/examples/token_transfer.rs b/examples/token_transfer.rs index 8160581..5ad6a2e 100644 --- a/examples/token_transfer.rs +++ b/examples/token_transfer.rs @@ -7,12 +7,12 @@ use erc3643sdk::{ #[tokio::main] async fn main() -> Result<(), Box> { let client = RwaClient::new( - "rpc_url", - "chain_id", - "token_address", - "identity_address", - "compliance_address", - "sei", + "https://rpc.kiivalidator.com", + "kiichain_1783-1", + "kii1token...", + "kii1identity...", + "kii1compliance...", + "akii", 10, )?; @@ -20,8 +20,8 @@ async fn main() -> Result<(), Box> { // Perform a token transfer let transfer_request = TransferMessageRequest { - from: "cosmos1sender...".to_string(), - to: "cosmos1recipient...".to_string(), + from: "kii1sender...".to_string(), + to: "kii1recipient...".to_string(), amount: 100, signer: signer, gas_limit: 5000, @@ -31,7 +31,7 @@ async fn main() -> Result<(), Box> { // Check balance let balance_request = TokenInfoRequest { - address: "cosmos1sender...".to_string(), + address: "kii1sender...".to_string(), }; let balance = client.balance(balance_request).await?; println!("Balance: {}", balance.balance); diff --git a/src/lib.rs b/src/lib.rs index 740bdd7..f3bc295 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,8 @@ //! # 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. +//! real-world assets on Kiichain. It provides functionality for token operations, +//! identity management, and compliance handling. //! //! ## Features //! @@ -19,14 +19,14 @@ //! //! #[tokio::main] //! async fn main() -> Result<(), Box> { -//! // Initialize the client +//! // Mainnet — use testnet RPC / oro_1336-1 for Oro //! let client = RwaClient::new( -//! "http://rpc.example.com:26657", -//! "my-chain-id", -//! "cosmos1token...", -//! "cosmos1identity...", -//! "cosmos1compliance...", -//! "sei", +//! "https://rpc.kiivalidator.com", +//! "kiichain_1783-1", +//! "kii1token...", +//! "kii1identity...", +//! "kii1compliance...", +//! "akii", //! "gas_price" //! //! )?; @@ -34,8 +34,8 @@ //! // 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(), +//! from: "kii1sender...".to_string(), +//! to: "kii1recipient...".to_string(), //! amount: 100, //! signer, //! gas_limit @@ -44,7 +44,7 @@ //! //! // Check a balance //! let balance = client.balance(TokenInfoRequest { -//! address: "cosmos1address...".to_string(), +//! address: "kii1address...".to_string(), //! }).await?; //! println!("Balance: {}", balance.balance); //! From 0c199cee4aa983f91a4bc6c0c302e2749295c36f Mon Sep 17 00:00:00 2001 From: matteyu Date: Thu, 20 Aug 2026 07:10:28 -0700 Subject: [PATCH 2/3] fix: gas string --- README.md | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e4e619..b92f1c0 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ async fn main() -> Result<(), Box> { "kii1identity...", "kii1compliance...", "akii", - "gas_price" + 10 )?; // Perform a token transfer diff --git a/src/lib.rs b/src/lib.rs index f3bc295..342ac27 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,7 +27,7 @@ //! "kii1identity...", //! "kii1compliance...", //! "akii", -//! "gas_price" +//! 10 //! //! )?; //! From 69a380fe998e7e6856cd240862482310e087feec Mon Sep 17 00:00:00 2001 From: matteyu Date: Thu, 20 Aug 2026 07:15:33 -0700 Subject: [PATCH 3/3] chore: add comment on gas price value example --- README.md | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b92f1c0..c4a7e60 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ async fn main() -> Result<(), Box> { "kii1identity...", "kii1compliance...", "akii", - 10 + 10 // gas_price )?; // Perform a token transfer diff --git a/src/lib.rs b/src/lib.rs index 342ac27..94cd783 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,7 +27,7 @@ //! "kii1identity...", //! "kii1compliance...", //! "akii", -//! 10 +//! 10 // gas_price //! //! )?; //!