CmcDid
Interfaces
Section titled “Interfaces”_SERVICE
Section titled “_SERVICE”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:304
Properties
Section titled “Properties”change_subnet_type_assignment
Section titled “change_subnet_type_assignment”change_subnet_type_assignment:
ActorMethod<[ChangeSubnetTypeAssignmentArgs],undefined>
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:305
create_canister
Section titled “create_canister”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
Section titled “get_build_metadata”get_build_metadata:
ActorMethod<[],string>
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:313
get_default_subnets
Section titled “get_default_subnets”get_default_subnets:
ActorMethod<[],Principal[]>
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:314
get_icp_xdr_conversion_rate
Section titled “get_icp_xdr_conversion_rate”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
Section titled “get_subnet_types_to_subnets”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
Section titled “notify_create_canister”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
Section titled “notify_mint_cycles”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
Section titled “notify_top_up”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
Section titled “set_authorized_subnetwork_list”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
Section titled “update_subnet_type”update_subnet_type:
ActorMethod<[UpdateSubnetTypeArgs],undefined>
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:357
CanisterSettings
Section titled “CanisterSettings”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:15
Properties
Section titled “Properties”compute_allocation
Section titled “compute_allocation”compute_allocation: [] | [
bigint]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:26
controllers
Section titled “controllers”controllers: [] | [
Principal[]]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:19
environment_variables
Section titled “environment_variables”environment_variables: [] | [
environment_variable[]]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:18
freezing_threshold
Section titled “freezing_threshold”freezing_threshold: [] | [
bigint]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:16
log_memory_limit
Section titled “log_memory_limit”log_memory_limit: [] | [
bigint]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:22
log_visibility
Section titled “log_visibility”log_visibility: [] | [
log_visibility]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:21
memory_allocation
Section titled “memory_allocation”memory_allocation: [] | [
bigint]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:25
reserved_cycles_limit
Section titled “reserved_cycles_limit”reserved_cycles_limit: [] | [
bigint]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:20
snapshot_visibility
Section titled “snapshot_visibility”snapshot_visibility: [] | [
snapshot_visibility]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:23
wasm_memory_limit
Section titled “wasm_memory_limit”wasm_memory_limit: [] | [
bigint]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:24
wasm_memory_threshold
Section titled “wasm_memory_threshold”wasm_memory_threshold: [] | [
bigint]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:17
CreateCanisterArg
Section titled “CreateCanisterArg”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:34
The argument of the [create_canister] method.
Properties
Section titled “Properties”settings
Section titled “settings”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
Section titled “subnet_selection”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
Section titled “subnet_type”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.
CyclesCanisterInitPayload
Section titled “CyclesCanisterInitPayload”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:76
Properties
Section titled “Properties”cycles_ledger_canister_id
Section titled “cycles_ledger_canister_id”cycles_ledger_canister_id: [] | [
Principal]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:78
exchange_rate_canister
Section titled “exchange_rate_canister”exchange_rate_canister: [] | [
ExchangeRateCanister]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:77
governance_canister_id
Section titled “governance_canister_id”governance_canister_id: [] | [
Principal]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:80
last_purged_notification
Section titled “last_purged_notification”last_purged_notification: [] | [
bigint]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:79
ledger_canister_id
Section titled “ledger_canister_id”ledger_canister_id: [] | [
Principal]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:82
minting_account_id
Section titled “minting_account_id”minting_account_id: [] | [
string]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:81
environment_variable
Section titled “environment_variable”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:292
Properties
Section titled “Properties”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
IcpXdrConversionRate
Section titled “IcpXdrConversionRate”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:97
Properties
Section titled “Properties”timestamp_seconds
Section titled “timestamp_seconds”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
Section titled “xdr_permyriad_per_icp”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.
IcpXdrConversionRateResponse
Section titled “IcpXdrConversionRateResponse”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:109
Properties
Section titled “Properties”certificate
Section titled “certificate”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
Section titled “hash_tree”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 ]NotifyCreateCanisterArg
Section titled “NotifyCreateCanisterArg”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:137
The argument of the [notify_create_canister] method.
Properties
Section titled “Properties”block_index
Section titled “block_index”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
Section titled “controller”controller:
Principal
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:141
The controller of canister to create.
settings
Section titled “settings”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
Section titled “subnet_selection”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
Section titled “subnet_type”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.
NotifyMintCyclesArg
Section titled “NotifyMintCyclesArg”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:217
Properties
Section titled “Properties”block_index
Section titled “block_index”block_index:
bigint
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:218
deposit_memo
Section titled “deposit_memo”deposit_memo:
Memo
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:219
to_subaccount
Section titled “to_subaccount”to_subaccount:
Subaccount
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:220
NotifyMintCyclesSuccess
Section titled “NotifyMintCyclesSuccess”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:225
Properties
Section titled “Properties”balance
Section titled “balance”balance:
bigint
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:229
New balance of the cycles ledger account
block_index
Section titled “block_index”block_index:
bigint
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:233
Cycles ledger block index of deposit
minted
Section titled “minted”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
NotifyTopUpArg
Section titled “NotifyTopUpArg”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:242
The argument of the [notify_top_up] method.
Properties
Section titled “Properties”block_index
Section titled “block_index”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
Section titled “canister_id”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
Properties
Section titled “Properties”data: [
Principal,Principal[]][]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:261
SetAuthorizedSubnetworkListArgs
Section titled “SetAuthorizedSubnetworkListArgs”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:263
Properties
Section titled “Properties”subnets
Section titled “subnets”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
SubnetFilter
Section titled “SubnetFilter”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:268
Properties
Section titled “Properties”subnet_type
Section titled “subnet_type”subnet_type: [] | [
string]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:269
SubnetListWithType
Section titled “SubnetListWithType”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:271
Properties
Section titled “Properties”subnet_type
Section titled “subnet_type”subnet_type:
string
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:273
subnets
Section titled “subnets”subnets:
Principal[]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:272
SubnetTypesToSubnetsResponse
Section titled “SubnetTypesToSubnetsResponse”Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:288
Properties
Section titled “Properties”data: [
string,Principal[]][]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:289
Type Aliases
Section titled “Type Aliases”AccountIdentifier
Section titled “AccountIdentifier”AccountIdentifier =
string
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:13
BlockIndex
Section titled “BlockIndex”BlockIndex =
bigint
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:14
ChangeSubnetTypeAssignmentArgs
Section titled “ChangeSubnetTypeAssignmentArgs”ChangeSubnetTypeAssignmentArgs = {
Add:SubnetListWithType; } | {Remove:SubnetListWithType; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:28
CreateCanisterError
Section titled “CreateCanisterError”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.
Properties
Section titled “Properties”Refunded
Section titled “Refunded”Refunded:
object
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:56
create_error
Section titled “create_error”create_error:
string
The reason why creating a canister failed.
refund_amount
Section titled “refund_amount”refund_amount:
bigint
The amount of cycles returned to the calling canister
CreateCanisterResult
Section titled “CreateCanisterResult”CreateCanisterResult = {
Ok:Principal; } | {Err:CreateCanisterError; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:67
Type Declaration
Section titled “Type Declaration”{ Ok: Principal; }
Ok:
Principal
The principal of the newly created canister.
{ Err: CreateCanisterError; }
Err:
CreateCanisterError
Cycles
Section titled “Cycles”Cycles =
bigint
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:75
ExchangeRateCanister
Section titled “ExchangeRateCanister”ExchangeRateCanister = {
Set:Principal; } | {Unset:null; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:84
Type Declaration
Section titled “Type Declaration”{ 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
Section titled “log_visibility”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
Section titled “NotifyCreateCanisterResult”NotifyCreateCanisterResult = {
Ok:Principal; } | {Err:NotifyError; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:163
Type Declaration
Section titled “Type Declaration”{ Ok: Principal; }
Ok:
Principal
The principal of the newly created canister.
{ Err: NotifyError; }
Err:
NotifyError
NotifyError
Section titled “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
Type Declaration
Section titled “Type Declaration”{ Refunded: { block_index: [] | [BlockIndex]; reason: string; }; }
Refunded
Section titled “Refunded”Refunded:
object
The payment processing failed and the payment was returned the caller. This is a non-retriable error.
Refunded.block_index
Section titled “Refunded.block_index”block_index: [] | [
BlockIndex]
The index of the block containing the refund.
Refunded.reason
Section titled “Refunded.reason”reason:
string
The reason for the refund.
{ InvalidTransaction: string; }
InvalidTransaction
Section titled “InvalidTransaction”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.
Other.error_code
Section titled “Other.error_code”error_code:
bigint
Other.error_message
Section titled “Other.error_message”error_message:
string
{ Processing: null; }
Processing
Section titled “Processing”Processing:
null
The same payment is already being processed by a concurrent request. This is a retriable error.
{ TransactionTooOld: BlockIndex; }
TransactionTooOld
Section titled “TransactionTooOld”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
Section titled “NotifyMintCyclesResult”NotifyMintCyclesResult = {
Ok:NotifyMintCyclesSuccess; } | {Err:NotifyError; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:222
NotifyTopUpResult
Section titled “NotifyTopUpResult”NotifyTopUpResult = {
Ok:Cycles; } | {Err:NotifyError; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:252
Type Declaration
Section titled “Type Declaration”{ Ok: Cycles; }
Ok:
Cycles
The amount of cycles sent to the specified canister.
{ Err: NotifyError; }
Err:
NotifyError
snapshot_visibility
Section titled “snapshot_visibility”snapshot_visibility = {
controllers:null; } | {public:null; } | {allowed_viewers:Principal[]; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:300
Subaccount
Section titled “Subaccount”Subaccount = [] | [
Uint8Array]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:267
SubnetSelection
Section titled “SubnetSelection”SubnetSelection = {
Filter:SubnetFilter; } | {Subnet: {subnet:Principal; }; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:275
Type Declaration
Section titled “Type Declaration”{ Filter: SubnetFilter; }
Filter
Section titled “Filter”Filter:
SubnetFilter
/ Choose a random subnet that fulfills the specified properties
{ Subnet: { subnet: Principal; }; }
Subnet
Section titled “Subnet”Subnet:
object
/ Choose a specific subnet
Subnet.subnet
Section titled “Subnet.subnet”subnet:
Principal
UpdateSubnetTypeArgs
Section titled “UpdateSubnetTypeArgs”UpdateSubnetTypeArgs = {
Add:string; } | {Remove:string; }
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:291
Variables
Section titled “Variables”idlFactory
Section titled “idlFactory”
constidlFactory:IDL.InterfaceFactory
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:359
init()
Section titled “init()”
constinit: (args) =>IDL.Type[]
Defined in: packages/canisters/src/declarations/cmc/cmc.d.ts:360
Parameters
Section titled “Parameters”typeof IDL
Returns
Section titled “Returns”IDL.Type[]