@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
package/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2021 DFINITY LLC.
189
+ Copyright 2021 DFINITY Stiftung.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -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),
@@ -581,6 +650,12 @@ export const idlFactory = ({ IDL }) => {
581
650
  [GetSnsInitializationParametersResponse],
582
651
  [],
583
652
  ),
653
+ 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], []),
654
+ 'get_upgrade_journal' : IDL.Func(
655
+ [GetUpgradeJournalRequest],
656
+ [GetUpgradeJournalResponse],
657
+ [],
658
+ ),
584
659
  'list_nervous_system_functions' : IDL.Func(
585
660
  [],
586
661
  [ListNervousSystemFunctionsResponse],
@@ -589,10 +664,30 @@ export const idlFactory = ({ IDL }) => {
589
664
  'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], []),
590
665
  'list_proposals' : IDL.Func([ListProposals], [ListProposalsResponse], []),
591
666
  'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
667
+ 'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),
592
668
  'set_mode' : IDL.Func([SetMode], [IDL.Record({})], []),
593
669
  });
594
670
  };
595
671
  export const init = ({ IDL }) => {
672
+ const Timers = IDL.Record({
673
+ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
674
+ 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
675
+ 'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
676
+ });
677
+ const Version = IDL.Record({
678
+ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
679
+ 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
680
+ 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
681
+ 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
682
+ 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
683
+ 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
684
+ });
685
+ const Versions = IDL.Record({ 'versions' : IDL.Vec(Version) });
686
+ const CachedUpgradeSteps = IDL.Record({
687
+ 'upgrade_steps' : IDL.Opt(Versions),
688
+ 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
689
+ 'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
690
+ });
596
691
  const GenericNervousSystemFunction = IDL.Record({
597
692
  'validator_canister_id' : IDL.Opt(IDL.Principal),
598
693
  'target_canister_id' : IDL.Opt(IDL.Principal),
@@ -638,6 +733,54 @@ export const init = ({ IDL }) => {
638
733
  'current_basis_points' : IDL.Opt(IDL.Int32),
639
734
  'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
640
735
  });
736
+ const TargetVersionSet = IDL.Record({
737
+ 'old_target_version' : IDL.Opt(Version),
738
+ 'new_target_version' : IDL.Opt(Version),
739
+ });
740
+ const UpgradeOutcome = IDL.Record({
741
+ 'status' : IDL.Opt(
742
+ IDL.Variant({
743
+ 'Success' : IDL.Record({}),
744
+ 'Timeout' : IDL.Record({}),
745
+ 'ExternalFailure' : IDL.Record({}),
746
+ 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
747
+ })
748
+ ),
749
+ 'human_readable' : IDL.Opt(IDL.Text),
750
+ });
751
+ const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
752
+ const UpgradeStarted = IDL.Record({
753
+ 'current_version' : IDL.Opt(Version),
754
+ 'expected_version' : IDL.Opt(Version),
755
+ 'reason' : IDL.Opt(
756
+ IDL.Variant({
757
+ 'UpgradeSnsToNextVersionProposal' : ProposalId,
758
+ 'BehindTargetVersion' : IDL.Record({}),
759
+ })
760
+ ),
761
+ });
762
+ const UpgradeStepsRefreshed = IDL.Record({
763
+ 'upgrade_steps' : IDL.Opt(Versions),
764
+ });
765
+ const TargetVersionReset = IDL.Record({
766
+ 'old_target_version' : IDL.Opt(Version),
767
+ 'new_target_version' : IDL.Opt(Version),
768
+ });
769
+ const UpgradeJournalEntry = IDL.Record({
770
+ 'event' : IDL.Opt(
771
+ IDL.Variant({
772
+ 'TargetVersionSet' : TargetVersionSet,
773
+ 'UpgradeOutcome' : UpgradeOutcome,
774
+ 'UpgradeStarted' : UpgradeStarted,
775
+ 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
776
+ 'TargetVersionReset' : TargetVersionReset,
777
+ })
778
+ ),
779
+ 'timestamp_seconds' : IDL.Opt(IDL.Nat64),
780
+ });
781
+ const UpgradeJournal = IDL.Record({
782
+ 'entries' : IDL.Vec(UpgradeJournalEntry),
783
+ });
641
784
  const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
642
785
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
643
786
  const DefaultFollowees = IDL.Record({
@@ -674,15 +817,6 @@ export const init = ({ IDL }) => {
674
817
  'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
675
818
  'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
676
819
  });
677
- const Version = IDL.Record({
678
- 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
679
- 'root_wasm_hash' : IDL.Vec(IDL.Nat8),
680
- 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
681
- 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
682
- 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
683
- 'index_wasm_hash' : IDL.Vec(IDL.Nat8),
684
- });
685
- const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
686
820
  const RewardEvent = IDL.Record({
687
821
  'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
688
822
  'actual_timestamp_seconds' : IDL.Nat64,
@@ -950,11 +1084,14 @@ export const init = ({ IDL }) => {
950
1084
  });
951
1085
  const Governance = IDL.Record({
952
1086
  'root_canister_id' : IDL.Opt(IDL.Principal),
1087
+ 'timers' : IDL.Opt(Timers),
1088
+ 'cached_upgrade_steps' : IDL.Opt(CachedUpgradeSteps),
953
1089
  'id_to_nervous_system_functions' : IDL.Vec(
954
1090
  IDL.Tuple(IDL.Nat64, NervousSystemFunction)
955
1091
  ),
956
1092
  'metrics' : IDL.Opt(GovernanceCachedMetrics),
957
1093
  'maturity_modulation' : IDL.Opt(MaturityModulation),
1094
+ 'upgrade_journal' : IDL.Opt(UpgradeJournal),
958
1095
  'mode' : IDL.Int32,
959
1096
  'parameters' : IDL.Opt(NervousSystemParameters),
960
1097
  'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
@@ -967,8 +1104,8 @@ export const init = ({ IDL }) => {
967
1104
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
968
1105
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
969
1106
  'sns_metadata' : IDL.Opt(ManageSnsMetadata),
970
- 'migrated_root_wasm_memory_limit' : IDL.Opt(IDL.Bool),
971
1107
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
1108
+ 'target_version' : IDL.Opt(Version),
972
1109
  'genesis_timestamp_seconds' : IDL.Nat64,
973
1110
  });
974
1111
  return [Governance];
@@ -44,6 +44,11 @@ export interface Ballot {
44
44
  voting_power: bigint;
45
45
  }
46
46
  export type By = { MemoAndController: MemoAndController } | { NeuronId: {} };
47
+ export interface CachedUpgradeSteps {
48
+ upgrade_steps: [] | [Versions];
49
+ response_timestamp_seconds: [] | [bigint];
50
+ requested_timestamp_seconds: [] | [bigint];
51
+ }
47
52
  export interface CanisterStatusResultV2 {
48
53
  status: CanisterStatusType;
49
54
  memory_size: bigint;
@@ -217,11 +222,24 @@ export interface GetRunningSnsVersionResponse {
217
222
  export interface GetSnsInitializationParametersResponse {
218
223
  sns_initialization_parameters: string;
219
224
  }
225
+ export interface GetTimersResponse {
226
+ timers: [] | [Timers];
227
+ }
228
+ export type GetUpgradeJournalRequest = {};
229
+ export interface GetUpgradeJournalResponse {
230
+ upgrade_journal: [] | [UpgradeJournal];
231
+ upgrade_steps: [] | [Versions];
232
+ response_timestamp_seconds: [] | [bigint];
233
+ target_version: [] | [Version];
234
+ }
220
235
  export interface Governance {
221
236
  root_canister_id: [] | [Principal];
237
+ timers: [] | [Timers];
238
+ cached_upgrade_steps: [] | [CachedUpgradeSteps];
222
239
  id_to_nervous_system_functions: Array<[bigint, NervousSystemFunction]>;
223
240
  metrics: [] | [GovernanceCachedMetrics];
224
241
  maturity_modulation: [] | [MaturityModulation];
242
+ upgrade_journal: [] | [UpgradeJournal];
225
243
  mode: number;
226
244
  parameters: [] | [NervousSystemParameters];
227
245
  is_finalizing_disburse_maturity: [] | [boolean];
@@ -234,8 +252,8 @@ export interface Governance {
234
252
  proposals: Array<[bigint, ProposalData]>;
235
253
  in_flight_commands: Array<[string, NeuronInFlightCommand]>;
236
254
  sns_metadata: [] | [ManageSnsMetadata];
237
- migrated_root_wasm_memory_limit: [] | [boolean];
238
255
  neurons: Array<[string, Neuron]>;
256
+ target_version: [] | [Version];
239
257
  genesis_timestamp_seconds: bigint;
240
258
  }
241
259
  export interface GovernanceCachedMetrics {
@@ -530,6 +548,19 @@ export interface Tally {
530
548
  total: bigint;
531
549
  timestamp_seconds: bigint;
532
550
  }
551
+ export interface TargetVersionReset {
552
+ old_target_version: [] | [Version];
553
+ new_target_version: [] | [Version];
554
+ }
555
+ export interface TargetVersionSet {
556
+ old_target_version: [] | [Version];
557
+ new_target_version: [] | [Version];
558
+ }
559
+ export interface Timers {
560
+ last_spawned_timestamp_seconds: [] | [bigint];
561
+ last_reset_timestamp_seconds: [] | [bigint];
562
+ requires_periodic_tasks: [] | [boolean];
563
+ }
533
564
  export interface Tokens {
534
565
  e8s: [] | [bigint];
535
566
  }
@@ -546,12 +577,51 @@ export interface UpgradeInProgress {
546
577
  proposal_id: bigint;
547
578
  target_version: [] | [Version];
548
579
  }
580
+ export interface UpgradeJournal {
581
+ entries: Array<UpgradeJournalEntry>;
582
+ }
583
+ export interface UpgradeJournalEntry {
584
+ event:
585
+ | []
586
+ | [
587
+ | { TargetVersionSet: TargetVersionSet }
588
+ | { UpgradeOutcome: UpgradeOutcome }
589
+ | { UpgradeStarted: UpgradeStarted }
590
+ | { UpgradeStepsRefreshed: UpgradeStepsRefreshed }
591
+ | { TargetVersionReset: TargetVersionReset },
592
+ ];
593
+ timestamp_seconds: [] | [bigint];
594
+ }
595
+ export interface UpgradeOutcome {
596
+ status:
597
+ | []
598
+ | [
599
+ | { Success: {} }
600
+ | { Timeout: {} }
601
+ | { ExternalFailure: {} }
602
+ | { InvalidState: { version: [] | [Version] } },
603
+ ];
604
+ human_readable: [] | [string];
605
+ }
549
606
  export interface UpgradeSnsControlledCanister {
550
607
  new_canister_wasm: Uint8Array | number[];
551
608
  mode: [] | [number];
552
609
  canister_id: [] | [Principal];
553
610
  canister_upgrade_arg: [] | [Uint8Array | number[]];
554
611
  }
612
+ export interface UpgradeStarted {
613
+ current_version: [] | [Version];
614
+ expected_version: [] | [Version];
615
+ reason:
616
+ | []
617
+ | [
618
+ | { UpgradeSnsToNextVersionProposal: ProposalId }
619
+ | { BehindTargetVersion: {} },
620
+ ];
621
+ }
622
+ export interface UpgradeStepsRefreshed {
623
+ upgrade_steps: [] | [Versions];
624
+ }
555
625
  export interface Valuation {
556
626
  token: [] | [number];
557
627
  account: [] | [Account];
@@ -571,6 +641,9 @@ export interface Version {
571
641
  governance_wasm_hash: Uint8Array | number[];
572
642
  index_wasm_hash: Uint8Array | number[];
573
643
  }
644
+ export interface Versions {
645
+ versions: Array<Version>;
646
+ }
574
647
  export interface VotingRewardsParameters {
575
648
  final_reward_rate_basis_points: [] | [bigint];
576
649
  initial_reward_rate_basis_points: [] | [bigint];
@@ -600,6 +673,11 @@ export interface _SERVICE {
600
673
  [{}],
601
674
  GetSnsInitializationParametersResponse
602
675
  >;
676
+ get_timers: ActorMethod<[{}], GetTimersResponse>;
677
+ get_upgrade_journal: ActorMethod<
678
+ [GetUpgradeJournalRequest],
679
+ GetUpgradeJournalResponse
680
+ >;
603
681
  list_nervous_system_functions: ActorMethod<
604
682
  [],
605
683
  ListNervousSystemFunctionsResponse
@@ -607,6 +685,7 @@ export interface _SERVICE {
607
685
  list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
608
686
  list_proposals: ActorMethod<[ListProposals], ListProposalsResponse>;
609
687
  manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
688
+ reset_timers: ActorMethod<[{}], {}>;
610
689
  set_mode: ActorMethod<[SetMode], {}>;
611
690
  }
612
691
  export declare const idlFactory: IDL.InterfaceFactory;
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit c43a488 (2024-09-27 tags: release-2024-09-26_01-31-no-canister-snapshots) 'rs/sns/governance/canister/governance.did' by import-candid
1
+ // Generated from IC repo commit c47e172 (2024-10-25 tags: release-2024-11-07_03-07-6.11-kernel) 'rs/sns/governance/canister/governance.did' by import-candid
2
2
  type Account = record {
3
3
  owner : opt principal;
4
4
  subaccount : opt Subaccount;
@@ -265,6 +265,12 @@ type GetSnsInitializationParametersResponse = record {
265
265
  sns_initialization_parameters : text;
266
266
  };
267
267
 
268
+ type CachedUpgradeSteps = record {
269
+ upgrade_steps : opt Versions;
270
+ requested_timestamp_seconds : opt nat64;
271
+ response_timestamp_seconds : opt nat64;
272
+ };
273
+
268
274
  type Governance = record {
269
275
  root_canister_id : opt principal;
270
276
  id_to_nervous_system_functions : vec record { nat64; NervousSystemFunction };
@@ -274,6 +280,7 @@ type Governance = record {
274
280
  parameters : opt NervousSystemParameters;
275
281
  is_finalizing_disburse_maturity : opt bool;
276
282
  deployed_version : opt Version;
283
+ cached_upgrade_steps : opt CachedUpgradeSteps;
277
284
  sns_initialization_parameters : text;
278
285
  latest_reward_event : opt RewardEvent;
279
286
  pending_version : opt UpgradeInProgress;
@@ -284,7 +291,19 @@ type Governance = record {
284
291
  sns_metadata : opt ManageSnsMetadata;
285
292
  neurons : vec record { text; Neuron };
286
293
  genesis_timestamp_seconds : nat64;
287
- migrated_root_wasm_memory_limit : opt bool;
294
+ target_version : opt Version;
295
+ timers : opt Timers;
296
+ upgrade_journal : opt UpgradeJournal;
297
+ };
298
+
299
+ type Timers = record {
300
+ requires_periodic_tasks : opt bool;
301
+ last_reset_timestamp_seconds : opt nat64;
302
+ last_spawned_timestamp_seconds : opt nat64;
303
+ };
304
+
305
+ type GetTimersResponse = record {
306
+ timers : opt Timers;
288
307
  };
289
308
 
290
309
  type GovernanceCachedMetrics = record {
@@ -689,6 +708,8 @@ type Version = record {
689
708
  index_wasm_hash : blob;
690
709
  };
691
710
 
711
+ type Versions = record { versions : vec Version };
712
+
692
713
  type VotingRewardsParameters = record {
693
714
  final_reward_rate_basis_points : opt nat64;
694
715
  initial_reward_rate_basis_points : opt nat64;
@@ -700,6 +721,63 @@ type WaitForQuietState = record {
700
721
  current_deadline_timestamp_seconds : nat64;
701
722
  };
702
723
 
724
+ type UpgradeJournalEntry = record {
725
+ event : opt variant {
726
+ UpgradeStepsRefreshed : UpgradeStepsRefreshed;
727
+ TargetVersionSet : TargetVersionSet;
728
+ TargetVersionReset : TargetVersionReset;
729
+ UpgradeStarted : UpgradeStarted;
730
+ UpgradeOutcome : UpgradeOutcome;
731
+ };
732
+ timestamp_seconds : opt nat64;
733
+ };
734
+
735
+ type UpgradeStepsRefreshed = record {
736
+ upgrade_steps : opt Versions;
737
+ };
738
+
739
+ type TargetVersionSet = record {
740
+ new_target_version : opt Version;
741
+ old_target_version : opt Version;
742
+ };
743
+
744
+ type TargetVersionReset = record {
745
+ new_target_version : opt Version;
746
+ old_target_version : opt Version;
747
+ };
748
+
749
+ type UpgradeStarted = record {
750
+ current_version : opt Version;
751
+ expected_version : opt Version;
752
+ reason : opt variant {
753
+ UpgradeSnsToNextVersionProposal : ProposalId;
754
+ BehindTargetVersion : record {};
755
+ }
756
+ };
757
+
758
+ type UpgradeOutcome = record {
759
+ human_readable : opt text;
760
+ status : opt variant {
761
+ Success : record {};
762
+ Timeout : record {};
763
+ InvalidState : record { version : opt Version };
764
+ ExternalFailure : record {};
765
+ };
766
+ };
767
+
768
+ type UpgradeJournal = record {
769
+ entries : vec UpgradeJournalEntry;
770
+ };
771
+
772
+ type GetUpgradeJournalRequest = record {};
773
+
774
+ type GetUpgradeJournalResponse = record {
775
+ upgrade_steps : opt Versions;
776
+ response_timestamp_seconds : opt nat64;
777
+ target_version : opt Version;
778
+ upgrade_journal : opt UpgradeJournal;
779
+ };
780
+
703
781
  service : (Governance) -> {
704
782
  claim_swap_neurons : (ClaimSwapNeuronsRequest) -> (ClaimSwapNeuronsResponse);
705
783
  fail_stuck_upgrade_in_progress : (record {}) -> (record {});
@@ -713,14 +791,13 @@ service : (Governance) -> {
713
791
  get_proposal : (GetProposal) -> (GetProposalResponse) query;
714
792
  get_root_canister_status : (null) -> (CanisterStatusResultV2);
715
793
  get_running_sns_version : (record {}) -> (GetRunningSnsVersionResponse) query;
716
- get_sns_initialization_parameters : (record {}) -> (
717
- GetSnsInitializationParametersResponse,
718
- ) query;
719
- list_nervous_system_functions : () -> (
720
- ListNervousSystemFunctionsResponse,
721
- ) query;
794
+ get_sns_initialization_parameters : (record {}) -> (GetSnsInitializationParametersResponse) query;
795
+ get_upgrade_journal : (GetUpgradeJournalRequest) -> (GetUpgradeJournalResponse) query;
796
+ list_nervous_system_functions : () -> (ListNervousSystemFunctionsResponse) query;
722
797
  list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
723
798
  list_proposals : (ListProposals) -> (ListProposalsResponse) query;
724
799
  manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
725
800
  set_mode : (SetMode) -> (record {});
801
+ reset_timers : (record {}) -> (record {});
802
+ get_timers : (record {}) -> (GetTimersResponse) query;
726
803
  }