Skip to content

CmcDid

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:304

change_subnet_type_assignment: ActorMethod<[ChangeSubnetTypeAssignmentArgs], undefined>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:305

create_canister: ActorMethod<[CreateCanisterArg], CreateCanisterResult>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:312

Creates a canister using the cycles attached to the function call.

get_build_metadata: ActorMethod<[], string>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:313

get_default_subnets: ActorMethod<[], Principal[]>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:314

get_icp_xdr_conversion_rate: ActorMethod<[], IcpXdrConversionRateResponse>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:318

Returns the ICP/XDR conversion rate.

get_principals_authorized_to_create_canisters_to_subnets
Section titled “get_principals_authorized_to_create_canisters_to_subnets”

get_principals_authorized_to_create_canisters_to_subnets: ActorMethod<[], PrincipalsAuthorizedToCreateCanistersToSubnetsResponse>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:323

Returns the mapping from principals to subnets in which they are authorized to create canisters.

get_subnet_types_to_subnets: ActorMethod<[], SubnetTypesToSubnetsResponse>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:330

Returns the current mapping of subnet types to subnets.

notify_create_canister: ActorMethod<[NotifyCreateCanisterArg], NotifyCreateCanisterResult>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:334

Prompts the cycles minting canister to process a payment for canister creation.

notify_mint_cycles: ActorMethod<[NotifyMintCyclesArg], NotifyMintCyclesResult>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:341

Mints cycles and deposits them to the cycles ledger

notify_top_up: ActorMethod<[NotifyTopUpArg], NotifyTopUpResult>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:349

Prompts the cycles minting canister to process a payment by converting ICP into cycles and sending the cycles the specified canister.

set_authorized_subnetwork_list: ActorMethod<[SetAuthorizedSubnetworkListArgs], undefined>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:353

Below are methods that can only be called by other NNS canisters.

update_subnet_type: ActorMethod<[UpdateSubnetTypeArgs], undefined>

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:357


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:15

compute_allocation: [] | [bigint]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:26

controllers: [] | [Principal[]]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:19

environment_variables: [] | [environment_variable[]]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:18

freezing_threshold: [] | [bigint]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:16

log_memory_limit: [] | [bigint]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:22

log_visibility: [] | [log_visibility]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:21

memory_allocation: [] | [bigint]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:25

reserved_cycles_limit: [] | [bigint]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:20

snapshot_visibility: [] | [snapshot_visibility]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:23

wasm_memory_limit: [] | [bigint]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:24

wasm_memory_threshold: [] | [bigint]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:17


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:34

The argument of the [create_canister] method.

settings: [] | [CanisterSettings]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:43

Optional canister settings that, if set, are applied to the newly created canister. If not specified, the caller is the controller of the canister and the other settings are set to default values.

subnet_selection: [] | [SubnetSelection]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:38

Optional instructions to select on which subnet the new canister will be created on.

subnet_type: [] | [string]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:49

An optional subnet type that, if set, determines what type of subnet the new canister will be created on. Deprecated. Use subnet_selection instead.


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:76

cycles_ledger_canister_id: [] | [Principal]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:78

exchange_rate_canister: [] | [ExchangeRateCanister]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:77

governance_canister_id: [] | [Principal]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:80

last_purged_notification: [] | [bigint]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:79

ledger_canister_id: [] | [Principal]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:82

minting_account_id: [] | [string]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:81


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:292

name: string

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:294

value: string

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:293


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:97

timestamp_seconds: bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:107

The time for which the market data was queried, expressed in UNIX epoch time in seconds.

xdr_permyriad_per_icp: bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:102

The number of 10,000ths of IMF SDR (currency code XDR) that corresponds to 1 ICP. This value reflects the current market price of one ICP token.


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:109

certificate: Uint8Array

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:114

System certificate as specified in https://internetcomputer.org/docs/interface-spec/index.html#certification-encoding

data: IcpXdrConversionRate

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:118

The latest ICP/XDR conversion rate.

hash_tree: Uint8Array

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:131

CBOR-serialized hash tree as specified in https://internetcomputer.org/docs/interface-spec/index.html#certification-encoding The hash tree is used for certification and hash the following structure:

*
|
+-- ICP_XDR_CONVERSION_RATE -- [ Candid encoded IcpXdrConversionRate ]
|
`-- AVERAGE_ICP_XDR_CONVERSION_RATE -- [ Candid encoded IcpXdrConversionRate ]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:137

The argument of the [notify_create_canister] method.

block_index: bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:145

Index of the block on the ICP ledger that contains the payment.

controller: Principal

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:141

The controller of canister to create.

settings: [] | [CanisterSettings]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:155

Optional canister settings that, if set, are applied to the newly created canister. If not specified, the caller is the controller of the canister and the other settings are set to default values.

subnet_selection: [] | [SubnetSelection]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:150

Optional instructions to select on which subnet the new canister will be created on. vec may contain no more than one element.

subnet_type: [] | [string]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:161

An optional subnet type that, if set, determines what type of subnet the new canister will be created on. Deprecated. Use subnet_selection instead.


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:217

block_index: bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:218

deposit_memo: Memo

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:219

to_subaccount: Subaccount

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:220


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:225

balance: bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:229

New balance of the cycles ledger account

block_index: bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:233

Cycles ledger block index of deposit

minted: bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:237

Amount of cycles that were minted and deposited to the cycles ledger


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:242

The argument of the [notify_top_up] method.

block_index: bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:246

Index of the block on the ICP ledger that contains the payment.

canister_id: Principal

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:250

The canister to top up.


PrincipalsAuthorizedToCreateCanistersToSubnetsResponse

Section titled “PrincipalsAuthorizedToCreateCanistersToSubnetsResponse”

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:260

data: [Principal, Principal[]][]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:261


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:263

subnets: Principal[]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:265

who: [] | [Principal]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:264


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:268

subnet_type: [] | [string]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:269


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:271

subnet_type: string

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:273

subnets: Principal[]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:272


Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:288

data: [string, Principal[]][]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:289

AccountIdentifier = string

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:13


BlockIndex = bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:14


ChangeSubnetTypeAssignmentArgs = { Add: SubnetListWithType; } | { Remove: SubnetListWithType; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:28


CreateCanisterError = object

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:55

Canister creation failed and the cycles attached to the call were returned to the calling canister. A small fee may be charged.

Refunded: object

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:56

create_error: string

The reason why creating a canister failed.

refund_amount: bigint

The amount of cycles returned to the calling canister


CreateCanisterResult = { Ok: Principal; } | { Err: CreateCanisterError; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:67

{ Ok: Principal; }

Ok: Principal

The principal of the newly created canister.

{ Err: CreateCanisterError; }

Err: CreateCanisterError


Cycles = bigint

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:75


ExchangeRateCanister = { Set: Principal; } | { Unset: null; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:84

{ Set: Principal; }

Set: Principal

/ Enables the exchange rate canister with the given canister ID.

{ Unset: null; }

Unset: null

/ Disable the exchange rate canister.


log_visibility = { controllers: null; } | { public: null; } | { allowed_viewers: Principal[]; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:296


Memo = [] | [Uint8Array]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:133


NotifyCreateCanisterResult = { Ok: Principal; } | { Err: NotifyError; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:163

{ Ok: Principal; }

Ok: Principal

The principal of the newly created canister.

{ Err: NotifyError; }

Err: NotifyError


NotifyError = { Refunded: { block_index: [] | [BlockIndex]; reason: string; }; } | { InvalidTransaction: string; } | { Other: { error_code: bigint; error_message: string; }; } | { Processing: null; } | { TransactionTooOld: BlockIndex; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:171

{ Refunded: { block_index: [] | [BlockIndex]; reason: string; }; }

Refunded: object

The payment processing failed and the payment was returned the caller. This is a non-retriable error.

block_index: [] | [BlockIndex]

The index of the block containing the refund.

reason: string

The reason for the refund.

{ InvalidTransaction: string; }

InvalidTransaction: string

The transaction does not satisfy the cycle minting canister payment protocol. The text contains the description of the problem. This is a non-retriable error.

{ Other: { error_code: bigint; error_message: string; }; }

Other: object

Other error.

error_code: bigint

error_message: string

{ Processing: null; }

Processing: null

The same payment is already being processed by a concurrent request. This is a retriable error.

{ TransactionTooOld: BlockIndex; }

TransactionTooOld: BlockIndex

The payment was too old to be processed. The value of the variant is the oldest block index that can still be processed. This a non-retriable error.


NotifyMintCyclesResult = { Ok: NotifyMintCyclesSuccess; } | { Err: NotifyError; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:222


NotifyTopUpResult = { Ok: Cycles; } | { Err: NotifyError; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:252

{ Ok: Cycles; }

Ok: Cycles

The amount of cycles sent to the specified canister.

{ Err: NotifyError; }

Err: NotifyError


snapshot_visibility = { controllers: null; } | { public: null; } | { allowed_viewers: Principal[]; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:300


Subaccount = [] | [Uint8Array]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:267


SubnetSelection = { Filter: SubnetFilter; } | { Subnet: { subnet: Principal; }; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:275

{ Filter: SubnetFilter; }

Filter: SubnetFilter

/ Choose a random subnet that fulfills the specified properties

{ Subnet: { subnet: Principal; }; }

Subnet: object

/ Choose a specific subnet

subnet: Principal


UpdateSubnetTypeArgs = { Add: string; } | { Remove: string; }

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:291

const idlFactory: IDL.InterfaceFactory

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:359


const init: (args) => IDL.Type[]

Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:360

typeof IDL

IDL.Type[]