@dfinity/nns 11.1.4 → 12.0.0

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 (50) hide show
  1. package/README.md +4 -4
  2. package/dist/index.d.ts +10 -15
  3. package/dist/index.js +1 -7
  4. package/dist/index.js.map +4 -4
  5. package/dist/index.mjs +1 -7
  6. package/dist/index.mjs.map +4 -4
  7. package/package.json +3 -8
  8. package/dist/candid/genesis_token.certified.idl.d.ts +0 -2
  9. package/dist/candid/genesis_token.certified.idl.js +0 -49
  10. package/dist/candid/genesis_token.d.ts +0 -46
  11. package/dist/candid/genesis_token.did +0 -49
  12. package/dist/candid/genesis_token.idl.d.ts +0 -2
  13. package/dist/candid/genesis_token.idl.js +0 -49
  14. package/dist/candid/governance.certified.idl.d.ts +0 -2
  15. package/dist/candid/governance.certified.idl.js +0 -1788
  16. package/dist/candid/governance.d.ts +0 -1339
  17. package/dist/candid/governance.did +0 -1478
  18. package/dist/candid/governance.idl.d.ts +0 -2
  19. package/dist/candid/governance.idl.js +0 -1796
  20. package/dist/candid/governance_test.certified.idl.d.ts +0 -2
  21. package/dist/candid/governance_test.certified.idl.js +0 -1789
  22. package/dist/candid/governance_test.d.ts +0 -1343
  23. package/dist/candid/governance_test.did +0 -1481
  24. package/dist/candid/governance_test.idl.d.ts +0 -2
  25. package/dist/candid/governance_test.idl.js +0 -1797
  26. package/dist/candid/old_list_neurons_service.certified.idl.d.ts +0 -2
  27. package/dist/candid/old_list_neurons_service.certified.idl.js +0 -87
  28. package/dist/candid/sns_wasm.certified.idl.d.ts +0 -2
  29. package/dist/candid/sns_wasm.certified.idl.js +0 -331
  30. package/dist/candid/sns_wasm.d.ts +0 -315
  31. package/dist/candid/sns_wasm.did +0 -350
  32. package/dist/candid/sns_wasm.idl.d.ts +0 -2
  33. package/dist/candid/sns_wasm.idl.js +0 -331
  34. package/dist/canisters/governance/request.converters.d.ts +0 -108
  35. package/dist/canisters/governance/response.converters.d.ts +0 -26
  36. package/dist/canisters/governance/services.d.ts +0 -21
  37. package/dist/constants/canister_ids.d.ts +0 -5
  38. package/dist/constants/constants.d.ts +0 -1
  39. package/dist/enums/governance.enums.d.ts +0 -138
  40. package/dist/errors/governance.errors.d.ts +0 -21
  41. package/dist/genesis_token.canister.d.ts +0 -11
  42. package/dist/governance.canister.d.ts +0 -361
  43. package/dist/governance_test.canister.d.ts +0 -15
  44. package/dist/sns_wasm.canister.d.ts +0 -11
  45. package/dist/types/common.d.ts +0 -6
  46. package/dist/types/governance.options.d.ts +0 -7
  47. package/dist/types/governance_converters.d.ts +0 -821
  48. package/dist/types/sns_wasm.options.d.ts +0 -3
  49. package/dist/utils/account_identifier.utils.d.ts +0 -5
  50. package/dist/utils/neurons.utils.d.ts +0 -50
@@ -1,331 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // @ts-nocheck
4
-
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
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
-
9
- export const idlFactory = ({ IDL }) => {
10
- const SnsWasmCanisterInitPayload = IDL.Record({
11
- allowed_principals: IDL.Vec(IDL.Principal),
12
- access_controls_enabled: IDL.Bool,
13
- sns_subnet_ids: IDL.Vec(IDL.Principal),
14
- });
15
- const SnsWasm = IDL.Record({
16
- wasm: IDL.Vec(IDL.Nat8),
17
- proposal_id: IDL.Opt(IDL.Nat64),
18
- canister_type: IDL.Int32,
19
- });
20
- const AddWasmRequest = IDL.Record({
21
- hash: IDL.Vec(IDL.Nat8),
22
- wasm: IDL.Opt(SnsWasm),
23
- skip_update_latest_version: IDL.Opt(IDL.Bool),
24
- });
25
- const SnsWasmError = IDL.Record({ message: IDL.Text });
26
- const Result = IDL.Variant({
27
- Error: SnsWasmError,
28
- Hash: IDL.Vec(IDL.Nat8),
29
- });
30
- const AddWasmResponse = IDL.Record({ result: IDL.Opt(Result) });
31
- const NeuronBasketConstructionParameters = IDL.Record({
32
- dissolve_delay_interval_seconds: IDL.Nat64,
33
- count: IDL.Nat64,
34
- });
35
- const Canister = IDL.Record({ id: IDL.Opt(IDL.Principal) });
36
- const DappCanisters = IDL.Record({ canisters: IDL.Vec(Canister) });
37
- const LinearScalingCoefficient = IDL.Record({
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),
43
- });
44
- const IdealMatchedParticipationFunction = IDL.Record({
45
- serialized_representation: IDL.Opt(IDL.Text),
46
- });
47
- const NeuronsFundParticipationConstraints = IDL.Record({
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,
53
- ),
54
- });
55
- const TreasuryDistribution = IDL.Record({ total_e8s: IDL.Nat64 });
56
- const NeuronDistribution = IDL.Record({
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),
62
- });
63
- const DeveloperDistribution = IDL.Record({
64
- developer_neurons: IDL.Vec(NeuronDistribution),
65
- });
66
- const SwapDistribution = IDL.Record({
67
- total_e8s: IDL.Nat64,
68
- initial_swap_amount_e8s: IDL.Nat64,
69
- });
70
- const FractionalDeveloperVotingPower = IDL.Record({
71
- treasury_distribution: IDL.Opt(TreasuryDistribution),
72
- developer_distribution: IDL.Opt(DeveloperDistribution),
73
- swap_distribution: IDL.Opt(SwapDistribution),
74
- });
75
- const InitialTokenDistribution = IDL.Variant({
76
- FractionalDeveloperVotingPower: FractionalDeveloperVotingPower,
77
- });
78
- const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
79
- const SnsInitPayload = IDL.Record({
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,
88
- ),
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,
110
- ),
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),
122
- });
123
- const DeployNewSnsRequest = IDL.Record({
124
- sns_init_payload: IDL.Opt(SnsInitPayload),
125
- });
126
- const DappCanistersTransferResult = IDL.Record({
127
- restored_dapp_canisters: IDL.Vec(Canister),
128
- nns_controlled_dapp_canisters: IDL.Vec(Canister),
129
- sns_controlled_dapp_canisters: IDL.Vec(Canister),
130
- });
131
- const SnsCanisterIds = IDL.Record({
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),
137
- });
138
- const DeployNewSnsResponse = IDL.Record({
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),
143
- });
144
- const GetAllowedPrincipalsResponse = IDL.Record({
145
- allowed_principals: IDL.Vec(IDL.Principal),
146
- });
147
- const GetDeployedSnsByProposalIdRequest = IDL.Record({
148
- proposal_id: IDL.Nat64,
149
- });
150
- const DeployedSns = IDL.Record({
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),
156
- });
157
- const GetDeployedSnsByProposalIdResult = IDL.Variant({
158
- Error: SnsWasmError,
159
- DeployedSns: DeployedSns,
160
- });
161
- const GetDeployedSnsByProposalIdResponse = IDL.Record({
162
- get_deployed_sns_by_proposal_id_result: IDL.Opt(
163
- GetDeployedSnsByProposalIdResult,
164
- ),
165
- });
166
- const SnsVersion = IDL.Record({
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),
173
- });
174
- const GetNextSnsVersionRequest = IDL.Record({
175
- governance_canister_id: IDL.Opt(IDL.Principal),
176
- current_version: IDL.Opt(SnsVersion),
177
- });
178
- const GetNextSnsVersionResponse = IDL.Record({
179
- next_version: IDL.Opt(SnsVersion),
180
- });
181
- const GetProposalIdThatAddedWasmRequest = IDL.Record({
182
- hash: IDL.Vec(IDL.Nat8),
183
- });
184
- const GetProposalIdThatAddedWasmResponse = IDL.Record({
185
- proposal_id: IDL.Opt(IDL.Nat64),
186
- });
187
- const GetSnsSubnetIdsResponse = IDL.Record({
188
- sns_subnet_ids: IDL.Vec(IDL.Principal),
189
- });
190
- const GetWasmRequest = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
191
- const GetWasmResponse = IDL.Record({ wasm: IDL.Opt(SnsWasm) });
192
- const GetWasmMetadataRequest = IDL.Record({
193
- hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
194
- });
195
- const MetadataSection = IDL.Record({
196
- contents: IDL.Opt(IDL.Vec(IDL.Nat8)),
197
- name: IDL.Opt(IDL.Text),
198
- visibility: IDL.Opt(IDL.Text),
199
- });
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) });
203
- const SnsUpgrade = IDL.Record({
204
- next_version: IDL.Opt(SnsVersion),
205
- current_version: IDL.Opt(SnsVersion),
206
- });
207
- const InsertUpgradePathEntriesRequest = IDL.Record({
208
- upgrade_path: IDL.Vec(SnsUpgrade),
209
- sns_governance_canister_id: IDL.Opt(IDL.Principal),
210
- });
211
- const InsertUpgradePathEntriesResponse = IDL.Record({
212
- error: IDL.Opt(SnsWasmError),
213
- });
214
- const ListDeployedSnsesResponse = IDL.Record({
215
- instances: IDL.Vec(DeployedSns),
216
- });
217
- const ListUpgradeStepsRequest = IDL.Record({
218
- limit: IDL.Nat32,
219
- starting_at: IDL.Opt(SnsVersion),
220
- sns_governance_canister_id: IDL.Opt(IDL.Principal),
221
- });
222
- const PrettySnsVersion = IDL.Record({
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,
229
- });
230
- const ListUpgradeStep = IDL.Record({
231
- pretty_version: IDL.Opt(PrettySnsVersion),
232
- version: IDL.Opt(SnsVersion),
233
- });
234
- const ListUpgradeStepsResponse = IDL.Record({
235
- steps: IDL.Vec(ListUpgradeStep),
236
- });
237
- const UpdateAllowedPrincipalsRequest = IDL.Record({
238
- added_principals: IDL.Vec(IDL.Principal),
239
- removed_principals: IDL.Vec(IDL.Principal),
240
- });
241
- const UpdateAllowedPrincipalsResult = IDL.Variant({
242
- Error: SnsWasmError,
243
- AllowedPrincipals: GetAllowedPrincipalsResponse,
244
- });
245
- const UpdateAllowedPrincipalsResponse = IDL.Record({
246
- update_allowed_principals_result: IDL.Opt(UpdateAllowedPrincipalsResult),
247
- });
248
- const UpdateSnsSubnetListRequest = IDL.Record({
249
- sns_subnet_ids_to_add: IDL.Vec(IDL.Principal),
250
- sns_subnet_ids_to_remove: IDL.Vec(IDL.Principal),
251
- });
252
- const UpdateSnsSubnetListResponse = IDL.Record({
253
- error: IDL.Opt(SnsWasmError),
254
- });
255
-
256
- return IDL.Service({
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
- ),
320
- });
321
- };
322
-
323
- export const init = ({ IDL }) => {
324
- const SnsWasmCanisterInitPayload = IDL.Record({
325
- allowed_principals: IDL.Vec(IDL.Principal),
326
- access_controls_enabled: IDL.Bool,
327
- sns_subnet_ids: IDL.Vec(IDL.Principal),
328
- });
329
-
330
- return [SnsWasmCanisterInitPayload];
331
- };
@@ -1,108 +0,0 @@
1
- import type { AccountIdentifier as AccountIdentifierClass, AccountIdentifierHex } from "@dfinity/ledger-icp";
2
- import { Principal } from "@icp-sdk/core/principal";
3
- import type { NeuronSubaccount, AccountIdentifier as RawAccountIdentifier, ManageNeuronCommandRequest as RawCommand, ListNeurons as RawListNeurons, ListProposalInfoRequest as RawListProposalInfo, ManageNeuronRequest as RawManageNeuron, Operation as RawOperation } from "../../candid/governance";
4
- import type { NeuronVisibility, Vote } from "../../enums/governance.enums";
5
- import type { E8s, NeuronId } from "../../types/common";
6
- import type { Account, ClaimOrRefreshNeuronRequest, DisburseToNeuronRequest, FollowRequest, FolloweesForTopic, ListProposalsRequest, MakeProposalRequest, ManageNeuronRequest, ProposalId } from "../../types/governance_converters";
7
- export declare const fromAccountIdentifier: (accountIdentifier: AccountIdentifierHex) => RawAccountIdentifier;
8
- export declare const fromListNeurons: ({ neuronIds, includeEmptyNeurons, includePublicNeurons, neuronSubaccounts, pageNumber, pageSize, }: {
9
- neuronIds?: NeuronId[];
10
- includeEmptyNeurons?: boolean;
11
- includePublicNeurons?: boolean;
12
- neuronSubaccounts?: NeuronSubaccount[];
13
- pageNumber?: bigint;
14
- pageSize?: bigint;
15
- }) => RawListNeurons;
16
- export declare const fromManageNeuron: ({ id, command, neuronIdOrSubaccount, }: ManageNeuronRequest) => RawManageNeuron;
17
- export declare const fromListProposalsRequest: ({ includeRewardStatus, beforeProposal, excludeTopic, includeStatus, limit, includeAllManageNeuronProposals, omitLargeFields, }: ListProposalsRequest) => RawListProposalInfo;
18
- export declare const fromClaimOrRefreshNeuronRequest: (request: ClaimOrRefreshNeuronRequest) => RawManageNeuron;
19
- export declare const toClaimOrRefreshRequest: ({ memo, controller, }: {
20
- memo: bigint;
21
- controller?: Principal;
22
- }) => RawManageNeuron;
23
- export declare const toSplitRawRequest: ({ neuronId, amount, memo, }: {
24
- neuronId: NeuronId;
25
- amount: E8s;
26
- memo?: bigint;
27
- }) => RawManageNeuron;
28
- export declare const fromDisburseToNeuronRequest: (request: DisburseToNeuronRequest) => RawManageNeuron;
29
- export declare const fromMakeProposalRequest: (request: MakeProposalRequest) => RawManageNeuron;
30
- export declare const toRegisterVoteRequest: ({ neuronId, vote, proposalId, }: {
31
- neuronId: NeuronId;
32
- vote: Vote;
33
- proposalId: ProposalId;
34
- }) => RawManageNeuron;
35
- export declare const toMakeProposalRawRequest: (request: MakeProposalRequest) => RawManageNeuron;
36
- export declare const toManageNeuronsFollowRequest: ({ neuronId, topic, followees, }: FollowRequest) => RawManageNeuron;
37
- export declare const toDisburseNeuronRequest: ({ neuronId, toAccountIdentifier, amount, }: {
38
- neuronId: NeuronId;
39
- toAccountIdentifier?: AccountIdentifierClass;
40
- amount?: E8s;
41
- }) => RawManageNeuron;
42
- export declare const toDisburseMaturityRequest: ({ neuronId, percentageToDisburse, toAccountIdentifier, toAccount, }: {
43
- neuronId: NeuronId;
44
- percentageToDisburse: number;
45
- toAccountIdentifier?: AccountIdentifierHex;
46
- toAccount?: Account;
47
- }) => RawManageNeuron;
48
- export declare const toSetFollowingRequest: ({ neuronId, topicFollowing, }: {
49
- neuronId: NeuronId;
50
- topicFollowing: Array<FolloweesForTopic>;
51
- }) => RawManageNeuron;
52
- export declare const toRefreshVotingPowerRequest: ({ neuronId, }: {
53
- neuronId: NeuronId;
54
- }) => RawManageNeuron;
55
- export declare const toMergeMaturityRequest: ({ neuronId, percentageToMerge, }: {
56
- neuronId: NeuronId;
57
- percentageToMerge: number;
58
- }) => RawManageNeuron;
59
- export declare const toStakeMaturityRequest: ({ neuronId, percentageToStake, }: {
60
- neuronId: NeuronId;
61
- percentageToStake?: number;
62
- }) => RawManageNeuron;
63
- export declare const toSpawnNeuronRequest: ({ neuronId, percentageToSpawn, newController, nonce, }: {
64
- neuronId: NeuronId;
65
- percentageToSpawn?: number;
66
- newController?: Principal;
67
- nonce?: bigint;
68
- }) => RawManageNeuron;
69
- export declare const toAddHotkeyRequest: ({ neuronId, principal, }: {
70
- neuronId: NeuronId;
71
- principal: Principal;
72
- }) => RawManageNeuron;
73
- export declare const toRemoveHotkeyRequest: ({ neuronId, principal, }: {
74
- neuronId: NeuronId;
75
- principal: Principal;
76
- }) => RawManageNeuron;
77
- export declare const toIncreaseDissolveDelayRequest: ({ neuronId, additionalDissolveDelaySeconds, }: {
78
- neuronId: NeuronId;
79
- additionalDissolveDelaySeconds: number;
80
- }) => RawManageNeuron;
81
- export declare const toSetDissolveDelayRequest: ({ neuronId, dissolveDelaySeconds, }: {
82
- neuronId: NeuronId;
83
- dissolveDelaySeconds: number;
84
- }) => RawManageNeuron;
85
- export declare const toJoinCommunityFundRequest: (neuronId: NeuronId) => RawManageNeuron;
86
- export declare const toAutoStakeMaturityRequest: ({ neuronId, autoStake, }: {
87
- neuronId: NeuronId;
88
- autoStake: boolean;
89
- }) => RawManageNeuron;
90
- export declare const toLeaveCommunityFundRequest: (neuronId: NeuronId) => RawManageNeuron;
91
- export declare const toSetVisibilityRequest: ({ neuronId, visibility, }: {
92
- neuronId: NeuronId;
93
- visibility: NeuronVisibility;
94
- }) => RawManageNeuron;
95
- export declare const toMergeRequest: ({ sourceNeuronId, targetNeuronId, }: {
96
- sourceNeuronId: NeuronId;
97
- targetNeuronId: NeuronId;
98
- }) => RawManageNeuron;
99
- export declare const toStartDissolvingRequest: (neuronId: NeuronId) => RawManageNeuron;
100
- export declare const toStopDissolvingRequest: (neuronId: NeuronId) => RawManageNeuron;
101
- export declare const toCommand: ({ neuronId, command, }: {
102
- neuronId: NeuronId;
103
- command: RawCommand;
104
- }) => RawManageNeuron;
105
- export declare const toConfigureOperation: ({ neuronId, operation, }: {
106
- neuronId: NeuronId;
107
- operation: RawOperation;
108
- }) => RawManageNeuron;
@@ -1,26 +0,0 @@
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
- import type { GovernanceCachedMetrics, KnownNeuron, ListProposalsResponse, NetworkEconomics, Neuron, NeuronInfo, ProposalInfo } from "../../types/governance_converters";
4
- export declare const toNeuronInfo: ({ neuronId, neuronInfo, rawNeuron, canisterId, }: {
5
- neuronId: bigint;
6
- neuronInfo: RawNeuronInfo;
7
- rawNeuron?: RawNeuron;
8
- canisterId: Principal;
9
- }) => NeuronInfo;
10
- export declare const toNeuron: ({ neuron, canisterId, }: {
11
- neuron: RawNeuron;
12
- canisterId: Principal;
13
- }) => Neuron;
14
- export declare const toRawNeuron: ({ neuron, account, }: {
15
- neuron: Neuron;
16
- account: Uint8Array;
17
- }) => RawNeuron;
18
- export declare const toNetworkEconomics: (networkEconomics: RawNetworkEconomics) => NetworkEconomics;
19
- export declare const toMetrics: (metrics: RawGovernanceCachedMetrics) => GovernanceCachedMetrics;
20
- export declare const toProposalInfo: (proposalInfo: RawProposalInfo) => ProposalInfo;
21
- export declare const toArrayOfNeuronInfo: ({ response: { neuron_infos, full_neurons }, canisterId, }: {
22
- response: RawListNeuronsResponse;
23
- canisterId: Principal;
24
- }) => Array<NeuronInfo>;
25
- export declare const toListProposalsResponse: ({ proposal_info, }: RawListProposalInfoResponse) => ListProposalsResponse;
26
- export declare const toKnownNeuron: ({ id, known_neuron_data, }: RawKnownNeuron) => KnownNeuron;
@@ -1,21 +0,0 @@
1
- import type { Command_1, _SERVICE as GovernanceService, ManageNeuronRequest, ManageNeuronResponse } from "../../candid/governance";
2
- /**
3
- * Checks a Manage Neuron Response for error and returns successful response data.
4
- *
5
- * @throws {@link GovernanceError}
6
- */
7
- export declare const getSuccessfulCommandFromResponse: (response: ManageNeuronResponse) => Command_1;
8
- /**
9
- * @throws {@link GovernanceError}
10
- */
11
- export declare const manageNeuron: ({ request, service, }: {
12
- request: ManageNeuronRequest;
13
- service: GovernanceService;
14
- }) => Promise<Command_1>;
15
- /**
16
- * @throws {@link GovernanceError}
17
- */
18
- export declare const simulateManageNeuron: ({ request, service, }: {
19
- request: ManageNeuronRequest;
20
- service: GovernanceService;
21
- }) => Promise<Command_1>;
@@ -1,5 +0,0 @@
1
- import { Principal } from "@icp-sdk/core/principal";
2
- export declare const GOVERNANCE_CANISTER_ID: Principal;
3
- export declare const MAINNET_GOVERNANCE_CANISTER_ID: Principal;
4
- export declare const MAINNET_GENESIS_TOKEN_CANISTER_ID: Principal;
5
- export declare const MAINNET_SNS_WASM_CANISTER_ID: Principal;
@@ -1 +0,0 @@
1
- export declare const E8S_PER_TOKEN: bigint;
@@ -1,138 +0,0 @@
1
- export declare enum NeuronState {
2
- Unspecified = 0,
3
- Locked = 1,
4
- Dissolving = 2,
5
- Dissolved = 3,
6
- Spawning = 4
7
- }
8
- export declare enum Topic {
9
- Unspecified = 0,
10
- NeuronManagement = 1,
11
- ExchangeRate = 2,
12
- NetworkEconomics = 3,
13
- Governance = 4,
14
- NodeAdmin = 5,
15
- ParticipantManagement = 6,
16
- SubnetManagement = 7,
17
- NetworkCanisterManagement = 8,
18
- Kyc = 9,
19
- NodeProviderRewards = 10,
20
- /**
21
- * @deprecated
22
- */
23
- SnsDecentralizationSale = 11,
24
- IcOsVersionDeployment = 12,
25
- IcOsVersionElection = 13,
26
- SnsAndCommunityFund = 14,
27
- ApiBoundaryNodeManagement = 15,
28
- SubnetRental = 16,
29
- ProtocolCanisterManagement = 17,
30
- ServiceNervousSystemManagement = 18
31
- }
32
- export declare enum ProposalRewardStatus {
33
- Unknown = 0,
34
- AcceptVotes = 1,
35
- ReadyToSettle = 2,
36
- Settled = 3,
37
- Ineligible = 4
38
- }
39
- export declare enum ProposalStatus {
40
- Unknown = 0,
41
- Open = 1,
42
- Rejected = 2,
43
- Accepted = 3,
44
- Executed = 4,
45
- Failed = 5
46
- }
47
- export declare enum Vote {
48
- Unspecified = 0,
49
- Yes = 1,
50
- No = 2
51
- }
52
- export declare enum NnsFunction {
53
- Unspecified = 0,
54
- CreateSubnet = 1,
55
- AddNodeToSubnet = 2,
56
- NnsCanisterInstall = 3,
57
- NnsCanisterUpgrade = 4,
58
- BlessReplicaVersion = 5,
59
- RecoverSubnet = 6,
60
- UpdateConfigOfSubnet = 7,
61
- AssignNoid = 8,
62
- NnsRootUpgrade = 9,
63
- IcpXdrConversionRate = 10,
64
- DeployGuestosToAllSubnetNodes = 11,
65
- ClearProvisionalWhitelist = 12,
66
- RemoveNodesFromSubnet = 13,
67
- SetAuthorizedSubnetworks = 14,
68
- SetFirewallConfig = 15,
69
- UpdateNodeOperatorConfig = 16,
70
- StopOrStartNnsCanister = 17,
71
- RemoveNodes = 18,
72
- UninstallCode = 19,
73
- UpdateNodeRewardsTable = 20,
74
- AddOrRemoveDataCenters = 21,
75
- UpdateUnassignedNodesConfig = 22,
76
- RemoveNodeOperators = 23,
77
- RerouteCanisterRanges = 24,
78
- AddFirewallRules = 25,
79
- RemoveFirewallRules = 26,
80
- UpdateFirewallRules = 27,
81
- PrepareCanisterMigration = 28,
82
- CompleteCanisterMigration = 29,
83
- AddSnsWasm = 30,
84
- ChangeSubnetMembership = 31,
85
- UpdateSubnetType = 32,
86
- ChangeSubnetTypeAssignment = 33,
87
- UpdateSnsWasmSnsSubnetIds = 34,
88
- UpdateAllowedPrincipals = 35,
89
- RetireReplicaVersion = 36,
90
- InsertSnsWasmUpgradePathEntries = 37,
91
- ReviseElectedGuestosVersions = 38,
92
- BitcoinSetConfig = 39,
93
- UpdateElectedHostosVersions = 40,
94
- UpdateNodesHostosVersion = 41,
95
- HardResetNnsRootToVersion = 42,
96
- AddApiBoundaryNodes = 43,
97
- RemoveApiBoundaryNodes = 44,
98
- /**
99
- * @deprecated
100
- */
101
- UpdateApiBoundaryNodeDomain = 45,
102
- UpdateApiBoundaryNodesVersion = 46,
103
- DeployGuestosToSomeApiBoundaryNodes = 47,
104
- DeployGuestosToAllUnassignedNodes = 48,
105
- UpdateSshReadOnlyAccessForAllUnassignedNodes = 49,
106
- ReviseElectedHostosVersions = 50,
107
- DeployHostosToSomeNodes = 51,
108
- SubnetRentalRequest = 52,
109
- PauseCanisterMigrations = 53,
110
- UnpauseCanisterMigrations = 54,
111
- SetSubnetOperationalLevel = 55
112
- }
113
- export declare enum NeuronType {
114
- Unspecified = 0,
115
- Seed = 1,
116
- Ect = 2
117
- }
118
- export declare enum LogVisibility {
119
- Unspecified = 0,
120
- Controllers = 1,
121
- Public = 2
122
- }
123
- export declare enum CanisterAction {
124
- Unspecified = 0,
125
- Stop = 1,
126
- Start = 2
127
- }
128
- export declare enum NeuronVisibility {
129
- Unspecified = 0,
130
- Private = 1,
131
- Public = 2
132
- }
133
- export declare enum CanisterInstallMode {
134
- Unspecified = 0,
135
- Install = 1,
136
- Reinstall = 2,
137
- Upgrade = 3
138
- }
@@ -1,21 +0,0 @@
1
- import type { GovernanceError as GovernanceErrorDetail } from "../candid/governance";
2
- export declare abstract class StakeNeuronError extends Error {
3
- }
4
- export declare class CouldNotClaimNeuronError extends StakeNeuronError {
5
- }
6
- export declare class InsufficientAmountError extends StakeNeuronError {
7
- readonly minimumAmount: bigint;
8
- constructor(minimumAmount: bigint);
9
- }
10
- export declare class UnrecognizedTypeError extends Error {
11
- }
12
- export declare class GovernanceError extends Error {
13
- readonly detail: GovernanceErrorDetail;
14
- constructor(detail: GovernanceErrorDetail);
15
- }
16
- /**
17
- * An error used to ensure at compile-time that it's never reached.
18
- */
19
- export declare class UnsupportedValueError extends Error {
20
- constructor(value: never);
21
- }
@@ -1,11 +0,0 @@
1
- import { type CanisterOptions } from "@dfinity/utils";
2
- import type { _SERVICE as GenesisTokenService } from "./candid/genesis_token";
3
- import type { NeuronId } from "./types/common";
4
- export declare class GenesisTokenCanister {
5
- private readonly service;
6
- private constructor();
7
- static create(options?: CanisterOptions<GenesisTokenService>): GenesisTokenCanister;
8
- claimNeurons: ({ hexPubKey, }: {
9
- hexPubKey: string;
10
- }) => Promise<NeuronId[]>;
11
- }