@dfinity/nns 8.5.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -40
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +21 -0
- package/dist/candid/governance.d.ts +12 -0
- package/dist/candid/governance.did +17 -1
- package/dist/candid/governance.idl.js +21 -0
- package/dist/candid/governance_test.certified.idl.js +21 -0
- package/dist/candid/governance_test.d.ts +12 -0
- package/dist/candid/governance_test.did +17 -1
- package/dist/candid/governance_test.idl.js +21 -0
- 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-IAL3TRFD.js +19 -0
- package/dist/esm/chunk-IAL3TRFD.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/types/canisters/governance/request.converters.d.ts +6 -2
- package/dist/types/canisters/governance/response.converters.d.ts +3 -2
- package/dist/types/governance.canister.d.ts +16 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/governance_converters.d.ts +75 -0
- package/dist/types/utils/account_identifier.utils.d.ts +5 -0
- package/package.json +4 -7
- package/dist/esm/chunk-VPFNVMZT.js +0 -19
- package/dist/esm/chunk-VPFNVMZT.js.map +0 -7
|
@@ -83,6 +83,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
83
83
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
84
84
|
'nonce' : IDL.Nat64,
|
|
85
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
|
+
});
|
|
86
93
|
const StakeMaturity = IDL.Record({
|
|
87
94
|
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
88
95
|
});
|
|
@@ -103,6 +110,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
103
110
|
'RegisterVote' : RegisterVote,
|
|
104
111
|
'Merge' : Merge,
|
|
105
112
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
113
|
+
'SetFollowing' : SetFollowing,
|
|
106
114
|
'MakeProposal' : Proposal,
|
|
107
115
|
'StakeMaturity' : StakeMaturity,
|
|
108
116
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -424,6 +432,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
424
432
|
'not_dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
|
|
425
433
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
426
434
|
),
|
|
435
|
+
'spawning_neurons_count' : IDL.Nat64,
|
|
427
436
|
'declining_voting_power_neuron_subset_metrics' : IDL.Opt(
|
|
428
437
|
NeuronSubsetMetrics
|
|
429
438
|
),
|
|
@@ -830,6 +839,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
830
839
|
'RegisterVote' : RegisterVote,
|
|
831
840
|
'Merge' : Merge,
|
|
832
841
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
842
|
+
'SetFollowing' : SetFollowing,
|
|
833
843
|
'MakeProposal' : MakeProposalRequest,
|
|
834
844
|
'StakeMaturity' : StakeMaturity,
|
|
835
845
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -856,6 +866,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
856
866
|
'target_neuron_info' : IDL.Opt(NeuronInfo),
|
|
857
867
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
858
868
|
});
|
|
869
|
+
const SetFollowingResponse = IDL.Record({});
|
|
859
870
|
const MakeProposalResponse = IDL.Record({
|
|
860
871
|
'message' : IDL.Opt(IDL.Text),
|
|
861
872
|
'proposal_id' : IDL.Opt(ProposalId),
|
|
@@ -881,6 +892,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
881
892
|
'RegisterVote' : IDL.Record({}),
|
|
882
893
|
'Merge' : MergeResponse,
|
|
883
894
|
'DisburseToNeuron' : SpawnResponse,
|
|
895
|
+
'SetFollowing' : SetFollowingResponse,
|
|
884
896
|
'MakeProposal' : MakeProposalResponse,
|
|
885
897
|
'StakeMaturity' : StakeMaturityResponse,
|
|
886
898
|
'MergeMaturity' : MergeMaturityResponse,
|
|
@@ -1094,6 +1106,13 @@ export const init = ({ IDL }) => {
|
|
|
1094
1106
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
1095
1107
|
'nonce' : IDL.Nat64,
|
|
1096
1108
|
});
|
|
1109
|
+
const FolloweesForTopic = IDL.Record({
|
|
1110
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
1111
|
+
'followees' : IDL.Opt(IDL.Vec(NeuronId)),
|
|
1112
|
+
});
|
|
1113
|
+
const SetFollowing = IDL.Record({
|
|
1114
|
+
'topic_following' : IDL.Opt(IDL.Vec(FolloweesForTopic)),
|
|
1115
|
+
});
|
|
1097
1116
|
const StakeMaturity = IDL.Record({
|
|
1098
1117
|
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
1099
1118
|
});
|
|
@@ -1114,6 +1133,7 @@ export const init = ({ IDL }) => {
|
|
|
1114
1133
|
'RegisterVote' : RegisterVote,
|
|
1115
1134
|
'Merge' : Merge,
|
|
1116
1135
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
1136
|
+
'SetFollowing' : SetFollowing,
|
|
1117
1137
|
'MakeProposal' : Proposal,
|
|
1118
1138
|
'StakeMaturity' : StakeMaturity,
|
|
1119
1139
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -1435,6 +1455,7 @@ export const init = ({ IDL }) => {
|
|
|
1435
1455
|
'not_dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
|
|
1436
1456
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
1437
1457
|
),
|
|
1458
|
+
'spawning_neurons_count' : IDL.Nat64,
|
|
1438
1459
|
'declining_voting_power_neuron_subset_metrics' : IDL.Opt(
|
|
1439
1460
|
NeuronSubsetMetrics
|
|
1440
1461
|
),
|
|
@@ -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 }
|
|
@@ -216,6 +218,10 @@ export interface Follow {
|
|
|
216
218
|
export interface Followees {
|
|
217
219
|
followees: Array<NeuronId>;
|
|
218
220
|
}
|
|
221
|
+
export interface FolloweesForTopic {
|
|
222
|
+
topic: [] | [number];
|
|
223
|
+
followees: [] | [Array<NeuronId>];
|
|
224
|
+
}
|
|
219
225
|
export interface GetNeuronsFundAuditInfoRequest {
|
|
220
226
|
nns_proposal_id: [] | [ProposalId];
|
|
221
227
|
}
|
|
@@ -272,6 +278,7 @@ export interface GovernanceCachedMetrics {
|
|
|
272
278
|
total_voting_power_non_self_authenticating_controller: [] | [bigint];
|
|
273
279
|
total_staked_maturity_e8s_equivalent: bigint;
|
|
274
280
|
not_dissolving_neurons_e8s_buckets_ect: Array<[bigint, number]>;
|
|
281
|
+
spawning_neurons_count: bigint;
|
|
275
282
|
declining_voting_power_neuron_subset_metrics: [] | [NeuronSubsetMetrics];
|
|
276
283
|
total_staked_e8s_ect: bigint;
|
|
277
284
|
not_dissolving_neurons_staked_maturity_e8s_equivalent_sum: bigint;
|
|
@@ -423,6 +430,7 @@ export type ManageNeuronCommandRequest =
|
|
|
423
430
|
| { RegisterVote: RegisterVote }
|
|
424
431
|
| { Merge: Merge }
|
|
425
432
|
| { DisburseToNeuron: DisburseToNeuron }
|
|
433
|
+
| { SetFollowing: SetFollowing }
|
|
426
434
|
| { MakeProposal: MakeProposalRequest }
|
|
427
435
|
| { StakeMaturity: StakeMaturity }
|
|
428
436
|
| { MergeMaturity: MergeMaturity }
|
|
@@ -811,6 +819,10 @@ export interface SetDefaultFollowees {
|
|
|
811
819
|
export interface SetDissolveTimestamp {
|
|
812
820
|
dissolve_timestamp_seconds: bigint;
|
|
813
821
|
}
|
|
822
|
+
export interface SetFollowing {
|
|
823
|
+
topic_following: [] | [Array<FolloweesForTopic>];
|
|
824
|
+
}
|
|
825
|
+
export type SetFollowingResponse = {};
|
|
814
826
|
export interface SetOpenTimeWindowRequest {
|
|
815
827
|
open_time_window: [] | [TimeWindow];
|
|
816
828
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit e915efe (2025-07-02 tags: release-2025-07-03_03-27-base) 'rs/nns/governance/canister/governance_test.did' by import-candid
|
|
2
2
|
type AccountIdentifier = record {
|
|
3
3
|
hash : blob;
|
|
4
4
|
};
|
|
@@ -139,6 +139,18 @@ type DisburseMaturityResponse = record {
|
|
|
139
139
|
amount_disbursed_e8s : opt nat64;
|
|
140
140
|
};
|
|
141
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
|
+
|
|
142
154
|
type Command = variant {
|
|
143
155
|
Spawn : Spawn;
|
|
144
156
|
Split : Split;
|
|
@@ -154,6 +166,7 @@ type Command = variant {
|
|
|
154
166
|
Disburse : Disburse;
|
|
155
167
|
RefreshVotingPower : RefreshVotingPower;
|
|
156
168
|
DisburseMaturity : DisburseMaturity;
|
|
169
|
+
SetFollowing : SetFollowing;
|
|
157
170
|
};
|
|
158
171
|
|
|
159
172
|
type Command_1 = variant {
|
|
@@ -172,6 +185,7 @@ type Command_1 = variant {
|
|
|
172
185
|
Disburse : DisburseResponse;
|
|
173
186
|
RefreshVotingPower : RefreshVotingPowerResponse;
|
|
174
187
|
DisburseMaturity : DisburseMaturityResponse;
|
|
188
|
+
SetFollowing : SetFollowingResponse;
|
|
175
189
|
};
|
|
176
190
|
|
|
177
191
|
type Command_2 = variant {
|
|
@@ -359,6 +373,7 @@ type GovernanceCachedMetrics = record {
|
|
|
359
373
|
not_dissolving_neurons_e8s_buckets_seed : vec record { nat64; float64 };
|
|
360
374
|
timestamp_seconds : nat64;
|
|
361
375
|
seed_neuron_count : nat64;
|
|
376
|
+
spawning_neurons_count : nat64;
|
|
362
377
|
|
|
363
378
|
non_self_authenticating_controller_neuron_subset_metrics : opt NeuronSubsetMetrics;
|
|
364
379
|
public_neuron_subset_metrics : opt NeuronSubsetMetrics;
|
|
@@ -524,6 +539,7 @@ type ManageNeuronCommandRequest = variant {
|
|
|
524
539
|
Disburse : Disburse;
|
|
525
540
|
RefreshVotingPower : RefreshVotingPower;
|
|
526
541
|
DisburseMaturity : DisburseMaturity;
|
|
542
|
+
SetFollowing : SetFollowing;
|
|
527
543
|
};
|
|
528
544
|
|
|
529
545
|
type ManageNeuronRequest = record {
|
|
@@ -83,6 +83,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
83
83
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
84
84
|
'nonce' : IDL.Nat64,
|
|
85
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
|
+
});
|
|
86
93
|
const StakeMaturity = IDL.Record({
|
|
87
94
|
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
88
95
|
});
|
|
@@ -103,6 +110,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
103
110
|
'RegisterVote' : RegisterVote,
|
|
104
111
|
'Merge' : Merge,
|
|
105
112
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
113
|
+
'SetFollowing' : SetFollowing,
|
|
106
114
|
'MakeProposal' : Proposal,
|
|
107
115
|
'StakeMaturity' : StakeMaturity,
|
|
108
116
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -424,6 +432,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
424
432
|
'not_dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
|
|
425
433
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
426
434
|
),
|
|
435
|
+
'spawning_neurons_count' : IDL.Nat64,
|
|
427
436
|
'declining_voting_power_neuron_subset_metrics' : IDL.Opt(
|
|
428
437
|
NeuronSubsetMetrics
|
|
429
438
|
),
|
|
@@ -830,6 +839,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
830
839
|
'RegisterVote' : RegisterVote,
|
|
831
840
|
'Merge' : Merge,
|
|
832
841
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
842
|
+
'SetFollowing' : SetFollowing,
|
|
833
843
|
'MakeProposal' : MakeProposalRequest,
|
|
834
844
|
'StakeMaturity' : StakeMaturity,
|
|
835
845
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -856,6 +866,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
856
866
|
'target_neuron_info' : IDL.Opt(NeuronInfo),
|
|
857
867
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
858
868
|
});
|
|
869
|
+
const SetFollowingResponse = IDL.Record({});
|
|
859
870
|
const MakeProposalResponse = IDL.Record({
|
|
860
871
|
'message' : IDL.Opt(IDL.Text),
|
|
861
872
|
'proposal_id' : IDL.Opt(ProposalId),
|
|
@@ -881,6 +892,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
881
892
|
'RegisterVote' : IDL.Record({}),
|
|
882
893
|
'Merge' : MergeResponse,
|
|
883
894
|
'DisburseToNeuron' : SpawnResponse,
|
|
895
|
+
'SetFollowing' : SetFollowingResponse,
|
|
884
896
|
'MakeProposal' : MakeProposalResponse,
|
|
885
897
|
'StakeMaturity' : StakeMaturityResponse,
|
|
886
898
|
'MergeMaturity' : MergeMaturityResponse,
|
|
@@ -1110,6 +1122,13 @@ export const init = ({ IDL }) => {
|
|
|
1110
1122
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
1111
1123
|
'nonce' : IDL.Nat64,
|
|
1112
1124
|
});
|
|
1125
|
+
const FolloweesForTopic = IDL.Record({
|
|
1126
|
+
'topic' : IDL.Opt(IDL.Int32),
|
|
1127
|
+
'followees' : IDL.Opt(IDL.Vec(NeuronId)),
|
|
1128
|
+
});
|
|
1129
|
+
const SetFollowing = IDL.Record({
|
|
1130
|
+
'topic_following' : IDL.Opt(IDL.Vec(FolloweesForTopic)),
|
|
1131
|
+
});
|
|
1113
1132
|
const StakeMaturity = IDL.Record({
|
|
1114
1133
|
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
1115
1134
|
});
|
|
@@ -1130,6 +1149,7 @@ export const init = ({ IDL }) => {
|
|
|
1130
1149
|
'RegisterVote' : RegisterVote,
|
|
1131
1150
|
'Merge' : Merge,
|
|
1132
1151
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
1152
|
+
'SetFollowing' : SetFollowing,
|
|
1133
1153
|
'MakeProposal' : Proposal,
|
|
1134
1154
|
'StakeMaturity' : StakeMaturity,
|
|
1135
1155
|
'MergeMaturity' : MergeMaturity,
|
|
@@ -1451,6 +1471,7 @@ export const init = ({ IDL }) => {
|
|
|
1451
1471
|
'not_dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
|
|
1452
1472
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
1453
1473
|
),
|
|
1474
|
+
'spawning_neurons_count' : IDL.Nat64,
|
|
1454
1475
|
'declining_voting_power_neuron_subset_metrics' : IDL.Opt(
|
|
1455
1476
|
NeuronSubsetMetrics
|
|
1456
1477
|
),
|
package/dist/candid/sns_wasm.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit e915efe (2025-07-02 tags: release-2025-07-03_03-27-base) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
|
|
2
2
|
type AddWasmRequest = record {
|
|
3
3
|
hash : blob;
|
|
4
4
|
wasm : opt SnsWasm;
|