@dfinity/nns 8.4.1 → 8.5.0-beta-2025-06-28
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/README.md +60 -38
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +45 -2
- package/dist/candid/governance.d.ts +21 -0
- package/dist/candid/governance.did +30 -1
- package/dist/candid/governance.idl.js +45 -2
- package/dist/candid/governance_test.certified.idl.js +45 -2
- package/dist/candid/governance_test.d.ts +21 -0
- package/dist/candid/governance_test.did +27 -1
- package/dist/candid/governance_test.idl.js +45 -2
- package/dist/candid/sns_wasm.did +1 -1
- package/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/chunk-C3QZH6Y3.js +8 -0
- package/dist/esm/chunk-C3QZH6Y3.js.map +7 -0
- package/dist/esm/{chunk-UZGLNEQP.js → chunk-GJ7FSPCW.js} +2 -2
- package/dist/esm/{chunk-UZGLNEQP.js.map → chunk-GJ7FSPCW.js.map} +2 -2
- package/dist/esm/{chunk-GQ6HQ3NJ.js → chunk-LT33VVWB.js} +2 -2
- package/dist/esm/{chunk-GQ6HQ3NJ.js.map → chunk-LT33VVWB.js.map} +2 -2
- package/dist/esm/chunk-W6BBRGPQ.js +2 -0
- package/dist/esm/{chunk-IIFH2XLR.js.map → chunk-W6BBRGPQ.js.map} +1 -1
- package/dist/esm/genesis_token.canister.js +1 -1
- 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/sns_wasm.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +10 -4
- package/dist/types/governance.canister.d.ts +20 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/governance_converters.d.ts +20 -0
- package/dist/types/utils/account_identifier.utils.d.ts +5 -0
- package/package.json +8 -7
- package/dist/esm/chunk-IIFH2XLR.js +0 -2
- package/dist/esm/chunk-ZA4DZTQU.js +0 -19
- package/dist/esm/chunk-ZA4DZTQU.js.map +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 9bdaa01adf (2025-06-25) 'rs/nns/governance/canister/governance.did' by import-candid
|
|
2
2
|
type AccountIdentifier = record {
|
|
3
3
|
hash : blob;
|
|
4
4
|
};
|
|
@@ -127,6 +127,7 @@ type RefreshVotingPowerResponse = record {
|
|
|
127
127
|
type DisburseMaturity = record {
|
|
128
128
|
percentage_to_disburse : nat32;
|
|
129
129
|
to_account : opt Account;
|
|
130
|
+
to_account_identifier: opt AccountIdentifier;
|
|
130
131
|
};
|
|
131
132
|
|
|
132
133
|
type Account = record {
|
|
@@ -138,6 +139,18 @@ type DisburseMaturityResponse = record {
|
|
|
138
139
|
amount_disbursed_e8s : opt nat64;
|
|
139
140
|
};
|
|
140
141
|
|
|
142
|
+
type SetFollowing = record {
|
|
143
|
+
topic_following : opt vec FolloweesForTopic;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
type FolloweesForTopic = record {
|
|
147
|
+
followees : opt vec NeuronId;
|
|
148
|
+
topic : opt int32;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
type SetFollowingResponse = record {
|
|
152
|
+
};
|
|
153
|
+
|
|
141
154
|
// KEEP THIS IN SYNC WITH ManageNeuronCommandRequest!
|
|
142
155
|
type Command = variant {
|
|
143
156
|
Spawn : Spawn;
|
|
@@ -154,6 +167,7 @@ type Command = variant {
|
|
|
154
167
|
Disburse : Disburse;
|
|
155
168
|
RefreshVotingPower : RefreshVotingPower;
|
|
156
169
|
DisburseMaturity : DisburseMaturity;
|
|
170
|
+
SetFollowing : SetFollowing;
|
|
157
171
|
|
|
158
172
|
// KEEP THIS IN SYNC WITH ManageNeuronCommandRequest!
|
|
159
173
|
};
|
|
@@ -174,6 +188,7 @@ type Command_1 = variant {
|
|
|
174
188
|
Disburse : DisburseResponse;
|
|
175
189
|
RefreshVotingPower : RefreshVotingPowerResponse;
|
|
176
190
|
DisburseMaturity : DisburseMaturityResponse;
|
|
191
|
+
SetFollowing : SetFollowingResponse;
|
|
177
192
|
};
|
|
178
193
|
|
|
179
194
|
type Command_2 = variant {
|
|
@@ -548,6 +563,7 @@ type ManageNeuronCommandRequest = variant {
|
|
|
548
563
|
Disburse : Disburse;
|
|
549
564
|
RefreshVotingPower : RefreshVotingPower;
|
|
550
565
|
DisburseMaturity : DisburseMaturity;
|
|
566
|
+
SetFollowing : SetFollowing;
|
|
551
567
|
|
|
552
568
|
// KEEP THIS IN SYNC WITH COMMAND!
|
|
553
569
|
};
|
|
@@ -733,6 +749,10 @@ type Neuron = record {
|
|
|
733
749
|
//
|
|
734
750
|
// Per NNS policy, this is opt. Nevertheless, it will never be null.
|
|
735
751
|
potential_voting_power : opt nat64;
|
|
752
|
+
|
|
753
|
+
// The maturity disbursements in progress, i.e. the disbursements that are initiated but not
|
|
754
|
+
// finalized. The finalization happens 7 days after the disbursement is initiated.
|
|
755
|
+
maturity_disbursements_in_progress : opt vec MaturityDisbursement;
|
|
736
756
|
};
|
|
737
757
|
|
|
738
758
|
type NeuronBasketConstructionParameters = record {
|
|
@@ -996,6 +1016,7 @@ type ProposalData = record {
|
|
|
996
1016
|
executed_timestamp_seconds : nat64;
|
|
997
1017
|
original_total_community_fund_maturity_e8s_equivalent : opt nat64;
|
|
998
1018
|
total_potential_voting_power : opt nat64;
|
|
1019
|
+
topic: opt int32;
|
|
999
1020
|
};
|
|
1000
1021
|
|
|
1001
1022
|
type ProposalInfo = record {
|
|
@@ -1269,6 +1290,14 @@ type XdrConversionRate = record {
|
|
|
1269
1290
|
timestamp_seconds : opt nat64;
|
|
1270
1291
|
};
|
|
1271
1292
|
|
|
1293
|
+
type MaturityDisbursement = record {
|
|
1294
|
+
amount_e8s : opt nat64;
|
|
1295
|
+
timestamp_of_disbursement_seconds : opt nat64;
|
|
1296
|
+
finalize_disbursement_timestamp_seconds : opt nat64;
|
|
1297
|
+
account_to_disburse_to : opt Account;
|
|
1298
|
+
account_identifier_to_disburse_to : opt AccountIdentifier;
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1272
1301
|
service : (Governance) -> {
|
|
1273
1302
|
claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
|
|
1274
1303
|
claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (
|
|
@@ -22,11 +22,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
22
22
|
'topic' : IDL.Int32,
|
|
23
23
|
'followees' : IDL.Vec(NeuronId),
|
|
24
24
|
});
|
|
25
|
+
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
25
26
|
const Account = IDL.Record({
|
|
26
27
|
'owner' : IDL.Opt(IDL.Principal),
|
|
27
28
|
'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
28
29
|
});
|
|
29
30
|
const DisburseMaturity = IDL.Record({
|
|
31
|
+
'to_account_identifier' : IDL.Opt(AccountIdentifier),
|
|
30
32
|
'to_account' : IDL.Opt(Account),
|
|
31
33
|
'percentage_to_disburse' : IDL.Nat32,
|
|
32
34
|
});
|
|
@@ -81,11 +83,17 @@ export const idlFactory = ({ IDL }) => {
|
|
|
81
83
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
82
84
|
'nonce' : IDL.Nat64,
|
|
83
85
|
});
|
|
86
|
+
const FolloweesForTopic = IDL.Record({
|
|
87
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
88
|
+
'followees' : IDL.Opt(IDL.Vec(NeuronId)),
|
|
89
|
+
});
|
|
90
|
+
const SetFollowing = IDL.Record({
|
|
91
|
+
'topic_following' : IDL.Opt(IDL.Vec(FolloweesForTopic)),
|
|
92
|
+
});
|
|
84
93
|
const StakeMaturity = IDL.Record({
|
|
85
94
|
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
86
95
|
});
|
|
87
96
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
88
|
-
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
89
97
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
90
98
|
const Disburse = IDL.Record({
|
|
91
99
|
'to_account' : IDL.Opt(AccountIdentifier),
|
|
@@ -102,6 +110,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
102
110
|
'RegisterVote' : RegisterVote,
|
|
103
111
|
'Merge' : Merge,
|
|
104
112
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
113
|
+
'SetFollowing' : SetFollowing,
|
|
105
114
|
'MakeProposal' : Proposal,
|
|
106
115
|
'StakeMaturity' : StakeMaturity,
|
|
107
116
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -566,6 +575,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
566
575
|
});
|
|
567
576
|
const ProposalData = IDL.Record({
|
|
568
577
|
'id' : IDL.Opt(ProposalId),
|
|
578
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
569
579
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
570
580
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
571
581
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
@@ -605,6 +615,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
605
615
|
'vote' : IDL.Int32,
|
|
606
616
|
'proposal_id' : IDL.Opt(ProposalId),
|
|
607
617
|
});
|
|
618
|
+
const MaturityDisbursement = IDL.Record({
|
|
619
|
+
'account_identifier_to_disburse_to' : IDL.Opt(AccountIdentifier),
|
|
620
|
+
'timestamp_of_disbursement_seconds' : IDL.Opt(IDL.Nat64),
|
|
621
|
+
'amount_e8s' : IDL.Opt(IDL.Nat64),
|
|
622
|
+
'account_to_disburse_to' : IDL.Opt(Account),
|
|
623
|
+
'finalize_disbursement_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
624
|
+
});
|
|
608
625
|
const DissolveState = IDL.Variant({
|
|
609
626
|
'DissolveDelaySeconds' : IDL.Nat64,
|
|
610
627
|
'WhenDissolvedTimestampSeconds' : IDL.Nat64,
|
|
@@ -628,6 +645,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
628
645
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
629
646
|
'account' : IDL.Vec(IDL.Nat8),
|
|
630
647
|
'joined_community_fund_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
648
|
+
'maturity_disbursements_in_progress' : IDL.Opt(
|
|
649
|
+
IDL.Vec(MaturityDisbursement)
|
|
650
|
+
),
|
|
631
651
|
'dissolve_state' : IDL.Opt(DissolveState),
|
|
632
652
|
'followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
633
653
|
'neuron_fees_e8s' : IDL.Nat64,
|
|
@@ -818,6 +838,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
818
838
|
'RegisterVote' : RegisterVote,
|
|
819
839
|
'Merge' : Merge,
|
|
820
840
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
841
|
+
'SetFollowing' : SetFollowing,
|
|
821
842
|
'MakeProposal' : MakeProposalRequest,
|
|
822
843
|
'StakeMaturity' : StakeMaturity,
|
|
823
844
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -844,6 +865,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
844
865
|
'target_neuron_info' : IDL.Opt(NeuronInfo),
|
|
845
866
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
846
867
|
});
|
|
868
|
+
const SetFollowingResponse = IDL.Record({});
|
|
847
869
|
const MakeProposalResponse = IDL.Record({
|
|
848
870
|
'message' : IDL.Opt(IDL.Text),
|
|
849
871
|
'proposal_id' : IDL.Opt(ProposalId),
|
|
@@ -869,6 +891,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
869
891
|
'RegisterVote' : IDL.Record({}),
|
|
870
892
|
'Merge' : MergeResponse,
|
|
871
893
|
'DisburseToNeuron' : SpawnResponse,
|
|
894
|
+
'SetFollowing' : SetFollowingResponse,
|
|
872
895
|
'MakeProposal' : MakeProposalResponse,
|
|
873
896
|
'StakeMaturity' : StakeMaturityResponse,
|
|
874
897
|
'MergeMaturity' : MergeMaturityResponse,
|
|
@@ -1036,11 +1059,13 @@ export const init = ({ IDL }) => {
|
|
|
1036
1059
|
'topic' : IDL.Int32,
|
|
1037
1060
|
'followees' : IDL.Vec(NeuronId),
|
|
1038
1061
|
});
|
|
1062
|
+
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
1039
1063
|
const Account = IDL.Record({
|
|
1040
1064
|
'owner' : IDL.Opt(IDL.Principal),
|
|
1041
1065
|
'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
1042
1066
|
});
|
|
1043
1067
|
const DisburseMaturity = IDL.Record({
|
|
1068
|
+
'to_account_identifier' : IDL.Opt(AccountIdentifier),
|
|
1044
1069
|
'to_account' : IDL.Opt(Account),
|
|
1045
1070
|
'percentage_to_disburse' : IDL.Nat32,
|
|
1046
1071
|
});
|
|
@@ -1095,11 +1120,17 @@ export const init = ({ IDL }) => {
|
|
|
1095
1120
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
1096
1121
|
'nonce' : IDL.Nat64,
|
|
1097
1122
|
});
|
|
1123
|
+
const FolloweesForTopic = IDL.Record({
|
|
1124
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
1125
|
+
'followees' : IDL.Opt(IDL.Vec(NeuronId)),
|
|
1126
|
+
});
|
|
1127
|
+
const SetFollowing = IDL.Record({
|
|
1128
|
+
'topic_following' : IDL.Opt(IDL.Vec(FolloweesForTopic)),
|
|
1129
|
+
});
|
|
1098
1130
|
const StakeMaturity = IDL.Record({
|
|
1099
1131
|
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
1100
1132
|
});
|
|
1101
1133
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
1102
|
-
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
1103
1134
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
1104
1135
|
const Disburse = IDL.Record({
|
|
1105
1136
|
'to_account' : IDL.Opt(AccountIdentifier),
|
|
@@ -1116,6 +1147,7 @@ export const init = ({ IDL }) => {
|
|
|
1116
1147
|
'RegisterVote' : RegisterVote,
|
|
1117
1148
|
'Merge' : Merge,
|
|
1118
1149
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
1150
|
+
'SetFollowing' : SetFollowing,
|
|
1119
1151
|
'MakeProposal' : Proposal,
|
|
1120
1152
|
'StakeMaturity' : StakeMaturity,
|
|
1121
1153
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -1580,6 +1612,7 @@ export const init = ({ IDL }) => {
|
|
|
1580
1612
|
});
|
|
1581
1613
|
const ProposalData = IDL.Record({
|
|
1582
1614
|
'id' : IDL.Opt(ProposalId),
|
|
1615
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
1583
1616
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
1584
1617
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
1585
1618
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
@@ -1619,6 +1652,13 @@ export const init = ({ IDL }) => {
|
|
|
1619
1652
|
'vote' : IDL.Int32,
|
|
1620
1653
|
'proposal_id' : IDL.Opt(ProposalId),
|
|
1621
1654
|
});
|
|
1655
|
+
const MaturityDisbursement = IDL.Record({
|
|
1656
|
+
'account_identifier_to_disburse_to' : IDL.Opt(AccountIdentifier),
|
|
1657
|
+
'timestamp_of_disbursement_seconds' : IDL.Opt(IDL.Nat64),
|
|
1658
|
+
'amount_e8s' : IDL.Opt(IDL.Nat64),
|
|
1659
|
+
'account_to_disburse_to' : IDL.Opt(Account),
|
|
1660
|
+
'finalize_disbursement_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1661
|
+
});
|
|
1622
1662
|
const DissolveState = IDL.Variant({
|
|
1623
1663
|
'DissolveDelaySeconds' : IDL.Nat64,
|
|
1624
1664
|
'WhenDissolvedTimestampSeconds' : IDL.Nat64,
|
|
@@ -1642,6 +1682,9 @@ export const init = ({ IDL }) => {
|
|
|
1642
1682
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
1643
1683
|
'account' : IDL.Vec(IDL.Nat8),
|
|
1644
1684
|
'joined_community_fund_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1685
|
+
'maturity_disbursements_in_progress' : IDL.Opt(
|
|
1686
|
+
IDL.Vec(MaturityDisbursement)
|
|
1687
|
+
),
|
|
1645
1688
|
'dissolve_state' : IDL.Opt(DissolveState),
|
|
1646
1689
|
'followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
1647
1690
|
'neuron_fees_e8s' : IDL.Nat64,
|
|
@@ -22,11 +22,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
22
22
|
'topic' : IDL.Int32,
|
|
23
23
|
'followees' : IDL.Vec(NeuronId),
|
|
24
24
|
});
|
|
25
|
+
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
25
26
|
const Account = IDL.Record({
|
|
26
27
|
'owner' : IDL.Opt(IDL.Principal),
|
|
27
28
|
'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
28
29
|
});
|
|
29
30
|
const DisburseMaturity = IDL.Record({
|
|
31
|
+
'to_account_identifier' : IDL.Opt(AccountIdentifier),
|
|
30
32
|
'to_account' : IDL.Opt(Account),
|
|
31
33
|
'percentage_to_disburse' : IDL.Nat32,
|
|
32
34
|
});
|
|
@@ -81,11 +83,17 @@ export const idlFactory = ({ IDL }) => {
|
|
|
81
83
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
82
84
|
'nonce' : IDL.Nat64,
|
|
83
85
|
});
|
|
86
|
+
const FolloweesForTopic = IDL.Record({
|
|
87
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
88
|
+
'followees' : IDL.Opt(IDL.Vec(NeuronId)),
|
|
89
|
+
});
|
|
90
|
+
const SetFollowing = IDL.Record({
|
|
91
|
+
'topic_following' : IDL.Opt(IDL.Vec(FolloweesForTopic)),
|
|
92
|
+
});
|
|
84
93
|
const StakeMaturity = IDL.Record({
|
|
85
94
|
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
86
95
|
});
|
|
87
96
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
88
|
-
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
89
97
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
90
98
|
const Disburse = IDL.Record({
|
|
91
99
|
'to_account' : IDL.Opt(AccountIdentifier),
|
|
@@ -102,6 +110,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
102
110
|
'RegisterVote' : RegisterVote,
|
|
103
111
|
'Merge' : Merge,
|
|
104
112
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
113
|
+
'SetFollowing' : SetFollowing,
|
|
105
114
|
'MakeProposal' : Proposal,
|
|
106
115
|
'StakeMaturity' : StakeMaturity,
|
|
107
116
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -566,6 +575,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
566
575
|
});
|
|
567
576
|
const ProposalData = IDL.Record({
|
|
568
577
|
'id' : IDL.Opt(ProposalId),
|
|
578
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
569
579
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
570
580
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
571
581
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
@@ -605,6 +615,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
605
615
|
'vote' : IDL.Int32,
|
|
606
616
|
'proposal_id' : IDL.Opt(ProposalId),
|
|
607
617
|
});
|
|
618
|
+
const MaturityDisbursement = IDL.Record({
|
|
619
|
+
'account_identifier_to_disburse_to' : IDL.Opt(AccountIdentifier),
|
|
620
|
+
'timestamp_of_disbursement_seconds' : IDL.Opt(IDL.Nat64),
|
|
621
|
+
'amount_e8s' : IDL.Opt(IDL.Nat64),
|
|
622
|
+
'account_to_disburse_to' : IDL.Opt(Account),
|
|
623
|
+
'finalize_disbursement_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
624
|
+
});
|
|
608
625
|
const DissolveState = IDL.Variant({
|
|
609
626
|
'DissolveDelaySeconds' : IDL.Nat64,
|
|
610
627
|
'WhenDissolvedTimestampSeconds' : IDL.Nat64,
|
|
@@ -628,6 +645,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
628
645
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
629
646
|
'account' : IDL.Vec(IDL.Nat8),
|
|
630
647
|
'joined_community_fund_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
648
|
+
'maturity_disbursements_in_progress' : IDL.Opt(
|
|
649
|
+
IDL.Vec(MaturityDisbursement)
|
|
650
|
+
),
|
|
631
651
|
'dissolve_state' : IDL.Opt(DissolveState),
|
|
632
652
|
'followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
633
653
|
'neuron_fees_e8s' : IDL.Nat64,
|
|
@@ -818,6 +838,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
818
838
|
'RegisterVote' : RegisterVote,
|
|
819
839
|
'Merge' : Merge,
|
|
820
840
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
841
|
+
'SetFollowing' : SetFollowing,
|
|
821
842
|
'MakeProposal' : MakeProposalRequest,
|
|
822
843
|
'StakeMaturity' : StakeMaturity,
|
|
823
844
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -844,6 +865,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
844
865
|
'target_neuron_info' : IDL.Opt(NeuronInfo),
|
|
845
866
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
846
867
|
});
|
|
868
|
+
const SetFollowingResponse = IDL.Record({});
|
|
847
869
|
const MakeProposalResponse = IDL.Record({
|
|
848
870
|
'message' : IDL.Opt(IDL.Text),
|
|
849
871
|
'proposal_id' : IDL.Opt(ProposalId),
|
|
@@ -869,6 +891,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
869
891
|
'RegisterVote' : IDL.Record({}),
|
|
870
892
|
'Merge' : MergeResponse,
|
|
871
893
|
'DisburseToNeuron' : SpawnResponse,
|
|
894
|
+
'SetFollowing' : SetFollowingResponse,
|
|
872
895
|
'MakeProposal' : MakeProposalResponse,
|
|
873
896
|
'StakeMaturity' : StakeMaturityResponse,
|
|
874
897
|
'MergeMaturity' : MergeMaturityResponse,
|
|
@@ -1021,11 +1044,13 @@ export const init = ({ IDL }) => {
|
|
|
1021
1044
|
'topic' : IDL.Int32,
|
|
1022
1045
|
'followees' : IDL.Vec(NeuronId),
|
|
1023
1046
|
});
|
|
1047
|
+
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
1024
1048
|
const Account = IDL.Record({
|
|
1025
1049
|
'owner' : IDL.Opt(IDL.Principal),
|
|
1026
1050
|
'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
1027
1051
|
});
|
|
1028
1052
|
const DisburseMaturity = IDL.Record({
|
|
1053
|
+
'to_account_identifier' : IDL.Opt(AccountIdentifier),
|
|
1029
1054
|
'to_account' : IDL.Opt(Account),
|
|
1030
1055
|
'percentage_to_disburse' : IDL.Nat32,
|
|
1031
1056
|
});
|
|
@@ -1080,11 +1105,17 @@ export const init = ({ IDL }) => {
|
|
|
1080
1105
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
1081
1106
|
'nonce' : IDL.Nat64,
|
|
1082
1107
|
});
|
|
1108
|
+
const FolloweesForTopic = IDL.Record({
|
|
1109
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
1110
|
+
'followees' : IDL.Opt(IDL.Vec(NeuronId)),
|
|
1111
|
+
});
|
|
1112
|
+
const SetFollowing = IDL.Record({
|
|
1113
|
+
'topic_following' : IDL.Opt(IDL.Vec(FolloweesForTopic)),
|
|
1114
|
+
});
|
|
1083
1115
|
const StakeMaturity = IDL.Record({
|
|
1084
1116
|
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
1085
1117
|
});
|
|
1086
1118
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
1087
|
-
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
1088
1119
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
1089
1120
|
const Disburse = IDL.Record({
|
|
1090
1121
|
'to_account' : IDL.Opt(AccountIdentifier),
|
|
@@ -1101,6 +1132,7 @@ export const init = ({ IDL }) => {
|
|
|
1101
1132
|
'RegisterVote' : RegisterVote,
|
|
1102
1133
|
'Merge' : Merge,
|
|
1103
1134
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
1135
|
+
'SetFollowing' : SetFollowing,
|
|
1104
1136
|
'MakeProposal' : Proposal,
|
|
1105
1137
|
'StakeMaturity' : StakeMaturity,
|
|
1106
1138
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -1565,6 +1597,7 @@ export const init = ({ IDL }) => {
|
|
|
1565
1597
|
});
|
|
1566
1598
|
const ProposalData = IDL.Record({
|
|
1567
1599
|
'id' : IDL.Opt(ProposalId),
|
|
1600
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
1568
1601
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
1569
1602
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
1570
1603
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
@@ -1604,6 +1637,13 @@ export const init = ({ IDL }) => {
|
|
|
1604
1637
|
'vote' : IDL.Int32,
|
|
1605
1638
|
'proposal_id' : IDL.Opt(ProposalId),
|
|
1606
1639
|
});
|
|
1640
|
+
const MaturityDisbursement = IDL.Record({
|
|
1641
|
+
'account_identifier_to_disburse_to' : IDL.Opt(AccountIdentifier),
|
|
1642
|
+
'timestamp_of_disbursement_seconds' : IDL.Opt(IDL.Nat64),
|
|
1643
|
+
'amount_e8s' : IDL.Opt(IDL.Nat64),
|
|
1644
|
+
'account_to_disburse_to' : IDL.Opt(Account),
|
|
1645
|
+
'finalize_disbursement_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1646
|
+
});
|
|
1607
1647
|
const DissolveState = IDL.Variant({
|
|
1608
1648
|
'DissolveDelaySeconds' : IDL.Nat64,
|
|
1609
1649
|
'WhenDissolvedTimestampSeconds' : IDL.Nat64,
|
|
@@ -1627,6 +1667,9 @@ export const init = ({ IDL }) => {
|
|
|
1627
1667
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
1628
1668
|
'account' : IDL.Vec(IDL.Nat8),
|
|
1629
1669
|
'joined_community_fund_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1670
|
+
'maturity_disbursements_in_progress' : IDL.Opt(
|
|
1671
|
+
IDL.Vec(MaturityDisbursement)
|
|
1672
|
+
),
|
|
1630
1673
|
'dissolve_state' : IDL.Opt(DissolveState),
|
|
1631
1674
|
'followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
1632
1675
|
'neuron_fees_e8s' : IDL.Nat64,
|
|
@@ -103,6 +103,7 @@ export type Command =
|
|
|
103
103
|
| { RegisterVote: RegisterVote }
|
|
104
104
|
| { Merge: Merge }
|
|
105
105
|
| { DisburseToNeuron: DisburseToNeuron }
|
|
106
|
+
| { SetFollowing: SetFollowing }
|
|
106
107
|
| { MakeProposal: Proposal }
|
|
107
108
|
| { StakeMaturity: StakeMaturity }
|
|
108
109
|
| { MergeMaturity: MergeMaturity }
|
|
@@ -119,6 +120,7 @@ export type Command_1 =
|
|
|
119
120
|
| { RegisterVote: {} }
|
|
120
121
|
| { Merge: MergeResponse }
|
|
121
122
|
| { DisburseToNeuron: SpawnResponse }
|
|
123
|
+
| { SetFollowing: SetFollowingResponse }
|
|
122
124
|
| { MakeProposal: MakeProposalResponse }
|
|
123
125
|
| { StakeMaturity: StakeMaturityResponse }
|
|
124
126
|
| { MergeMaturity: MergeMaturityResponse }
|
|
@@ -182,6 +184,7 @@ export interface Disburse {
|
|
|
182
184
|
amount: [] | [Amount];
|
|
183
185
|
}
|
|
184
186
|
export interface DisburseMaturity {
|
|
187
|
+
to_account_identifier: [] | [AccountIdentifier];
|
|
185
188
|
to_account: [] | [Account];
|
|
186
189
|
percentage_to_disburse: number;
|
|
187
190
|
}
|
|
@@ -215,6 +218,10 @@ export interface Follow {
|
|
|
215
218
|
export interface Followees {
|
|
216
219
|
followees: Array<NeuronId>;
|
|
217
220
|
}
|
|
221
|
+
export interface FolloweesForTopic {
|
|
222
|
+
topic: [] | [number];
|
|
223
|
+
followees: [] | [Array<NeuronId>];
|
|
224
|
+
}
|
|
218
225
|
export interface GetNeuronsFundAuditInfoRequest {
|
|
219
226
|
nns_proposal_id: [] | [ProposalId];
|
|
220
227
|
}
|
|
@@ -422,6 +429,7 @@ export type ManageNeuronCommandRequest =
|
|
|
422
429
|
| { RegisterVote: RegisterVote }
|
|
423
430
|
| { Merge: Merge }
|
|
424
431
|
| { DisburseToNeuron: DisburseToNeuron }
|
|
432
|
+
| { SetFollowing: SetFollowing }
|
|
425
433
|
| { MakeProposal: MakeProposalRequest }
|
|
426
434
|
| { StakeMaturity: StakeMaturity }
|
|
427
435
|
| { MergeMaturity: MergeMaturity }
|
|
@@ -434,6 +442,13 @@ export interface ManageNeuronRequest {
|
|
|
434
442
|
export interface ManageNeuronResponse {
|
|
435
443
|
command: [] | [Command_1];
|
|
436
444
|
}
|
|
445
|
+
export interface MaturityDisbursement {
|
|
446
|
+
account_identifier_to_disburse_to: [] | [AccountIdentifier];
|
|
447
|
+
timestamp_of_disbursement_seconds: [] | [bigint];
|
|
448
|
+
amount_e8s: [] | [bigint];
|
|
449
|
+
account_to_disburse_to: [] | [Account];
|
|
450
|
+
finalize_disbursement_timestamp_seconds: [] | [bigint];
|
|
451
|
+
}
|
|
437
452
|
export interface Merge {
|
|
438
453
|
source_neuron_id: [] | [NeuronId];
|
|
439
454
|
}
|
|
@@ -493,6 +508,7 @@ export interface Neuron {
|
|
|
493
508
|
hot_keys: Array<Principal>;
|
|
494
509
|
account: Uint8Array | number[];
|
|
495
510
|
joined_community_fund_timestamp_seconds: [] | [bigint];
|
|
511
|
+
maturity_disbursements_in_progress: [] | [Array<MaturityDisbursement>];
|
|
496
512
|
dissolve_state: [] | [DissolveState];
|
|
497
513
|
followees: Array<[number, Followees]>;
|
|
498
514
|
neuron_fees_e8s: bigint;
|
|
@@ -693,6 +709,7 @@ export type ProposalActionRequest =
|
|
|
693
709
|
| { Motion: Motion };
|
|
694
710
|
export interface ProposalData {
|
|
695
711
|
id: [] | [ProposalId];
|
|
712
|
+
topic: [] | [number];
|
|
696
713
|
failure_reason: [] | [GovernanceError];
|
|
697
714
|
ballots: Array<[bigint, Ballot]>;
|
|
698
715
|
proposal_timestamp_seconds: bigint;
|
|
@@ -801,6 +818,10 @@ export interface SetDefaultFollowees {
|
|
|
801
818
|
export interface SetDissolveTimestamp {
|
|
802
819
|
dissolve_timestamp_seconds: bigint;
|
|
803
820
|
}
|
|
821
|
+
export interface SetFollowing {
|
|
822
|
+
topic_following: [] | [Array<FolloweesForTopic>];
|
|
823
|
+
}
|
|
824
|
+
export type SetFollowingResponse = {};
|
|
804
825
|
export interface SetOpenTimeWindowRequest {
|
|
805
826
|
open_time_window: [] | [TimeWindow];
|
|
806
827
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 9bdaa01adf (2025-06-25) 'rs/nns/governance/canister/governance_test.did' by import-candid
|
|
2
2
|
type AccountIdentifier = record {
|
|
3
3
|
hash : blob;
|
|
4
4
|
};
|
|
@@ -127,6 +127,7 @@ type RefreshVotingPowerResponse = record {
|
|
|
127
127
|
type DisburseMaturity = record {
|
|
128
128
|
percentage_to_disburse : nat32;
|
|
129
129
|
to_account : opt Account;
|
|
130
|
+
to_account_identifier: opt AccountIdentifier;
|
|
130
131
|
};
|
|
131
132
|
|
|
132
133
|
type Account = record {
|
|
@@ -138,6 +139,18 @@ type DisburseMaturityResponse = record {
|
|
|
138
139
|
amount_disbursed_e8s : opt nat64;
|
|
139
140
|
};
|
|
140
141
|
|
|
142
|
+
type SetFollowing = record {
|
|
143
|
+
topic_following : opt vec FolloweesForTopic;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
type FolloweesForTopic = record {
|
|
147
|
+
followees : opt vec NeuronId;
|
|
148
|
+
topic : opt int32;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
type SetFollowingResponse = record {
|
|
152
|
+
};
|
|
153
|
+
|
|
141
154
|
type Command = variant {
|
|
142
155
|
Spawn : Spawn;
|
|
143
156
|
Split : Split;
|
|
@@ -153,6 +166,7 @@ type Command = variant {
|
|
|
153
166
|
Disburse : Disburse;
|
|
154
167
|
RefreshVotingPower : RefreshVotingPower;
|
|
155
168
|
DisburseMaturity : DisburseMaturity;
|
|
169
|
+
SetFollowing : SetFollowing;
|
|
156
170
|
};
|
|
157
171
|
|
|
158
172
|
type Command_1 = variant {
|
|
@@ -171,6 +185,7 @@ type Command_1 = variant {
|
|
|
171
185
|
Disburse : DisburseResponse;
|
|
172
186
|
RefreshVotingPower : RefreshVotingPowerResponse;
|
|
173
187
|
DisburseMaturity : DisburseMaturityResponse;
|
|
188
|
+
SetFollowing : SetFollowingResponse;
|
|
174
189
|
};
|
|
175
190
|
|
|
176
191
|
type Command_2 = variant {
|
|
@@ -523,6 +538,7 @@ type ManageNeuronCommandRequest = variant {
|
|
|
523
538
|
Disburse : Disburse;
|
|
524
539
|
RefreshVotingPower : RefreshVotingPower;
|
|
525
540
|
DisburseMaturity : DisburseMaturity;
|
|
541
|
+
SetFollowing : SetFollowing;
|
|
526
542
|
};
|
|
527
543
|
|
|
528
544
|
type ManageNeuronRequest = record {
|
|
@@ -642,6 +658,7 @@ type Neuron = record {
|
|
|
642
658
|
voting_power_refreshed_timestamp_seconds : opt nat64;
|
|
643
659
|
deciding_voting_power : opt nat64;
|
|
644
660
|
potential_voting_power : opt nat64;
|
|
661
|
+
maturity_disbursements_in_progress : opt vec MaturityDisbursement;
|
|
645
662
|
};
|
|
646
663
|
|
|
647
664
|
type NeuronBasketConstructionParameters = record {
|
|
@@ -883,6 +900,7 @@ type ProposalData = record {
|
|
|
883
900
|
executed_timestamp_seconds : nat64;
|
|
884
901
|
original_total_community_fund_maturity_e8s_equivalent : opt nat64;
|
|
885
902
|
total_potential_voting_power : opt nat64;
|
|
903
|
+
topic: opt int32;
|
|
886
904
|
};
|
|
887
905
|
|
|
888
906
|
type ProposalInfo = record {
|
|
@@ -1156,6 +1174,14 @@ type XdrConversionRate = record {
|
|
|
1156
1174
|
timestamp_seconds : opt nat64;
|
|
1157
1175
|
};
|
|
1158
1176
|
|
|
1177
|
+
type MaturityDisbursement = record {
|
|
1178
|
+
amount_e8s : opt nat64;
|
|
1179
|
+
timestamp_of_disbursement_seconds : opt nat64;
|
|
1180
|
+
finalize_disbursement_timestamp_seconds : opt nat64;
|
|
1181
|
+
account_to_disburse_to : opt Account;
|
|
1182
|
+
account_identifier_to_disburse_to : opt AccountIdentifier;
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1159
1185
|
service : (Governance) -> {
|
|
1160
1186
|
claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
|
|
1161
1187
|
claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (
|