@dfinity/sns 3.2.2 → 3.2.3-next-2024-11-14

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 (40) hide show
  1. package/LICENSE +1 -1
  2. package/dist/candid/sns_governance.certified.idl.js +157 -20
  3. package/dist/candid/sns_governance.d.ts +80 -1
  4. package/dist/candid/sns_governance.did +85 -8
  5. package/dist/candid/sns_governance.idl.js +157 -20
  6. package/dist/candid/sns_governance_test.certified.idl.js +166 -20
  7. package/dist/candid/sns_governance_test.d.ts +88 -1
  8. package/dist/candid/sns_governance_test.did +87 -2
  9. package/dist/candid/sns_governance_test.idl.js +166 -20
  10. package/dist/candid/sns_root.certified.idl.js +15 -0
  11. package/dist/candid/sns_root.d.ts +11 -0
  12. package/dist/candid/sns_root.did +14 -1
  13. package/dist/candid/sns_root.idl.js +15 -0
  14. package/dist/candid/sns_swap.certified.idl.js +9 -0
  15. package/dist/candid/sns_swap.d.ts +11 -0
  16. package/dist/candid/sns_swap.did +14 -1
  17. package/dist/candid/sns_swap.idl.js +9 -0
  18. package/dist/cjs/index.cjs.js +1 -1
  19. package/dist/cjs/index.cjs.js.map +3 -3
  20. package/dist/esm/chunk-BNILACKH.js +2 -0
  21. package/dist/esm/chunk-BNILACKH.js.map +7 -0
  22. package/dist/esm/chunk-GCMQLWR5.js +2 -0
  23. package/dist/esm/chunk-GCMQLWR5.js.map +7 -0
  24. package/dist/esm/{chunk-7V3B657R.js → chunk-XGUZCIOP.js} +2 -2
  25. package/dist/esm/chunk-XKKPAZAY.js +2 -0
  26. package/dist/esm/chunk-XKKPAZAY.js.map +7 -0
  27. package/dist/esm/governance.canister.js +1 -1
  28. package/dist/esm/index.js +1 -1
  29. package/dist/esm/index.js.map +3 -3
  30. package/dist/esm/root.canister.js +1 -1
  31. package/dist/esm/sns.js +1 -1
  32. package/dist/esm/swap.canister.js +1 -1
  33. package/package.json +7 -7
  34. package/dist/esm/chunk-5YPS4ZYR.js +0 -2
  35. package/dist/esm/chunk-5YPS4ZYR.js.map +0 -7
  36. package/dist/esm/chunk-JY2TPU5D.js +0 -2
  37. package/dist/esm/chunk-JY2TPU5D.js.map +0 -7
  38. package/dist/esm/chunk-ODQ7CAD7.js +0 -2
  39. package/dist/esm/chunk-ODQ7CAD7.js.map +0 -7
  40. /package/dist/esm/{chunk-7V3B657R.js.map → chunk-XGUZCIOP.js.map} +0 -0
@@ -1,5 +1,24 @@
1
1
  /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_governance.did */
2
2
  export const idlFactory = ({ IDL }) => {
3
+ const Timers = IDL.Record({
4
+ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
5
+ 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
6
+ 'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
7
+ });
8
+ const Version = IDL.Record({
9
+ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
10
+ 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
11
+ 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
12
+ 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
13
+ 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
14
+ 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
15
+ });
16
+ const Versions = IDL.Record({ 'versions' : IDL.Vec(Version) });
17
+ const CachedUpgradeSteps = IDL.Record({
18
+ 'upgrade_steps' : IDL.Opt(Versions),
19
+ 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
20
+ 'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
21
+ });
3
22
  const GenericNervousSystemFunction = IDL.Record({
4
23
  'validator_canister_id' : IDL.Opt(IDL.Principal),
5
24
  'target_canister_id' : IDL.Opt(IDL.Principal),
@@ -45,6 +64,54 @@ export const idlFactory = ({ IDL }) => {
45
64
  'current_basis_points' : IDL.Opt(IDL.Int32),
46
65
  'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
47
66
  });
67
+ const TargetVersionSet = IDL.Record({
68
+ 'old_target_version' : IDL.Opt(Version),
69
+ 'new_target_version' : IDL.Opt(Version),
70
+ });
71
+ const UpgradeOutcome = IDL.Record({
72
+ 'status' : IDL.Opt(
73
+ IDL.Variant({
74
+ 'Success' : IDL.Record({}),
75
+ 'Timeout' : IDL.Record({}),
76
+ 'ExternalFailure' : IDL.Record({}),
77
+ 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
78
+ })
79
+ ),
80
+ 'human_readable' : IDL.Opt(IDL.Text),
81
+ });
82
+ const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
83
+ const UpgradeStarted = IDL.Record({
84
+ 'current_version' : IDL.Opt(Version),
85
+ 'expected_version' : IDL.Opt(Version),
86
+ 'reason' : IDL.Opt(
87
+ IDL.Variant({
88
+ 'UpgradeSnsToNextVersionProposal' : ProposalId,
89
+ 'BehindTargetVersion' : IDL.Record({}),
90
+ })
91
+ ),
92
+ });
93
+ const UpgradeStepsRefreshed = IDL.Record({
94
+ 'upgrade_steps' : IDL.Opt(Versions),
95
+ });
96
+ const TargetVersionReset = IDL.Record({
97
+ 'old_target_version' : IDL.Opt(Version),
98
+ 'new_target_version' : IDL.Opt(Version),
99
+ });
100
+ const UpgradeJournalEntry = IDL.Record({
101
+ 'event' : IDL.Opt(
102
+ IDL.Variant({
103
+ 'TargetVersionSet' : TargetVersionSet,
104
+ 'UpgradeOutcome' : UpgradeOutcome,
105
+ 'UpgradeStarted' : UpgradeStarted,
106
+ 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
107
+ 'TargetVersionReset' : TargetVersionReset,
108
+ })
109
+ ),
110
+ 'timestamp_seconds' : IDL.Opt(IDL.Nat64),
111
+ });
112
+ const UpgradeJournal = IDL.Record({
113
+ 'entries' : IDL.Vec(UpgradeJournalEntry),
114
+ });
48
115
  const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
49
116
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
50
117
  const DefaultFollowees = IDL.Record({
@@ -81,15 +148,6 @@ export const idlFactory = ({ IDL }) => {
81
148
  'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
82
149
  'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
83
150
  });
84
- const Version = IDL.Record({
85
- 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
86
- 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
87
- 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
88
- 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
89
- 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
90
- 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
91
- });
92
- const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
93
151
  const RewardEvent = IDL.Record({
94
152
  'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
95
153
  'actual_timestamp_seconds' : IDL.Nat64,
@@ -357,11 +415,14 @@ export const idlFactory = ({ IDL }) => {
357
415
  });
358
416
  const Governance = IDL.Record({
359
417
  'root_canister_id' : IDL.Opt(IDL.Principal),
418
+ 'timers' : IDL.Opt(Timers),
419
+ 'cached_upgrade_steps' : IDL.Opt(CachedUpgradeSteps),
360
420
  'id_to_nervous_system_functions' : IDL.Vec(
361
421
  IDL.Tuple(IDL.Nat64, NervousSystemFunction)
362
422
  ),
363
423
  'metrics' : IDL.Opt(GovernanceCachedMetrics),
364
424
  'maturity_modulation' : IDL.Opt(MaturityModulation),
425
+ 'upgrade_journal' : IDL.Opt(UpgradeJournal),
365
426
  'mode' : IDL.Int32,
366
427
  'parameters' : IDL.Opt(NervousSystemParameters),
367
428
  'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
@@ -374,8 +435,8 @@ export const idlFactory = ({ IDL }) => {
374
435
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
375
436
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
376
437
  'sns_metadata' : IDL.Opt(ManageSnsMetadata),
377
- 'migrated_root_wasm_memory_limit' : IDL.Opt(IDL.Bool),
378
438
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
439
+ 'target_version' : IDL.Opt(Version),
379
440
  'genesis_timestamp_seconds' : IDL.Nat64,
380
441
  });
381
442
  const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });
@@ -463,6 +524,14 @@ export const idlFactory = ({ IDL }) => {
463
524
  const GetSnsInitializationParametersResponse = IDL.Record({
464
525
  'sns_initialization_parameters' : IDL.Text,
465
526
  });
527
+ const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });
528
+ const GetUpgradeJournalRequest = IDL.Record({});
529
+ const GetUpgradeJournalResponse = IDL.Record({
530
+ 'upgrade_journal' : IDL.Opt(UpgradeJournal),
531
+ 'upgrade_steps' : IDL.Opt(Versions),
532
+ 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
533
+ 'target_version' : IDL.Opt(Version),
534
+ });
466
535
  const ListNervousSystemFunctionsResponse = IDL.Record({
467
536
  'reserved_ids' : IDL.Vec(IDL.Nat64),
468
537
  'functions' : IDL.Vec(NervousSystemFunction),
@@ -585,6 +654,12 @@ export const idlFactory = ({ IDL }) => {
585
654
  [GetSnsInitializationParametersResponse],
586
655
  ['query'],
587
656
  ),
657
+ 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], ['query']),
658
+ 'get_upgrade_journal' : IDL.Func(
659
+ [GetUpgradeJournalRequest],
660
+ [GetUpgradeJournalResponse],
661
+ ['query'],
662
+ ),
588
663
  'list_nervous_system_functions' : IDL.Func(
589
664
  [],
590
665
  [ListNervousSystemFunctionsResponse],
@@ -597,10 +672,30 @@ export const idlFactory = ({ IDL }) => {
597
672
  ['query'],
598
673
  ),
599
674
  'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
675
+ 'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),
600
676
  'set_mode' : IDL.Func([SetMode], [IDL.Record({})], []),
601
677
  });
602
678
  };
603
679
  export const init = ({ IDL }) => {
680
+ const Timers = IDL.Record({
681
+ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
682
+ 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
683
+ 'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
684
+ });
685
+ const Version = IDL.Record({
686
+ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
687
+ 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
688
+ 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
689
+ 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
690
+ 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
691
+ 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
692
+ });
693
+ const Versions = IDL.Record({ 'versions' : IDL.Vec(Version) });
694
+ const CachedUpgradeSteps = IDL.Record({
695
+ 'upgrade_steps' : IDL.Opt(Versions),
696
+ 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
697
+ 'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
698
+ });
604
699
  const GenericNervousSystemFunction = IDL.Record({
605
700
  'validator_canister_id' : IDL.Opt(IDL.Principal),
606
701
  'target_canister_id' : IDL.Opt(IDL.Principal),
@@ -646,6 +741,54 @@ export const init = ({ IDL }) => {
646
741
  'current_basis_points' : IDL.Opt(IDL.Int32),
647
742
  'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
648
743
  });
744
+ const TargetVersionSet = IDL.Record({
745
+ 'old_target_version' : IDL.Opt(Version),
746
+ 'new_target_version' : IDL.Opt(Version),
747
+ });
748
+ const UpgradeOutcome = IDL.Record({
749
+ 'status' : IDL.Opt(
750
+ IDL.Variant({
751
+ 'Success' : IDL.Record({}),
752
+ 'Timeout' : IDL.Record({}),
753
+ 'ExternalFailure' : IDL.Record({}),
754
+ 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
755
+ })
756
+ ),
757
+ 'human_readable' : IDL.Opt(IDL.Text),
758
+ });
759
+ const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
760
+ const UpgradeStarted = IDL.Record({
761
+ 'current_version' : IDL.Opt(Version),
762
+ 'expected_version' : IDL.Opt(Version),
763
+ 'reason' : IDL.Opt(
764
+ IDL.Variant({
765
+ 'UpgradeSnsToNextVersionProposal' : ProposalId,
766
+ 'BehindTargetVersion' : IDL.Record({}),
767
+ })
768
+ ),
769
+ });
770
+ const UpgradeStepsRefreshed = IDL.Record({
771
+ 'upgrade_steps' : IDL.Opt(Versions),
772
+ });
773
+ const TargetVersionReset = IDL.Record({
774
+ 'old_target_version' : IDL.Opt(Version),
775
+ 'new_target_version' : IDL.Opt(Version),
776
+ });
777
+ const UpgradeJournalEntry = IDL.Record({
778
+ 'event' : IDL.Opt(
779
+ IDL.Variant({
780
+ 'TargetVersionSet' : TargetVersionSet,
781
+ 'UpgradeOutcome' : UpgradeOutcome,
782
+ 'UpgradeStarted' : UpgradeStarted,
783
+ 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
784
+ 'TargetVersionReset' : TargetVersionReset,
785
+ })
786
+ ),
787
+ 'timestamp_seconds' : IDL.Opt(IDL.Nat64),
788
+ });
789
+ const UpgradeJournal = IDL.Record({
790
+ 'entries' : IDL.Vec(UpgradeJournalEntry),
791
+ });
649
792
  const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
650
793
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
651
794
  const DefaultFollowees = IDL.Record({
@@ -682,15 +825,6 @@ export const init = ({ IDL }) => {
682
825
  'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
683
826
  'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
684
827
  });
685
- const Version = IDL.Record({
686
- 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
687
- 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
688
- 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
689
- 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
690
- 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
691
- 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
692
- });
693
- const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
694
828
  const RewardEvent = IDL.Record({
695
829
  'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
696
830
  'actual_timestamp_seconds' : IDL.Nat64,
@@ -958,11 +1092,14 @@ export const init = ({ IDL }) => {
958
1092
  });
959
1093
  const Governance = IDL.Record({
960
1094
  'root_canister_id' : IDL.Opt(IDL.Principal),
1095
+ 'timers' : IDL.Opt(Timers),
1096
+ 'cached_upgrade_steps' : IDL.Opt(CachedUpgradeSteps),
961
1097
  'id_to_nervous_system_functions' : IDL.Vec(
962
1098
  IDL.Tuple(IDL.Nat64, NervousSystemFunction)
963
1099
  ),
964
1100
  'metrics' : IDL.Opt(GovernanceCachedMetrics),
965
1101
  'maturity_modulation' : IDL.Opt(MaturityModulation),
1102
+ 'upgrade_journal' : IDL.Opt(UpgradeJournal),
966
1103
  'mode' : IDL.Int32,
967
1104
  'parameters' : IDL.Opt(NervousSystemParameters),
968
1105
  'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
@@ -975,8 +1112,8 @@ export const init = ({ IDL }) => {
975
1112
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
976
1113
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
977
1114
  'sns_metadata' : IDL.Opt(ManageSnsMetadata),
978
- 'migrated_root_wasm_memory_limit' : IDL.Opt(IDL.Bool),
979
1115
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
1116
+ 'target_version' : IDL.Opt(Version),
980
1117
  'genesis_timestamp_seconds' : IDL.Nat64,
981
1118
  });
982
1119
  return [Governance];
@@ -1,5 +1,24 @@
1
1
  /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_governance_test.did */
2
2
  export const idlFactory = ({ IDL }) => {
3
+ const Timers = IDL.Record({
4
+ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
5
+ 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
6
+ 'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
7
+ });
8
+ const Version = IDL.Record({
9
+ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
10
+ 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
11
+ 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
12
+ 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
13
+ 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
14
+ 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
15
+ });
16
+ const Versions = IDL.Record({ 'versions' : IDL.Vec(Version) });
17
+ const CachedUpgradeSteps = IDL.Record({
18
+ 'upgrade_steps' : IDL.Opt(Versions),
19
+ 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
20
+ 'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
21
+ });
3
22
  const GenericNervousSystemFunction = IDL.Record({
4
23
  'validator_canister_id' : IDL.Opt(IDL.Principal),
5
24
  'target_canister_id' : IDL.Opt(IDL.Principal),
@@ -45,6 +64,54 @@ export const idlFactory = ({ IDL }) => {
45
64
  'current_basis_points' : IDL.Opt(IDL.Int32),
46
65
  'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
47
66
  });
67
+ const TargetVersionSet = IDL.Record({
68
+ 'old_target_version' : IDL.Opt(Version),
69
+ 'new_target_version' : IDL.Opt(Version),
70
+ });
71
+ const UpgradeOutcome = IDL.Record({
72
+ 'status' : IDL.Opt(
73
+ IDL.Variant({
74
+ 'Success' : IDL.Record({}),
75
+ 'Timeout' : IDL.Record({}),
76
+ 'ExternalFailure' : IDL.Record({}),
77
+ 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
78
+ })
79
+ ),
80
+ 'human_readable' : IDL.Opt(IDL.Text),
81
+ });
82
+ const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
83
+ const UpgradeStarted = IDL.Record({
84
+ 'current_version' : IDL.Opt(Version),
85
+ 'expected_version' : IDL.Opt(Version),
86
+ 'reason' : IDL.Opt(
87
+ IDL.Variant({
88
+ 'UpgradeSnsToNextVersionProposal' : ProposalId,
89
+ 'BehindTargetVersion' : IDL.Record({}),
90
+ })
91
+ ),
92
+ });
93
+ const UpgradeStepsRefreshed = IDL.Record({
94
+ 'upgrade_steps' : IDL.Opt(Versions),
95
+ });
96
+ const TargetVersionReset = IDL.Record({
97
+ 'old_target_version' : IDL.Opt(Version),
98
+ 'new_target_version' : IDL.Opt(Version),
99
+ });
100
+ const UpgradeJournalEntry = IDL.Record({
101
+ 'event' : IDL.Opt(
102
+ IDL.Variant({
103
+ 'TargetVersionSet' : TargetVersionSet,
104
+ 'UpgradeOutcome' : UpgradeOutcome,
105
+ 'UpgradeStarted' : UpgradeStarted,
106
+ 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
107
+ 'TargetVersionReset' : TargetVersionReset,
108
+ })
109
+ ),
110
+ 'timestamp_seconds' : IDL.Opt(IDL.Nat64),
111
+ });
112
+ const UpgradeJournal = IDL.Record({
113
+ 'entries' : IDL.Vec(UpgradeJournalEntry),
114
+ });
48
115
  const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
49
116
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
50
117
  const DefaultFollowees = IDL.Record({
@@ -81,15 +148,6 @@ export const idlFactory = ({ IDL }) => {
81
148
  'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
82
149
  'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
83
150
  });
84
- const Version = IDL.Record({
85
- 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
86
- 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
87
- 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
88
- 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
89
- 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
90
- 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
91
- });
92
- const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
93
151
  const RewardEvent = IDL.Record({
94
152
  'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
95
153
  'actual_timestamp_seconds' : IDL.Nat64,
@@ -357,11 +415,14 @@ export const idlFactory = ({ IDL }) => {
357
415
  });
358
416
  const Governance = IDL.Record({
359
417
  'root_canister_id' : IDL.Opt(IDL.Principal),
418
+ 'timers' : IDL.Opt(Timers),
419
+ 'cached_upgrade_steps' : IDL.Opt(CachedUpgradeSteps),
360
420
  'id_to_nervous_system_functions' : IDL.Vec(
361
421
  IDL.Tuple(IDL.Nat64, NervousSystemFunction)
362
422
  ),
363
423
  'metrics' : IDL.Opt(GovernanceCachedMetrics),
364
424
  'maturity_modulation' : IDL.Opt(MaturityModulation),
425
+ 'upgrade_journal' : IDL.Opt(UpgradeJournal),
365
426
  'mode' : IDL.Int32,
366
427
  'parameters' : IDL.Opt(NervousSystemParameters),
367
428
  'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
@@ -374,8 +435,8 @@ export const idlFactory = ({ IDL }) => {
374
435
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
375
436
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
376
437
  'sns_metadata' : IDL.Opt(ManageSnsMetadata),
377
- 'migrated_root_wasm_memory_limit' : IDL.Opt(IDL.Bool),
378
438
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
439
+ 'target_version' : IDL.Opt(Version),
379
440
  'genesis_timestamp_seconds' : IDL.Nat64,
380
441
  });
381
442
  const AddMaturityRequest = IDL.Record({
@@ -385,6 +446,10 @@ export const idlFactory = ({ IDL }) => {
385
446
  const AddMaturityResponse = IDL.Record({
386
447
  'new_maturity_e8s' : IDL.Opt(IDL.Nat64),
387
448
  });
449
+ const AdvanceTargetVersionRequest = IDL.Record({
450
+ 'target_version' : IDL.Opt(Version),
451
+ });
452
+ const AdvanceTargetVersionResponse = IDL.Record({});
388
453
  const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });
389
454
  const NeuronsFund = IDL.Record({
390
455
  'nns_neuron_hotkeys' : IDL.Opt(Principals),
@@ -470,6 +535,14 @@ export const idlFactory = ({ IDL }) => {
470
535
  const GetSnsInitializationParametersResponse = IDL.Record({
471
536
  'sns_initialization_parameters' : IDL.Text,
472
537
  });
538
+ const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });
539
+ const GetUpgradeJournalRequest = IDL.Record({});
540
+ const GetUpgradeJournalResponse = IDL.Record({
541
+ 'upgrade_journal' : IDL.Opt(UpgradeJournal),
542
+ 'upgrade_steps' : IDL.Opt(Versions),
543
+ 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
544
+ 'target_version' : IDL.Opt(Version),
545
+ });
473
546
  const ListNervousSystemFunctionsResponse = IDL.Record({
474
547
  'reserved_ids' : IDL.Vec(IDL.Nat64),
475
548
  'functions' : IDL.Vec(NervousSystemFunction),
@@ -552,6 +625,11 @@ export const idlFactory = ({ IDL }) => {
552
625
  const SetMode = IDL.Record({ 'mode' : IDL.Int32 });
553
626
  return IDL.Service({
554
627
  'add_maturity' : IDL.Func([AddMaturityRequest], [AddMaturityResponse], []),
628
+ 'advance_target_version' : IDL.Func(
629
+ [AdvanceTargetVersionRequest],
630
+ [AdvanceTargetVersionResponse],
631
+ [],
632
+ ),
555
633
  'claim_swap_neurons' : IDL.Func(
556
634
  [ClaimSwapNeuronsRequest],
557
635
  [ClaimSwapNeuronsResponse],
@@ -593,6 +671,12 @@ export const idlFactory = ({ IDL }) => {
593
671
  [GetSnsInitializationParametersResponse],
594
672
  [],
595
673
  ),
674
+ 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], []),
675
+ 'get_upgrade_journal' : IDL.Func(
676
+ [GetUpgradeJournalRequest],
677
+ [GetUpgradeJournalResponse],
678
+ [],
679
+ ),
596
680
  'list_nervous_system_functions' : IDL.Func(
597
681
  [],
598
682
  [ListNervousSystemFunctionsResponse],
@@ -602,11 +686,31 @@ export const idlFactory = ({ IDL }) => {
602
686
  'list_proposals' : IDL.Func([ListProposals], [ListProposalsResponse], []),
603
687
  'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
604
688
  'mint_tokens' : IDL.Func([MintTokensRequest], [IDL.Record({})], []),
689
+ 'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),
605
690
  'set_mode' : IDL.Func([SetMode], [IDL.Record({})], []),
606
691
  'update_neuron' : IDL.Func([Neuron], [IDL.Opt(GovernanceError)], []),
607
692
  });
608
693
  };
609
694
  export const init = ({ IDL }) => {
695
+ const Timers = IDL.Record({
696
+ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
697
+ 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
698
+ 'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
699
+ });
700
+ const Version = IDL.Record({
701
+ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
702
+ 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
703
+ 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
704
+ 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
705
+ 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
706
+ 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
707
+ });
708
+ const Versions = IDL.Record({ 'versions' : IDL.Vec(Version) });
709
+ const CachedUpgradeSteps = IDL.Record({
710
+ 'upgrade_steps' : IDL.Opt(Versions),
711
+ 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
712
+ 'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
713
+ });
610
714
  const GenericNervousSystemFunction = IDL.Record({
611
715
  'validator_canister_id' : IDL.Opt(IDL.Principal),
612
716
  'target_canister_id' : IDL.Opt(IDL.Principal),
@@ -652,6 +756,54 @@ export const init = ({ IDL }) => {
652
756
  'current_basis_points' : IDL.Opt(IDL.Int32),
653
757
  'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
654
758
  });
759
+ const TargetVersionSet = IDL.Record({
760
+ 'old_target_version' : IDL.Opt(Version),
761
+ 'new_target_version' : IDL.Opt(Version),
762
+ });
763
+ const UpgradeOutcome = IDL.Record({
764
+ 'status' : IDL.Opt(
765
+ IDL.Variant({
766
+ 'Success' : IDL.Record({}),
767
+ 'Timeout' : IDL.Record({}),
768
+ 'ExternalFailure' : IDL.Record({}),
769
+ 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
770
+ })
771
+ ),
772
+ 'human_readable' : IDL.Opt(IDL.Text),
773
+ });
774
+ const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
775
+ const UpgradeStarted = IDL.Record({
776
+ 'current_version' : IDL.Opt(Version),
777
+ 'expected_version' : IDL.Opt(Version),
778
+ 'reason' : IDL.Opt(
779
+ IDL.Variant({
780
+ 'UpgradeSnsToNextVersionProposal' : ProposalId,
781
+ 'BehindTargetVersion' : IDL.Record({}),
782
+ })
783
+ ),
784
+ });
785
+ const UpgradeStepsRefreshed = IDL.Record({
786
+ 'upgrade_steps' : IDL.Opt(Versions),
787
+ });
788
+ const TargetVersionReset = IDL.Record({
789
+ 'old_target_version' : IDL.Opt(Version),
790
+ 'new_target_version' : IDL.Opt(Version),
791
+ });
792
+ const UpgradeJournalEntry = IDL.Record({
793
+ 'event' : IDL.Opt(
794
+ IDL.Variant({
795
+ 'TargetVersionSet' : TargetVersionSet,
796
+ 'UpgradeOutcome' : UpgradeOutcome,
797
+ 'UpgradeStarted' : UpgradeStarted,
798
+ 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
799
+ 'TargetVersionReset' : TargetVersionReset,
800
+ })
801
+ ),
802
+ 'timestamp_seconds' : IDL.Opt(IDL.Nat64),
803
+ });
804
+ const UpgradeJournal = IDL.Record({
805
+ 'entries' : IDL.Vec(UpgradeJournalEntry),
806
+ });
655
807
  const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
656
808
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
657
809
  const DefaultFollowees = IDL.Record({
@@ -688,15 +840,6 @@ export const init = ({ IDL }) => {
688
840
  'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
689
841
  'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
690
842
  });
691
- const Version = IDL.Record({
692
- 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
693
- 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
694
- 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
695
- 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
696
- 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
697
- 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
698
- });
699
- const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
700
843
  const RewardEvent = IDL.Record({
701
844
  'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
702
845
  'actual_timestamp_seconds' : IDL.Nat64,
@@ -964,11 +1107,14 @@ export const init = ({ IDL }) => {
964
1107
  });
965
1108
  const Governance = IDL.Record({
966
1109
  'root_canister_id' : IDL.Opt(IDL.Principal),
1110
+ 'timers' : IDL.Opt(Timers),
1111
+ 'cached_upgrade_steps' : IDL.Opt(CachedUpgradeSteps),
967
1112
  'id_to_nervous_system_functions' : IDL.Vec(
968
1113
  IDL.Tuple(IDL.Nat64, NervousSystemFunction)
969
1114
  ),
970
1115
  'metrics' : IDL.Opt(GovernanceCachedMetrics),
971
1116
  'maturity_modulation' : IDL.Opt(MaturityModulation),
1117
+ 'upgrade_journal' : IDL.Opt(UpgradeJournal),
972
1118
  'mode' : IDL.Int32,
973
1119
  'parameters' : IDL.Opt(NervousSystemParameters),
974
1120
  'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
@@ -981,8 +1127,8 @@ export const init = ({ IDL }) => {
981
1127
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
982
1128
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
983
1129
  'sns_metadata' : IDL.Opt(ManageSnsMetadata),
984
- 'migrated_root_wasm_memory_limit' : IDL.Opt(IDL.Bool),
985
1130
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
1131
+ 'target_version' : IDL.Opt(Version),
986
1132
  'genesis_timestamp_seconds' : IDL.Nat64,
987
1133
  });
988
1134
  return [Governance];