Skip to content

Commit

Permalink
Update Candid Files (#772)
Browse files Browse the repository at this point in the history
# Motivation
The canisters APIs have been updated.

# Changes
* Updated the candid interface files for the canisters used in this
library.
* Updated the javascript bindings for the latest candid interfaces.

# Tests
- [ ] Please check the API updates for any breaking changes that affect
our code.

Co-authored-by: gix-bot <gix-bot@users.noreply.github.com>
  • Loading branch information
sa-github-api and gix-bot authored Nov 25, 2024
1 parent ae9b11c commit 2b06baa
Show file tree
Hide file tree
Showing 27 changed files with 345 additions and 75 deletions.
2 changes: 1 addition & 1 deletion packages/ckbtc/candid/minter.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid
// Represents an account on the ckBTC ledger.
type Account = record { owner : principal; subaccount : opt blob };

Expand Down
2 changes: 1 addition & 1 deletion packages/cketh/candid/minter.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid
type EthereumNetwork = variant {
// The public Ethereum mainnet.
Mainnet;
Expand Down
2 changes: 1 addition & 1 deletion packages/cketh/candid/orchestrator.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid
type OrchestratorArg = variant {
UpgradeArg : UpgradeArg;
InitArg : InitArg;
Expand Down
2 changes: 1 addition & 1 deletion packages/cmc/candid/cmc.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/nns/cmc/cmc.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/nns/cmc/cmc.did' by import-candid
type Cycles = nat;
type BlockIndex = nat64;
type log_visibility = variant {
Expand Down
3 changes: 3 additions & 0 deletions packages/ic-management/candid/ic-management.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ export const idlFactory = ({ IDL }) => {
const stop_canister_args = IDL.Record({ 'canister_id' : canister_id });
const stored_chunks_args = IDL.Record({ 'canister_id' : canister_id });
const stored_chunks_result = IDL.Vec(chunk_hash);
const subnet_info_args = IDL.Record({ 'subnet_id' : IDL.Principal });
const subnet_info_result = IDL.Record({ 'replica_version' : IDL.Text });
const take_canister_snapshot_args = IDL.Record({
'replace_snapshot' : IDL.Opt(snapshot_id),
'canister_id' : canister_id,
Expand Down Expand Up @@ -448,6 +450,7 @@ export const idlFactory = ({ IDL }) => {
[stored_chunks_result],
[],
),
'subnet_info' : IDL.Func([subnet_info_args], [subnet_info_result], []),
'take_canister_snapshot' : IDL.Func(
[take_canister_snapshot_args],
[take_canister_snapshot_result],
Expand Down
7 changes: 7 additions & 0 deletions packages/ic-management/candid/ic-management.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ export interface stored_chunks_args {
canister_id: canister_id;
}
export type stored_chunks_result = Array<chunk_hash>;
export interface subnet_info_args {
subnet_id: Principal;
}
export interface subnet_info_result {
replica_version: string;
}
export interface take_canister_snapshot_args {
replace_snapshot: [] | [snapshot_id];
canister_id: canister_id;
Expand Down Expand Up @@ -404,6 +410,7 @@ export interface _SERVICE {
start_canister: ActorMethod<[start_canister_args], undefined>;
stop_canister: ActorMethod<[stop_canister_args], undefined>;
stored_chunks: ActorMethod<[stored_chunks_args], stored_chunks_result>;
subnet_info: ActorMethod<[subnet_info_args], subnet_info_result>;
take_canister_snapshot: ActorMethod<
[take_canister_snapshot_args],
take_canister_snapshot_result
Expand Down
13 changes: 12 additions & 1 deletion packages/ic-management/candid/ic-management.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from dfinity/portal commit 407ec5b92d06618c4df9f52e98514c5f4f44313e for file 'docs/references/_attachments/ic.did'
// Generated from dfinity/portal commit 7b300dc97a1636f8134410e9a40f3556acf9b496 for file 'docs/references/_attachments/ic.did'
type canister_id = principal;
type wasm_module = blob;
type snapshot_id = blob;
Expand Down Expand Up @@ -344,6 +344,14 @@ type node_metrics_history_result = vec record {
node_metrics : vec node_metrics;
};

type subnet_info_args = record {
subnet_id : principal;
};

type subnet_info_result = record {
replica_version : text;
};

type provisional_create_canister_with_cycles_args = record {
amount : opt nat;
settings : opt canister_settings;
Expand Down Expand Up @@ -446,6 +454,9 @@ service ic : {
// metrics interface
node_metrics_history : (node_metrics_history_args) -> (node_metrics_history_result);

// subnet info
subnet_info : (subnet_info_args) -> (subnet_info_result);

// provisional interfaces for the pre-ledger world
provisional_create_canister_with_cycles : (provisional_create_canister_with_cycles_args) -> (provisional_create_canister_with_cycles_result);
provisional_top_up_canister : (provisional_top_up_canister_args) -> ();
Expand Down
3 changes: 3 additions & 0 deletions packages/ic-management/candid/ic-management.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ export const idlFactory = ({ IDL }) => {
const stop_canister_args = IDL.Record({ 'canister_id' : canister_id });
const stored_chunks_args = IDL.Record({ 'canister_id' : canister_id });
const stored_chunks_result = IDL.Vec(chunk_hash);
const subnet_info_args = IDL.Record({ 'subnet_id' : IDL.Principal });
const subnet_info_result = IDL.Record({ 'replica_version' : IDL.Text });
const take_canister_snapshot_args = IDL.Record({
'replace_snapshot' : IDL.Opt(snapshot_id),
'canister_id' : canister_id,
Expand Down Expand Up @@ -448,6 +450,7 @@ export const idlFactory = ({ IDL }) => {
[stored_chunks_result],
[],
),
'subnet_info' : IDL.Func([subnet_info_args], [subnet_info_result], []),
'take_canister_snapshot' : IDL.Func(
[take_canister_snapshot_args],
[take_canister_snapshot_result],
Expand Down
2 changes: 1 addition & 1 deletion packages/ledger-icp/candid/index.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/ledger_suite/icp/index/index.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/ledger_suite/icp/index/index.did' by import-candid
type Account = record { owner : principal; subaccount : opt vec nat8 };
type GetAccountIdentifierTransactionsArgs = record {
max_results : nat64;
Expand Down
2 changes: 1 addition & 1 deletion packages/ledger-icp/candid/ledger.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/ledger_suite/icp/ledger.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/ledger_suite/icp/ledger.did' by import-candid
// This is the official Ledger interface that is guaranteed to be backward compatible.

// Amount of tokens, measured in 10^-8 of a token.
Expand Down
2 changes: 1 addition & 1 deletion packages/ledger-icrc/candid/icrc_index-ng.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/ledger_suite/icrc1/index-ng/index-ng.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/ledger_suite/icrc1/index-ng/index-ng.did' by import-candid
type Tokens = nat;

type InitArg = record {
Expand Down
2 changes: 1 addition & 1 deletion packages/ledger-icrc/candid/icrc_index.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/ledger_suite/icrc1/index/index.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/ledger_suite/icrc1/index/index.did' by import-candid
type TxId = nat;

type Account = record { owner : principal; subaccount : opt blob };
Expand Down
2 changes: 1 addition & 1 deletion packages/ledger-icrc/candid/icrc_ledger.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/ledger_suite/icrc1/ledger/ledger.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/ledger_suite/icrc1/ledger/ledger.did' by import-candid
type BlockIndex = nat;
type Subaccount = blob;
// Number of nanoseconds since the UNIX epoch in UTC timezone.
Expand Down
2 changes: 1 addition & 1 deletion packages/nns/candid/genesis_token.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/nns/gtc/canister/gtc.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/nns/gtc/canister/gtc.did' by import-candid
type AccountState = record {
authenticated_principal_id : opt principal;
successfully_transferred_neurons : vec TransferredNeuron;
Expand Down
2 changes: 1 addition & 1 deletion packages/nns/candid/governance.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/nns/governance/canister/governance.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/nns/governance/canister/governance.did' by import-candid
type AccountIdentifier = record {
hash : blob;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/nns/candid/governance_test.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/nns/governance/canister/governance_test.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/nns/governance/canister/governance_test.did' by import-candid
type AccountIdentifier = record {
hash : blob;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/nns/candid/sns_wasm.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
// Generated from IC repo commit 5d20289 (2024-11-21 tags: release-2024-11-21_03-11-24.04-base-kernel) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
type AddWasmRequest = record {
hash : blob;
wasm : opt SnsWasm;
Expand Down
54 changes: 45 additions & 9 deletions packages/sns/candid/sns_governance.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export const idlFactory = ({ IDL }) => {
'upgrade_steps' : IDL.Opt(Versions),
});
const TargetVersionReset = IDL.Record({
'human_readable' : IDL.Opt(IDL.Text),
'old_target_version' : IDL.Opt(Version),
'new_target_version' : IDL.Opt(Version),
});
Expand Down Expand Up @@ -165,7 +166,7 @@ export const idlFactory = ({ IDL }) => {
const PendingVersion = IDL.Record({
'mark_failed_at_seconds' : IDL.Nat64,
'checking_upgrade_lock' : IDL.Nat64,
'proposal_id' : IDL.Nat64,
'proposal_id' : IDL.Opt(IDL.Nat64),
'target_version' : IDL.Opt(Version),
});
const GovernanceError = IDL.Record({
Expand Down Expand Up @@ -193,9 +194,21 @@ export const idlFactory = ({ IDL }) => {
const MintSnsTokensActionAuxiliary = IDL.Record({
'valuation' : IDL.Opt(Valuation),
});
const SnsVersion = IDL.Record({
'archive_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'root_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'swap_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'ledger_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'governance_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'index_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
});
const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
'target_version' : IDL.Opt(SnsVersion),
});
const ActionAuxiliary = IDL.Variant({
'TransferSnsTreasuryFunds' : MintSnsTokensActionAuxiliary,
'MintSnsTokens' : MintSnsTokensActionAuxiliary,
'AdvanceSnsTargetVersion' : AdvanceSnsTargetVersionActionAuxiliary,
});
const Ballot = IDL.Record({
'vote' : IDL.Int32,
Expand Down Expand Up @@ -244,6 +257,9 @@ export const idlFactory = ({ IDL }) => {
'memo' : IDL.Opt(IDL.Nat64),
'amount_e8s' : IDL.Opt(IDL.Nat64),
});
const AdvanceSnsTargetVersion = IDL.Record({
'new_target' : IDL.Opt(SnsVersion),
});
const ManageSnsMetadata = IDL.Record({
'url' : IDL.Opt(IDL.Text),
'logo' : IDL.Opt(IDL.Text),
Expand Down Expand Up @@ -272,6 +288,7 @@ export const idlFactory = ({ IDL }) => {
'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
'DeregisterDappCanisters' : DeregisterDappCanisters,
'MintSnsTokens' : MintSnsTokens,
'AdvanceSnsTargetVersion' : AdvanceSnsTargetVersion,
'Unspecified' : IDL.Record({}),
'ManageSnsMetadata' : ManageSnsMetadata,
'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
Expand Down Expand Up @@ -522,15 +539,16 @@ export const idlFactory = ({ IDL }) => {
'idle_cycles_burned_per_day' : IDL.Nat,
'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
});
const UpgradeInProgress = IDL.Record({
'mark_failed_at_seconds' : IDL.Nat64,
'checking_upgrade_lock' : IDL.Nat64,
'proposal_id' : IDL.Nat64,
'target_version' : IDL.Opt(Version),
});
const GetRunningSnsVersionResponse = IDL.Record({
'deployed_version' : IDL.Opt(Version),
'pending_version' : IDL.Opt(UpgradeInProgress),
'pending_version' : IDL.Opt(
IDL.Record({
'mark_failed_at_seconds' : IDL.Nat64,
'checking_upgrade_lock' : IDL.Nat64,
'proposal_id' : IDL.Nat64,
'target_version' : IDL.Opt(Version),
})
),
});
const GetSnsInitializationParametersResponse = IDL.Record({
'sns_initialization_parameters' : IDL.Text,
Expand All @@ -541,6 +559,7 @@ export const idlFactory = ({ IDL }) => {
'upgrade_journal' : IDL.Opt(UpgradeJournal),
'upgrade_steps' : IDL.Opt(Versions),
'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
'deployed_version' : IDL.Opt(Version),
'target_version' : IDL.Opt(Version),
});
const ListNervousSystemFunctionsResponse = IDL.Record({
Expand Down Expand Up @@ -778,6 +797,7 @@ export const init = ({ IDL }) => {
'upgrade_steps' : IDL.Opt(Versions),
});
const TargetVersionReset = IDL.Record({
'human_readable' : IDL.Opt(IDL.Text),
'old_target_version' : IDL.Opt(Version),
'new_target_version' : IDL.Opt(Version),
});
Expand Down Expand Up @@ -845,7 +865,7 @@ export const init = ({ IDL }) => {
const PendingVersion = IDL.Record({
'mark_failed_at_seconds' : IDL.Nat64,
'checking_upgrade_lock' : IDL.Nat64,
'proposal_id' : IDL.Nat64,
'proposal_id' : IDL.Opt(IDL.Nat64),
'target_version' : IDL.Opt(Version),
});
const GovernanceError = IDL.Record({
Expand Down Expand Up @@ -873,9 +893,21 @@ export const init = ({ IDL }) => {
const MintSnsTokensActionAuxiliary = IDL.Record({
'valuation' : IDL.Opt(Valuation),
});
const SnsVersion = IDL.Record({
'archive_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'root_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'swap_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'ledger_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'governance_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'index_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
});
const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
'target_version' : IDL.Opt(SnsVersion),
});
const ActionAuxiliary = IDL.Variant({
'TransferSnsTreasuryFunds' : MintSnsTokensActionAuxiliary,
'MintSnsTokens' : MintSnsTokensActionAuxiliary,
'AdvanceSnsTargetVersion' : AdvanceSnsTargetVersionActionAuxiliary,
});
const Ballot = IDL.Record({
'vote' : IDL.Int32,
Expand Down Expand Up @@ -924,6 +956,9 @@ export const init = ({ IDL }) => {
'memo' : IDL.Opt(IDL.Nat64),
'amount_e8s' : IDL.Opt(IDL.Nat64),
});
const AdvanceSnsTargetVersion = IDL.Record({
'new_target' : IDL.Opt(SnsVersion),
});
const ManageSnsMetadata = IDL.Record({
'url' : IDL.Opt(IDL.Text),
'logo' : IDL.Opt(IDL.Text),
Expand Down Expand Up @@ -952,6 +987,7 @@ export const init = ({ IDL }) => {
'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
'DeregisterDappCanisters' : DeregisterDappCanisters,
'MintSnsTokens' : MintSnsTokens,
'AdvanceSnsTargetVersion' : AdvanceSnsTargetVersion,
'Unspecified' : IDL.Record({}),
'ManageSnsMetadata' : ManageSnsMetadata,
'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
Expand Down
Loading

0 comments on commit 2b06baa

Please sign in to comment.