@dfinity/sns 6.0.1 → 7.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 (53) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +54 -19
  3. package/dist/index.js +1 -6
  4. package/dist/index.js.map +4 -4
  5. package/dist/index.mjs +1 -6
  6. package/dist/index.mjs.map +4 -4
  7. package/package.json +3 -8
  8. package/dist/candid/sns_governance.certified.idl.d.ts +0 -2
  9. package/dist/candid/sns_governance.certified.idl.js +0 -1432
  10. package/dist/candid/sns_governance.d.ts +0 -933
  11. package/dist/candid/sns_governance.did +0 -1069
  12. package/dist/candid/sns_governance.idl.d.ts +0 -2
  13. package/dist/candid/sns_governance.idl.js +0 -1440
  14. package/dist/candid/sns_governance_test.certified.idl.d.ts +0 -2
  15. package/dist/candid/sns_governance_test.certified.idl.js +0 -1460
  16. package/dist/candid/sns_governance_test.d.ts +0 -962
  17. package/dist/candid/sns_governance_test.did +0 -1094
  18. package/dist/candid/sns_governance_test.idl.d.ts +0 -2
  19. package/dist/candid/sns_governance_test.idl.js +0 -1468
  20. package/dist/candid/sns_root.certified.idl.d.ts +0 -2
  21. package/dist/candid/sns_root.certified.idl.js +0 -251
  22. package/dist/candid/sns_root.d.ts +0 -212
  23. package/dist/candid/sns_root.did +0 -231
  24. package/dist/candid/sns_root.idl.d.ts +0 -2
  25. package/dist/candid/sns_root.idl.js +0 -251
  26. package/dist/candid/sns_swap.certified.idl.d.ts +0 -2
  27. package/dist/candid/sns_swap.certified.idl.js +0 -499
  28. package/dist/candid/sns_swap.d.ts +0 -438
  29. package/dist/candid/sns_swap.did +0 -505
  30. package/dist/candid/sns_swap.idl.d.ts +0 -2
  31. package/dist/candid/sns_swap.idl.js +0 -507
  32. package/dist/constants/governance.constants.d.ts +0 -8
  33. package/dist/converters/governance.converters.d.ts +0 -22
  34. package/dist/converters/swap.converters.d.ts +0 -3
  35. package/dist/enums/governance.enums.d.ts +0 -35
  36. package/dist/enums/swap.enums.d.ts +0 -22
  37. package/dist/errors/common.errors.d.ts +0 -4
  38. package/dist/errors/governance.errors.d.ts +0 -2
  39. package/dist/errors/swap.errors.d.ts +0 -16
  40. package/dist/governance.canister.d.ts +0 -138
  41. package/dist/governance_test.canister.d.ts +0 -16
  42. package/dist/root.canister.d.ts +0 -19
  43. package/dist/sns.d.ts +0 -21
  44. package/dist/sns.wrapper.d.ts +0 -160
  45. package/dist/swap.canister.d.ts +0 -47
  46. package/dist/types/actions.d.ts +0 -191
  47. package/dist/types/canister.options.d.ts +0 -5
  48. package/dist/types/common.d.ts +0 -2
  49. package/dist/types/governance.params.d.ts +0 -151
  50. package/dist/types/governance_test.params.d.ts +0 -7
  51. package/dist/types/swap.params.d.ts +0 -8
  52. package/dist/utils/error.utils.d.ts +0 -12
  53. package/dist/utils/governance.utils.d.ts +0 -14
@@ -1,933 +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
- import type { ActorMethod } from "@icp-sdk/core/agent";
10
- import type { IDL } from "@icp-sdk/core/candid";
11
- import type { Principal } from "@icp-sdk/core/principal";
12
-
13
- export interface Account {
14
- owner: [] | [Principal];
15
- subaccount: [] | [Subaccount];
16
- }
17
- export type Action =
18
- | {
19
- ManageNervousSystemParameters: NervousSystemParameters;
20
- }
21
- | { AddGenericNervousSystemFunction: NervousSystemFunction }
22
- | { ManageDappCanisterSettings: ManageDappCanisterSettings }
23
- | { ExecuteExtensionOperation: ExecuteExtensionOperation }
24
- | { UpgradeExtension: UpgradeExtension }
25
- | { RemoveGenericNervousSystemFunction: bigint }
26
- | { SetTopicsForCustomProposals: SetTopicsForCustomProposals }
27
- | { RegisterExtension: RegisterExtension }
28
- | { UpgradeSnsToNextVersion: {} }
29
- | { RegisterDappCanisters: RegisterDappCanisters }
30
- | { TransferSnsTreasuryFunds: TransferSnsTreasuryFunds }
31
- | { UpgradeSnsControlledCanister: UpgradeSnsControlledCanister }
32
- | { DeregisterDappCanisters: DeregisterDappCanisters }
33
- | { MintSnsTokens: MintSnsTokens }
34
- | { AdvanceSnsTargetVersion: AdvanceSnsTargetVersion }
35
- | { Unspecified: {} }
36
- | { ManageSnsMetadata: ManageSnsMetadata }
37
- | {
38
- ExecuteGenericNervousSystemFunction: ExecuteGenericNervousSystemFunction;
39
- }
40
- | { ManageLedgerParameters: ManageLedgerParameters }
41
- | { Motion: Motion };
42
- export type ActionAuxiliary =
43
- | {
44
- TransferSnsTreasuryFunds: MintSnsTokensActionAuxiliary;
45
- }
46
- | { MintSnsTokens: MintSnsTokensActionAuxiliary }
47
- | { AdvanceSnsTargetVersion: AdvanceSnsTargetVersionActionAuxiliary };
48
- export interface AddNeuronPermissions {
49
- permissions_to_add: [] | [NeuronPermissionList];
50
- principal_id: [] | [Principal];
51
- }
52
- export interface AdvanceSnsTargetVersion {
53
- new_target: [] | [SnsVersion];
54
- }
55
- export interface AdvanceSnsTargetVersionActionAuxiliary {
56
- target_version: [] | [SnsVersion];
57
- }
58
- export interface Amount {
59
- e8s: bigint;
60
- }
61
- export interface Ballot {
62
- vote: number;
63
- cast_timestamp_seconds: bigint;
64
- voting_power: bigint;
65
- }
66
- export type By = { MemoAndController: MemoAndController } | { NeuronId: {} };
67
- export interface CachedUpgradeSteps {
68
- upgrade_steps: [] | [Versions];
69
- response_timestamp_seconds: [] | [bigint];
70
- requested_timestamp_seconds: [] | [bigint];
71
- }
72
- export interface CanisterStatusResultV2 {
73
- memory_metrics: [] | [MemoryMetrics];
74
- status: CanisterStatusType;
75
- memory_size: bigint;
76
- cycles: bigint;
77
- settings: DefiniteCanisterSettingsArgs;
78
- query_stats: [] | [QueryStats];
79
- idle_cycles_burned_per_day: bigint;
80
- module_hash: [] | [Uint8Array];
81
- }
82
- export type CanisterStatusType =
83
- | { stopped: null }
84
- | { stopping: null }
85
- | { running: null };
86
- export interface ChangeAutoStakeMaturity {
87
- requested_setting_for_auto_stake_maturity: boolean;
88
- }
89
- export interface ChunkedCanisterWasm {
90
- wasm_module_hash: Uint8Array;
91
- chunk_hashes_list: Array<Uint8Array>;
92
- store_canister_id: [] | [Principal];
93
- }
94
- export interface ClaimOrRefresh {
95
- by: [] | [By];
96
- }
97
- export interface ClaimOrRefreshResponse {
98
- refreshed_neuron_id: [] | [NeuronId];
99
- }
100
- export interface ClaimSwapNeuronsRequest {
101
- neuron_recipes: [] | [NeuronRecipes];
102
- }
103
- export interface ClaimSwapNeuronsResponse {
104
- claim_swap_neurons_result: [] | [ClaimSwapNeuronsResult];
105
- }
106
- export type ClaimSwapNeuronsResult =
107
- | { Ok: ClaimedSwapNeurons }
108
- | { Err: number };
109
- export interface ClaimedSwapNeurons {
110
- swap_neurons: Array<SwapNeuron>;
111
- }
112
- export type Command =
113
- | { Split: Split }
114
- | { Follow: Follow }
115
- | { DisburseMaturity: DisburseMaturity }
116
- | { ClaimOrRefresh: ClaimOrRefresh }
117
- | { Configure: Configure }
118
- | { RegisterVote: RegisterVote }
119
- | { SetFollowing: SetFollowing }
120
- | { MakeProposal: Proposal }
121
- | { StakeMaturity: StakeMaturity }
122
- | { RemoveNeuronPermissions: RemoveNeuronPermissions }
123
- | { AddNeuronPermissions: AddNeuronPermissions }
124
- | { MergeMaturity: MergeMaturity }
125
- | { Disburse: Disburse };
126
- export type Command_1 =
127
- | { Error: GovernanceError }
128
- | { Split: SplitResponse }
129
- | { Follow: {} }
130
- | { DisburseMaturity: DisburseMaturityResponse }
131
- | { ClaimOrRefresh: ClaimOrRefreshResponse }
132
- | { Configure: {} }
133
- | { RegisterVote: {} }
134
- | { SetFollowing: {} }
135
- | { MakeProposal: GetProposal }
136
- | { RemoveNeuronPermission: {} }
137
- | { StakeMaturity: StakeMaturityResponse }
138
- | { MergeMaturity: MergeMaturityResponse }
139
- | { Disburse: DisburseResponse }
140
- | { AddNeuronPermission: {} };
141
- export type Command_2 =
142
- | { Split: Split }
143
- | { Follow: Follow }
144
- | { DisburseMaturity: DisburseMaturity }
145
- | { Configure: Configure }
146
- | { RegisterVote: RegisterVote }
147
- | { SetFollowing: SetFollowing }
148
- | { SyncCommand: {} }
149
- | { MakeProposal: Proposal }
150
- | { FinalizeDisburseMaturity: FinalizeDisburseMaturity }
151
- | { ClaimOrRefreshNeuron: ClaimOrRefresh }
152
- | { RemoveNeuronPermissions: RemoveNeuronPermissions }
153
- | { AddNeuronPermissions: AddNeuronPermissions }
154
- | { MergeMaturity: MergeMaturity }
155
- | { Disburse: Disburse };
156
- export interface Configure {
157
- operation: [] | [Operation];
158
- }
159
- export interface Decimal {
160
- human_readable: [] | [string];
161
- }
162
- export interface DefaultFollowees {
163
- followees: Array<[bigint, Followees]>;
164
- }
165
- export interface DefiniteCanisterSettingsArgs {
166
- freezing_threshold: bigint;
167
- wasm_memory_threshold: [] | [bigint];
168
- controllers: Array<Principal>;
169
- wasm_memory_limit: [] | [bigint];
170
- memory_allocation: bigint;
171
- compute_allocation: bigint;
172
- }
173
- export interface DeregisterDappCanisters {
174
- canister_ids: Array<Principal>;
175
- new_controllers: Array<Principal>;
176
- }
177
- export interface Disburse {
178
- to_account: [] | [Account];
179
- amount: [] | [Amount];
180
- }
181
- export interface DisburseMaturity {
182
- to_account: [] | [Account];
183
- percentage_to_disburse: number;
184
- }
185
- export interface DisburseMaturityInProgress {
186
- timestamp_of_disbursement_seconds: bigint;
187
- amount_e8s: bigint;
188
- account_to_disburse_to: [] | [Account];
189
- finalize_disbursement_timestamp_seconds: [] | [bigint];
190
- }
191
- export interface DisburseMaturityResponse {
192
- amount_disbursed_e8s: bigint;
193
- amount_deducted_e8s: [] | [bigint];
194
- }
195
- export interface DisburseResponse {
196
- transfer_block_height: bigint;
197
- }
198
- export type DissolveState =
199
- | { DissolveDelaySeconds: bigint }
200
- | { WhenDissolvedTimestampSeconds: bigint };
201
- export interface ExecuteExtensionOperation {
202
- extension_canister_id: [] | [Principal];
203
- operation_name: [] | [string];
204
- operation_arg: [] | [ExtensionOperationArg];
205
- }
206
- export interface ExecuteGenericNervousSystemFunction {
207
- function_id: bigint;
208
- payload: Uint8Array;
209
- }
210
- export interface ExtensionInit {
211
- value: [] | [PreciseValue];
212
- }
213
- export interface ExtensionOperationArg {
214
- value: [] | [PreciseValue];
215
- }
216
- export interface ExtensionOperationSpec {
217
- topic: [] | [Topic];
218
- operation_type: [] | [ExtensionOperationType];
219
- description: [] | [string];
220
- extension_type: [] | [ExtensionType];
221
- }
222
- export type ExtensionOperationType =
223
- | { TreasuryManagerWithdraw: null }
224
- | { TreasuryManagerDeposit: null };
225
- export type ExtensionType = { TreasuryManager: null };
226
- export interface ExtensionUpgradeArg {
227
- value: [] | [PreciseValue];
228
- }
229
- export interface FinalizeDisburseMaturity {
230
- amount_to_be_disbursed_e8s: bigint;
231
- to_account: [] | [Account];
232
- }
233
- export interface Follow {
234
- function_id: bigint;
235
- followees: Array<NeuronId>;
236
- }
237
- export interface Followee {
238
- alias: [] | [string];
239
- neuron_id: [] | [NeuronId];
240
- }
241
- export interface Followees {
242
- followees: Array<NeuronId>;
243
- }
244
- export interface FolloweesForTopic {
245
- topic: [] | [Topic];
246
- followees: Array<Followee>;
247
- }
248
- export type FunctionType =
249
- | { NativeNervousSystemFunction: {} }
250
- | { GenericNervousSystemFunction: GenericNervousSystemFunction };
251
- export interface GenericNervousSystemFunction {
252
- topic: [] | [Topic];
253
- validator_canister_id: [] | [Principal];
254
- target_canister_id: [] | [Principal];
255
- validator_method_name: [] | [string];
256
- target_method_name: [] | [string];
257
- }
258
- export interface GetMaturityModulationResponse {
259
- maturity_modulation: [] | [MaturityModulation];
260
- }
261
- export interface GetMetadataResponse {
262
- url: [] | [string];
263
- logo: [] | [string];
264
- name: [] | [string];
265
- description: [] | [string];
266
- }
267
- export interface GetMetricsRequest {
268
- time_window_seconds: [] | [bigint];
269
- }
270
- export interface GetMetricsResponse {
271
- get_metrics_result: [] | [GetMetricsResult];
272
- }
273
- export type GetMetricsResult = { Ok: Metrics } | { Err: GovernanceError };
274
- export interface GetModeResponse {
275
- mode: [] | [number];
276
- }
277
- export interface GetNeuron {
278
- neuron_id: [] | [NeuronId];
279
- }
280
- export interface GetNeuronResponse {
281
- result: [] | [Result];
282
- }
283
- export interface GetProposal {
284
- proposal_id: [] | [ProposalId];
285
- }
286
- export interface GetProposalResponse {
287
- result: [] | [Result_1];
288
- }
289
- export interface GetRunningSnsVersionResponse {
290
- deployed_version: [] | [Version];
291
- pending_version:
292
- | []
293
- | [
294
- {
295
- mark_failed_at_seconds: bigint;
296
- checking_upgrade_lock: bigint;
297
- proposal_id: bigint;
298
- target_version: [] | [Version];
299
- },
300
- ];
301
- }
302
- export interface GetSnsInitializationParametersResponse {
303
- sns_initialization_parameters: string;
304
- }
305
- export interface GetTimersResponse {
306
- timers: [] | [Timers];
307
- }
308
- export interface GetUpgradeJournalRequest {
309
- offset: [] | [bigint];
310
- limit: [] | [bigint];
311
- }
312
- export interface GetUpgradeJournalResponse {
313
- upgrade_journal: [] | [UpgradeJournal];
314
- upgrade_steps: [] | [Versions];
315
- response_timestamp_seconds: [] | [bigint];
316
- deployed_version: [] | [Version];
317
- target_version: [] | [Version];
318
- upgrade_journal_entry_count: [] | [bigint];
319
- }
320
- export interface Governance {
321
- root_canister_id: [] | [Principal];
322
- timers: [] | [Timers];
323
- cached_upgrade_steps: [] | [CachedUpgradeSteps];
324
- id_to_nervous_system_functions: Array<[bigint, NervousSystemFunction]>;
325
- metrics: [] | [GovernanceCachedMetrics];
326
- maturity_modulation: [] | [MaturityModulation];
327
- upgrade_journal: [] | [UpgradeJournal];
328
- mode: number;
329
- parameters: [] | [NervousSystemParameters];
330
- is_finalizing_disburse_maturity: [] | [boolean];
331
- deployed_version: [] | [Version];
332
- sns_initialization_parameters: string;
333
- latest_reward_event: [] | [RewardEvent];
334
- pending_version: [] | [PendingVersion];
335
- swap_canister_id: [] | [Principal];
336
- ledger_canister_id: [] | [Principal];
337
- proposals: Array<[bigint, ProposalData]>;
338
- in_flight_commands: Array<[string, NeuronInFlightCommand]>;
339
- sns_metadata: [] | [ManageSnsMetadata];
340
- neurons: Array<[string, Neuron]>;
341
- target_version: [] | [Version];
342
- genesis_timestamp_seconds: bigint;
343
- }
344
- export interface GovernanceCachedMetrics {
345
- treasury_metrics: Array<TreasuryMetrics>;
346
- not_dissolving_neurons_e8s_buckets: Array<[bigint, number]>;
347
- garbage_collectable_neurons_count: bigint;
348
- neurons_with_invalid_stake_count: bigint;
349
- not_dissolving_neurons_count_buckets: Array<[bigint, bigint]>;
350
- neurons_with_less_than_6_months_dissolve_delay_count: bigint;
351
- dissolved_neurons_count: bigint;
352
- total_staked_e8s: bigint;
353
- total_supply_governance_tokens: bigint;
354
- voting_power_metrics: [] | [VotingPowerMetrics];
355
- not_dissolving_neurons_count: bigint;
356
- dissolved_neurons_e8s: bigint;
357
- neurons_with_less_than_6_months_dissolve_delay_e8s: bigint;
358
- dissolving_neurons_count_buckets: Array<[bigint, bigint]>;
359
- dissolving_neurons_count: bigint;
360
- dissolving_neurons_e8s_buckets: Array<[bigint, number]>;
361
- timestamp_seconds: bigint;
362
- }
363
- export interface GovernanceError {
364
- error_message: string;
365
- error_type: number;
366
- }
367
- export interface IncreaseDissolveDelay {
368
- additional_dissolve_delay_seconds: number;
369
- }
370
- export interface ListNervousSystemFunctionsResponse {
371
- reserved_ids: BigUint64Array;
372
- functions: Array<NervousSystemFunction>;
373
- }
374
- export interface ListNeurons {
375
- of_principal: [] | [Principal];
376
- limit: number;
377
- start_page_at: [] | [NeuronId];
378
- }
379
- export interface ListNeuronsResponse {
380
- neurons: Array<Neuron>;
381
- }
382
- export interface ListProposals {
383
- include_reward_status: Int32Array;
384
- before_proposal: [] | [ProposalId];
385
- limit: number;
386
- exclude_type: BigUint64Array;
387
- include_topics: [] | [Array<TopicSelector>];
388
- include_status: Int32Array;
389
- }
390
- export interface ListProposalsResponse {
391
- include_ballots_by_caller: [] | [boolean];
392
- proposals: Array<ProposalData>;
393
- include_topic_filtering: [] | [boolean];
394
- }
395
- export type ListTopicsRequest = {};
396
- export interface ListTopicsResponse {
397
- uncategorized_functions: [] | [Array<NervousSystemFunction>];
398
- topics: [] | [Array<TopicInfo>];
399
- }
400
- export interface ManageDappCanisterSettings {
401
- freezing_threshold: [] | [bigint];
402
- wasm_memory_threshold: [] | [bigint];
403
- canister_ids: Array<Principal>;
404
- reserved_cycles_limit: [] | [bigint];
405
- log_visibility: [] | [number];
406
- wasm_memory_limit: [] | [bigint];
407
- memory_allocation: [] | [bigint];
408
- compute_allocation: [] | [bigint];
409
- }
410
- export interface ManageLedgerParameters {
411
- token_symbol: [] | [string];
412
- transfer_fee: [] | [bigint];
413
- token_logo: [] | [string];
414
- token_name: [] | [string];
415
- }
416
- export interface ManageNeuron {
417
- subaccount: Uint8Array;
418
- command: [] | [Command];
419
- }
420
- export interface ManageNeuronResponse {
421
- command: [] | [Command_1];
422
- }
423
- export interface ManageSnsMetadata {
424
- url: [] | [string];
425
- logo: [] | [string];
426
- name: [] | [string];
427
- description: [] | [string];
428
- }
429
- export interface MaturityModulation {
430
- current_basis_points: [] | [number];
431
- updated_at_timestamp_seconds: [] | [bigint];
432
- }
433
- export interface MemoAndController {
434
- controller: [] | [Principal];
435
- memo: bigint;
436
- }
437
- export interface MemoryMetrics {
438
- wasm_binary_size: [] | [bigint];
439
- wasm_chunk_store_size: [] | [bigint];
440
- canister_history_size: [] | [bigint];
441
- stable_memory_size: [] | [bigint];
442
- snapshots_size: [] | [bigint];
443
- wasm_memory_size: [] | [bigint];
444
- global_memory_size: [] | [bigint];
445
- custom_sections_size: [] | [bigint];
446
- }
447
- export interface MergeMaturity {
448
- percentage_to_merge: number;
449
- }
450
- export interface MergeMaturityResponse {
451
- merged_maturity_e8s: bigint;
452
- new_stake_e8s: bigint;
453
- }
454
- export interface Metrics {
455
- /**
456
- * The metrics below are cached (albeit this is an implementation detail).
457
- */
458
- treasury_metrics: [] | [Array<TreasuryMetrics>];
459
- voting_power_metrics: [] | [VotingPowerMetrics];
460
- last_ledger_block_timestamp: [] | [bigint];
461
- num_recently_executed_proposals: [] | [bigint];
462
- num_recently_submitted_proposals: [] | [bigint];
463
- genesis_timestamp_seconds: [] | [bigint];
464
- }
465
- export interface MintSnsTokens {
466
- to_principal: [] | [Principal];
467
- to_subaccount: [] | [Subaccount];
468
- memo: [] | [bigint];
469
- amount_e8s: [] | [bigint];
470
- }
471
- export interface MintSnsTokensActionAuxiliary {
472
- valuation: [] | [Valuation];
473
- }
474
- export interface Motion {
475
- motion_text: string;
476
- }
477
- export interface NervousSystemFunction {
478
- id: bigint;
479
- name: string;
480
- description: [] | [string];
481
- function_type: [] | [FunctionType];
482
- }
483
- export interface NervousSystemParameters {
484
- default_followees: [] | [DefaultFollowees];
485
- max_dissolve_delay_seconds: [] | [bigint];
486
- max_dissolve_delay_bonus_percentage: [] | [bigint];
487
- max_followees_per_function: [] | [bigint];
488
- automatically_advance_target_version: [] | [boolean];
489
- neuron_claimer_permissions: [] | [NeuronPermissionList];
490
- neuron_minimum_stake_e8s: [] | [bigint];
491
- max_neuron_age_for_age_bonus: [] | [bigint];
492
- initial_voting_period_seconds: [] | [bigint];
493
- neuron_minimum_dissolve_delay_to_vote_seconds: [] | [bigint];
494
- reject_cost_e8s: [] | [bigint];
495
- max_proposals_to_keep_per_action: [] | [number];
496
- wait_for_quiet_deadline_increase_seconds: [] | [bigint];
497
- max_number_of_neurons: [] | [bigint];
498
- transaction_fee_e8s: [] | [bigint];
499
- max_number_of_proposals_with_ballots: [] | [bigint];
500
- max_age_bonus_percentage: [] | [bigint];
501
- neuron_grantable_permissions: [] | [NeuronPermissionList];
502
- voting_rewards_parameters: [] | [VotingRewardsParameters];
503
- maturity_modulation_disabled: [] | [boolean];
504
- max_number_of_principals_per_neuron: [] | [bigint];
505
- }
506
- export interface Neuron {
507
- id: [] | [NeuronId];
508
- staked_maturity_e8s_equivalent: [] | [bigint];
509
- permissions: Array<NeuronPermission>;
510
- maturity_e8s_equivalent: bigint;
511
- cached_neuron_stake_e8s: bigint;
512
- created_timestamp_seconds: bigint;
513
- topic_followees:
514
- | []
515
- | [{ topic_id_to_followees: Array<[number, FolloweesForTopic]> }];
516
- source_nns_neuron_id: [] | [bigint];
517
- auto_stake_maturity: [] | [boolean];
518
- aging_since_timestamp_seconds: bigint;
519
- dissolve_state: [] | [DissolveState];
520
- voting_power_percentage_multiplier: bigint;
521
- vesting_period_seconds: [] | [bigint];
522
- disburse_maturity_in_progress: Array<DisburseMaturityInProgress>;
523
- followees: Array<[bigint, Followees]>;
524
- neuron_fees_e8s: bigint;
525
- }
526
- export interface NeuronId {
527
- id: Uint8Array;
528
- }
529
- export interface NeuronIds {
530
- neuron_ids: Array<NeuronId>;
531
- }
532
- export interface NeuronInFlightCommand {
533
- command: [] | [Command_2];
534
- timestamp: bigint;
535
- }
536
- export interface NeuronPermission {
537
- principal: [] | [Principal];
538
- permission_type: Int32Array;
539
- }
540
- export interface NeuronPermissionList {
541
- permissions: Int32Array;
542
- }
543
- export interface NeuronRecipe {
544
- controller: [] | [Principal];
545
- dissolve_delay_seconds: [] | [bigint];
546
- participant: [] | [Participant];
547
- stake_e8s: [] | [bigint];
548
- followees: [] | [NeuronIds];
549
- neuron_id: [] | [NeuronId];
550
- }
551
- export interface NeuronRecipes {
552
- neuron_recipes: Array<NeuronRecipe>;
553
- }
554
- export interface NeuronsFund {
555
- nns_neuron_hotkeys: [] | [Principals];
556
- nns_neuron_controller: [] | [Principal];
557
- nns_neuron_id: [] | [bigint];
558
- }
559
- export type Operation =
560
- | {
561
- ChangeAutoStakeMaturity: ChangeAutoStakeMaturity;
562
- }
563
- | { StopDissolving: {} }
564
- | { StartDissolving: {} }
565
- | { IncreaseDissolveDelay: IncreaseDissolveDelay }
566
- | { SetDissolveTimestamp: SetDissolveTimestamp };
567
- export type Participant = { NeuronsFund: NeuronsFund } | { Direct: {} };
568
- export interface PendingVersion {
569
- mark_failed_at_seconds: bigint;
570
- checking_upgrade_lock: bigint;
571
- proposal_id: [] | [bigint];
572
- target_version: [] | [Version];
573
- }
574
- export interface Percentage {
575
- basis_points: [] | [bigint];
576
- }
577
- /**
578
- * This type is equivalant to `ICRC3Value`, but we give it another name since it is used here not
579
- * in the context of the ICRC-3 ledger standard. The justification is the same: The candid format
580
- * supports sharing information even when the client and the server involved do not have the same
581
- * schema (see the Upgrading and subtyping section of the candid spec). While this mechanism allows
582
- * to evolve services and clients independently without breaking them, it also means that a client
583
- * may not receive all the information that the server is sending, e.g. in case the client schema
584
- * lacks some fields that the server schema has.
585
- *
586
- * This loss of information is not an option for SNS voters deciding if an extension with particular
587
- * init args should be installed or if an extension function with particular arguments should be
588
- * called. The client must receive the same exact data the server sent in order to verify it.
589
- *
590
- * Verification of a priorly installed extension is done by hashing the extension's init arg data
591
- * and checking that the result is consistent with what has been certified by the SNS.
592
- */
593
- export type PreciseValue =
594
- | { Int: bigint }
595
- | { Map: Array<[string, PreciseValue]> }
596
- | { Nat: bigint }
597
- | { Blob: Uint8Array }
598
- | { Bool: boolean }
599
- | { Text: string }
600
- | { Array: Array<PreciseValue> };
601
- export interface Principals {
602
- principals: Array<Principal>;
603
- }
604
- export interface Proposal {
605
- url: string;
606
- title: string;
607
- action: [] | [Action];
608
- summary: string;
609
- }
610
- export interface ProposalData {
611
- id: [] | [ProposalId];
612
- payload_text_rendering: [] | [string];
613
- topic: [] | [Topic];
614
- action: bigint;
615
- failure_reason: [] | [GovernanceError];
616
- action_auxiliary: [] | [ActionAuxiliary];
617
- ballots: Array<[string, Ballot]>;
618
- minimum_yes_proportion_of_total: [] | [Percentage];
619
- reward_event_round: bigint;
620
- failed_timestamp_seconds: bigint;
621
- reward_event_end_timestamp_seconds: [] | [bigint];
622
- proposal_creation_timestamp_seconds: bigint;
623
- initial_voting_period_seconds: bigint;
624
- reject_cost_e8s: bigint;
625
- latest_tally: [] | [Tally];
626
- wait_for_quiet_deadline_increase_seconds: bigint;
627
- decided_timestamp_seconds: bigint;
628
- proposal: [] | [Proposal];
629
- proposer: [] | [NeuronId];
630
- wait_for_quiet_state: [] | [WaitForQuietState];
631
- minimum_yes_proportion_of_exercised: [] | [Percentage];
632
- is_eligible_for_rewards: boolean;
633
- executed_timestamp_seconds: bigint;
634
- }
635
- export interface ProposalId {
636
- id: bigint;
637
- }
638
- export interface QueryStats {
639
- response_payload_bytes_total: [] | [bigint];
640
- num_instructions_total: [] | [bigint];
641
- num_calls_total: [] | [bigint];
642
- request_payload_bytes_total: [] | [bigint];
643
- }
644
- export interface RegisterDappCanisters {
645
- canister_ids: Array<Principal>;
646
- }
647
- export interface RegisterExtension {
648
- chunked_canister_wasm: [] | [ChunkedCanisterWasm];
649
- extension_init: [] | [ExtensionInit];
650
- }
651
- export interface RegisterVote {
652
- vote: number;
653
- proposal: [] | [ProposalId];
654
- }
655
- export interface RegisteredExtensionOperationSpec {
656
- spec: [] | [ExtensionOperationSpec];
657
- canister_id: [] | [Principal];
658
- }
659
- export interface RemoveNeuronPermissions {
660
- permissions_to_remove: [] | [NeuronPermissionList];
661
- principal_id: [] | [Principal];
662
- }
663
- export type Result = { Error: GovernanceError } | { Neuron: Neuron };
664
- export type Result_1 = { Error: GovernanceError } | { Proposal: ProposalData };
665
- export interface RewardEvent {
666
- rounds_since_last_distribution: [] | [bigint];
667
- actual_timestamp_seconds: bigint;
668
- end_timestamp_seconds: [] | [bigint];
669
- total_available_e8s_equivalent: [] | [bigint];
670
- distributed_e8s_equivalent: bigint;
671
- round: bigint;
672
- settled_proposals: Array<ProposalId>;
673
- }
674
- export interface SetDissolveTimestamp {
675
- dissolve_timestamp_seconds: bigint;
676
- }
677
- export interface SetFollowing {
678
- topic_following: Array<FolloweesForTopic>;
679
- }
680
- export interface SetMode {
681
- mode: number;
682
- }
683
- export interface SetTopicsForCustomProposals {
684
- custom_function_id_to_topic: Array<[bigint, Topic]>;
685
- }
686
- export interface SnsVersion {
687
- archive_wasm_hash: [] | [Uint8Array];
688
- root_wasm_hash: [] | [Uint8Array];
689
- swap_wasm_hash: [] | [Uint8Array];
690
- ledger_wasm_hash: [] | [Uint8Array];
691
- governance_wasm_hash: [] | [Uint8Array];
692
- index_wasm_hash: [] | [Uint8Array];
693
- }
694
- export interface Split {
695
- memo: bigint;
696
- amount_e8s: bigint;
697
- }
698
- export interface SplitResponse {
699
- created_neuron_id: [] | [NeuronId];
700
- }
701
- export interface StakeMaturity {
702
- percentage_to_stake: [] | [number];
703
- }
704
- export interface StakeMaturityResponse {
705
- maturity_e8s: bigint;
706
- staked_maturity_e8s: bigint;
707
- }
708
- export interface Subaccount {
709
- subaccount: Uint8Array;
710
- }
711
- export interface SwapNeuron {
712
- id: [] | [NeuronId];
713
- status: number;
714
- }
715
- export interface Tally {
716
- no: bigint;
717
- yes: bigint;
718
- total: bigint;
719
- timestamp_seconds: bigint;
720
- }
721
- export interface TargetVersionReset {
722
- human_readable: [] | [string];
723
- old_target_version: [] | [Version];
724
- new_target_version: [] | [Version];
725
- }
726
- export interface TargetVersionSet {
727
- old_target_version: [] | [Version];
728
- new_target_version: [] | [Version];
729
- is_advanced_automatically: [] | [boolean];
730
- }
731
- export interface Timers {
732
- last_spawned_timestamp_seconds: [] | [bigint];
733
- last_reset_timestamp_seconds: [] | [bigint];
734
- requires_periodic_tasks: [] | [boolean];
735
- }
736
- export interface Tokens {
737
- e8s: [] | [bigint];
738
- }
739
- export type Topic =
740
- | { DappCanisterManagement: null }
741
- | { DaoCommunitySettings: null }
742
- | { ApplicationBusinessLogic: null }
743
- | { CriticalDappOperations: null }
744
- | { TreasuryAssetManagement: null }
745
- | { Governance: null }
746
- | { SnsFrameworkManagement: null };
747
- export interface TopicInfo {
748
- extension_operations: [] | [Array<RegisteredExtensionOperationSpec>];
749
- native_functions: [] | [Array<NervousSystemFunction>];
750
- topic: [] | [Topic];
751
- is_critical: [] | [boolean];
752
- name: [] | [string];
753
- description: [] | [string];
754
- custom_functions: [] | [Array<NervousSystemFunction>];
755
- }
756
- export interface TopicSelector {
757
- topic: [] | [Topic];
758
- }
759
- export interface TransferSnsTreasuryFunds {
760
- from_treasury: number;
761
- to_principal: [] | [Principal];
762
- to_subaccount: [] | [Subaccount];
763
- memo: [] | [bigint];
764
- amount_e8s: bigint;
765
- }
766
- export interface TreasuryMetrics {
767
- /**
768
- * A human-readable identified for this treasury, e.g., "ICP".
769
- */
770
- name: [] | [string];
771
- /**
772
- * The amount of tokens in this treasury at the end of swap finalization.
773
- */
774
- original_amount_e8s: [] | [bigint];
775
- /**
776
- * The regularly updated amount of tokens in this treasury.
777
- */
778
- amount_e8s: [] | [bigint];
779
- account: [] | [Account];
780
- /**
781
- * The source of truth for the treasury balance is this ledger canister / account.
782
- */
783
- ledger_canister_id: [] | [Principal];
784
- /**
785
- * Same as, e.g., `TransferSnsTreasuryFunds.from_treasury`.
786
- */
787
- treasury: number;
788
- /**
789
- * When the metrics were last updated.
790
- */
791
- timestamp_seconds: [] | [bigint];
792
- }
793
- export interface UpgradeExtension {
794
- extension_canister_id: [] | [Principal];
795
- wasm: [] | [Wasm];
796
- canister_upgrade_arg: [] | [ExtensionUpgradeArg];
797
- }
798
- export interface UpgradeInProgress {
799
- mark_failed_at_seconds: bigint;
800
- checking_upgrade_lock: bigint;
801
- proposal_id: [] | [bigint];
802
- target_version: [] | [Version];
803
- }
804
- export interface UpgradeJournal {
805
- entries: Array<UpgradeJournalEntry>;
806
- }
807
- export interface UpgradeJournalEntry {
808
- event:
809
- | []
810
- | [
811
- | { TargetVersionSet: TargetVersionSet }
812
- | { UpgradeStepsReset: UpgradeStepsReset }
813
- | { UpgradeOutcome: UpgradeOutcome }
814
- | { UpgradeStarted: UpgradeStarted }
815
- | { UpgradeStepsRefreshed: UpgradeStepsRefreshed }
816
- | { TargetVersionReset: TargetVersionReset },
817
- ];
818
- timestamp_seconds: [] | [bigint];
819
- }
820
- export interface UpgradeOutcome {
821
- status:
822
- | []
823
- | [
824
- | { Success: {} }
825
- | { Timeout: {} }
826
- | { ExternalFailure: {} }
827
- | { InvalidState: { version: [] | [Version] } },
828
- ];
829
- human_readable: [] | [string];
830
- }
831
- export interface UpgradeSnsControlledCanister {
832
- new_canister_wasm: Uint8Array;
833
- mode: [] | [number];
834
- canister_id: [] | [Principal];
835
- chunked_canister_wasm: [] | [ChunkedCanisterWasm];
836
- canister_upgrade_arg: [] | [Uint8Array];
837
- }
838
- export interface UpgradeStarted {
839
- current_version: [] | [Version];
840
- expected_version: [] | [Version];
841
- reason:
842
- | []
843
- | [
844
- | { UpgradeSnsToNextVersionProposal: ProposalId }
845
- | { BehindTargetVersion: {} },
846
- ];
847
- }
848
- export interface UpgradeStepsRefreshed {
849
- upgrade_steps: [] | [Versions];
850
- }
851
- export interface UpgradeStepsReset {
852
- human_readable: [] | [string];
853
- upgrade_steps: [] | [Versions];
854
- }
855
- export interface Valuation {
856
- token: [] | [number];
857
- account: [] | [Account];
858
- valuation_factors: [] | [ValuationFactors];
859
- timestamp_seconds: [] | [bigint];
860
- }
861
- export interface ValuationFactors {
862
- xdrs_per_icp: [] | [Decimal];
863
- icps_per_token: [] | [Decimal];
864
- tokens: [] | [Tokens];
865
- }
866
- export interface Version {
867
- archive_wasm_hash: Uint8Array;
868
- root_wasm_hash: Uint8Array;
869
- swap_wasm_hash: Uint8Array;
870
- ledger_wasm_hash: Uint8Array;
871
- governance_wasm_hash: Uint8Array;
872
- index_wasm_hash: Uint8Array;
873
- }
874
- export interface Versions {
875
- versions: Array<Version>;
876
- }
877
- export interface VotingPowerMetrics {
878
- governance_total_potential_voting_power: [] | [bigint];
879
- /**
880
- * When the metrics were last updated.
881
- */
882
- timestamp_seconds: [] | [bigint];
883
- }
884
- export interface VotingRewardsParameters {
885
- final_reward_rate_basis_points: [] | [bigint];
886
- initial_reward_rate_basis_points: [] | [bigint];
887
- reward_rate_transition_duration_seconds: [] | [bigint];
888
- round_duration_seconds: [] | [bigint];
889
- }
890
- export interface WaitForQuietState {
891
- current_deadline_timestamp_seconds: bigint;
892
- }
893
- export type Wasm = { Chunked: ChunkedCanisterWasm } | { Bytes: Uint8Array };
894
- export interface _SERVICE {
895
- claim_swap_neurons: ActorMethod<
896
- [ClaimSwapNeuronsRequest],
897
- ClaimSwapNeuronsResponse
898
- >;
899
- fail_stuck_upgrade_in_progress: ActorMethod<[{}], {}>;
900
- get_build_metadata: ActorMethod<[], string>;
901
- get_latest_reward_event: ActorMethod<[], RewardEvent>;
902
- get_maturity_modulation: ActorMethod<[{}], GetMaturityModulationResponse>;
903
- get_metadata: ActorMethod<[{}], GetMetadataResponse>;
904
- get_metrics: ActorMethod<[GetMetricsRequest], GetMetricsResponse>;
905
- get_metrics_replicated: ActorMethod<[GetMetricsRequest], GetMetricsResponse>;
906
- get_mode: ActorMethod<[{}], GetModeResponse>;
907
- get_nervous_system_parameters: ActorMethod<[null], NervousSystemParameters>;
908
- get_neuron: ActorMethod<[GetNeuron], GetNeuronResponse>;
909
- get_proposal: ActorMethod<[GetProposal], GetProposalResponse>;
910
- get_root_canister_status: ActorMethod<[null], CanisterStatusResultV2>;
911
- get_running_sns_version: ActorMethod<[{}], GetRunningSnsVersionResponse>;
912
- get_sns_initialization_parameters: ActorMethod<
913
- [{}],
914
- GetSnsInitializationParametersResponse
915
- >;
916
- get_timers: ActorMethod<[{}], GetTimersResponse>;
917
- get_upgrade_journal: ActorMethod<
918
- [GetUpgradeJournalRequest],
919
- GetUpgradeJournalResponse
920
- >;
921
- list_nervous_system_functions: ActorMethod<
922
- [],
923
- ListNervousSystemFunctionsResponse
924
- >;
925
- list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
926
- list_proposals: ActorMethod<[ListProposals], ListProposalsResponse>;
927
- list_topics: ActorMethod<[ListTopicsRequest], ListTopicsResponse>;
928
- manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
929
- reset_timers: ActorMethod<[{}], {}>;
930
- set_mode: ActorMethod<[SetMode], {}>;
931
- }
932
- export declare const idlFactory: IDL.InterfaceFactory;
933
- export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];