Skip to content

Commit

Permalink
Update Candid Files (#708)
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>
Co-authored-by: David de Kloet <122978264+dskloetd@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 2, 2024
1 parent c74b166 commit 61c633a
Show file tree
Hide file tree
Showing 35 changed files with 1,769 additions and 482 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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid
// 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
// 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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid
// 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
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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid
// 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
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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/nns/cmc/cmc.did' by import-candid
// 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
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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icp_ledger/index/index.did' by import-candid
// 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
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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icp_ledger/ledger.did' by import-candid
// 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
// 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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icrc1/index-ng/index-ng.did' by import-candid
// 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
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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icrc1/index/index.did' by import-candid
// 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
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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icrc1/ledger/ledger.did' by import-candid
// 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
type BlockIndex = nat;
type Subaccount = blob;
// Number of nanoseconds since the UNIX epoch in UTC timezone.
Expand Down
29 changes: 23 additions & 6 deletions 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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/nns/gtc/canister/gtc.did' by import-candid
// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/nns/gtc/canister/gtc.did' by import-candid
type AccountState = record {
authenticated_principal_id : opt principal;
successfully_transferred_neurons : vec TransferredNeuron;
Expand All @@ -10,15 +10,32 @@ type AccountState = record {
has_forwarded : bool;
icpts : nat32;
};
type NeuronId = record { id : nat64 };
type Result = variant { Ok : vec NeuronId; Err : text };
type Result_1 = variant { Ok; Err : text };
type Result_2 = variant { Ok : AccountState; Err : text };

type NeuronId = record {
id : nat64
};

type Result = variant {
Ok : vec NeuronId;
Err : text
};

type Result_1 = variant {
Ok;
Err : text
};

type Result_2 = variant {
Ok : AccountState;
Err : text
};

type TransferredNeuron = record {
error : opt text;
timestamp_seconds : nat64;
neuron_id : opt NeuronId;
};

service : {
balance : (text) -> (nat32) query;
claim_neurons : (text) -> (Result);
Expand All @@ -28,4 +45,4 @@ service : {
get_build_metadata : () -> (text) query;
len : () -> (nat16) query;
total : () -> (nat32) query;
}
}
26 changes: 1 addition & 25 deletions packages/nns/candid/governance.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,17 +476,6 @@ export const idlFactory = ({ IDL }) => {
'error_message' : IDL.Text,
'error_type' : IDL.Int32,
});
const CfNeuron = IDL.Record({
'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
'hotkeys' : IDL.Opt(Principals),
'nns_neuron_id' : IDL.Nat64,
'amount_icp_e8s' : IDL.Nat64,
});
const CfParticipant = IDL.Record({
'controller' : IDL.Opt(IDL.Principal),
'hotkey_principal' : IDL.Text,
'cf_neurons' : IDL.Vec(CfNeuron),
});
const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
const SwapParticipationLimits = IDL.Record({
'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
Expand Down Expand Up @@ -564,7 +553,6 @@ export const idlFactory = ({ IDL }) => {
const ProposalData = IDL.Record({
'id' : IDL.Opt(NeuronId),
'failure_reason' : IDL.Opt(GovernanceError),
'cf_participants' : IDL.Vec(CfParticipant),
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
'proposal_timestamp_seconds' : IDL.Nat64,
'reward_event_round' : IDL.Nat64,
Expand Down Expand Up @@ -672,7 +660,7 @@ export const idlFactory = ({ IDL }) => {
'Err' : GovernanceError,
});
const Result_4 = IDL.Variant({
'Ok' : RewardNodeProviders,
'Ok' : MonthlyNodeProviderRewards,
'Err' : GovernanceError,
});
const NeuronInfo = IDL.Record({
Expand Down Expand Up @@ -1457,17 +1445,6 @@ export const init = ({ IDL }) => {
'error_message' : IDL.Text,
'error_type' : IDL.Int32,
});
const CfNeuron = IDL.Record({
'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
'hotkeys' : IDL.Opt(Principals),
'nns_neuron_id' : IDL.Nat64,
'amount_icp_e8s' : IDL.Nat64,
});
const CfParticipant = IDL.Record({
'controller' : IDL.Opt(IDL.Principal),
'hotkey_principal' : IDL.Text,
'cf_neurons' : IDL.Vec(CfNeuron),
});
const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
const SwapParticipationLimits = IDL.Record({
'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
Expand Down Expand Up @@ -1545,7 +1522,6 @@ export const init = ({ IDL }) => {
const ProposalData = IDL.Record({
'id' : IDL.Opt(NeuronId),
'failure_reason' : IDL.Opt(GovernanceError),
'cf_participants' : IDL.Vec(CfParticipant),
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
'proposal_timestamp_seconds' : IDL.Nat64,
'reward_event_round' : IDL.Nat64,
Expand Down
16 changes: 3 additions & 13 deletions packages/nns/candid/governance.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,6 @@ export interface CanisterSummary {
status: [] | [CanisterStatusResultV2];
canister_id: [] | [Principal];
}
export interface CfNeuron {
has_created_neuron_recipes: [] | [boolean];
hotkeys: [] | [Principals];
nns_neuron_id: bigint;
amount_icp_e8s: bigint;
}
export interface CfParticipant {
controller: [] | [Principal];
hotkey_principal: string;
cf_neurons: Array<CfNeuron>;
}
export type Change = { ToRemove: NodeProvider } | { ToAdd: NodeProvider };
export interface ChangeAutoStakeMaturity {
requested_setting_for_auto_stake_maturity: boolean;
Expand Down Expand Up @@ -690,7 +679,6 @@ export type ProposalActionRequest =
export interface ProposalData {
id: [] | [NeuronId];
failure_reason: [] | [GovernanceError];
cf_participants: Array<CfParticipant>;
ballots: Array<[bigint, Ballot]>;
proposal_timestamp_seconds: bigint;
reward_event_round: bigint;
Expand Down Expand Up @@ -750,7 +738,9 @@ export type Result_2 = { Ok: Neuron } | { Err: GovernanceError };
export type Result_3 =
| { Ok: GovernanceCachedMetrics }
| { Err: GovernanceError };
export type Result_4 = { Ok: RewardNodeProviders } | { Err: GovernanceError };
export type Result_4 =
| { Ok: MonthlyNodeProviderRewards }
| { Err: GovernanceError };
export type Result_5 = { Ok: NeuronInfo } | { Err: GovernanceError };
export type Result_6 = { Ok: Ok } | { Err: GovernanceError };
export type Result_7 = { Ok: NodeProvider } | { Err: GovernanceError };
Expand Down
Loading

0 comments on commit 61c633a

Please sign in to comment.