use candid::{Nat, Principal};
use num_bigint::BigUint;
use serde_bytes::ByteBuf;
pub use version::Version;
pub mod asset;
pub mod block;
pub mod package;
pub mod secret;
pub mod transaction;
pub mod vault;
mod version;
pub type PublicKey = ByteBuf;
pub type WalletRegisterId = BigUint;
pub type MarketId = BigUint;
pub type OrderId = BigUint;
pub type AssetId = BigUint;
pub type PackageId = BigUint;
pub type AssetAmount = BigUint;
pub type Nonce = BigUint;
pub type CanisterId = Principal;
pub type NodeProvider = Principal;
pub type BlockHeight = BigUint;
pub type MerkleRoot = [u8; 32];
pub type MerkleNode = [u8; 32];
pub type BlockHash = [u8; 32];
pub type TransactionHash = [u8; 32];
pub type VaultSeqId = u64;
pub type CandidWalletRegisterId = Nat;
pub type CandidMarketId = Nat;
pub type CandidOrderId = Nat;
pub type CandidPackageId = Nat;
pub type CandidAssetId = Nat;
pub type CandidAssetAmount = Nat;
pub type CandidNonce = Nat;
pub type CandidBlockHeight = Nat;
#[macro_export(local_inner_macros)]
macro_rules! impl_from_uint_for_enum {
($enum_type:ty, $($t:ty),*) => {
$(
impl From<$t> for $enum_type {
fn from(value: $t) -> Self {
<$enum_type>::from(BigUint::from(value))
}
}
)*
};
}