junobuild_shared/ledger/
types.rs

1pub mod icp {
2    use ic_ledger_types::{Block, BlockIndex};
3
4    pub type BlockIndexed = (BlockIndex, Block);
5    pub type Blocks = Vec<BlockIndexed>;
6}
7
8pub mod icrc {
9    use icrc_ledger_types::icrc1::transfer::{BlockIndex, TransferError};
10    use icrc_ledger_types::icrc2::transfer_from::TransferFromError;
11
12    pub type IcrcTransferResult = Result<BlockIndex, TransferError>;
13    pub type IcrcTransferFromResult = Result<BlockIndex, TransferFromError>;
14}
15
16pub mod cycles {
17    use candid::{CandidType, Deserialize};
18    use serde::Serialize;
19
20    #[derive(CandidType, Serialize, Deserialize, Clone)]
21    pub struct CyclesTokens {
22        pub e12s: u64,
23    }
24}