@dfinity/nns 2.0.0 → 2.1.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 (35) hide show
  1. package/README.md +12 -24
  2. package/dist/candid/genesis_token.did +1 -1
  3. package/dist/candid/governance.certified.idl.js +488 -312
  4. package/dist/candid/governance.d.ts +101 -0
  5. package/dist/candid/governance.did +104 -3
  6. package/dist/candid/governance.idl.js +496 -320
  7. package/dist/candid/governance_test.certified.idl.js +115 -0
  8. package/dist/candid/governance_test.d.ts +69 -0
  9. package/dist/candid/governance_test.did +67 -2
  10. package/dist/candid/governance_test.idl.js +115 -0
  11. package/dist/candid/sns_wasm.certified.idl.js +2 -0
  12. package/dist/candid/sns_wasm.d.ts +2 -0
  13. package/dist/candid/sns_wasm.did +3 -1
  14. package/dist/candid/sns_wasm.idl.js +2 -0
  15. package/dist/cjs/index.cjs.js +2 -2
  16. package/dist/cjs/index.cjs.js.map +4 -4
  17. package/dist/esm/chunk-2MR4JA3T.js +20 -0
  18. package/dist/esm/chunk-2MR4JA3T.js.map +7 -0
  19. package/dist/esm/chunk-YGDWD6VV.js +2 -0
  20. package/dist/esm/chunk-YGDWD6VV.js.map +7 -0
  21. package/dist/esm/governance.canister.js +1 -1
  22. package/dist/esm/index.js +1 -1
  23. package/dist/esm/index.js.map +4 -4
  24. package/dist/esm/sns_wasm.canister.js +1 -1
  25. package/dist/types/canisters/governance/request.converters.d.ts +1 -1
  26. package/dist/types/canisters/governance/response.converters.d.ts +2 -1
  27. package/dist/types/enums/governance.enums.d.ts +3 -1
  28. package/dist/types/governance_test.canister.d.ts +14 -0
  29. package/dist/types/index.d.ts +1 -0
  30. package/dist/types/types/governance_converters.d.ts +17 -11
  31. package/package.json +1 -1
  32. package/dist/esm/chunk-IJWQXUQ5.js +0 -2
  33. package/dist/esm/chunk-IJWQXUQ5.js.map +0 -7
  34. package/dist/esm/chunk-LARRGLCK.js +0 -20
  35. package/dist/esm/chunk-LARRGLCK.js.map +0 -7
@@ -139,6 +139,7 @@ export const idlFactory = ({ IDL }) => {
139
139
  const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });
140
140
  const SwapParameters = IDL.Record({
141
141
  'minimum_participants' : IDL.Opt(IDL.Nat64),
142
+ 'neurons_fund_participation' : IDL.Opt(IDL.Bool),
142
143
  'duration' : IDL.Opt(Duration),
143
144
  'neuron_basket_construction_parameters' : IDL.Opt(
144
145
  NeuronBasketConstructionParameters
@@ -146,8 +147,10 @@ export const idlFactory = ({ IDL }) => {
146
147
  'confirmation_text' : IDL.Opt(IDL.Text),
147
148
  'maximum_participant_icp' : IDL.Opt(Tokens),
148
149
  'minimum_icp' : IDL.Opt(Tokens),
150
+ 'minimum_direct_participation_icp' : IDL.Opt(Tokens),
149
151
  'minimum_participant_icp' : IDL.Opt(Tokens),
150
152
  'start_time' : IDL.Opt(GlobalTimeOfDay),
153
+ 'maximum_direct_participation_icp' : IDL.Opt(Tokens),
151
154
  'maximum_icp' : IDL.Opt(Tokens),
152
155
  'neurons_fund_investment_icp' : IDL.Opt(Tokens),
153
156
  'restricted_countries' : IDL.Opt(Countries),
@@ -216,7 +219,9 @@ export const idlFactory = ({ IDL }) => {
216
219
  'sns_token_e8s' : IDL.Nat64,
217
220
  'sale_delay_seconds' : IDL.Opt(IDL.Nat64),
218
221
  'max_participant_icp_e8s' : IDL.Nat64,
222
+ 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
219
223
  'min_icp_e8s' : IDL.Nat64,
224
+ 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
220
225
  });
221
226
  const OpenSnsTokenSwap = IDL.Record({
222
227
  'community_fund_investment_e8s' : IDL.Opt(IDL.Nat64),
@@ -364,6 +369,7 @@ export const idlFactory = ({ IDL }) => {
364
369
  'error_type' : IDL.Int32,
365
370
  });
366
371
  const CfNeuron = IDL.Record({
372
+ 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
367
373
  'nns_neuron_id' : IDL.Nat64,
368
374
  'amount_icp_e8s' : IDL.Nat64,
369
375
  });
@@ -372,6 +378,41 @@ export const idlFactory = ({ IDL }) => {
372
378
  'cf_neurons' : IDL.Vec(CfNeuron),
373
379
  });
374
380
  const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
381
+ const SwapParticipationLimits = IDL.Record({
382
+ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
383
+ 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
384
+ 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
385
+ 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
386
+ });
387
+ const NeuronsFundNeuronPortion = IDL.Record({
388
+ 'hotkey_principal' : IDL.Opt(IDL.Principal),
389
+ 'is_capped' : IDL.Opt(IDL.Bool),
390
+ 'maturity_equivalent_icp_e8s' : IDL.Opt(IDL.Nat64),
391
+ 'nns_neuron_id' : IDL.Opt(NeuronId),
392
+ 'amount_icp_e8s' : IDL.Opt(IDL.Nat64),
393
+ });
394
+ const NeuronsFundSnapshot = IDL.Record({
395
+ 'neurons_fund_neuron_portions' : IDL.Vec(NeuronsFundNeuronPortion),
396
+ });
397
+ const IdealMatchedParticipationFunction = IDL.Record({
398
+ 'serialized_representation' : IDL.Opt(IDL.Text),
399
+ });
400
+ const NeuronsFundParticipation = IDL.Record({
401
+ 'total_maturity_equivalent_icp_e8s' : IDL.Opt(IDL.Nat64),
402
+ 'intended_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
403
+ 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
404
+ 'swap_participation_limits' : IDL.Opt(SwapParticipationLimits),
405
+ 'max_neurons_fund_swap_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
406
+ 'neurons_fund_reserves' : IDL.Opt(NeuronsFundSnapshot),
407
+ 'ideal_matched_participation_function' : IDL.Opt(
408
+ IdealMatchedParticipationFunction
409
+ ),
410
+ });
411
+ const NeuronsFundData = IDL.Record({
412
+ 'final_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
413
+ 'initial_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
414
+ 'neurons_fund_refunds' : IDL.Opt(NeuronsFundSnapshot),
415
+ });
375
416
  const CanisterStatusResultV2 = IDL.Record({
376
417
  'status' : IDL.Opt(IDL.Int32),
377
418
  'freezing_threshold' : IDL.Opt(IDL.Nat64),
@@ -415,6 +456,7 @@ export const idlFactory = ({ IDL }) => {
415
456
  'proposal_timestamp_seconds' : IDL.Nat64,
416
457
  'reward_event_round' : IDL.Nat64,
417
458
  'failed_timestamp_seconds' : IDL.Nat64,
459
+ 'neurons_fund_data' : IDL.Opt(NeuronsFundData),
418
460
  'reject_cost_e8s' : IDL.Nat64,
419
461
  'derived_proposal_information' : IDL.Opt(DerivedProposalInformation),
420
462
  'latest_tally' : IDL.Opt(Tally),
@@ -628,6 +670,32 @@ export const idlFactory = ({ IDL }) => {
628
670
  'result' : IDL.Opt(Result_7),
629
671
  'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),
630
672
  });
673
+ const Committed_1 = IDL.Record({
674
+ 'total_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
675
+ 'total_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
676
+ 'sns_governance_canister_id' : IDL.Opt(IDL.Principal),
677
+ });
678
+ const Result_8 = IDL.Variant({
679
+ 'Committed' : Committed_1,
680
+ 'Aborted' : IDL.Record({}),
681
+ });
682
+ const SettleNeuronsFundParticipationRequest = IDL.Record({
683
+ 'result' : IDL.Opt(Result_8),
684
+ 'nns_proposal_id' : IDL.Opt(IDL.Nat64),
685
+ });
686
+ const NeuronsFundNeuron = IDL.Record({
687
+ 'hotkey_principal' : IDL.Opt(IDL.Text),
688
+ 'is_capped' : IDL.Opt(IDL.Bool),
689
+ 'nns_neuron_id' : IDL.Opt(IDL.Nat64),
690
+ 'amount_icp_e8s' : IDL.Opt(IDL.Nat64),
691
+ });
692
+ const Ok = IDL.Record({
693
+ 'neurons_fund_neuron_portions' : IDL.Vec(NeuronsFundNeuron),
694
+ });
695
+ const Result_9 = IDL.Variant({ 'Ok' : Ok, 'Err' : GovernanceError });
696
+ const SettleNeuronsFundParticipationResponse = IDL.Record({
697
+ 'result' : IDL.Opt(Result_9),
698
+ });
631
699
  const UpdateNodeProvider = IDL.Record({
632
700
  'reward_account' : IDL.Opt(AccountIdentifier),
633
701
  });
@@ -694,6 +762,11 @@ export const idlFactory = ({ IDL }) => {
694
762
  [Result],
695
763
  [],
696
764
  ),
765
+ 'settle_neurons_fund_participation' : IDL.Func(
766
+ [SettleNeuronsFundParticipationRequest],
767
+ [SettleNeuronsFundParticipationResponse],
768
+ [],
769
+ ),
697
770
  'simulate_manage_neuron' : IDL.Func(
698
771
  [ManageNeuron],
699
772
  [ManageNeuronResponse],
@@ -844,6 +917,7 @@ export const init = ({ IDL }) => {
844
917
  const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });
845
918
  const SwapParameters = IDL.Record({
846
919
  'minimum_participants' : IDL.Opt(IDL.Nat64),
920
+ 'neurons_fund_participation' : IDL.Opt(IDL.Bool),
847
921
  'duration' : IDL.Opt(Duration),
848
922
  'neuron_basket_construction_parameters' : IDL.Opt(
849
923
  NeuronBasketConstructionParameters
@@ -851,8 +925,10 @@ export const init = ({ IDL }) => {
851
925
  'confirmation_text' : IDL.Opt(IDL.Text),
852
926
  'maximum_participant_icp' : IDL.Opt(Tokens),
853
927
  'minimum_icp' : IDL.Opt(Tokens),
928
+ 'minimum_direct_participation_icp' : IDL.Opt(Tokens),
854
929
  'minimum_participant_icp' : IDL.Opt(Tokens),
855
930
  'start_time' : IDL.Opt(GlobalTimeOfDay),
931
+ 'maximum_direct_participation_icp' : IDL.Opt(Tokens),
856
932
  'maximum_icp' : IDL.Opt(Tokens),
857
933
  'neurons_fund_investment_icp' : IDL.Opt(Tokens),
858
934
  'restricted_countries' : IDL.Opt(Countries),
@@ -921,7 +997,9 @@ export const init = ({ IDL }) => {
921
997
  'sns_token_e8s' : IDL.Nat64,
922
998
  'sale_delay_seconds' : IDL.Opt(IDL.Nat64),
923
999
  'max_participant_icp_e8s' : IDL.Nat64,
1000
+ 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
924
1001
  'min_icp_e8s' : IDL.Nat64,
1002
+ 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
925
1003
  });
926
1004
  const OpenSnsTokenSwap = IDL.Record({
927
1005
  'community_fund_investment_e8s' : IDL.Opt(IDL.Nat64),
@@ -1069,6 +1147,7 @@ export const init = ({ IDL }) => {
1069
1147
  'error_type' : IDL.Int32,
1070
1148
  });
1071
1149
  const CfNeuron = IDL.Record({
1150
+ 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
1072
1151
  'nns_neuron_id' : IDL.Nat64,
1073
1152
  'amount_icp_e8s' : IDL.Nat64,
1074
1153
  });
@@ -1077,6 +1156,41 @@ export const init = ({ IDL }) => {
1077
1156
  'cf_neurons' : IDL.Vec(CfNeuron),
1078
1157
  });
1079
1158
  const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
1159
+ const SwapParticipationLimits = IDL.Record({
1160
+ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
1161
+ 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
1162
+ 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
1163
+ 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
1164
+ });
1165
+ const NeuronsFundNeuronPortion = IDL.Record({
1166
+ 'hotkey_principal' : IDL.Opt(IDL.Principal),
1167
+ 'is_capped' : IDL.Opt(IDL.Bool),
1168
+ 'maturity_equivalent_icp_e8s' : IDL.Opt(IDL.Nat64),
1169
+ 'nns_neuron_id' : IDL.Opt(NeuronId),
1170
+ 'amount_icp_e8s' : IDL.Opt(IDL.Nat64),
1171
+ });
1172
+ const NeuronsFundSnapshot = IDL.Record({
1173
+ 'neurons_fund_neuron_portions' : IDL.Vec(NeuronsFundNeuronPortion),
1174
+ });
1175
+ const IdealMatchedParticipationFunction = IDL.Record({
1176
+ 'serialized_representation' : IDL.Opt(IDL.Text),
1177
+ });
1178
+ const NeuronsFundParticipation = IDL.Record({
1179
+ 'total_maturity_equivalent_icp_e8s' : IDL.Opt(IDL.Nat64),
1180
+ 'intended_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
1181
+ 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
1182
+ 'swap_participation_limits' : IDL.Opt(SwapParticipationLimits),
1183
+ 'max_neurons_fund_swap_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
1184
+ 'neurons_fund_reserves' : IDL.Opt(NeuronsFundSnapshot),
1185
+ 'ideal_matched_participation_function' : IDL.Opt(
1186
+ IdealMatchedParticipationFunction
1187
+ ),
1188
+ });
1189
+ const NeuronsFundData = IDL.Record({
1190
+ 'final_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
1191
+ 'initial_neurons_fund_participation' : IDL.Opt(NeuronsFundParticipation),
1192
+ 'neurons_fund_refunds' : IDL.Opt(NeuronsFundSnapshot),
1193
+ });
1080
1194
  const CanisterStatusResultV2 = IDL.Record({
1081
1195
  'status' : IDL.Opt(IDL.Int32),
1082
1196
  'freezing_threshold' : IDL.Opt(IDL.Nat64),
@@ -1120,6 +1234,7 @@ export const init = ({ IDL }) => {
1120
1234
  'proposal_timestamp_seconds' : IDL.Nat64,
1121
1235
  'reward_event_round' : IDL.Nat64,
1122
1236
  'failed_timestamp_seconds' : IDL.Nat64,
1237
+ 'neurons_fund_data' : IDL.Opt(NeuronsFundData),
1123
1238
  'reject_cost_e8s' : IDL.Nat64,
1124
1239
  'derived_proposal_information' : IDL.Opt(DerivedProposalInformation),
1125
1240
  'latest_tally' : IDL.Opt(Tally),
@@ -114,9 +114,11 @@ export const idlFactory = ({ IDL }) => {
114
114
  'token_logo' : IDL.Opt(IDL.Text),
115
115
  'token_name' : IDL.Opt(IDL.Text),
116
116
  'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
117
+ 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
117
118
  'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),
118
119
  'restricted_countries' : IDL.Opt(Countries),
119
120
  'min_icp_e8s' : IDL.Opt(IDL.Nat64),
121
+ 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
120
122
  });
121
123
  const DeployNewSnsRequest = IDL.Record({
122
124
  'sns_init_payload' : IDL.Opt(SnsInitPayload),
@@ -182,9 +182,11 @@ export interface SnsInitPayload {
182
182
  token_logo: [] | [string];
183
183
  token_name: [] | [string];
184
184
  max_participant_icp_e8s: [] | [bigint];
185
+ min_direct_participation_icp_e8s: [] | [bigint];
185
186
  proposal_reject_cost_e8s: [] | [bigint];
186
187
  restricted_countries: [] | [Countries];
187
188
  min_icp_e8s: [] | [bigint];
189
+ max_direct_participation_icp_e8s: [] | [bigint];
188
190
  }
189
191
  export interface SnsUpgrade {
190
192
  next_version: [] | [SnsVersion];
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 557b532805beb8d63c5ab65146d4e338849a50e1 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
1
+ // Generated from IC repo commit 2d57e93dabc5f13258d0dee1ffb2363ddce7fe62 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
2
2
  type AddWasmRequest = record { hash : vec nat8; wasm : opt SnsWasm };
3
3
  type AddWasmResponse = record { result : opt Result };
4
4
  type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution };
@@ -142,9 +142,11 @@ type SnsInitPayload = record {
142
142
  token_logo : opt text;
143
143
  token_name : opt text;
144
144
  max_participant_icp_e8s : opt nat64;
145
+ min_direct_participation_icp_e8s : opt nat64;
145
146
  proposal_reject_cost_e8s : opt nat64;
146
147
  restricted_countries : opt Countries;
147
148
  min_icp_e8s : opt nat64;
149
+ max_direct_participation_icp_e8s : opt nat64;
148
150
  };
149
151
  type SnsUpgrade = record {
150
152
  next_version : opt SnsVersion;
@@ -114,9 +114,11 @@ export const idlFactory = ({ IDL }) => {
114
114
  'token_logo' : IDL.Opt(IDL.Text),
115
115
  'token_name' : IDL.Opt(IDL.Text),
116
116
  'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
117
+ 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
117
118
  'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),
118
119
  'restricted_countries' : IDL.Opt(Countries),
119
120
  'min_icp_e8s' : IDL.Opt(IDL.Nat64),
121
+ 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
120
122
  });
121
123
  const DeployNewSnsRequest = IDL.Record({
122
124
  'sns_init_payload' : IDL.Opt(SnsInitPayload),