@dfinity/sns 3.2.3 → 3.2.4
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.
- package/dist/candid/sns_governance.certified.idl.js +121 -6
- package/dist/candid/sns_governance.d.ts +62 -1
- package/dist/candid/sns_governance.did +69 -9
- package/dist/candid/sns_governance.idl.js +121 -6
- package/dist/candid/sns_governance_test.certified.idl.js +121 -6
- package/dist/candid/sns_governance_test.d.ts +62 -1
- package/dist/candid/sns_governance_test.did +66 -2
- package/dist/candid/sns_governance_test.idl.js +121 -6
- package/dist/candid/sns_root.certified.idl.js +15 -0
- package/dist/candid/sns_root.d.ts +11 -0
- package/dist/candid/sns_root.did +14 -1
- package/dist/candid/sns_root.idl.js +15 -0
- package/dist/candid/sns_swap.certified.idl.js +2 -0
- package/dist/candid/sns_swap.d.ts +4 -0
- package/dist/candid/sns_swap.did +6 -1
- package/dist/candid/sns_swap.idl.js +2 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/chunk-BNILACKH.js +2 -0
- package/dist/esm/chunk-BNILACKH.js.map +7 -0
- package/dist/esm/chunk-LCH6N5XY.js +2 -0
- package/dist/esm/chunk-LCH6N5XY.js.map +7 -0
- package/dist/esm/{chunk-UV6BDZNF.js → chunk-X7UB3EAO.js} +2 -2
- package/dist/esm/chunk-XKKPAZAY.js +2 -0
- package/dist/esm/chunk-XKKPAZAY.js.map +7 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/root.canister.js +1 -1
- package/dist/esm/sns.js +1 -1
- package/dist/esm/swap.canister.js +1 -1
- package/package.json +3 -3
- package/dist/esm/chunk-4I3PWDTO.js +0 -2
- package/dist/esm/chunk-4I3PWDTO.js.map +0 -7
- package/dist/esm/chunk-5YPS4ZYR.js +0 -2
- package/dist/esm/chunk-5YPS4ZYR.js.map +0 -7
- package/dist/esm/chunk-I6XQKGWZ.js +0 -2
- package/dist/esm/chunk-I6XQKGWZ.js.map +0 -7
- /package/dist/esm/{chunk-UV6BDZNF.js.map → chunk-X7UB3EAO.js.map} +0 -0
|
@@ -3,6 +3,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
3
3
|
const Timers = IDL.Record({
|
|
4
4
|
'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
5
5
|
'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
6
|
+
'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
|
|
6
7
|
});
|
|
7
8
|
const Version = IDL.Record({
|
|
8
9
|
'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
@@ -63,6 +64,59 @@ export const idlFactory = ({ IDL }) => {
|
|
|
63
64
|
'current_basis_points' : IDL.Opt(IDL.Int32),
|
|
64
65
|
'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
65
66
|
});
|
|
67
|
+
const TargetVersionSet = IDL.Record({
|
|
68
|
+
'old_target_version' : IDL.Opt(Version),
|
|
69
|
+
'new_target_version' : IDL.Opt(Version),
|
|
70
|
+
});
|
|
71
|
+
const UpgradeStepsReset = IDL.Record({
|
|
72
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
73
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
74
|
+
});
|
|
75
|
+
const UpgradeOutcome = IDL.Record({
|
|
76
|
+
'status' : IDL.Opt(
|
|
77
|
+
IDL.Variant({
|
|
78
|
+
'Success' : IDL.Record({}),
|
|
79
|
+
'Timeout' : IDL.Record({}),
|
|
80
|
+
'ExternalFailure' : IDL.Record({}),
|
|
81
|
+
'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
|
|
82
|
+
})
|
|
83
|
+
),
|
|
84
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
85
|
+
});
|
|
86
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
87
|
+
const UpgradeStarted = IDL.Record({
|
|
88
|
+
'current_version' : IDL.Opt(Version),
|
|
89
|
+
'expected_version' : IDL.Opt(Version),
|
|
90
|
+
'reason' : IDL.Opt(
|
|
91
|
+
IDL.Variant({
|
|
92
|
+
'UpgradeSnsToNextVersionProposal' : ProposalId,
|
|
93
|
+
'BehindTargetVersion' : IDL.Record({}),
|
|
94
|
+
})
|
|
95
|
+
),
|
|
96
|
+
});
|
|
97
|
+
const UpgradeStepsRefreshed = IDL.Record({
|
|
98
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
99
|
+
});
|
|
100
|
+
const TargetVersionReset = IDL.Record({
|
|
101
|
+
'old_target_version' : IDL.Opt(Version),
|
|
102
|
+
'new_target_version' : IDL.Opt(Version),
|
|
103
|
+
});
|
|
104
|
+
const UpgradeJournalEntry = IDL.Record({
|
|
105
|
+
'event' : IDL.Opt(
|
|
106
|
+
IDL.Variant({
|
|
107
|
+
'TargetVersionSet' : TargetVersionSet,
|
|
108
|
+
'UpgradeStepsReset' : UpgradeStepsReset,
|
|
109
|
+
'UpgradeOutcome' : UpgradeOutcome,
|
|
110
|
+
'UpgradeStarted' : UpgradeStarted,
|
|
111
|
+
'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
|
|
112
|
+
'TargetVersionReset' : TargetVersionReset,
|
|
113
|
+
})
|
|
114
|
+
),
|
|
115
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
116
|
+
});
|
|
117
|
+
const UpgradeJournal = IDL.Record({
|
|
118
|
+
'entries' : IDL.Vec(UpgradeJournalEntry),
|
|
119
|
+
});
|
|
66
120
|
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
67
121
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
68
122
|
const DefaultFollowees = IDL.Record({
|
|
@@ -99,7 +153,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
99
153
|
'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
|
|
100
154
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
101
155
|
});
|
|
102
|
-
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
103
156
|
const RewardEvent = IDL.Record({
|
|
104
157
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
105
158
|
'actual_timestamp_seconds' : IDL.Nat64,
|
|
@@ -109,7 +162,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
109
162
|
'round' : IDL.Nat64,
|
|
110
163
|
'settled_proposals' : IDL.Vec(ProposalId),
|
|
111
164
|
});
|
|
112
|
-
const
|
|
165
|
+
const PendingVersion = IDL.Record({
|
|
113
166
|
'mark_failed_at_seconds' : IDL.Nat64,
|
|
114
167
|
'checking_upgrade_lock' : IDL.Nat64,
|
|
115
168
|
'proposal_id' : IDL.Nat64,
|
|
@@ -374,13 +427,14 @@ export const idlFactory = ({ IDL }) => {
|
|
|
374
427
|
),
|
|
375
428
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
376
429
|
'maturity_modulation' : IDL.Opt(MaturityModulation),
|
|
430
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
377
431
|
'mode' : IDL.Int32,
|
|
378
432
|
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
379
433
|
'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
|
|
380
434
|
'deployed_version' : IDL.Opt(Version),
|
|
381
435
|
'sns_initialization_parameters' : IDL.Text,
|
|
382
436
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
383
|
-
'pending_version' : IDL.Opt(
|
|
437
|
+
'pending_version' : IDL.Opt(PendingVersion),
|
|
384
438
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
385
439
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
386
440
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
@@ -468,6 +522,12 @@ export const idlFactory = ({ IDL }) => {
|
|
|
468
522
|
'idle_cycles_burned_per_day' : IDL.Nat,
|
|
469
523
|
'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
470
524
|
});
|
|
525
|
+
const UpgradeInProgress = IDL.Record({
|
|
526
|
+
'mark_failed_at_seconds' : IDL.Nat64,
|
|
527
|
+
'checking_upgrade_lock' : IDL.Nat64,
|
|
528
|
+
'proposal_id' : IDL.Nat64,
|
|
529
|
+
'target_version' : IDL.Opt(Version),
|
|
530
|
+
});
|
|
471
531
|
const GetRunningSnsVersionResponse = IDL.Record({
|
|
472
532
|
'deployed_version' : IDL.Opt(Version),
|
|
473
533
|
'pending_version' : IDL.Opt(UpgradeInProgress),
|
|
@@ -478,6 +538,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
478
538
|
const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });
|
|
479
539
|
const GetUpgradeJournalRequest = IDL.Record({});
|
|
480
540
|
const GetUpgradeJournalResponse = IDL.Record({
|
|
541
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
481
542
|
'upgrade_steps' : IDL.Opt(Versions),
|
|
482
543
|
'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
483
544
|
'target_version' : IDL.Opt(Version),
|
|
@@ -622,6 +683,7 @@ export const init = ({ IDL }) => {
|
|
|
622
683
|
const Timers = IDL.Record({
|
|
623
684
|
'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
624
685
|
'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
686
|
+
'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
|
|
625
687
|
});
|
|
626
688
|
const Version = IDL.Record({
|
|
627
689
|
'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
@@ -682,6 +744,59 @@ export const init = ({ IDL }) => {
|
|
|
682
744
|
'current_basis_points' : IDL.Opt(IDL.Int32),
|
|
683
745
|
'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
684
746
|
});
|
|
747
|
+
const TargetVersionSet = IDL.Record({
|
|
748
|
+
'old_target_version' : IDL.Opt(Version),
|
|
749
|
+
'new_target_version' : IDL.Opt(Version),
|
|
750
|
+
});
|
|
751
|
+
const UpgradeStepsReset = IDL.Record({
|
|
752
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
753
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
754
|
+
});
|
|
755
|
+
const UpgradeOutcome = IDL.Record({
|
|
756
|
+
'status' : IDL.Opt(
|
|
757
|
+
IDL.Variant({
|
|
758
|
+
'Success' : IDL.Record({}),
|
|
759
|
+
'Timeout' : IDL.Record({}),
|
|
760
|
+
'ExternalFailure' : IDL.Record({}),
|
|
761
|
+
'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
|
|
762
|
+
})
|
|
763
|
+
),
|
|
764
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
765
|
+
});
|
|
766
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
767
|
+
const UpgradeStarted = IDL.Record({
|
|
768
|
+
'current_version' : IDL.Opt(Version),
|
|
769
|
+
'expected_version' : IDL.Opt(Version),
|
|
770
|
+
'reason' : IDL.Opt(
|
|
771
|
+
IDL.Variant({
|
|
772
|
+
'UpgradeSnsToNextVersionProposal' : ProposalId,
|
|
773
|
+
'BehindTargetVersion' : IDL.Record({}),
|
|
774
|
+
})
|
|
775
|
+
),
|
|
776
|
+
});
|
|
777
|
+
const UpgradeStepsRefreshed = IDL.Record({
|
|
778
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
779
|
+
});
|
|
780
|
+
const TargetVersionReset = IDL.Record({
|
|
781
|
+
'old_target_version' : IDL.Opt(Version),
|
|
782
|
+
'new_target_version' : IDL.Opt(Version),
|
|
783
|
+
});
|
|
784
|
+
const UpgradeJournalEntry = IDL.Record({
|
|
785
|
+
'event' : IDL.Opt(
|
|
786
|
+
IDL.Variant({
|
|
787
|
+
'TargetVersionSet' : TargetVersionSet,
|
|
788
|
+
'UpgradeStepsReset' : UpgradeStepsReset,
|
|
789
|
+
'UpgradeOutcome' : UpgradeOutcome,
|
|
790
|
+
'UpgradeStarted' : UpgradeStarted,
|
|
791
|
+
'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
|
|
792
|
+
'TargetVersionReset' : TargetVersionReset,
|
|
793
|
+
})
|
|
794
|
+
),
|
|
795
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
796
|
+
});
|
|
797
|
+
const UpgradeJournal = IDL.Record({
|
|
798
|
+
'entries' : IDL.Vec(UpgradeJournalEntry),
|
|
799
|
+
});
|
|
685
800
|
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
686
801
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
687
802
|
const DefaultFollowees = IDL.Record({
|
|
@@ -718,7 +833,6 @@ export const init = ({ IDL }) => {
|
|
|
718
833
|
'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
|
|
719
834
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
720
835
|
});
|
|
721
|
-
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
722
836
|
const RewardEvent = IDL.Record({
|
|
723
837
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
724
838
|
'actual_timestamp_seconds' : IDL.Nat64,
|
|
@@ -728,7 +842,7 @@ export const init = ({ IDL }) => {
|
|
|
728
842
|
'round' : IDL.Nat64,
|
|
729
843
|
'settled_proposals' : IDL.Vec(ProposalId),
|
|
730
844
|
});
|
|
731
|
-
const
|
|
845
|
+
const PendingVersion = IDL.Record({
|
|
732
846
|
'mark_failed_at_seconds' : IDL.Nat64,
|
|
733
847
|
'checking_upgrade_lock' : IDL.Nat64,
|
|
734
848
|
'proposal_id' : IDL.Nat64,
|
|
@@ -993,13 +1107,14 @@ export const init = ({ IDL }) => {
|
|
|
993
1107
|
),
|
|
994
1108
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
995
1109
|
'maturity_modulation' : IDL.Opt(MaturityModulation),
|
|
1110
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
996
1111
|
'mode' : IDL.Int32,
|
|
997
1112
|
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
998
1113
|
'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
|
|
999
1114
|
'deployed_version' : IDL.Opt(Version),
|
|
1000
1115
|
'sns_initialization_parameters' : IDL.Text,
|
|
1001
1116
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
1002
|
-
'pending_version' : IDL.Opt(
|
|
1117
|
+
'pending_version' : IDL.Opt(PendingVersion),
|
|
1003
1118
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
1004
1119
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
1005
1120
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
@@ -227,6 +227,7 @@ export interface GetTimersResponse {
|
|
|
227
227
|
}
|
|
228
228
|
export type GetUpgradeJournalRequest = {};
|
|
229
229
|
export interface GetUpgradeJournalResponse {
|
|
230
|
+
upgrade_journal: [] | [UpgradeJournal];
|
|
230
231
|
upgrade_steps: [] | [Versions];
|
|
231
232
|
response_timestamp_seconds: [] | [bigint];
|
|
232
233
|
target_version: [] | [Version];
|
|
@@ -238,13 +239,14 @@ export interface Governance {
|
|
|
238
239
|
id_to_nervous_system_functions: Array<[bigint, NervousSystemFunction]>;
|
|
239
240
|
metrics: [] | [GovernanceCachedMetrics];
|
|
240
241
|
maturity_modulation: [] | [MaturityModulation];
|
|
242
|
+
upgrade_journal: [] | [UpgradeJournal];
|
|
241
243
|
mode: number;
|
|
242
244
|
parameters: [] | [NervousSystemParameters];
|
|
243
245
|
is_finalizing_disburse_maturity: [] | [boolean];
|
|
244
246
|
deployed_version: [] | [Version];
|
|
245
247
|
sns_initialization_parameters: string;
|
|
246
248
|
latest_reward_event: [] | [RewardEvent];
|
|
247
|
-
pending_version: [] | [
|
|
249
|
+
pending_version: [] | [PendingVersion];
|
|
248
250
|
swap_canister_id: [] | [Principal];
|
|
249
251
|
ledger_canister_id: [] | [Principal];
|
|
250
252
|
proposals: Array<[bigint, ProposalData]>;
|
|
@@ -452,6 +454,12 @@ export type Operation =
|
|
|
452
454
|
| { IncreaseDissolveDelay: IncreaseDissolveDelay }
|
|
453
455
|
| { SetDissolveTimestamp: SetDissolveTimestamp };
|
|
454
456
|
export type Participant = { NeuronsFund: NeuronsFund } | { Direct: {} };
|
|
457
|
+
export interface PendingVersion {
|
|
458
|
+
mark_failed_at_seconds: bigint;
|
|
459
|
+
checking_upgrade_lock: bigint;
|
|
460
|
+
proposal_id: bigint;
|
|
461
|
+
target_version: [] | [Version];
|
|
462
|
+
}
|
|
455
463
|
export interface Percentage {
|
|
456
464
|
basis_points: [] | [bigint];
|
|
457
465
|
}
|
|
@@ -546,9 +554,18 @@ export interface Tally {
|
|
|
546
554
|
total: bigint;
|
|
547
555
|
timestamp_seconds: bigint;
|
|
548
556
|
}
|
|
557
|
+
export interface TargetVersionReset {
|
|
558
|
+
old_target_version: [] | [Version];
|
|
559
|
+
new_target_version: [] | [Version];
|
|
560
|
+
}
|
|
561
|
+
export interface TargetVersionSet {
|
|
562
|
+
old_target_version: [] | [Version];
|
|
563
|
+
new_target_version: [] | [Version];
|
|
564
|
+
}
|
|
549
565
|
export interface Timers {
|
|
550
566
|
last_spawned_timestamp_seconds: [] | [bigint];
|
|
551
567
|
last_reset_timestamp_seconds: [] | [bigint];
|
|
568
|
+
requires_periodic_tasks: [] | [boolean];
|
|
552
569
|
}
|
|
553
570
|
export interface Tokens {
|
|
554
571
|
e8s: [] | [bigint];
|
|
@@ -566,12 +583,56 @@ export interface UpgradeInProgress {
|
|
|
566
583
|
proposal_id: bigint;
|
|
567
584
|
target_version: [] | [Version];
|
|
568
585
|
}
|
|
586
|
+
export interface UpgradeJournal {
|
|
587
|
+
entries: Array<UpgradeJournalEntry>;
|
|
588
|
+
}
|
|
589
|
+
export interface UpgradeJournalEntry {
|
|
590
|
+
event:
|
|
591
|
+
| []
|
|
592
|
+
| [
|
|
593
|
+
| { TargetVersionSet: TargetVersionSet }
|
|
594
|
+
| { UpgradeStepsReset: UpgradeStepsReset }
|
|
595
|
+
| { UpgradeOutcome: UpgradeOutcome }
|
|
596
|
+
| { UpgradeStarted: UpgradeStarted }
|
|
597
|
+
| { UpgradeStepsRefreshed: UpgradeStepsRefreshed }
|
|
598
|
+
| { TargetVersionReset: TargetVersionReset },
|
|
599
|
+
];
|
|
600
|
+
timestamp_seconds: [] | [bigint];
|
|
601
|
+
}
|
|
602
|
+
export interface UpgradeOutcome {
|
|
603
|
+
status:
|
|
604
|
+
| []
|
|
605
|
+
| [
|
|
606
|
+
| { Success: {} }
|
|
607
|
+
| { Timeout: {} }
|
|
608
|
+
| { ExternalFailure: {} }
|
|
609
|
+
| { InvalidState: { version: [] | [Version] } },
|
|
610
|
+
];
|
|
611
|
+
human_readable: [] | [string];
|
|
612
|
+
}
|
|
569
613
|
export interface UpgradeSnsControlledCanister {
|
|
570
614
|
new_canister_wasm: Uint8Array | number[];
|
|
571
615
|
mode: [] | [number];
|
|
572
616
|
canister_id: [] | [Principal];
|
|
573
617
|
canister_upgrade_arg: [] | [Uint8Array | number[]];
|
|
574
618
|
}
|
|
619
|
+
export interface UpgradeStarted {
|
|
620
|
+
current_version: [] | [Version];
|
|
621
|
+
expected_version: [] | [Version];
|
|
622
|
+
reason:
|
|
623
|
+
| []
|
|
624
|
+
| [
|
|
625
|
+
| { UpgradeSnsToNextVersionProposal: ProposalId }
|
|
626
|
+
| { BehindTargetVersion: {} },
|
|
627
|
+
];
|
|
628
|
+
}
|
|
629
|
+
export interface UpgradeStepsRefreshed {
|
|
630
|
+
upgrade_steps: [] | [Versions];
|
|
631
|
+
}
|
|
632
|
+
export interface UpgradeStepsReset {
|
|
633
|
+
human_readable: [] | [string];
|
|
634
|
+
upgrade_steps: [] | [Versions];
|
|
635
|
+
}
|
|
575
636
|
export interface Valuation {
|
|
576
637
|
token: [] | [number];
|
|
577
638
|
account: [] | [Account];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/sns/governance/canister/governance.did' by import-candid
|
|
2
2
|
type Account = record {
|
|
3
3
|
owner : opt principal;
|
|
4
4
|
subaccount : opt Subaccount;
|
|
@@ -283,7 +283,7 @@ type Governance = record {
|
|
|
283
283
|
cached_upgrade_steps : opt CachedUpgradeSteps;
|
|
284
284
|
sns_initialization_parameters : text;
|
|
285
285
|
latest_reward_event : opt RewardEvent;
|
|
286
|
-
pending_version : opt
|
|
286
|
+
pending_version : opt PendingVersion;
|
|
287
287
|
swap_canister_id : opt principal;
|
|
288
288
|
ledger_canister_id : opt principal;
|
|
289
289
|
proposals : vec record { nat64; ProposalData };
|
|
@@ -291,11 +291,13 @@ type Governance = record {
|
|
|
291
291
|
sns_metadata : opt ManageSnsMetadata;
|
|
292
292
|
neurons : vec record { text; Neuron };
|
|
293
293
|
genesis_timestamp_seconds : nat64;
|
|
294
|
-
target_version: opt Version;
|
|
294
|
+
target_version : opt Version;
|
|
295
295
|
timers : opt Timers;
|
|
296
|
+
upgrade_journal : opt UpgradeJournal;
|
|
296
297
|
};
|
|
297
298
|
|
|
298
299
|
type Timers = record {
|
|
300
|
+
requires_periodic_tasks : opt bool;
|
|
299
301
|
last_reset_timestamp_seconds : opt nat64;
|
|
300
302
|
last_spawned_timestamp_seconds : opt nat64;
|
|
301
303
|
};
|
|
@@ -677,6 +679,13 @@ type UpgradeInProgress = record {
|
|
|
677
679
|
target_version : opt Version;
|
|
678
680
|
};
|
|
679
681
|
|
|
682
|
+
type PendingVersion = record {
|
|
683
|
+
mark_failed_at_seconds : nat64;
|
|
684
|
+
checking_upgrade_lock : nat64;
|
|
685
|
+
proposal_id : nat64;
|
|
686
|
+
target_version : opt Version;
|
|
687
|
+
};
|
|
688
|
+
|
|
680
689
|
type UpgradeSnsControlledCanister = record {
|
|
681
690
|
new_canister_wasm : blob;
|
|
682
691
|
mode : opt int32;
|
|
@@ -719,12 +728,67 @@ type WaitForQuietState = record {
|
|
|
719
728
|
current_deadline_timestamp_seconds : nat64;
|
|
720
729
|
};
|
|
721
730
|
|
|
731
|
+
type UpgradeJournalEntry = record {
|
|
732
|
+
event : opt variant {
|
|
733
|
+
UpgradeStepsRefreshed : UpgradeStepsRefreshed;
|
|
734
|
+
UpgradeStepsReset : UpgradeStepsReset;
|
|
735
|
+
TargetVersionSet : TargetVersionSet;
|
|
736
|
+
TargetVersionReset : TargetVersionReset;
|
|
737
|
+
UpgradeStarted : UpgradeStarted;
|
|
738
|
+
UpgradeOutcome : UpgradeOutcome;
|
|
739
|
+
};
|
|
740
|
+
timestamp_seconds : opt nat64;
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
type UpgradeStepsRefreshed = record {
|
|
744
|
+
upgrade_steps : opt Versions;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
type UpgradeStepsReset = record {
|
|
748
|
+
human_readable : opt text;
|
|
749
|
+
upgrade_steps : opt Versions;
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
type TargetVersionSet = record {
|
|
753
|
+
new_target_version : opt Version;
|
|
754
|
+
old_target_version : opt Version;
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
type TargetVersionReset = record {
|
|
758
|
+
new_target_version : opt Version;
|
|
759
|
+
old_target_version : opt Version;
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
type UpgradeStarted = record {
|
|
763
|
+
current_version : opt Version;
|
|
764
|
+
expected_version : opt Version;
|
|
765
|
+
reason : opt variant {
|
|
766
|
+
UpgradeSnsToNextVersionProposal : ProposalId;
|
|
767
|
+
BehindTargetVersion : record {};
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
type UpgradeOutcome = record {
|
|
772
|
+
human_readable : opt text;
|
|
773
|
+
status : opt variant {
|
|
774
|
+
Success : record {};
|
|
775
|
+
Timeout : record {};
|
|
776
|
+
InvalidState : record { version : opt Version };
|
|
777
|
+
ExternalFailure : record {};
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
type UpgradeJournal = record {
|
|
782
|
+
entries : vec UpgradeJournalEntry;
|
|
783
|
+
};
|
|
784
|
+
|
|
722
785
|
type GetUpgradeJournalRequest = record {};
|
|
723
786
|
|
|
724
787
|
type GetUpgradeJournalResponse = record {
|
|
725
788
|
upgrade_steps : opt Versions;
|
|
726
789
|
response_timestamp_seconds : opt nat64;
|
|
727
790
|
target_version : opt Version;
|
|
791
|
+
upgrade_journal : opt UpgradeJournal;
|
|
728
792
|
};
|
|
729
793
|
|
|
730
794
|
service : (Governance) -> {
|
|
@@ -740,13 +804,9 @@ service : (Governance) -> {
|
|
|
740
804
|
get_proposal : (GetProposal) -> (GetProposalResponse) query;
|
|
741
805
|
get_root_canister_status : (null) -> (CanisterStatusResultV2);
|
|
742
806
|
get_running_sns_version : (record {}) -> (GetRunningSnsVersionResponse) query;
|
|
743
|
-
get_sns_initialization_parameters : (record {}) -> (
|
|
744
|
-
GetSnsInitializationParametersResponse,
|
|
745
|
-
) query;
|
|
807
|
+
get_sns_initialization_parameters : (record {}) -> (GetSnsInitializationParametersResponse) query;
|
|
746
808
|
get_upgrade_journal : (GetUpgradeJournalRequest) -> (GetUpgradeJournalResponse) query;
|
|
747
|
-
list_nervous_system_functions : () -> (
|
|
748
|
-
ListNervousSystemFunctionsResponse,
|
|
749
|
-
) query;
|
|
809
|
+
list_nervous_system_functions : () -> (ListNervousSystemFunctionsResponse) query;
|
|
750
810
|
list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
|
|
751
811
|
list_proposals : (ListProposals) -> (ListProposalsResponse) query;
|
|
752
812
|
manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
|
|
@@ -3,6 +3,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
3
3
|
const Timers = IDL.Record({
|
|
4
4
|
'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
5
5
|
'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
6
|
+
'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
|
|
6
7
|
});
|
|
7
8
|
const Version = IDL.Record({
|
|
8
9
|
'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
@@ -63,6 +64,59 @@ export const idlFactory = ({ IDL }) => {
|
|
|
63
64
|
'current_basis_points' : IDL.Opt(IDL.Int32),
|
|
64
65
|
'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
65
66
|
});
|
|
67
|
+
const TargetVersionSet = IDL.Record({
|
|
68
|
+
'old_target_version' : IDL.Opt(Version),
|
|
69
|
+
'new_target_version' : IDL.Opt(Version),
|
|
70
|
+
});
|
|
71
|
+
const UpgradeStepsReset = IDL.Record({
|
|
72
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
73
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
74
|
+
});
|
|
75
|
+
const UpgradeOutcome = IDL.Record({
|
|
76
|
+
'status' : IDL.Opt(
|
|
77
|
+
IDL.Variant({
|
|
78
|
+
'Success' : IDL.Record({}),
|
|
79
|
+
'Timeout' : IDL.Record({}),
|
|
80
|
+
'ExternalFailure' : IDL.Record({}),
|
|
81
|
+
'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
|
|
82
|
+
})
|
|
83
|
+
),
|
|
84
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
85
|
+
});
|
|
86
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
87
|
+
const UpgradeStarted = IDL.Record({
|
|
88
|
+
'current_version' : IDL.Opt(Version),
|
|
89
|
+
'expected_version' : IDL.Opt(Version),
|
|
90
|
+
'reason' : IDL.Opt(
|
|
91
|
+
IDL.Variant({
|
|
92
|
+
'UpgradeSnsToNextVersionProposal' : ProposalId,
|
|
93
|
+
'BehindTargetVersion' : IDL.Record({}),
|
|
94
|
+
})
|
|
95
|
+
),
|
|
96
|
+
});
|
|
97
|
+
const UpgradeStepsRefreshed = IDL.Record({
|
|
98
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
99
|
+
});
|
|
100
|
+
const TargetVersionReset = IDL.Record({
|
|
101
|
+
'old_target_version' : IDL.Opt(Version),
|
|
102
|
+
'new_target_version' : IDL.Opt(Version),
|
|
103
|
+
});
|
|
104
|
+
const UpgradeJournalEntry = IDL.Record({
|
|
105
|
+
'event' : IDL.Opt(
|
|
106
|
+
IDL.Variant({
|
|
107
|
+
'TargetVersionSet' : TargetVersionSet,
|
|
108
|
+
'UpgradeStepsReset' : UpgradeStepsReset,
|
|
109
|
+
'UpgradeOutcome' : UpgradeOutcome,
|
|
110
|
+
'UpgradeStarted' : UpgradeStarted,
|
|
111
|
+
'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
|
|
112
|
+
'TargetVersionReset' : TargetVersionReset,
|
|
113
|
+
})
|
|
114
|
+
),
|
|
115
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
116
|
+
});
|
|
117
|
+
const UpgradeJournal = IDL.Record({
|
|
118
|
+
'entries' : IDL.Vec(UpgradeJournalEntry),
|
|
119
|
+
});
|
|
66
120
|
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
67
121
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
68
122
|
const DefaultFollowees = IDL.Record({
|
|
@@ -99,7 +153,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
99
153
|
'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
|
|
100
154
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
101
155
|
});
|
|
102
|
-
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
103
156
|
const RewardEvent = IDL.Record({
|
|
104
157
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
105
158
|
'actual_timestamp_seconds' : IDL.Nat64,
|
|
@@ -109,7 +162,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
109
162
|
'round' : IDL.Nat64,
|
|
110
163
|
'settled_proposals' : IDL.Vec(ProposalId),
|
|
111
164
|
});
|
|
112
|
-
const
|
|
165
|
+
const PendingVersion = IDL.Record({
|
|
113
166
|
'mark_failed_at_seconds' : IDL.Nat64,
|
|
114
167
|
'checking_upgrade_lock' : IDL.Nat64,
|
|
115
168
|
'proposal_id' : IDL.Nat64,
|
|
@@ -374,13 +427,14 @@ export const idlFactory = ({ IDL }) => {
|
|
|
374
427
|
),
|
|
375
428
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
376
429
|
'maturity_modulation' : IDL.Opt(MaturityModulation),
|
|
430
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
377
431
|
'mode' : IDL.Int32,
|
|
378
432
|
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
379
433
|
'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
|
|
380
434
|
'deployed_version' : IDL.Opt(Version),
|
|
381
435
|
'sns_initialization_parameters' : IDL.Text,
|
|
382
436
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
383
|
-
'pending_version' : IDL.Opt(
|
|
437
|
+
'pending_version' : IDL.Opt(PendingVersion),
|
|
384
438
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
385
439
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
386
440
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
@@ -468,6 +522,12 @@ export const idlFactory = ({ IDL }) => {
|
|
|
468
522
|
'idle_cycles_burned_per_day' : IDL.Nat,
|
|
469
523
|
'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
470
524
|
});
|
|
525
|
+
const UpgradeInProgress = IDL.Record({
|
|
526
|
+
'mark_failed_at_seconds' : IDL.Nat64,
|
|
527
|
+
'checking_upgrade_lock' : IDL.Nat64,
|
|
528
|
+
'proposal_id' : IDL.Nat64,
|
|
529
|
+
'target_version' : IDL.Opt(Version),
|
|
530
|
+
});
|
|
471
531
|
const GetRunningSnsVersionResponse = IDL.Record({
|
|
472
532
|
'deployed_version' : IDL.Opt(Version),
|
|
473
533
|
'pending_version' : IDL.Opt(UpgradeInProgress),
|
|
@@ -478,6 +538,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
478
538
|
const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });
|
|
479
539
|
const GetUpgradeJournalRequest = IDL.Record({});
|
|
480
540
|
const GetUpgradeJournalResponse = IDL.Record({
|
|
541
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
481
542
|
'upgrade_steps' : IDL.Opt(Versions),
|
|
482
543
|
'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
483
544
|
'target_version' : IDL.Opt(Version),
|
|
@@ -630,6 +691,7 @@ export const init = ({ IDL }) => {
|
|
|
630
691
|
const Timers = IDL.Record({
|
|
631
692
|
'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
632
693
|
'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
694
|
+
'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
|
|
633
695
|
});
|
|
634
696
|
const Version = IDL.Record({
|
|
635
697
|
'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
@@ -690,6 +752,59 @@ export const init = ({ IDL }) => {
|
|
|
690
752
|
'current_basis_points' : IDL.Opt(IDL.Int32),
|
|
691
753
|
'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
692
754
|
});
|
|
755
|
+
const TargetVersionSet = IDL.Record({
|
|
756
|
+
'old_target_version' : IDL.Opt(Version),
|
|
757
|
+
'new_target_version' : IDL.Opt(Version),
|
|
758
|
+
});
|
|
759
|
+
const UpgradeStepsReset = IDL.Record({
|
|
760
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
761
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
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
|
+
'UpgradeStepsReset' : UpgradeStepsReset,
|
|
797
|
+
'UpgradeOutcome' : UpgradeOutcome,
|
|
798
|
+
'UpgradeStarted' : UpgradeStarted,
|
|
799
|
+
'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
|
|
800
|
+
'TargetVersionReset' : TargetVersionReset,
|
|
801
|
+
})
|
|
802
|
+
),
|
|
803
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
804
|
+
});
|
|
805
|
+
const UpgradeJournal = IDL.Record({
|
|
806
|
+
'entries' : IDL.Vec(UpgradeJournalEntry),
|
|
807
|
+
});
|
|
693
808
|
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
694
809
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
695
810
|
const DefaultFollowees = IDL.Record({
|
|
@@ -726,7 +841,6 @@ export const init = ({ IDL }) => {
|
|
|
726
841
|
'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
|
|
727
842
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
728
843
|
});
|
|
729
|
-
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
730
844
|
const RewardEvent = IDL.Record({
|
|
731
845
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
732
846
|
'actual_timestamp_seconds' : IDL.Nat64,
|
|
@@ -736,7 +850,7 @@ export const init = ({ IDL }) => {
|
|
|
736
850
|
'round' : IDL.Nat64,
|
|
737
851
|
'settled_proposals' : IDL.Vec(ProposalId),
|
|
738
852
|
});
|
|
739
|
-
const
|
|
853
|
+
const PendingVersion = IDL.Record({
|
|
740
854
|
'mark_failed_at_seconds' : IDL.Nat64,
|
|
741
855
|
'checking_upgrade_lock' : IDL.Nat64,
|
|
742
856
|
'proposal_id' : IDL.Nat64,
|
|
@@ -1001,13 +1115,14 @@ export const init = ({ IDL }) => {
|
|
|
1001
1115
|
),
|
|
1002
1116
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
1003
1117
|
'maturity_modulation' : IDL.Opt(MaturityModulation),
|
|
1118
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
1004
1119
|
'mode' : IDL.Int32,
|
|
1005
1120
|
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
1006
1121
|
'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
|
|
1007
1122
|
'deployed_version' : IDL.Opt(Version),
|
|
1008
1123
|
'sns_initialization_parameters' : IDL.Text,
|
|
1009
1124
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
1010
|
-
'pending_version' : IDL.Opt(
|
|
1125
|
+
'pending_version' : IDL.Opt(PendingVersion),
|
|
1011
1126
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
1012
1127
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
1013
1128
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|