Skip to content

Commit

Permalink
Update Candid Files (#717)
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 Sep 9, 2024
1 parent e7fa676 commit 1b43ed0
Show file tree
Hide file tree
Showing 27 changed files with 18 additions and 179 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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) '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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) '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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) '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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/nns/cmc/cmc.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) 'rs/nns/cmc/cmc.did' by import-candid
type Cycles = nat;
type BlockIndex = nat64;
type log_visibility = variant {
Expand Down
32 changes: 0 additions & 32 deletions packages/ic-management/candid/ic-management.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ export const idlFactory = ({ IDL }) => {
});
const satoshi = IDL.Nat64;
const bitcoin_get_balance_result = satoshi;
const bitcoin_get_balance_query_args = IDL.Record({
'network' : bitcoin_network,
'address' : bitcoin_address,
'min_confirmations' : IDL.Opt(IDL.Nat32),
});
const bitcoin_get_balance_query_result = satoshi;
const bitcoin_block_height = IDL.Nat32;
const bitcoin_get_block_headers_args = IDL.Record({
'start_height' : bitcoin_block_height,
Expand Down Expand Up @@ -62,22 +56,6 @@ export const idlFactory = ({ IDL }) => {
'tip_block_hash' : bitcoin_block_hash,
'utxos' : IDL.Vec(utxo),
});
const bitcoin_get_utxos_query_args = IDL.Record({
'network' : bitcoin_network,
'filter' : IDL.Opt(
IDL.Variant({
'page' : IDL.Vec(IDL.Nat8),
'min_confirmations' : IDL.Nat32,
})
),
'address' : bitcoin_address,
});
const bitcoin_get_utxos_query_result = IDL.Record({
'next_page' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'tip_height' : bitcoin_block_height,
'tip_block_hash' : bitcoin_block_hash,
'utxos' : IDL.Vec(utxo),
});
const bitcoin_send_transaction_args = IDL.Record({
'transaction' : IDL.Vec(IDL.Nat8),
'network' : bitcoin_network,
Expand Down Expand Up @@ -340,11 +318,6 @@ export const idlFactory = ({ IDL }) => {
[bitcoin_get_balance_result],
[],
),
'bitcoin_get_balance_query' : IDL.Func(
[bitcoin_get_balance_query_args],
[bitcoin_get_balance_query_result],
[],
),
'bitcoin_get_block_headers' : IDL.Func(
[bitcoin_get_block_headers_args],
[bitcoin_get_block_headers_result],
Expand All @@ -360,11 +333,6 @@ export const idlFactory = ({ IDL }) => {
[bitcoin_get_utxos_result],
[],
),
'bitcoin_get_utxos_query' : IDL.Func(
[bitcoin_get_utxos_query_args],
[bitcoin_get_utxos_query_result],
[],
),
'bitcoin_send_transaction' : IDL.Func(
[bitcoin_send_transaction_args],
[],
Expand Down
27 changes: 0 additions & 27 deletions packages/ic-management/candid/ic-management.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ export interface bitcoin_get_balance_args {
address: bitcoin_address;
min_confirmations: [] | [number];
}
export interface bitcoin_get_balance_query_args {
network: bitcoin_network;
address: bitcoin_address;
min_confirmations: [] | [number];
}
export type bitcoin_get_balance_query_result = satoshi;
export type bitcoin_get_balance_result = satoshi;
export interface bitcoin_get_block_headers_args {
start_height: bitcoin_block_height;
Expand All @@ -40,19 +34,6 @@ export interface bitcoin_get_utxos_args {
| [{ page: Uint8Array | number[] } | { min_confirmations: number }];
address: bitcoin_address;
}
export interface bitcoin_get_utxos_query_args {
network: bitcoin_network;
filter:
| []
| [{ page: Uint8Array | number[] } | { min_confirmations: number }];
address: bitcoin_address;
}
export interface bitcoin_get_utxos_query_result {
next_page: [] | [Uint8Array | number[]];
tip_height: bitcoin_block_height;
tip_block_hash: bitcoin_block_hash;
utxos: Array<utxo>;
}
export interface bitcoin_get_utxos_result {
next_page: [] | [Uint8Array | number[]];
tip_height: bitcoin_block_height;
Expand Down Expand Up @@ -322,10 +303,6 @@ export interface _SERVICE {
[bitcoin_get_balance_args],
bitcoin_get_balance_result
>;
bitcoin_get_balance_query: ActorMethod<
[bitcoin_get_balance_query_args],
bitcoin_get_balance_query_result
>;
bitcoin_get_block_headers: ActorMethod<
[bitcoin_get_block_headers_args],
bitcoin_get_block_headers_result
Expand All @@ -338,10 +315,6 @@ export interface _SERVICE {
[bitcoin_get_utxos_args],
bitcoin_get_utxos_result
>;
bitcoin_get_utxos_query: ActorMethod<
[bitcoin_get_utxos_query_args],
bitcoin_get_utxos_query_result
>;
bitcoin_send_transaction: ActorMethod<
[bitcoin_send_transaction_args],
undefined
Expand Down
28 changes: 1 addition & 27 deletions packages/ic-management/candid/ic-management.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from dfinity/interface-spec commit 0a50e0c1eac44dbc0c02116ff110096a17c4c022 for file 'spec/_attachments/ic.did'
// Generated from dfinity/interface-spec commit 45a23a737ec37cb8c9b098e377af857b4b55abda for file 'spec/_attachments/ic.did'
type canister_id = principal;
type wasm_module = blob;

Expand Down Expand Up @@ -126,22 +126,6 @@ type bitcoin_get_utxos_result = record {
next_page : opt blob;
};

type bitcoin_get_utxos_query_args = record {
address : bitcoin_address;
network : bitcoin_network;
filter : opt variant {
min_confirmations : nat32;
page : blob;
};
};

type bitcoin_get_utxos_query_result = record {
utxos : vec utxo;
tip_block_hash : bitcoin_block_hash;
tip_height : bitcoin_block_height;
next_page : opt blob;
};

type bitcoin_get_balance_args = record {
address : bitcoin_address;
network : bitcoin_network;
Expand All @@ -150,14 +134,6 @@ type bitcoin_get_balance_args = record {

type bitcoin_get_balance_result = satoshi;

type bitcoin_get_balance_query_args = record {
address : bitcoin_address;
network : bitcoin_network;
min_confirmations : opt nat32;
};

type bitcoin_get_balance_query_result = satoshi;

type bitcoin_get_current_fee_percentiles_args = record {
network : bitcoin_network;
};
Expand Down Expand Up @@ -425,9 +401,7 @@ service ic : {

// bitcoin interface
bitcoin_get_balance : (bitcoin_get_balance_args) -> (bitcoin_get_balance_result);
bitcoin_get_balance_query : (bitcoin_get_balance_query_args) -> (bitcoin_get_balance_query_result) query;
bitcoin_get_utxos : (bitcoin_get_utxos_args) -> (bitcoin_get_utxos_result);
bitcoin_get_utxos_query : (bitcoin_get_utxos_query_args) -> (bitcoin_get_utxos_query_result) query;
bitcoin_send_transaction : (bitcoin_send_transaction_args) -> ();
bitcoin_get_current_fee_percentiles : (bitcoin_get_current_fee_percentiles_args) -> (bitcoin_get_current_fee_percentiles_result);
bitcoin_get_block_headers : (bitcoin_get_block_headers_args) -> (bitcoin_get_block_headers_result);
Expand Down
32 changes: 0 additions & 32 deletions packages/ic-management/candid/ic-management.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ export const idlFactory = ({ IDL }) => {
});
const satoshi = IDL.Nat64;
const bitcoin_get_balance_result = satoshi;
const bitcoin_get_balance_query_args = IDL.Record({
'network' : bitcoin_network,
'address' : bitcoin_address,
'min_confirmations' : IDL.Opt(IDL.Nat32),
});
const bitcoin_get_balance_query_result = satoshi;
const bitcoin_block_height = IDL.Nat32;
const bitcoin_get_block_headers_args = IDL.Record({
'start_height' : bitcoin_block_height,
Expand Down Expand Up @@ -62,22 +56,6 @@ export const idlFactory = ({ IDL }) => {
'tip_block_hash' : bitcoin_block_hash,
'utxos' : IDL.Vec(utxo),
});
const bitcoin_get_utxos_query_args = IDL.Record({
'network' : bitcoin_network,
'filter' : IDL.Opt(
IDL.Variant({
'page' : IDL.Vec(IDL.Nat8),
'min_confirmations' : IDL.Nat32,
})
),
'address' : bitcoin_address,
});
const bitcoin_get_utxos_query_result = IDL.Record({
'next_page' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'tip_height' : bitcoin_block_height,
'tip_block_hash' : bitcoin_block_hash,
'utxos' : IDL.Vec(utxo),
});
const bitcoin_send_transaction_args = IDL.Record({
'transaction' : IDL.Vec(IDL.Nat8),
'network' : bitcoin_network,
Expand Down Expand Up @@ -340,11 +318,6 @@ export const idlFactory = ({ IDL }) => {
[bitcoin_get_balance_result],
[],
),
'bitcoin_get_balance_query' : IDL.Func(
[bitcoin_get_balance_query_args],
[bitcoin_get_balance_query_result],
['query'],
),
'bitcoin_get_block_headers' : IDL.Func(
[bitcoin_get_block_headers_args],
[bitcoin_get_block_headers_result],
Expand All @@ -360,11 +333,6 @@ export const idlFactory = ({ IDL }) => {
[bitcoin_get_utxos_result],
[],
),
'bitcoin_get_utxos_query' : IDL.Func(
[bitcoin_get_utxos_query_args],
[bitcoin_get_utxos_query_result],
['query'],
),
'bitcoin_send_transaction' : IDL.Func(
[bitcoin_send_transaction_args],
[],
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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/icp_ledger/index/index.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) 'rs/rosetta-api/icp_ledger/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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/icp_ledger/ledger.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) 'rs/rosetta-api/icp_ledger/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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/icrc1/index-ng/index-ng.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) 'rs/rosetta-api/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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/icrc1/index/index.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) 'rs/rosetta-api/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 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/icrc1/ledger/ledger.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) 'rs/rosetta-api/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 20321d1029 (2024-09-07) 'rs/nns/gtc/canister/gtc.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) '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 20321d1029 (2024-09-07) 'rs/nns/governance/canister/governance.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) '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 20321d1029 (2024-09-07) 'rs/nns/governance/canister/governance_test.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) '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 20321d1029 (2024-09-07) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
type AddWasmRequest = record {
hash : blob;
wasm : opt SnsWasm;
Expand Down
10 changes: 0 additions & 10 deletions packages/sns/candid/sns_governance.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,8 @@ export const idlFactory = ({ IDL }) => {
const NeuronRecipes = IDL.Record({
'neuron_recipes' : IDL.Vec(NeuronRecipe),
});
const NeuronParameters = IDL.Record({
'controller' : IDL.Opt(IDL.Principal),
'dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
'source_nns_neuron_id' : IDL.Opt(IDL.Nat64),
'stake_e8s' : IDL.Opt(IDL.Nat64),
'followees' : IDL.Vec(NeuronId),
'hotkey' : IDL.Opt(IDL.Principal),
'neuron_id' : IDL.Opt(NeuronId),
});
const ClaimSwapNeuronsRequest = IDL.Record({
'neuron_recipes' : IDL.Opt(NeuronRecipes),
'neuron_parameters' : IDL.Vec(NeuronParameters),
});
const SwapNeuron = IDL.Record({
'id' : IDL.Opt(NeuronId),
Expand Down
1 change: 0 additions & 1 deletion packages/sns/candid/sns_governance.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export interface ClaimOrRefreshResponse {
}
export interface ClaimSwapNeuronsRequest {
neuron_recipes: [] | [NeuronRecipes];
neuron_parameters: Array<NeuronParameters>;
}
export interface ClaimSwapNeuronsResponse {
claim_swap_neurons_result: [] | [ClaimSwapNeuronsResult];
Expand Down
3 changes: 1 addition & 2 deletions packages/sns/candid/sns_governance.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/sns/governance/canister/governance.did' by import-candid
// Generated from IC repo commit 843e71b (2024-08-14 tags: release-2024-09-06_01-30-canister-snapshots) 'rs/sns/governance/canister/governance.did' by import-candid
type Account = record {
owner : opt principal;
subaccount : opt Subaccount;
Expand Down Expand Up @@ -76,7 +76,6 @@ type ClaimOrRefreshResponse = record {

type ClaimSwapNeuronsRequest = record {
neuron_recipes : opt NeuronRecipes;
neuron_parameters : vec NeuronParameters;
};

type ClaimSwapNeuronsResponse = record {
Expand Down
10 changes: 0 additions & 10 deletions packages/sns/candid/sns_governance.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,8 @@ export const idlFactory = ({ IDL }) => {
const NeuronRecipes = IDL.Record({
'neuron_recipes' : IDL.Vec(NeuronRecipe),
});
const NeuronParameters = IDL.Record({
'controller' : IDL.Opt(IDL.Principal),
'dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
'source_nns_neuron_id' : IDL.Opt(IDL.Nat64),
'stake_e8s' : IDL.Opt(IDL.Nat64),
'followees' : IDL.Vec(NeuronId),
'hotkey' : IDL.Opt(IDL.Principal),
'neuron_id' : IDL.Opt(NeuronId),
});
const ClaimSwapNeuronsRequest = IDL.Record({
'neuron_recipes' : IDL.Opt(NeuronRecipes),
'neuron_parameters' : IDL.Vec(NeuronParameters),
});
const SwapNeuron = IDL.Record({
'id' : IDL.Opt(NeuronId),
Expand Down
10 changes: 0 additions & 10 deletions packages/sns/candid/sns_governance_test.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,8 @@ export const idlFactory = ({ IDL }) => {
const NeuronRecipes = IDL.Record({
'neuron_recipes' : IDL.Vec(NeuronRecipe),
});
const NeuronParameters = IDL.Record({
'controller' : IDL.Opt(IDL.Principal),
'dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
'source_nns_neuron_id' : IDL.Opt(IDL.Nat64),
'stake_e8s' : IDL.Opt(IDL.Nat64),
'followees' : IDL.Vec(NeuronId),
'hotkey' : IDL.Opt(IDL.Principal),
'neuron_id' : IDL.Opt(NeuronId),
});
const ClaimSwapNeuronsRequest = IDL.Record({
'neuron_recipes' : IDL.Opt(NeuronRecipes),
'neuron_parameters' : IDL.Vec(NeuronParameters),
});
const SwapNeuron = IDL.Record({
'id' : IDL.Opt(NeuronId),
Expand Down
1 change: 0 additions & 1 deletion packages/sns/candid/sns_governance_test.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export interface ClaimOrRefreshResponse {
}
export interface ClaimSwapNeuronsRequest {
neuron_recipes: [] | [NeuronRecipes];
neuron_parameters: Array<NeuronParameters>;
}
export interface ClaimSwapNeuronsResponse {
claim_swap_neurons_result: [] | [ClaimSwapNeuronsResult];
Expand Down
Loading

0 comments on commit 1b43ed0

Please sign in to comment.