common library
Common functions and classes.
Classes
- IcpTokens
- Icrc1Account
- Icrc1Ledger
- Icrc1Ledgers
- SYSTEM_CANISTERS
- Common NNS canisters.
- Tokens
Enums
Constants
Functions
-
check_canister_status(
Caller caller, Principal canister_id) → Future< Map> -
Returns a status map for the convenience using the
canister_status
method on the management canister. -
check_icp_balance(
String icp_id, {CallType? calltype}) → Future< IcpTokens> -
check_icrc1_balance(
{required Principal ledger_canister_id, required Icrc1Account account, required CallType calltype}) → Future< BigInt> -
create_canister(
Caller caller, IcpTokens icp_tokens, {Uint8List? from_subaccount_bytes, Nat64? block_height, String? subnet_type}) → Future< Principal> - Creates a canister using the NNS ledger and the cycles-minting-canister.
-
icp_id(
Principal principal, {List< int> ? subaccount_bytes}) → String - This function computes the textual ICP-account-identifier of a Principal account owner and an optional 32-bytes subaccount.
-
provisional_create_canister_with_cycles(
{required Caller caller, BigInt? cycles, Record? canister_settings, Principal? specified_id}) → Future< Principal> - Create a canister in the local environment.
-
provisional_top_up_canister(
Principal canister_id, BigInt cycles) → Future< void> - Top up the cycles of a canister in the local environment.
-
put_code_on_the_canister(
Caller caller, Principal canister_id, Uint8List wasm_module, CanisterInstallMode mode, [Uint8List? canister_install_arg]) → Future< void> -
Installs the
wasm_module
onto thecanister_id
using the management canister'sinstall_code
method. WARNING: This function does not stop or start the canister. If your canister needs to be stopped before upgrading, make sure to call the management canister'sstop_canister
method before calling this function. -
top_up_canister(
Caller caller, IcpTokens icp_tokens, Principal canister_id, {Uint8List? from_subaccount_bytes, Nat64? block_height}) → Future< Nat> - Top-up the cycles on a canister with some ICP using the NNS ledger and the cycles-minting-canister.
-
transfer_icp(
Caller caller, String fortheicpid, IcpTokens mount, {IcpTokens? fee, Nat64? memo, List< int> ? subaccount_bytes}) → Future<Variant> -
Returns the Variant response of this call - the
Result<Ok, Err>
variant. Check the ICP ledger's candid service file for the specific structure of this variant response to this call.