@dfinity/nns 10.4.0 → 11.0.0-next-2025-10-20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +8 -8
  2. package/dist/candid/genesis_token.certified.idl.d.ts +1 -1
  3. package/dist/candid/genesis_token.certified.idl.js +41 -30
  4. package/dist/candid/genesis_token.d.ts +11 -3
  5. package/dist/candid/genesis_token.idl.d.ts +1 -1
  6. package/dist/candid/genesis_token.idl.js +41 -30
  7. package/dist/candid/governance.certified.idl.d.ts +1 -1
  8. package/dist/candid/governance.certified.idl.js +1272 -1304
  9. package/dist/candid/governance.d.ts +11 -3
  10. package/dist/candid/governance.idl.d.ts +1 -1
  11. package/dist/candid/governance.idl.js +1280 -1320
  12. package/dist/candid/governance_test.certified.idl.d.ts +1 -1
  13. package/dist/candid/governance_test.certified.idl.js +1273 -1305
  14. package/dist/candid/governance_test.d.ts +11 -3
  15. package/dist/candid/governance_test.idl.d.ts +1 -1
  16. package/dist/candid/governance_test.idl.js +1281 -1321
  17. package/dist/candid/old_list_neurons_service.certified.idl.js +60 -60
  18. package/dist/candid/sns_wasm.certified.idl.d.ts +1 -1
  19. package/dist/candid/sns_wasm.certified.idl.js +230 -224
  20. package/dist/candid/sns_wasm.d.ts +11 -3
  21. package/dist/candid/sns_wasm.idl.d.ts +1 -1
  22. package/dist/candid/sns_wasm.idl.js +230 -224
  23. package/dist/{types/canisters → canisters}/governance/request.converters.d.ts +2 -2
  24. package/dist/{types/canisters → canisters}/governance/response.converters.d.ts +2 -2
  25. package/dist/{types/canisters → canisters}/governance/services.d.ts +1 -1
  26. package/dist/{types/constants → constants}/canister_ids.d.ts +1 -1
  27. package/dist/{types/errors → errors}/governance.errors.d.ts +1 -1
  28. package/dist/{types/genesis_token.canister.d.ts → genesis_token.canister.d.ts} +1 -1
  29. package/dist/{types/governance.canister.d.ts → governance.canister.d.ts} +2 -2
  30. package/dist/{types/governance_test.canister.d.ts → governance_test.canister.d.ts} +2 -2
  31. package/dist/{types/index.d.ts → index.d.ts} +2 -2
  32. package/dist/index.js +8 -1
  33. package/dist/index.js.map +7 -0
  34. package/dist/index.mjs +10 -0
  35. package/dist/index.mjs.map +7 -0
  36. package/dist/{types/sns_wasm.canister.d.ts → sns_wasm.canister.d.ts} +1 -1
  37. package/dist/types/{types/governance.options.d.ts → governance.options.d.ts} +2 -2
  38. package/dist/types/{types/governance_converters.d.ts → governance_converters.d.ts} +2 -2
  39. package/dist/types/{types/sns_wasm.options.d.ts → sns_wasm.options.d.ts} +1 -1
  40. package/dist/{types/utils → utils}/account_identifier.utils.d.ts +1 -1
  41. package/dist/{types/utils → utils}/neurons.utils.d.ts +1 -1
  42. package/package.json +23 -12
  43. package/dist/cjs/index.cjs.js +0 -8
  44. package/dist/cjs/index.cjs.js.map +0 -7
  45. package/dist/esm/chunk-6RTK3IEW.js +0 -2
  46. package/dist/esm/chunk-6RTK3IEW.js.map +0 -7
  47. package/dist/esm/chunk-GJ7FSPCW.js +0 -2
  48. package/dist/esm/chunk-GJ7FSPCW.js.map +0 -7
  49. package/dist/esm/chunk-HK4WSMGK.js +0 -8
  50. package/dist/esm/chunk-HK4WSMGK.js.map +0 -7
  51. package/dist/esm/chunk-W6BBRGPQ.js +0 -2
  52. package/dist/esm/chunk-W6BBRGPQ.js.map +0 -7
  53. package/dist/esm/genesis_token.canister.js +0 -2
  54. package/dist/esm/genesis_token.canister.js.map +0 -7
  55. package/dist/esm/governance.canister.js +0 -2
  56. package/dist/esm/governance.canister.js.map +0 -7
  57. package/dist/esm/index.js +0 -2
  58. package/dist/esm/index.js.map +0 -7
  59. package/dist/esm/sns_wasm.canister.js +0 -2
  60. package/dist/esm/sns_wasm.canister.js.map +0 -7
  61. package/dist/index.cjs.js +0 -1
  62. /package/dist/{types/constants → constants}/constants.d.ts +0 -0
  63. /package/dist/{types/enums → enums}/governance.enums.d.ts +0 -0
  64. /package/dist/types/{types/common.d.ts → common.d.ts} +0 -0
@@ -1,325 +1,331 @@
1
- /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/sns_wasm.did */
1
+ /* eslint-disable */
2
+
3
+ // @ts-nocheck
4
+
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
6
+ // You should NOT make any changes in this file as it will be overwritten.
7
+ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
+
2
9
  export const idlFactory = ({ IDL }) => {
3
10
  const SnsWasmCanisterInitPayload = IDL.Record({
4
- 'allowed_principals' : IDL.Vec(IDL.Principal),
5
- 'access_controls_enabled' : IDL.Bool,
6
- 'sns_subnet_ids' : IDL.Vec(IDL.Principal),
11
+ allowed_principals: IDL.Vec(IDL.Principal),
12
+ access_controls_enabled: IDL.Bool,
13
+ sns_subnet_ids: IDL.Vec(IDL.Principal),
7
14
  });
8
15
  const SnsWasm = IDL.Record({
9
- 'wasm' : IDL.Vec(IDL.Nat8),
10
- 'proposal_id' : IDL.Opt(IDL.Nat64),
11
- 'canister_type' : IDL.Int32,
16
+ wasm: IDL.Vec(IDL.Nat8),
17
+ proposal_id: IDL.Opt(IDL.Nat64),
18
+ canister_type: IDL.Int32,
12
19
  });
13
20
  const AddWasmRequest = IDL.Record({
14
- 'hash' : IDL.Vec(IDL.Nat8),
15
- 'wasm' : IDL.Opt(SnsWasm),
16
- 'skip_update_latest_version' : IDL.Opt(IDL.Bool),
21
+ hash: IDL.Vec(IDL.Nat8),
22
+ wasm: IDL.Opt(SnsWasm),
23
+ skip_update_latest_version: IDL.Opt(IDL.Bool),
17
24
  });
18
- const SnsWasmError = IDL.Record({ 'message' : IDL.Text });
25
+ const SnsWasmError = IDL.Record({ message: IDL.Text });
19
26
  const Result = IDL.Variant({
20
- 'Error' : SnsWasmError,
21
- 'Hash' : IDL.Vec(IDL.Nat8),
27
+ Error: SnsWasmError,
28
+ Hash: IDL.Vec(IDL.Nat8),
22
29
  });
23
- const AddWasmResponse = IDL.Record({ 'result' : IDL.Opt(Result) });
30
+ const AddWasmResponse = IDL.Record({ result: IDL.Opt(Result) });
24
31
  const NeuronBasketConstructionParameters = IDL.Record({
25
- 'dissolve_delay_interval_seconds' : IDL.Nat64,
26
- 'count' : IDL.Nat64,
32
+ dissolve_delay_interval_seconds: IDL.Nat64,
33
+ count: IDL.Nat64,
27
34
  });
28
- const Canister = IDL.Record({ 'id' : IDL.Opt(IDL.Principal) });
29
- const DappCanisters = IDL.Record({ 'canisters' : IDL.Vec(Canister) });
35
+ const Canister = IDL.Record({ id: IDL.Opt(IDL.Principal) });
36
+ const DappCanisters = IDL.Record({ canisters: IDL.Vec(Canister) });
30
37
  const LinearScalingCoefficient = IDL.Record({
31
- 'slope_numerator' : IDL.Opt(IDL.Nat64),
32
- 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),
33
- 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
34
- 'slope_denominator' : IDL.Opt(IDL.Nat64),
35
- 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
38
+ slope_numerator: IDL.Opt(IDL.Nat64),
39
+ intercept_icp_e8s: IDL.Opt(IDL.Nat64),
40
+ from_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
41
+ slope_denominator: IDL.Opt(IDL.Nat64),
42
+ to_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
36
43
  });
37
44
  const IdealMatchedParticipationFunction = IDL.Record({
38
- 'serialized_representation' : IDL.Opt(IDL.Text),
45
+ serialized_representation: IDL.Opt(IDL.Text),
39
46
  });
40
47
  const NeuronsFundParticipationConstraints = IDL.Record({
41
- 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
42
- 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
43
- 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
44
- 'ideal_matched_participation_function' : IDL.Opt(
45
- IdealMatchedParticipationFunction
48
+ coefficient_intervals: IDL.Vec(LinearScalingCoefficient),
49
+ max_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
50
+ min_direct_participation_threshold_icp_e8s: IDL.Opt(IDL.Nat64),
51
+ ideal_matched_participation_function: IDL.Opt(
52
+ IdealMatchedParticipationFunction,
46
53
  ),
47
54
  });
48
- const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });
55
+ const TreasuryDistribution = IDL.Record({ total_e8s: IDL.Nat64 });
49
56
  const NeuronDistribution = IDL.Record({
50
- 'controller' : IDL.Opt(IDL.Principal),
51
- 'dissolve_delay_seconds' : IDL.Nat64,
52
- 'memo' : IDL.Nat64,
53
- 'stake_e8s' : IDL.Nat64,
54
- 'vesting_period_seconds' : IDL.Opt(IDL.Nat64),
57
+ controller: IDL.Opt(IDL.Principal),
58
+ dissolve_delay_seconds: IDL.Nat64,
59
+ memo: IDL.Nat64,
60
+ stake_e8s: IDL.Nat64,
61
+ vesting_period_seconds: IDL.Opt(IDL.Nat64),
55
62
  });
56
63
  const DeveloperDistribution = IDL.Record({
57
- 'developer_neurons' : IDL.Vec(NeuronDistribution),
64
+ developer_neurons: IDL.Vec(NeuronDistribution),
58
65
  });
59
66
  const SwapDistribution = IDL.Record({
60
- 'total_e8s' : IDL.Nat64,
61
- 'initial_swap_amount_e8s' : IDL.Nat64,
67
+ total_e8s: IDL.Nat64,
68
+ initial_swap_amount_e8s: IDL.Nat64,
62
69
  });
63
70
  const FractionalDeveloperVotingPower = IDL.Record({
64
- 'treasury_distribution' : IDL.Opt(TreasuryDistribution),
65
- 'developer_distribution' : IDL.Opt(DeveloperDistribution),
66
- 'swap_distribution' : IDL.Opt(SwapDistribution),
71
+ treasury_distribution: IDL.Opt(TreasuryDistribution),
72
+ developer_distribution: IDL.Opt(DeveloperDistribution),
73
+ swap_distribution: IDL.Opt(SwapDistribution),
67
74
  });
68
75
  const InitialTokenDistribution = IDL.Variant({
69
- 'FractionalDeveloperVotingPower' : FractionalDeveloperVotingPower,
76
+ FractionalDeveloperVotingPower: FractionalDeveloperVotingPower,
70
77
  });
71
- const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });
78
+ const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
72
79
  const SnsInitPayload = IDL.Record({
73
- 'url' : IDL.Opt(IDL.Text),
74
- 'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
75
- 'max_dissolve_delay_bonus_percentage' : IDL.Opt(IDL.Nat64),
76
- 'nns_proposal_id' : IDL.Opt(IDL.Nat64),
77
- 'neurons_fund_participation' : IDL.Opt(IDL.Bool),
78
- 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
79
- 'neuron_basket_construction_parameters' : IDL.Opt(
80
- NeuronBasketConstructionParameters
80
+ url: IDL.Opt(IDL.Text),
81
+ max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
82
+ max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
83
+ nns_proposal_id: IDL.Opt(IDL.Nat64),
84
+ neurons_fund_participation: IDL.Opt(IDL.Bool),
85
+ min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
86
+ neuron_basket_construction_parameters: IDL.Opt(
87
+ NeuronBasketConstructionParameters,
81
88
  ),
82
- 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),
83
- 'token_symbol' : IDL.Opt(IDL.Text),
84
- 'final_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
85
- 'max_icp_e8s' : IDL.Opt(IDL.Nat64),
86
- 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
87
- 'confirmation_text' : IDL.Opt(IDL.Text),
88
- 'logo' : IDL.Opt(IDL.Text),
89
- 'name' : IDL.Opt(IDL.Text),
90
- 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
91
- 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),
92
- 'initial_voting_period_seconds' : IDL.Opt(IDL.Nat64),
93
- 'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
94
- 'description' : IDL.Opt(IDL.Text),
95
- 'max_neuron_age_seconds_for_age_bonus' : IDL.Opt(IDL.Nat64),
96
- 'min_participants' : IDL.Opt(IDL.Nat64),
97
- 'initial_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
98
- 'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),
99
- 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
100
- 'dapp_canisters' : IDL.Opt(DappCanisters),
101
- 'neurons_fund_participation_constraints' : IDL.Opt(
102
- NeuronsFundParticipationConstraints
89
+ fallback_controller_principal_ids: IDL.Vec(IDL.Text),
90
+ token_symbol: IDL.Opt(IDL.Text),
91
+ final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
92
+ max_icp_e8s: IDL.Opt(IDL.Nat64),
93
+ neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
94
+ confirmation_text: IDL.Opt(IDL.Text),
95
+ logo: IDL.Opt(IDL.Text),
96
+ name: IDL.Opt(IDL.Text),
97
+ swap_start_timestamp_seconds: IDL.Opt(IDL.Nat64),
98
+ swap_due_timestamp_seconds: IDL.Opt(IDL.Nat64),
99
+ initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
100
+ neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
101
+ description: IDL.Opt(IDL.Text),
102
+ max_neuron_age_seconds_for_age_bonus: IDL.Opt(IDL.Nat64),
103
+ min_participants: IDL.Opt(IDL.Nat64),
104
+ initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
105
+ wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
106
+ transaction_fee_e8s: IDL.Opt(IDL.Nat64),
107
+ dapp_canisters: IDL.Opt(DappCanisters),
108
+ neurons_fund_participation_constraints: IDL.Opt(
109
+ NeuronsFundParticipationConstraints,
103
110
  ),
104
- 'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),
105
- 'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),
106
- 'reward_rate_transition_duration_seconds' : IDL.Opt(IDL.Nat64),
107
- 'token_logo' : IDL.Opt(IDL.Text),
108
- 'token_name' : IDL.Opt(IDL.Text),
109
- 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
110
- 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
111
- 'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),
112
- 'restricted_countries' : IDL.Opt(Countries),
113
- 'min_icp_e8s' : IDL.Opt(IDL.Nat64),
114
- 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
111
+ max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
112
+ initial_token_distribution: IDL.Opt(InitialTokenDistribution),
113
+ reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
114
+ token_logo: IDL.Opt(IDL.Text),
115
+ token_name: IDL.Opt(IDL.Text),
116
+ max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
117
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
118
+ proposal_reject_cost_e8s: IDL.Opt(IDL.Nat64),
119
+ restricted_countries: IDL.Opt(Countries),
120
+ min_icp_e8s: IDL.Opt(IDL.Nat64),
121
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
115
122
  });
116
123
  const DeployNewSnsRequest = IDL.Record({
117
- 'sns_init_payload' : IDL.Opt(SnsInitPayload),
124
+ sns_init_payload: IDL.Opt(SnsInitPayload),
118
125
  });
119
126
  const DappCanistersTransferResult = IDL.Record({
120
- 'restored_dapp_canisters' : IDL.Vec(Canister),
121
- 'nns_controlled_dapp_canisters' : IDL.Vec(Canister),
122
- 'sns_controlled_dapp_canisters' : IDL.Vec(Canister),
127
+ restored_dapp_canisters: IDL.Vec(Canister),
128
+ nns_controlled_dapp_canisters: IDL.Vec(Canister),
129
+ sns_controlled_dapp_canisters: IDL.Vec(Canister),
123
130
  });
124
131
  const SnsCanisterIds = IDL.Record({
125
- 'root' : IDL.Opt(IDL.Principal),
126
- 'swap' : IDL.Opt(IDL.Principal),
127
- 'ledger' : IDL.Opt(IDL.Principal),
128
- 'index' : IDL.Opt(IDL.Principal),
129
- 'governance' : IDL.Opt(IDL.Principal),
132
+ root: IDL.Opt(IDL.Principal),
133
+ swap: IDL.Opt(IDL.Principal),
134
+ ledger: IDL.Opt(IDL.Principal),
135
+ index: IDL.Opt(IDL.Principal),
136
+ governance: IDL.Opt(IDL.Principal),
130
137
  });
131
138
  const DeployNewSnsResponse = IDL.Record({
132
- 'dapp_canisters_transfer_result' : IDL.Opt(DappCanistersTransferResult),
133
- 'subnet_id' : IDL.Opt(IDL.Principal),
134
- 'error' : IDL.Opt(SnsWasmError),
135
- 'canisters' : IDL.Opt(SnsCanisterIds),
139
+ dapp_canisters_transfer_result: IDL.Opt(DappCanistersTransferResult),
140
+ subnet_id: IDL.Opt(IDL.Principal),
141
+ error: IDL.Opt(SnsWasmError),
142
+ canisters: IDL.Opt(SnsCanisterIds),
136
143
  });
137
144
  const GetAllowedPrincipalsResponse = IDL.Record({
138
- 'allowed_principals' : IDL.Vec(IDL.Principal),
145
+ allowed_principals: IDL.Vec(IDL.Principal),
139
146
  });
140
147
  const GetDeployedSnsByProposalIdRequest = IDL.Record({
141
- 'proposal_id' : IDL.Nat64,
148
+ proposal_id: IDL.Nat64,
142
149
  });
143
150
  const DeployedSns = IDL.Record({
144
- 'root_canister_id' : IDL.Opt(IDL.Principal),
145
- 'governance_canister_id' : IDL.Opt(IDL.Principal),
146
- 'index_canister_id' : IDL.Opt(IDL.Principal),
147
- 'swap_canister_id' : IDL.Opt(IDL.Principal),
148
- 'ledger_canister_id' : IDL.Opt(IDL.Principal),
151
+ root_canister_id: IDL.Opt(IDL.Principal),
152
+ governance_canister_id: IDL.Opt(IDL.Principal),
153
+ index_canister_id: IDL.Opt(IDL.Principal),
154
+ swap_canister_id: IDL.Opt(IDL.Principal),
155
+ ledger_canister_id: IDL.Opt(IDL.Principal),
149
156
  });
150
157
  const GetDeployedSnsByProposalIdResult = IDL.Variant({
151
- 'Error' : SnsWasmError,
152
- 'DeployedSns' : DeployedSns,
158
+ Error: SnsWasmError,
159
+ DeployedSns: DeployedSns,
153
160
  });
154
161
  const GetDeployedSnsByProposalIdResponse = IDL.Record({
155
- 'get_deployed_sns_by_proposal_id_result' : IDL.Opt(
156
- GetDeployedSnsByProposalIdResult
162
+ get_deployed_sns_by_proposal_id_result: IDL.Opt(
163
+ GetDeployedSnsByProposalIdResult,
157
164
  ),
158
165
  });
159
166
  const SnsVersion = IDL.Record({
160
- 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
161
- 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
162
- 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
163
- 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
164
- 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
165
- 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
167
+ archive_wasm_hash: IDL.Vec(IDL.Nat8),
168
+ root_wasm_hash: IDL.Vec(IDL.Nat8),
169
+ swap_wasm_hash: IDL.Vec(IDL.Nat8),
170
+ ledger_wasm_hash: IDL.Vec(IDL.Nat8),
171
+ governance_wasm_hash: IDL.Vec(IDL.Nat8),
172
+ index_wasm_hash: IDL.Vec(IDL.Nat8),
166
173
  });
167
174
  const GetNextSnsVersionRequest = IDL.Record({
168
- 'governance_canister_id' : IDL.Opt(IDL.Principal),
169
- 'current_version' : IDL.Opt(SnsVersion),
175
+ governance_canister_id: IDL.Opt(IDL.Principal),
176
+ current_version: IDL.Opt(SnsVersion),
170
177
  });
171
178
  const GetNextSnsVersionResponse = IDL.Record({
172
- 'next_version' : IDL.Opt(SnsVersion),
179
+ next_version: IDL.Opt(SnsVersion),
173
180
  });
174
181
  const GetProposalIdThatAddedWasmRequest = IDL.Record({
175
- 'hash' : IDL.Vec(IDL.Nat8),
182
+ hash: IDL.Vec(IDL.Nat8),
176
183
  });
177
184
  const GetProposalIdThatAddedWasmResponse = IDL.Record({
178
- 'proposal_id' : IDL.Opt(IDL.Nat64),
185
+ proposal_id: IDL.Opt(IDL.Nat64),
179
186
  });
180
187
  const GetSnsSubnetIdsResponse = IDL.Record({
181
- 'sns_subnet_ids' : IDL.Vec(IDL.Principal),
188
+ sns_subnet_ids: IDL.Vec(IDL.Principal),
182
189
  });
183
- const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
184
- const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });
190
+ const GetWasmRequest = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
191
+ const GetWasmResponse = IDL.Record({ wasm: IDL.Opt(SnsWasm) });
185
192
  const GetWasmMetadataRequest = IDL.Record({
186
- 'hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
193
+ hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
187
194
  });
188
195
  const MetadataSection = IDL.Record({
189
- 'contents' : IDL.Opt(IDL.Vec(IDL.Nat8)),
190
- 'name' : IDL.Opt(IDL.Text),
191
- 'visibility' : IDL.Opt(IDL.Text),
196
+ contents: IDL.Opt(IDL.Vec(IDL.Nat8)),
197
+ name: IDL.Opt(IDL.Text),
198
+ visibility: IDL.Opt(IDL.Text),
192
199
  });
193
- const Ok = IDL.Record({ 'sections' : IDL.Vec(MetadataSection) });
194
- const Result_1 = IDL.Variant({ 'Ok' : Ok, 'Error' : SnsWasmError });
195
- const GetWasmMetadataResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });
200
+ const Ok = IDL.Record({ sections: IDL.Vec(MetadataSection) });
201
+ const Result_1 = IDL.Variant({ Ok: Ok, Error: SnsWasmError });
202
+ const GetWasmMetadataResponse = IDL.Record({ result: IDL.Opt(Result_1) });
196
203
  const SnsUpgrade = IDL.Record({
197
- 'next_version' : IDL.Opt(SnsVersion),
198
- 'current_version' : IDL.Opt(SnsVersion),
204
+ next_version: IDL.Opt(SnsVersion),
205
+ current_version: IDL.Opt(SnsVersion),
199
206
  });
200
207
  const InsertUpgradePathEntriesRequest = IDL.Record({
201
- 'upgrade_path' : IDL.Vec(SnsUpgrade),
202
- 'sns_governance_canister_id' : IDL.Opt(IDL.Principal),
208
+ upgrade_path: IDL.Vec(SnsUpgrade),
209
+ sns_governance_canister_id: IDL.Opt(IDL.Principal),
203
210
  });
204
211
  const InsertUpgradePathEntriesResponse = IDL.Record({
205
- 'error' : IDL.Opt(SnsWasmError),
212
+ error: IDL.Opt(SnsWasmError),
206
213
  });
207
214
  const ListDeployedSnsesResponse = IDL.Record({
208
- 'instances' : IDL.Vec(DeployedSns),
215
+ instances: IDL.Vec(DeployedSns),
209
216
  });
210
217
  const ListUpgradeStepsRequest = IDL.Record({
211
- 'limit' : IDL.Nat32,
212
- 'starting_at' : IDL.Opt(SnsVersion),
213
- 'sns_governance_canister_id' : IDL.Opt(IDL.Principal),
218
+ limit: IDL.Nat32,
219
+ starting_at: IDL.Opt(SnsVersion),
220
+ sns_governance_canister_id: IDL.Opt(IDL.Principal),
214
221
  });
215
222
  const PrettySnsVersion = IDL.Record({
216
- 'archive_wasm_hash' : IDL.Text,
217
- 'root_wasm_hash' : IDL.Text,
218
- 'swap_wasm_hash' : IDL.Text,
219
- 'ledger_wasm_hash' : IDL.Text,
220
- 'governance_wasm_hash' : IDL.Text,
221
- 'index_wasm_hash' : IDL.Text,
223
+ archive_wasm_hash: IDL.Text,
224
+ root_wasm_hash: IDL.Text,
225
+ swap_wasm_hash: IDL.Text,
226
+ ledger_wasm_hash: IDL.Text,
227
+ governance_wasm_hash: IDL.Text,
228
+ index_wasm_hash: IDL.Text,
222
229
  });
223
230
  const ListUpgradeStep = IDL.Record({
224
- 'pretty_version' : IDL.Opt(PrettySnsVersion),
225
- 'version' : IDL.Opt(SnsVersion),
231
+ pretty_version: IDL.Opt(PrettySnsVersion),
232
+ version: IDL.Opt(SnsVersion),
226
233
  });
227
234
  const ListUpgradeStepsResponse = IDL.Record({
228
- 'steps' : IDL.Vec(ListUpgradeStep),
235
+ steps: IDL.Vec(ListUpgradeStep),
229
236
  });
230
237
  const UpdateAllowedPrincipalsRequest = IDL.Record({
231
- 'added_principals' : IDL.Vec(IDL.Principal),
232
- 'removed_principals' : IDL.Vec(IDL.Principal),
238
+ added_principals: IDL.Vec(IDL.Principal),
239
+ removed_principals: IDL.Vec(IDL.Principal),
233
240
  });
234
241
  const UpdateAllowedPrincipalsResult = IDL.Variant({
235
- 'Error' : SnsWasmError,
236
- 'AllowedPrincipals' : GetAllowedPrincipalsResponse,
242
+ Error: SnsWasmError,
243
+ AllowedPrincipals: GetAllowedPrincipalsResponse,
237
244
  });
238
245
  const UpdateAllowedPrincipalsResponse = IDL.Record({
239
- 'update_allowed_principals_result' : IDL.Opt(UpdateAllowedPrincipalsResult),
246
+ update_allowed_principals_result: IDL.Opt(UpdateAllowedPrincipalsResult),
240
247
  });
241
248
  const UpdateSnsSubnetListRequest = IDL.Record({
242
- 'sns_subnet_ids_to_add' : IDL.Vec(IDL.Principal),
243
- 'sns_subnet_ids_to_remove' : IDL.Vec(IDL.Principal),
249
+ sns_subnet_ids_to_add: IDL.Vec(IDL.Principal),
250
+ sns_subnet_ids_to_remove: IDL.Vec(IDL.Principal),
244
251
  });
245
252
  const UpdateSnsSubnetListResponse = IDL.Record({
246
- 'error' : IDL.Opt(SnsWasmError),
253
+ error: IDL.Opt(SnsWasmError),
247
254
  });
255
+
248
256
  return IDL.Service({
249
- 'add_wasm' : IDL.Func([AddWasmRequest], [AddWasmResponse], []),
250
- 'deploy_new_sns' : IDL.Func(
251
- [DeployNewSnsRequest],
252
- [DeployNewSnsResponse],
253
- [],
254
- ),
255
- 'get_allowed_principals' : IDL.Func(
256
- [IDL.Record({})],
257
- [GetAllowedPrincipalsResponse],
258
- ['query'],
259
- ),
260
- 'get_deployed_sns_by_proposal_id' : IDL.Func(
261
- [GetDeployedSnsByProposalIdRequest],
262
- [GetDeployedSnsByProposalIdResponse],
263
- ['query'],
264
- ),
265
- 'get_latest_sns_version_pretty' : IDL.Func(
266
- [IDL.Null],
267
- [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
268
- ['query'],
269
- ),
270
- 'get_next_sns_version' : IDL.Func(
271
- [GetNextSnsVersionRequest],
272
- [GetNextSnsVersionResponse],
273
- ['query'],
274
- ),
275
- 'get_proposal_id_that_added_wasm' : IDL.Func(
276
- [GetProposalIdThatAddedWasmRequest],
277
- [GetProposalIdThatAddedWasmResponse],
278
- ['query'],
279
- ),
280
- 'get_sns_subnet_ids' : IDL.Func(
281
- [IDL.Record({})],
282
- [GetSnsSubnetIdsResponse],
283
- ['query'],
284
- ),
285
- 'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], ['query']),
286
- 'get_wasm_metadata' : IDL.Func(
287
- [GetWasmMetadataRequest],
288
- [GetWasmMetadataResponse],
289
- ['query'],
290
- ),
291
- 'insert_upgrade_path_entries' : IDL.Func(
292
- [InsertUpgradePathEntriesRequest],
293
- [InsertUpgradePathEntriesResponse],
294
- [],
295
- ),
296
- 'list_deployed_snses' : IDL.Func(
297
- [IDL.Record({})],
298
- [ListDeployedSnsesResponse],
299
- ['query'],
300
- ),
301
- 'list_upgrade_steps' : IDL.Func(
302
- [ListUpgradeStepsRequest],
303
- [ListUpgradeStepsResponse],
304
- ['query'],
305
- ),
306
- 'update_allowed_principals' : IDL.Func(
307
- [UpdateAllowedPrincipalsRequest],
308
- [UpdateAllowedPrincipalsResponse],
309
- [],
310
- ),
311
- 'update_sns_subnet_list' : IDL.Func(
312
- [UpdateSnsSubnetListRequest],
313
- [UpdateSnsSubnetListResponse],
314
- [],
315
- ),
257
+ add_wasm: IDL.Func([AddWasmRequest], [AddWasmResponse], []),
258
+ deploy_new_sns: IDL.Func([DeployNewSnsRequest], [DeployNewSnsResponse], []),
259
+ get_allowed_principals: IDL.Func(
260
+ [IDL.Record({})],
261
+ [GetAllowedPrincipalsResponse],
262
+ ["query"],
263
+ ),
264
+ get_deployed_sns_by_proposal_id: IDL.Func(
265
+ [GetDeployedSnsByProposalIdRequest],
266
+ [GetDeployedSnsByProposalIdResponse],
267
+ ["query"],
268
+ ),
269
+ get_latest_sns_version_pretty: IDL.Func(
270
+ [IDL.Null],
271
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
272
+ ["query"],
273
+ ),
274
+ get_next_sns_version: IDL.Func(
275
+ [GetNextSnsVersionRequest],
276
+ [GetNextSnsVersionResponse],
277
+ ["query"],
278
+ ),
279
+ get_proposal_id_that_added_wasm: IDL.Func(
280
+ [GetProposalIdThatAddedWasmRequest],
281
+ [GetProposalIdThatAddedWasmResponse],
282
+ ["query"],
283
+ ),
284
+ get_sns_subnet_ids: IDL.Func(
285
+ [IDL.Record({})],
286
+ [GetSnsSubnetIdsResponse],
287
+ ["query"],
288
+ ),
289
+ get_wasm: IDL.Func([GetWasmRequest], [GetWasmResponse], ["query"]),
290
+ get_wasm_metadata: IDL.Func(
291
+ [GetWasmMetadataRequest],
292
+ [GetWasmMetadataResponse],
293
+ ["query"],
294
+ ),
295
+ insert_upgrade_path_entries: IDL.Func(
296
+ [InsertUpgradePathEntriesRequest],
297
+ [InsertUpgradePathEntriesResponse],
298
+ [],
299
+ ),
300
+ list_deployed_snses: IDL.Func(
301
+ [IDL.Record({})],
302
+ [ListDeployedSnsesResponse],
303
+ ["query"],
304
+ ),
305
+ list_upgrade_steps: IDL.Func(
306
+ [ListUpgradeStepsRequest],
307
+ [ListUpgradeStepsResponse],
308
+ ["query"],
309
+ ),
310
+ update_allowed_principals: IDL.Func(
311
+ [UpdateAllowedPrincipalsRequest],
312
+ [UpdateAllowedPrincipalsResponse],
313
+ [],
314
+ ),
315
+ update_sns_subnet_list: IDL.Func(
316
+ [UpdateSnsSubnetListRequest],
317
+ [UpdateSnsSubnetListResponse],
318
+ [],
319
+ ),
316
320
  });
317
321
  };
322
+
318
323
  export const init = ({ IDL }) => {
319
324
  const SnsWasmCanisterInitPayload = IDL.Record({
320
- 'allowed_principals' : IDL.Vec(IDL.Principal),
321
- 'access_controls_enabled' : IDL.Bool,
322
- 'sns_subnet_ids' : IDL.Vec(IDL.Principal),
325
+ allowed_principals: IDL.Vec(IDL.Principal),
326
+ access_controls_enabled: IDL.Bool,
327
+ sns_subnet_ids: IDL.Vec(IDL.Principal),
323
328
  });
329
+
324
330
  return [SnsWasmCanisterInitPayload];
325
331
  };
@@ -1,6 +1,6 @@
1
1
  import type { AccountIdentifier as AccountIdentifierClass, AccountIdentifierHex } from "@dfinity/ledger-icp";
2
- import { Principal } from "@dfinity/principal";
3
- import type { ListProposalInfo, NeuronSubaccount, AccountIdentifier as RawAccountIdentifier, ManageNeuronCommandRequest as RawCommand, ListNeurons as RawListNeurons, ManageNeuronRequest as RawManageNeuron, Operation as RawOperation } from "../../../candid/governance";
2
+ import { Principal } from "@icp-sdk/core/principal";
3
+ import type { ListProposalInfo, NeuronSubaccount, AccountIdentifier as RawAccountIdentifier, ManageNeuronCommandRequest as RawCommand, ListNeurons as RawListNeurons, ManageNeuronRequest as RawManageNeuron, Operation as RawOperation } from "../../candid/governance";
4
4
  import type { NeuronVisibility, Vote } from "../../enums/governance.enums";
5
5
  import type { E8s, NeuronId } from "../../types/common";
6
6
  import type { Account, ClaimOrRefreshNeuronRequest, DisburseToNeuronRequest, FollowRequest, FolloweesForTopic, ListProposalsRequest, MakeProposalRequest, ManageNeuronRequest, ProposalId } from "../../types/governance_converters";
@@ -1,5 +1,5 @@
1
- import { Principal } from "@dfinity/principal";
2
- import type { GovernanceCachedMetrics as RawGovernanceCachedMetrics, KnownNeuron as RawKnownNeuron, ListNeuronsResponse as RawListNeuronsResponse, ListProposalInfoResponse as RawListProposalInfoResponse, NetworkEconomics as RawNetworkEconomics, Neuron as RawNeuron, NeuronInfo as RawNeuronInfo, ProposalInfo as RawProposalInfo } from "../../../candid/governance";
1
+ import { Principal } from "@icp-sdk/core/principal";
2
+ import type { GovernanceCachedMetrics as RawGovernanceCachedMetrics, KnownNeuron as RawKnownNeuron, ListNeuronsResponse as RawListNeuronsResponse, ListProposalInfoResponse as RawListProposalInfoResponse, NetworkEconomics as RawNetworkEconomics, Neuron as RawNeuron, NeuronInfo as RawNeuronInfo, ProposalInfo as RawProposalInfo } from "../../candid/governance";
3
3
  import type { GovernanceCachedMetrics, KnownNeuron, ListProposalsResponse, NetworkEconomics, Neuron, NeuronInfo, ProposalInfo } from "../../types/governance_converters";
4
4
  export declare const toNeuronInfo: ({ neuronId, neuronInfo, rawNeuron, canisterId, }: {
5
5
  neuronId: bigint;
@@ -1,4 +1,4 @@
1
- import type { Command_1, _SERVICE as GovernanceService, ManageNeuronRequest, ManageNeuronResponse } from "../../../candid/governance";
1
+ import type { Command_1, _SERVICE as GovernanceService, ManageNeuronRequest, ManageNeuronResponse } from "../../candid/governance";
2
2
  /**
3
3
  * Checks a Manage Neuron Response for error and returns successful response data.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Principal } from "@dfinity/principal";
1
+ import { Principal } from "@icp-sdk/core/principal";
2
2
  export declare const GOVERNANCE_CANISTER_ID: Principal;
3
3
  export declare const MAINNET_GOVERNANCE_CANISTER_ID: Principal;
4
4
  export declare const MAINNET_GENESIS_TOKEN_CANISTER_ID: Principal;
@@ -1,4 +1,4 @@
1
- import type { GovernanceError as GovernanceErrorDetail } from "../../candid/governance";
1
+ import type { GovernanceError as GovernanceErrorDetail } from "../candid/governance";
2
2
  export declare abstract class StakeNeuronError extends Error {
3
3
  }
4
4
  export declare class CouldNotClaimNeuronError extends StakeNeuronError {
@@ -1,5 +1,5 @@
1
1
  import { type CanisterOptions } from "@dfinity/utils";
2
- import type { _SERVICE as GenesisTokenService } from "../candid/genesis_token";
2
+ import type { _SERVICE as GenesisTokenService } from "./candid/genesis_token";
3
3
  import type { NeuronId } from "./types/common";
4
4
  export declare class GenesisTokenCanister {
5
5
  private readonly service;
@@ -1,6 +1,6 @@
1
1
  import { type AccountIdentifierHex, type LedgerCanister } from "@dfinity/ledger-icp";
2
- import type { Principal } from "@dfinity/principal";
3
- import type { NeuronSubaccount, RewardEvent } from "../candid/governance";
2
+ import type { Principal } from "@icp-sdk/core/principal";
3
+ import type { NeuronSubaccount, RewardEvent } from "./candid/governance";
4
4
  import type { NeuronVisibility, Vote } from "./enums/governance.enums";
5
5
  import type { E8s, NeuronId } from "./types/common";
6
6
  import type { GovernanceCanisterOptions } from "./types/governance.options";
@@ -1,5 +1,5 @@
1
1
  import { type CanisterOptions } from "@dfinity/utils";
2
- import type { _SERVICE as GovernanceService } from "../candid/governance_test";
2
+ import type { _SERVICE as GovernanceService } from "./candid/governance_test";
3
3
  import type { Neuron } from "./types/governance_converters";
4
4
  export declare class GovernanceTestCanister {
5
5
  private readonly canisterId;
@@ -11,5 +11,5 @@ export declare class GovernanceTestCanister {
11
11
  *
12
12
  * Only available in the governance test canister.
13
13
  */
14
- updateNeuron(neuron: Neuron): Promise<[] | [import("../candid/governance_test").GovernanceError]>;
14
+ updateNeuron(neuron: Neuron): Promise<[] | [import("./candid/governance_test").GovernanceError]>;
15
15
  }
@@ -1,5 +1,5 @@
1
- export type { RewardEvent } from "../candid/governance";
2
- export type { DeployedSns } from "../candid/sns_wasm";
1
+ export type { RewardEvent } from "./candid/governance";
2
+ export type { DeployedSns } from "./candid/sns_wasm";
3
3
  export * from "./enums/governance.enums";
4
4
  export * from "./errors/governance.errors";
5
5
  export { GenesisTokenCanister } from "./genesis_token.canister";