Crates.io | cc_transaction |
lib.rs | cc_transaction |
version | 0.10.0 |
source | src |
created_at | 2024-11-11 08:27:38.37424 |
updated_at | 2024-11-19 15:32:53.284751 |
description | A library for handling cryptocurrency transactions on the Centichain network |
homepage | |
repository | https://github.com/mgharebaghi/cc_transaction |
max_upload_size | |
id | 1443601 |
size | 14,531 |
A Rust library for handling cryptocurrency transactions on the Centichain network. This library provides comprehensive functionality for creating, signing, and sending transactions, managing UTXOs (Unspent Transaction Outputs), and handling wallet operations.
use centichain_transactions::Transaction;
async fn send_money() -> Result<String, String> {
let wallet = "your_wallet_public_key";
let private_key = "your_private_key";
let recipient = "recipient_wallet_address";
let amount = "100.50"; // Amount in decimal format
let result = Transaction::make_and_send(
wallet.to_string(),
private_key.to_string(),
recipient.to_string(),
amount.to_string()
).await?;
Ok(result)
}
Add this to your Cargo.toml
:
[dependencies]
centichain-transactions = "0.9.0"