@dfinity/nns 6.0.0 → 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.
@@ -476,17 +476,6 @@ export const idlFactory = ({ IDL }) => {
476
476
  'error_message' : IDL.Text,
477
477
  'error_type' : IDL.Int32,
478
478
  });
479
- const CfNeuron = IDL.Record({
480
- 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
481
- 'hotkeys' : IDL.Opt(Principals),
482
- 'nns_neuron_id' : IDL.Nat64,
483
- 'amount_icp_e8s' : IDL.Nat64,
484
- });
485
- const CfParticipant = IDL.Record({
486
- 'controller' : IDL.Opt(IDL.Principal),
487
- 'hotkey_principal' : IDL.Text,
488
- 'cf_neurons' : IDL.Vec(CfNeuron),
489
- });
490
479
  const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
491
480
  const SwapParticipationLimits = IDL.Record({
492
481
  'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
@@ -496,7 +485,6 @@ export const idlFactory = ({ IDL }) => {
496
485
  });
497
486
  const NeuronsFundNeuronPortion = IDL.Record({
498
487
  'controller' : IDL.Opt(IDL.Principal),
499
- 'hotkey_principal' : IDL.Opt(IDL.Principal),
500
488
  'hotkeys' : IDL.Vec(IDL.Principal),
501
489
  'is_capped' : IDL.Opt(IDL.Bool),
502
490
  'maturity_equivalent_icp_e8s' : IDL.Opt(IDL.Nat64),
@@ -564,7 +552,6 @@ export const idlFactory = ({ IDL }) => {
564
552
  const ProposalData = IDL.Record({
565
553
  'id' : IDL.Opt(NeuronId),
566
554
  'failure_reason' : IDL.Opt(GovernanceError),
567
- 'cf_participants' : IDL.Vec(CfParticipant),
568
555
  'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
569
556
  'proposal_timestamp_seconds' : IDL.Nat64,
570
557
  'reward_event_round' : IDL.Nat64,
@@ -672,7 +659,7 @@ export const idlFactory = ({ IDL }) => {
672
659
  'Err' : GovernanceError,
673
660
  });
674
661
  const Result_4 = IDL.Variant({
675
- 'Ok' : RewardNodeProviders,
662
+ 'Ok' : MonthlyNodeProviderRewards,
676
663
  'Err' : GovernanceError,
677
664
  });
678
665
  const NeuronInfo = IDL.Record({
@@ -782,9 +769,6 @@ export const idlFactory = ({ IDL }) => {
782
769
  'CreateServiceNervousSystem' : CreateServiceNervousSystem,
783
770
  'ExecuteNnsFunction' : ExecuteNnsFunction,
784
771
  'RewardNodeProvider' : RewardNodeProvider,
785
- 'OpenSnsTokenSwap' : OpenSnsTokenSwap,
786
- 'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
787
- 'SetDefaultFollowees' : SetDefaultFollowees,
788
772
  'RewardNodeProviders' : RewardNodeProviders,
789
773
  'ManageNetworkEconomics' : NetworkEconomics,
790
774
  'ApproveGenesisKyc' : Principals,
@@ -885,7 +869,6 @@ export const idlFactory = ({ IDL }) => {
885
869
  });
886
870
  const NeuronsFundNeuron = IDL.Record({
887
871
  'controller' : IDL.Opt(IDL.Principal),
888
- 'hotkey_principal' : IDL.Opt(IDL.Text),
889
872
  'hotkeys' : IDL.Opt(Principals),
890
873
  'is_capped' : IDL.Opt(IDL.Bool),
891
874
  'nns_neuron_id' : IDL.Opt(IDL.Nat64),
@@ -1474,17 +1457,6 @@ export const init = ({ IDL }) => {
1474
1457
  'error_message' : IDL.Text,
1475
1458
  'error_type' : IDL.Int32,
1476
1459
  });
1477
- const CfNeuron = IDL.Record({
1478
- 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
1479
- 'hotkeys' : IDL.Opt(Principals),
1480
- 'nns_neuron_id' : IDL.Nat64,
1481
- 'amount_icp_e8s' : IDL.Nat64,
1482
- });
1483
- const CfParticipant = IDL.Record({
1484
- 'controller' : IDL.Opt(IDL.Principal),
1485
- 'hotkey_principal' : IDL.Text,
1486
- 'cf_neurons' : IDL.Vec(CfNeuron),
1487
- });
1488
1460
  const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
1489
1461
  const SwapParticipationLimits = IDL.Record({
1490
1462
  'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
@@ -1494,7 +1466,6 @@ export const init = ({ IDL }) => {
1494
1466
  });
1495
1467
  const NeuronsFundNeuronPortion = IDL.Record({
1496
1468
  'controller' : IDL.Opt(IDL.Principal),
1497
- 'hotkey_principal' : IDL.Opt(IDL.Principal),
1498
1469
  'hotkeys' : IDL.Vec(IDL.Principal),
1499
1470
  'is_capped' : IDL.Opt(IDL.Bool),
1500
1471
  'maturity_equivalent_icp_e8s' : IDL.Opt(IDL.Nat64),
@@ -1562,7 +1533,6 @@ export const init = ({ IDL }) => {
1562
1533
  const ProposalData = IDL.Record({
1563
1534
  'id' : IDL.Opt(NeuronId),
1564
1535
  'failure_reason' : IDL.Opt(GovernanceError),
1565
- 'cf_participants' : IDL.Vec(CfParticipant),
1566
1536
  'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
1567
1537
  'proposal_timestamp_seconds' : IDL.Nat64,
1568
1538
  'reward_event_round' : IDL.Nat64,
@@ -1,22 +1,46 @@
1
- // Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
2
- type AddWasmRequest = record { hash : blob; wasm : opt SnsWasm };
3
- type AddWasmResponse = record { result : opt Result };
4
- type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution };
5
- type Canister = record { id : opt principal };
6
- type Countries = record { iso_codes : vec text };
7
- type DappCanisters = record { canisters : vec Canister };
1
+ // Generated from IC repo commit c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
2
+ type AddWasmRequest = record {
3
+ hash : blob;
4
+ wasm : opt SnsWasm;
5
+ };
6
+
7
+ type AddWasmResponse = record {
8
+ result : opt Result;
9
+ };
10
+
11
+ type AirdropDistribution = record {
12
+ airdrop_neurons : vec NeuronDistribution;
13
+ };
14
+
15
+ type Canister = record {
16
+ id : opt principal;
17
+ };
18
+
19
+ type Countries = record {
20
+ iso_codes : vec text;
21
+ };
22
+
23
+ type DappCanisters = record {
24
+ canisters : vec Canister;
25
+ };
26
+
8
27
  type DappCanistersTransferResult = record {
9
28
  restored_dapp_canisters : vec Canister;
10
29
  nns_controlled_dapp_canisters : vec Canister;
11
30
  sns_controlled_dapp_canisters : vec Canister;
12
31
  };
13
- type DeployNewSnsRequest = record { sns_init_payload : opt SnsInitPayload };
32
+
33
+ type DeployNewSnsRequest = record {
34
+ sns_init_payload : opt SnsInitPayload;
35
+ };
36
+
14
37
  type DeployNewSnsResponse = record {
15
38
  dapp_canisters_transfer_result : opt DappCanistersTransferResult;
16
39
  subnet_id : opt principal;
17
40
  error : opt SnsWasmError;
18
41
  canisters : opt SnsCanisterIds;
19
42
  };
43
+
20
44
  type DeployedSns = record {
21
45
  root_canister_id : opt principal;
22
46
  governance_canister_id : opt principal;
@@ -24,49 +48,89 @@ type DeployedSns = record {
24
48
  swap_canister_id : opt principal;
25
49
  ledger_canister_id : opt principal;
26
50
  };
51
+
27
52
  type DeveloperDistribution = record {
28
53
  developer_neurons : vec NeuronDistribution;
29
54
  };
55
+
30
56
  type FractionalDeveloperVotingPower = record {
31
57
  treasury_distribution : opt TreasuryDistribution;
32
58
  developer_distribution : opt DeveloperDistribution;
33
59
  airdrop_distribution : opt AirdropDistribution;
34
60
  swap_distribution : opt SwapDistribution;
35
61
  };
62
+
36
63
  type GetAllowedPrincipalsResponse = record {
37
64
  allowed_principals : vec principal;
38
65
  };
39
- type GetDeployedSnsByProposalIdRequest = record { proposal_id : nat64 };
66
+
67
+ type GetDeployedSnsByProposalIdRequest = record {
68
+ proposal_id : nat64;
69
+ };
70
+
40
71
  type GetDeployedSnsByProposalIdResponse = record {
41
72
  get_deployed_sns_by_proposal_id_result : opt GetDeployedSnsByProposalIdResult;
42
73
  };
74
+
43
75
  type GetDeployedSnsByProposalIdResult = variant {
44
76
  Error : SnsWasmError;
45
77
  DeployedSns : DeployedSns;
46
78
  };
79
+
47
80
  type GetNextSnsVersionRequest = record {
48
81
  governance_canister_id : opt principal;
49
82
  current_version : opt SnsVersion;
50
83
  };
51
- type GetNextSnsVersionResponse = record { next_version : opt SnsVersion };
52
- type GetProposalIdThatAddedWasmRequest = record { hash : blob };
53
- type GetProposalIdThatAddedWasmResponse = record { proposal_id : opt nat64 };
54
- type GetSnsSubnetIdsResponse = record { sns_subnet_ids : vec principal };
55
- type GetWasmMetadataRequest = record { hash : opt blob };
56
- type GetWasmMetadataResponse = record { result : opt Result_1 };
57
- type GetWasmRequest = record { hash : blob };
58
- type GetWasmResponse = record { wasm : opt SnsWasm };
84
+
85
+ type GetNextSnsVersionResponse = record {
86
+ next_version : opt SnsVersion;
87
+ };
88
+
89
+ type GetProposalIdThatAddedWasmRequest = record {
90
+ hash : blob;
91
+ };
92
+
93
+ type GetProposalIdThatAddedWasmResponse = record {
94
+ proposal_id : opt nat64;
95
+ };
96
+
97
+ type GetSnsSubnetIdsResponse = record {
98
+ sns_subnet_ids : vec principal;
99
+ };
100
+
101
+ type GetWasmMetadataRequest = record {
102
+ hash : opt blob;
103
+ };
104
+
105
+ type GetWasmMetadataResponse = record {
106
+ result : opt Result_1;
107
+ };
108
+
109
+ type GetWasmRequest = record {
110
+ hash : blob;
111
+ };
112
+
113
+ type GetWasmResponse = record {
114
+ wasm : opt SnsWasm;
115
+ };
116
+
59
117
  type IdealMatchedParticipationFunction = record {
60
118
  serialized_representation : opt text;
61
119
  };
120
+
62
121
  type InitialTokenDistribution = variant {
63
122
  FractionalDeveloperVotingPower : FractionalDeveloperVotingPower;
64
123
  };
124
+
65
125
  type InsertUpgradePathEntriesRequest = record {
66
126
  upgrade_path : vec SnsUpgrade;
67
127
  sns_governance_canister_id : opt principal;
68
128
  };
69
- type InsertUpgradePathEntriesResponse = record { error : opt SnsWasmError };
129
+
130
+ type InsertUpgradePathEntriesResponse = record {
131
+ error : opt SnsWasmError;
132
+ };
133
+
70
134
  type LinearScalingCoefficient = record {
71
135
  slope_numerator : opt nat64;
72
136
  intercept_icp_e8s : opt nat64;
@@ -74,26 +138,37 @@ type LinearScalingCoefficient = record {
74
138
  slope_denominator : opt nat64;
75
139
  to_direct_participation_icp_e8s : opt nat64;
76
140
  };
77
- type ListDeployedSnsesResponse = record { instances : vec DeployedSns };
141
+
142
+ type ListDeployedSnsesResponse = record {
143
+ instances : vec DeployedSns;
144
+ };
145
+
78
146
  type ListUpgradeStep = record {
79
147
  pretty_version : opt PrettySnsVersion;
80
148
  version : opt SnsVersion;
81
149
  };
150
+
82
151
  type ListUpgradeStepsRequest = record {
83
152
  limit : nat32;
84
153
  starting_at : opt SnsVersion;
85
154
  sns_governance_canister_id : opt principal;
86
155
  };
87
- type ListUpgradeStepsResponse = record { steps : vec ListUpgradeStep };
156
+
157
+ type ListUpgradeStepsResponse = record {
158
+ steps : vec ListUpgradeStep;
159
+ };
160
+
88
161
  type MetadataSection = record {
89
162
  contents : opt blob;
90
163
  name : opt text;
91
164
  visibility : opt text;
92
165
  };
166
+
93
167
  type NeuronBasketConstructionParameters = record {
94
168
  dissolve_delay_interval_seconds : nat64;
95
169
  count : nat64;
96
170
  };
171
+
97
172
  type NeuronDistribution = record {
98
173
  controller : opt principal;
99
174
  dissolve_delay_seconds : nat64;
@@ -101,13 +176,18 @@ type NeuronDistribution = record {
101
176
  stake_e8s : nat64;
102
177
  vesting_period_seconds : opt nat64;
103
178
  };
179
+
104
180
  type NeuronsFundParticipationConstraints = record {
105
181
  coefficient_intervals : vec LinearScalingCoefficient;
106
182
  max_neurons_fund_participation_icp_e8s : opt nat64;
107
183
  min_direct_participation_threshold_icp_e8s : opt nat64;
108
184
  ideal_matched_participation_function : opt IdealMatchedParticipationFunction;
109
185
  };
110
- type Ok = record { sections : vec MetadataSection };
186
+
187
+ type Ok = record {
188
+ sections : vec MetadataSection;
189
+ };
190
+
111
191
  type PrettySnsVersion = record {
112
192
  archive_wasm_hash : text;
113
193
  root_wasm_hash : text;
@@ -116,8 +196,17 @@ type PrettySnsVersion = record {
116
196
  governance_wasm_hash : text;
117
197
  index_wasm_hash : text;
118
198
  };
119
- type Result = variant { Error : SnsWasmError; Hash : blob };
120
- type Result_1 = variant { Ok : Ok; Error : SnsWasmError };
199
+
200
+ type Result = variant {
201
+ Error : SnsWasmError;
202
+ Hash : blob;
203
+ };
204
+
205
+ type Result_1 = variant {
206
+ Ok : Ok;
207
+ Error : SnsWasmError;
208
+ };
209
+
121
210
  type SnsCanisterIds = record {
122
211
  root : opt principal;
123
212
  swap : opt principal;
@@ -125,6 +214,7 @@ type SnsCanisterIds = record {
125
214
  index : opt principal;
126
215
  governance : opt principal;
127
216
  };
217
+
128
218
  type SnsInitPayload = record {
129
219
  url : opt text;
130
220
  max_dissolve_delay_seconds : opt nat64;
@@ -165,10 +255,12 @@ type SnsInitPayload = record {
165
255
  min_icp_e8s : opt nat64;
166
256
  max_direct_participation_icp_e8s : opt nat64;
167
257
  };
258
+
168
259
  type SnsUpgrade = record {
169
260
  next_version : opt SnsVersion;
170
261
  current_version : opt SnsVersion;
171
262
  };
263
+
172
264
  type SnsVersion = record {
173
265
  archive_wasm_hash : blob;
174
266
  root_wasm_hash : blob;
@@ -177,38 +269,55 @@ type SnsVersion = record {
177
269
  governance_wasm_hash : blob;
178
270
  index_wasm_hash : blob;
179
271
  };
272
+
180
273
  type SnsWasm = record {
181
274
  wasm : blob;
182
275
  proposal_id : opt nat64;
183
276
  canister_type : int32;
184
277
  };
278
+
185
279
  type SnsWasmCanisterInitPayload = record {
186
280
  allowed_principals : vec principal;
187
281
  access_controls_enabled : bool;
188
282
  sns_subnet_ids : vec principal;
189
283
  };
190
- type SnsWasmError = record { message : text };
284
+
285
+ type SnsWasmError = record {
286
+ message : text;
287
+ };
288
+
191
289
  type SwapDistribution = record {
192
290
  total_e8s : nat64;
193
291
  initial_swap_amount_e8s : nat64;
194
292
  };
195
- type TreasuryDistribution = record { total_e8s : nat64 };
293
+
294
+ type TreasuryDistribution = record {
295
+ total_e8s : nat64;
296
+ };
297
+
196
298
  type UpdateAllowedPrincipalsRequest = record {
197
299
  added_principals : vec principal;
198
300
  removed_principals : vec principal;
199
301
  };
302
+
200
303
  type UpdateAllowedPrincipalsResponse = record {
201
304
  update_allowed_principals_result : opt UpdateAllowedPrincipalsResult;
202
305
  };
306
+
203
307
  type UpdateAllowedPrincipalsResult = variant {
204
308
  Error : SnsWasmError;
205
309
  AllowedPrincipals : GetAllowedPrincipalsResponse;
206
310
  };
311
+
207
312
  type UpdateSnsSubnetListRequest = record {
208
313
  sns_subnet_ids_to_add : vec principal;
209
314
  sns_subnet_ids_to_remove : vec principal;
210
315
  };
211
- type UpdateSnsSubnetListResponse = record { error : opt SnsWasmError };
316
+
317
+ type UpdateSnsSubnetListResponse = record {
318
+ error : opt SnsWasmError;
319
+ };
320
+
212
321
  service : (SnsWasmCanisterInitPayload) -> {
213
322
  add_wasm : (AddWasmRequest) -> (AddWasmResponse);
214
323
  deploy_new_sns : (DeployNewSnsRequest) -> (DeployNewSnsResponse);
@@ -241,4 +350,4 @@ service : (SnsWasmCanisterInitPayload) -> {
241
350
  update_sns_subnet_list : (UpdateSnsSubnetListRequest) -> (
242
351
  UpdateSnsSubnetListResponse,
243
352
  );
244
- }
353
+ }