Skip to content

Commit

Permalink
Update Candid Files (#737)
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 <[email protected]>
  • Loading branch information
sa-github-api and gix-bot authored Oct 21, 2024
1 parent ccf1be7 commit 7ed25cc
Show file tree
Hide file tree
Showing 41 changed files with 495 additions and 174 deletions.
6 changes: 6 additions & 0 deletions packages/ckbtc/candid/minter.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ export const idlFactory = ({ IDL }) => {
'stopping' : IDL.Null,
'running' : IDL.Null,
});
const LogVisibility = IDL.Variant({
'controllers' : IDL.Null,
'public' : IDL.Null,
});
const DefiniteCanisterSettings = IDL.Record({
'freezing_threshold' : IDL.Nat,
'controllers' : IDL.Vec(IDL.Principal),
'reserved_cycles_limit' : IDL.Nat,
'log_visibility' : LogVisibility,
'wasm_memory_limit' : IDL.Nat,
'memory_allocation' : IDL.Nat,
'compute_allocation' : IDL.Nat,
});
Expand Down
3 changes: 3 additions & 0 deletions packages/ckbtc/candid/minter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export interface DefiniteCanisterSettings {
freezing_threshold: bigint;
controllers: Array<Principal>;
reserved_cycles_limit: bigint;
log_visibility: LogVisibility;
wasm_memory_limit: bigint;
memory_allocation: bigint;
compute_allocation: bigint;
}
Expand Down Expand Up @@ -129,6 +131,7 @@ export interface InitArgs {
min_confirmations: [] | [number];
kyt_fee: [] | [bigint];
}
export type LogVisibility = { controllers: null } | { public: null };
export type MinterArg = { Upgrade: [] | [UpgradeArgs] } | { Init: InitArgs };
export interface MinterInfo {
retrieve_btc_min_amount: bigint;
Expand Down
11 changes: 9 additions & 2 deletions packages/ckbtc/candid/minter.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) '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 Expand Up @@ -28,6 +28,13 @@ type DefiniteCanisterSettings = record {
memory_allocation : nat;
compute_allocation : nat;
reserved_cycles_limit : nat;
log_visibility: LogVisibility;
wasm_memory_limit : nat;
};

type LogVisibility = variant {
controllers;
public;
};

type RetrieveBtcArgs = record {
Expand Down Expand Up @@ -454,7 +461,7 @@ service : (minter_arg : MinterArg) -> {

/// Returns the status of a withdrawal request request using the RetrieveBtcStatusV2 type.
retrieve_btc_status_v2 : (record { block_index : nat64 }) -> (RetrieveBtcStatusV2) query;

// Returns the withdrawal statues by account.
//
// # Note
Expand Down
6 changes: 6 additions & 0 deletions packages/ckbtc/candid/minter.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ export const idlFactory = ({ IDL }) => {
'stopping' : IDL.Null,
'running' : IDL.Null,
});
const LogVisibility = IDL.Variant({
'controllers' : IDL.Null,
'public' : IDL.Null,
});
const DefiniteCanisterSettings = IDL.Record({
'freezing_threshold' : IDL.Nat,
'controllers' : IDL.Vec(IDL.Principal),
'reserved_cycles_limit' : IDL.Nat,
'log_visibility' : LogVisibility,
'wasm_memory_limit' : IDL.Nat,
'memory_allocation' : IDL.Nat,
'compute_allocation' : IDL.Nat,
});
Expand Down
6 changes: 6 additions & 0 deletions packages/cketh/candid/minter.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,16 @@ export const idlFactory = ({ IDL }) => {
'stopping' : IDL.Null,
'running' : IDL.Null,
});
const LogVisibility = IDL.Variant({
'controllers' : IDL.Null,
'public' : IDL.Null,
});
const DefiniteCanisterSettings = IDL.Record({
'freezing_threshold' : IDL.Nat,
'controllers' : IDL.Vec(IDL.Principal),
'reserved_cycles_limit' : IDL.Nat,
'log_visibility' : LogVisibility,
'wasm_memory_limit' : IDL.Nat,
'memory_allocation' : IDL.Nat,
'compute_allocation' : IDL.Nat,
});
Expand Down
3 changes: 3 additions & 0 deletions packages/cketh/candid/minter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export interface DefiniteCanisterSettings {
freezing_threshold: bigint;
controllers: Array<Principal>;
reserved_cycles_limit: bigint;
log_visibility: LogVisibility;
wasm_memory_limit: bigint;
memory_allocation: bigint;
compute_allocation: bigint;
}
Expand Down Expand Up @@ -232,6 +234,7 @@ export type LedgerError =
failed_burn_amount: bigint;
};
};
export type LogVisibility = { controllers: null } | { public: null };
export type MinterArg = { UpgradeArg: UpgradeArg } | { InitArg: InitArg };
export interface MinterInfo {
eth_balance: [] | [bigint];
Expand Down
9 changes: 8 additions & 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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid
type EthereumNetwork = variant {
// The public Ethereum mainnet.
Mainnet;
Expand All @@ -25,6 +25,13 @@ type DefiniteCanisterSettings = record {
memory_allocation : nat;
compute_allocation : nat;
reserved_cycles_limit : nat;
log_visibility: LogVisibility;
wasm_memory_limit : nat;
};

type LogVisibility = variant {
controllers;
public;
};

type QueryStats = record {
Expand Down
6 changes: 6 additions & 0 deletions packages/cketh/candid/minter.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,16 @@ export const idlFactory = ({ IDL }) => {
'stopping' : IDL.Null,
'running' : IDL.Null,
});
const LogVisibility = IDL.Variant({
'controllers' : IDL.Null,
'public' : IDL.Null,
});
const DefiniteCanisterSettings = IDL.Record({
'freezing_threshold' : IDL.Nat,
'controllers' : IDL.Vec(IDL.Principal),
'reserved_cycles_limit' : IDL.Nat,
'log_visibility' : LogVisibility,
'wasm_memory_limit' : IDL.Nat,
'memory_allocation' : IDL.Nat,
'compute_allocation' : IDL.Nat,
});
Expand Down
6 changes: 6 additions & 0 deletions packages/cketh/candid/orchestrator.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,16 @@ export const idlFactory = ({ IDL }) => {
'stopping' : IDL.Null,
'running' : IDL.Null,
});
const LogVisibility = IDL.Variant({
'controllers' : IDL.Null,
'public' : IDL.Null,
});
const DefiniteCanisterSettings = IDL.Record({
'freezing_threshold' : IDL.Nat,
'controllers' : IDL.Vec(IDL.Principal),
'reserved_cycles_limit' : IDL.Nat,
'log_visibility' : LogVisibility,
'wasm_memory_limit' : IDL.Nat,
'memory_allocation' : IDL.Nat,
'compute_allocation' : IDL.Nat,
});
Expand Down
3 changes: 3 additions & 0 deletions packages/cketh/candid/orchestrator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export interface DefiniteCanisterSettings {
freezing_threshold: bigint;
controllers: Array<Principal>;
reserved_cycles_limit: bigint;
log_visibility: LogVisibility;
wasm_memory_limit: bigint;
memory_allocation: bigint;
compute_allocation: bigint;
}
Expand Down Expand Up @@ -64,6 +66,7 @@ export interface LedgerSuiteVersion {
ledger_compressed_wasm_hash: string;
index_compressed_wasm_hash: string;
}
export type LogVisibility = { controllers: null } | { public: null };
export interface ManagedCanisterIds {
ledger: [] | [Principal];
index: [] | [Principal];
Expand Down
9 changes: 8 additions & 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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid
type OrchestratorArg = variant {
UpgradeArg : UpgradeArg;
InitArg : InitArg;
Expand Down Expand Up @@ -226,6 +226,13 @@ type DefiniteCanisterSettings = record {
memory_allocation : nat;
compute_allocation : nat;
reserved_cycles_limit : nat;
log_visibility: LogVisibility;
wasm_memory_limit : nat;
};

type LogVisibility = variant {
controllers;
public;
};

type QueryStats = record {
Expand Down
6 changes: 6 additions & 0 deletions packages/cketh/candid/orchestrator.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,16 @@ export const idlFactory = ({ IDL }) => {
'stopping' : IDL.Null,
'running' : IDL.Null,
});
const LogVisibility = IDL.Variant({
'controllers' : IDL.Null,
'public' : IDL.Null,
});
const DefiniteCanisterSettings = IDL.Record({
'freezing_threshold' : IDL.Nat,
'controllers' : IDL.Vec(IDL.Principal),
'reserved_cycles_limit' : IDL.Nat,
'log_visibility' : LogVisibility,
'wasm_memory_limit' : IDL.Nat,
'memory_allocation' : IDL.Nat,
'compute_allocation' : IDL.Nat,
});
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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/nns/cmc/cmc.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) 'rs/nns/cmc/cmc.did' by import-candid
type Cycles = nat;
type BlockIndex = nat64;
type log_visibility = variant {
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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/rosetta-api/icp_ledger/index/index.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) '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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/rosetta-api/icp_ledger/ledger.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) '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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/rosetta-api/icrc1/index-ng/index-ng.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) '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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/rosetta-api/icrc1/index/index.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) '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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/rosetta-api/icrc1/ledger/ledger.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) '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 c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/nns/gtc/canister/gtc.did' by import-candid
// Generated from IC repo commit 3c76b91 (2024-10-17 tags: release-2024-10-17_03-07-scheduler-changes-guestos-revert) 'rs/nns/gtc/canister/gtc.did' by import-candid
type AccountState = record {
authenticated_principal_id : opt principal;
successfully_transferred_neurons : vec TransferredNeuron;
Expand Down
26 changes: 14 additions & 12 deletions packages/nns/candid/governance.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ export const idlFactory = ({ IDL }) => {
'SetDissolveTimestamp' : SetDissolveTimestamp,
});
const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
const RegisterVote = IDL.Record({
'vote' : IDL.Int32,
'proposal' : IDL.Opt(NeuronId),
'proposal' : IDL.Opt(ProposalId),
});
const Merge = IDL.Record({ 'source_neuron_id' : IDL.Opt(NeuronId) });
const DisburseToNeuron = IDL.Record({
Expand Down Expand Up @@ -447,7 +448,7 @@ export const idlFactory = ({ IDL }) => {
'total_available_e8s_equivalent' : IDL.Nat64,
'latest_round_available_e8s_equivalent' : IDL.Opt(IDL.Nat64),
'distributed_e8s_equivalent' : IDL.Nat64,
'settled_proposals' : IDL.Vec(NeuronId),
'settled_proposals' : IDL.Vec(ProposalId),
});
const NeuronStakeTransfer = IDL.Record({
'to_subaccount' : IDL.Vec(IDL.Nat8),
Expand Down Expand Up @@ -550,7 +551,7 @@ export const idlFactory = ({ IDL }) => {
'current_deadline_timestamp_seconds' : IDL.Nat64,
});
const ProposalData = IDL.Record({
'id' : IDL.Opt(NeuronId),
'id' : IDL.Opt(ProposalId),
'failure_reason' : IDL.Opt(GovernanceError),
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
'proposal_timestamp_seconds' : IDL.Nat64,
Expand Down Expand Up @@ -587,7 +588,7 @@ export const idlFactory = ({ IDL }) => {
});
const BallotInfo = IDL.Record({
'vote' : IDL.Int32,
'proposal_id' : IDL.Opt(NeuronId),
'proposal_id' : IDL.Opt(ProposalId),
});
const DissolveState = IDL.Variant({
'DissolveDelaySeconds' : IDL.Nat64,
Expand Down Expand Up @@ -678,7 +679,7 @@ export const idlFactory = ({ IDL }) => {
});
const Result_5 = IDL.Variant({ 'Ok' : NeuronInfo, 'Err' : GovernanceError });
const GetNeuronsFundAuditInfoRequest = IDL.Record({
'nns_proposal_id' : IDL.Opt(NeuronId),
'nns_proposal_id' : IDL.Opt(ProposalId),
});
const NeuronsFundAuditInfo = IDL.Record({
'final_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
Expand All @@ -697,7 +698,7 @@ export const idlFactory = ({ IDL }) => {
'Err' : GovernanceError,
});
const ProposalInfo = IDL.Record({
'id' : IDL.Opt(NeuronId),
'id' : IDL.Opt(ProposalId),
'status' : IDL.Int32,
'topic' : IDL.Int32,
'failure_reason' : IDL.Opt(GovernanceError),
Expand Down Expand Up @@ -744,7 +745,7 @@ export const idlFactory = ({ IDL }) => {
const ListProposalInfo = IDL.Record({
'include_reward_status' : IDL.Vec(IDL.Int32),
'omit_large_fields' : IDL.Opt(IDL.Bool),
'before_proposal' : IDL.Opt(NeuronId),
'before_proposal' : IDL.Opt(ProposalId),
'limit' : IDL.Nat32,
'exclude_topic' : IDL.Vec(IDL.Int32),
'include_all_manage_neuron_proposals' : IDL.Opt(IDL.Bool),
Expand Down Expand Up @@ -814,7 +815,7 @@ export const idlFactory = ({ IDL }) => {
});
const MakeProposalResponse = IDL.Record({
'message' : IDL.Opt(IDL.Text),
'proposal_id' : IDL.Opt(NeuronId),
'proposal_id' : IDL.Opt(ProposalId),
});
const StakeMaturityResponse = IDL.Record({
'maturity_e8s' : IDL.Nat64,
Expand Down Expand Up @@ -1023,9 +1024,10 @@ export const init = ({ IDL }) => {
'SetDissolveTimestamp' : SetDissolveTimestamp,
});
const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
const RegisterVote = IDL.Record({
'vote' : IDL.Int32,
'proposal' : IDL.Opt(NeuronId),
'proposal' : IDL.Opt(ProposalId),
});
const Merge = IDL.Record({ 'source_neuron_id' : IDL.Opt(NeuronId) });
const DisburseToNeuron = IDL.Record({
Expand Down Expand Up @@ -1411,7 +1413,7 @@ export const init = ({ IDL }) => {
'total_available_e8s_equivalent' : IDL.Nat64,
'latest_round_available_e8s_equivalent' : IDL.Opt(IDL.Nat64),
'distributed_e8s_equivalent' : IDL.Nat64,
'settled_proposals' : IDL.Vec(NeuronId),
'settled_proposals' : IDL.Vec(ProposalId),
});
const NeuronStakeTransfer = IDL.Record({
'to_subaccount' : IDL.Vec(IDL.Nat8),
Expand Down Expand Up @@ -1514,7 +1516,7 @@ export const init = ({ IDL }) => {
'current_deadline_timestamp_seconds' : IDL.Nat64,
});
const ProposalData = IDL.Record({
'id' : IDL.Opt(NeuronId),
'id' : IDL.Opt(ProposalId),
'failure_reason' : IDL.Opt(GovernanceError),
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
'proposal_timestamp_seconds' : IDL.Nat64,
Expand Down Expand Up @@ -1551,7 +1553,7 @@ export const init = ({ IDL }) => {
});
const BallotInfo = IDL.Record({
'vote' : IDL.Int32,
'proposal_id' : IDL.Opt(NeuronId),
'proposal_id' : IDL.Opt(ProposalId),
});
const DissolveState = IDL.Variant({
'DissolveDelaySeconds' : IDL.Nat64,
Expand Down
Loading

0 comments on commit 7ed25cc

Please sign in to comment.