junobuild_shared/mgmt/
types.rspub mod cmc {
use candid::{CandidType, Principal};
use ic_cdk::api::management_canister::main::{CanisterId, CanisterSettings};
use ic_ledger_types::BlockIndex;
use serde::Deserialize;
pub type Cycles = u128;
#[derive(CandidType, Deserialize)]
pub enum NotifyError {
Refunded {
reason: String,
block_index: Option<BlockIndex>,
},
InvalidTransaction(String),
TransactionTooOld(BlockIndex),
Processing,
Other {
error_code: u64,
error_message: String,
},
}
#[derive(CandidType, Deserialize)]
pub struct TopUpCanisterArgs {
pub block_index: BlockIndex,
pub canister_id: Principal,
}
#[derive(CandidType, Deserialize)]
pub enum CreateCanisterError {
Refunded {
refund_amount: u128,
create_error: String,
},
}
pub type CreateCanisterResult = Result<CanisterId, CreateCanisterError>;
#[derive(CandidType, Deserialize)]
pub struct SubnetFilter {
pub subnet_type: Option<String>,
}
pub type SubnetId = Principal;
#[derive(CandidType, Deserialize)]
pub enum SubnetSelection {
Filter(SubnetFilter),
Subnet { subnet: SubnetId },
}
#[derive(CandidType, Deserialize)]
pub struct CreateCanister {
#[deprecated(note = "use subnet_selection instead")]
pub subnet_type: Option<String>,
pub subnet_selection: Option<SubnetSelection>,
pub settings: Option<CanisterSettings>,
}
}
pub mod ic {
use crate::types::core::Blob;
pub struct WasmArg {
pub wasm: Blob,
pub install_arg: Vec<u8>,
}
}