ex3_ic_ledger_client/
lib.rs1use async_trait::async_trait;
2use ex3_canister_client::CanisterResult;
3
4use ic_ledger_types::{BlockIndex, QueryBlocksResponse, TransferArgs, TransferResult};
5
6#[cfg(feature = "mock")]
7pub mod mock;
8
9#[cfg(feature = "canister")]
10pub mod canister_impl;
11#[cfg(feature = "agent")]
12pub mod client_impl;
13
14#[async_trait]
17pub trait ICLedger: Send + Sync {
18 async fn transfer(&self, args: TransferArgs) -> CanisterResult<TransferResult>;
19 async fn query_blocks(
20 &self,
21 start: BlockIndex,
22 count: u64,
23 ) -> CanisterResult<QueryBlocksResponse>;
24}