1 unstable release
new 0.1.0 | Mar 14, 2025 |
---|
#70 in Magic Beans
20KB
228 lines
Client utilities for Internet Computer canister interactions.
This module provides low-level utilities for making cross-canister calls (C2C) with support for different serialization formats and cycle payments.
Features
- Cross-canister calls with custom serialization/deserialization
- Support for cycle payments in C2C calls
- Raw C2C call functionality with detailed error handling
- Integration with tracing for debugging and monitoring
Examples
use bity_dfinity_library::canister_client::make_c2c_call;
use candid::{encode_one, decode_one};
async fn transfer(
canister_id: Principal,
args: &TransferArgs,
) -> CallResult<TransferResponse> {
make_c2c_call(
canister_id,
"transfer",
args,
encode_one,
|r| decode_one(r),
)
.await
}
Dependencies
~1.6–9.5MB
~81K SLoC