@dfinity/nns 5.1.2 → 5.2.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 +37 -35
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +70 -13
- package/dist/candid/governance.d.ts +26 -5
- package/dist/candid/governance.did +25 -4
- package/dist/candid/governance.idl.js +70 -13
- package/dist/candid/governance_test.certified.idl.js +70 -13
- package/dist/candid/governance_test.d.ts +26 -5
- package/dist/candid/governance_test.did +25 -4
- package/dist/candid/governance_test.idl.js +70 -13
- package/dist/candid/old_list_neurons_service.certified.idl.d.ts +2 -0
- package/dist/candid/old_list_neurons_service.certified.idl.js +78 -0
- package/dist/candid/sns_wasm.did +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/chunk-ZSTGGZGS.js +19 -0
- package/dist/esm/chunk-ZSTGGZGS.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 +4 -1
- package/dist/types/canisters/governance/response.converters.d.ts +8 -1
- package/dist/types/enums/governance.enums.d.ts +3 -1
- package/dist/types/governance.canister.d.ts +4 -1
- package/dist/types/governance_test.canister.d.ts +2 -1
- package/dist/types/types/governance.options.d.ts +2 -0
- package/package.json +6 -6
- package/dist/esm/chunk-AN6DZS5M.js +0 -19
- package/dist/esm/chunk-AN6DZS5M.js.map +0 -7
|
@@ -308,9 +308,34 @@ export const idlFactory = ({ IDL }) => {
|
|
|
308
308
|
'caller' : IDL.Opt(IDL.Principal),
|
|
309
309
|
'proposer_id' : IDL.Opt(NeuronId),
|
|
310
310
|
});
|
|
311
|
-
const
|
|
311
|
+
const XdrConversionRate = IDL.Record({
|
|
312
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
313
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
314
|
+
});
|
|
315
|
+
const MonthlyNodeProviderRewards = IDL.Record({
|
|
316
|
+
'minimum_xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
317
|
+
'registry_version' : IDL.Opt(IDL.Nat64),
|
|
318
|
+
'node_providers' : IDL.Vec(NodeProvider),
|
|
312
319
|
'timestamp' : IDL.Nat64,
|
|
313
320
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
321
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
322
|
+
'maximum_node_provider_rewards_e8s' : IDL.Opt(IDL.Nat64),
|
|
323
|
+
});
|
|
324
|
+
const NeuronSubsetMetrics = IDL.Record({
|
|
325
|
+
'total_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
326
|
+
'maturity_e8s_equivalent_buckets' : IDL.Vec(
|
|
327
|
+
IDL.Tuple(IDL.Nat64, IDL.Nat64)
|
|
328
|
+
),
|
|
329
|
+
'voting_power_buckets' : IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
330
|
+
'total_staked_e8s' : IDL.Opt(IDL.Nat64),
|
|
331
|
+
'count' : IDL.Opt(IDL.Nat64),
|
|
332
|
+
'total_staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
333
|
+
'staked_maturity_e8s_equivalent_buckets' : IDL.Vec(
|
|
334
|
+
IDL.Tuple(IDL.Nat64, IDL.Nat64)
|
|
335
|
+
),
|
|
336
|
+
'staked_e8s_buckets' : IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
337
|
+
'total_voting_power' : IDL.Opt(IDL.Nat64),
|
|
338
|
+
'count_buckets' : IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
314
339
|
});
|
|
315
340
|
const GovernanceCachedMetrics = IDL.Record({
|
|
316
341
|
'total_maturity_e8s_equivalent' : IDL.Nat64,
|
|
@@ -337,6 +362,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
337
362
|
'not_dissolving_neurons_count' : IDL.Nat64,
|
|
338
363
|
'total_locked_e8s' : IDL.Nat64,
|
|
339
364
|
'neurons_fund_total_active_neurons' : IDL.Nat64,
|
|
365
|
+
'total_voting_power_non_self_authenticating_controller' : IDL.Opt(
|
|
366
|
+
IDL.Nat64
|
|
367
|
+
),
|
|
340
368
|
'total_staked_maturity_e8s_equivalent' : IDL.Nat64,
|
|
341
369
|
'not_dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
|
|
342
370
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
@@ -344,6 +372,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
344
372
|
'total_staked_e8s_ect' : IDL.Nat64,
|
|
345
373
|
'not_dissolving_neurons_staked_maturity_e8s_equivalent_sum' : IDL.Nat64,
|
|
346
374
|
'dissolved_neurons_e8s' : IDL.Nat64,
|
|
375
|
+
'total_staked_e8s_non_self_authenticating_controller' : IDL.Opt(IDL.Nat64),
|
|
347
376
|
'dissolving_neurons_e8s_buckets_seed' : IDL.Vec(
|
|
348
377
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
349
378
|
),
|
|
@@ -357,6 +386,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
357
386
|
'dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
|
|
358
387
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
359
388
|
),
|
|
389
|
+
'non_self_authenticating_controller_neuron_subset_metrics' : IDL.Opt(
|
|
390
|
+
NeuronSubsetMetrics
|
|
391
|
+
),
|
|
360
392
|
'dissolving_neurons_count' : IDL.Nat64,
|
|
361
393
|
'dissolving_neurons_e8s_buckets' : IDL.Vec(
|
|
362
394
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
@@ -518,10 +550,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
518
550
|
IDL.Nat64
|
|
519
551
|
),
|
|
520
552
|
});
|
|
521
|
-
const XdrConversionRate = IDL.Record({
|
|
522
|
-
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
523
|
-
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
524
|
-
});
|
|
525
553
|
const Command_2 = IDL.Variant({
|
|
526
554
|
'Spawn' : NeuronId,
|
|
527
555
|
'Split' : Split,
|
|
@@ -572,7 +600,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
572
600
|
'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
573
601
|
'making_sns_proposal' : IDL.Opt(MakingSnsProposal),
|
|
574
602
|
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
575
|
-
|
|
603
|
+
MonthlyNodeProviderRewards
|
|
576
604
|
),
|
|
577
605
|
'maturity_modulation_last_updated_at_timestamp_seconds' : IDL.Opt(
|
|
578
606
|
IDL.Nat64
|
|
@@ -670,6 +698,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
670
698
|
});
|
|
671
699
|
const ListNeurons = IDL.Record({
|
|
672
700
|
'neuron_ids' : IDL.Vec(IDL.Nat64),
|
|
701
|
+
'include_empty_neurons_readable_by_caller' : IDL.Opt(IDL.Bool),
|
|
673
702
|
'include_neurons_readable_by_caller' : IDL.Bool,
|
|
674
703
|
});
|
|
675
704
|
const ListNeuronsResponse = IDL.Record({
|
|
@@ -795,7 +824,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
795
824
|
'get_monthly_node_provider_rewards' : IDL.Func([], [Result_4], []),
|
|
796
825
|
'get_most_recent_monthly_node_provider_rewards' : IDL.Func(
|
|
797
826
|
[],
|
|
798
|
-
[IDL.Opt(
|
|
827
|
+
[IDL.Opt(MonthlyNodeProviderRewards)],
|
|
799
828
|
['query'],
|
|
800
829
|
),
|
|
801
830
|
'get_network_economics_parameters' : IDL.Func(
|
|
@@ -1169,9 +1198,34 @@ export const init = ({ IDL }) => {
|
|
|
1169
1198
|
'caller' : IDL.Opt(IDL.Principal),
|
|
1170
1199
|
'proposer_id' : IDL.Opt(NeuronId),
|
|
1171
1200
|
});
|
|
1172
|
-
const
|
|
1201
|
+
const XdrConversionRate = IDL.Record({
|
|
1202
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1203
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1204
|
+
});
|
|
1205
|
+
const MonthlyNodeProviderRewards = IDL.Record({
|
|
1206
|
+
'minimum_xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1207
|
+
'registry_version' : IDL.Opt(IDL.Nat64),
|
|
1208
|
+
'node_providers' : IDL.Vec(NodeProvider),
|
|
1173
1209
|
'timestamp' : IDL.Nat64,
|
|
1174
1210
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
1211
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
1212
|
+
'maximum_node_provider_rewards_e8s' : IDL.Opt(IDL.Nat64),
|
|
1213
|
+
});
|
|
1214
|
+
const NeuronSubsetMetrics = IDL.Record({
|
|
1215
|
+
'total_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
1216
|
+
'maturity_e8s_equivalent_buckets' : IDL.Vec(
|
|
1217
|
+
IDL.Tuple(IDL.Nat64, IDL.Nat64)
|
|
1218
|
+
),
|
|
1219
|
+
'voting_power_buckets' : IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
1220
|
+
'total_staked_e8s' : IDL.Opt(IDL.Nat64),
|
|
1221
|
+
'count' : IDL.Opt(IDL.Nat64),
|
|
1222
|
+
'total_staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
1223
|
+
'staked_maturity_e8s_equivalent_buckets' : IDL.Vec(
|
|
1224
|
+
IDL.Tuple(IDL.Nat64, IDL.Nat64)
|
|
1225
|
+
),
|
|
1226
|
+
'staked_e8s_buckets' : IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
1227
|
+
'total_voting_power' : IDL.Opt(IDL.Nat64),
|
|
1228
|
+
'count_buckets' : IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
1175
1229
|
});
|
|
1176
1230
|
const GovernanceCachedMetrics = IDL.Record({
|
|
1177
1231
|
'total_maturity_e8s_equivalent' : IDL.Nat64,
|
|
@@ -1198,6 +1252,9 @@ export const init = ({ IDL }) => {
|
|
|
1198
1252
|
'not_dissolving_neurons_count' : IDL.Nat64,
|
|
1199
1253
|
'total_locked_e8s' : IDL.Nat64,
|
|
1200
1254
|
'neurons_fund_total_active_neurons' : IDL.Nat64,
|
|
1255
|
+
'total_voting_power_non_self_authenticating_controller' : IDL.Opt(
|
|
1256
|
+
IDL.Nat64
|
|
1257
|
+
),
|
|
1201
1258
|
'total_staked_maturity_e8s_equivalent' : IDL.Nat64,
|
|
1202
1259
|
'not_dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
|
|
1203
1260
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
@@ -1205,6 +1262,7 @@ export const init = ({ IDL }) => {
|
|
|
1205
1262
|
'total_staked_e8s_ect' : IDL.Nat64,
|
|
1206
1263
|
'not_dissolving_neurons_staked_maturity_e8s_equivalent_sum' : IDL.Nat64,
|
|
1207
1264
|
'dissolved_neurons_e8s' : IDL.Nat64,
|
|
1265
|
+
'total_staked_e8s_non_self_authenticating_controller' : IDL.Opt(IDL.Nat64),
|
|
1208
1266
|
'dissolving_neurons_e8s_buckets_seed' : IDL.Vec(
|
|
1209
1267
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
1210
1268
|
),
|
|
@@ -1218,6 +1276,9 @@ export const init = ({ IDL }) => {
|
|
|
1218
1276
|
'dissolving_neurons_e8s_buckets_ect' : IDL.Vec(
|
|
1219
1277
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
1220
1278
|
),
|
|
1279
|
+
'non_self_authenticating_controller_neuron_subset_metrics' : IDL.Opt(
|
|
1280
|
+
NeuronSubsetMetrics
|
|
1281
|
+
),
|
|
1221
1282
|
'dissolving_neurons_count' : IDL.Nat64,
|
|
1222
1283
|
'dissolving_neurons_e8s_buckets' : IDL.Vec(
|
|
1223
1284
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
@@ -1379,10 +1440,6 @@ export const init = ({ IDL }) => {
|
|
|
1379
1440
|
IDL.Nat64
|
|
1380
1441
|
),
|
|
1381
1442
|
});
|
|
1382
|
-
const XdrConversionRate = IDL.Record({
|
|
1383
|
-
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1384
|
-
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1385
|
-
});
|
|
1386
1443
|
const Command_2 = IDL.Variant({
|
|
1387
1444
|
'Spawn' : NeuronId,
|
|
1388
1445
|
'Split' : Split,
|
|
@@ -1433,7 +1490,7 @@ export const init = ({ IDL }) => {
|
|
|
1433
1490
|
'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
1434
1491
|
'making_sns_proposal' : IDL.Opt(MakingSnsProposal),
|
|
1435
1492
|
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
1436
|
-
|
|
1493
|
+
MonthlyNodeProviderRewards
|
|
1437
1494
|
),
|
|
1438
1495
|
'maturity_modulation_last_updated_at_timestamp_seconds' : IDL.Opt(
|
|
1439
1496
|
IDL.Nat64
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// This file was created manually by taking governance.certified.idl.js and
|
|
2
|
+
// removing everything that isn't needed for `list_neurons` and then removing
|
|
3
|
+
// `include_empty_neurons_readable_by_caller` from `ListNeurons`.
|
|
4
|
+
// The Ledger hardware wallet doesn't support the
|
|
5
|
+
// `include_empty_neurons_readable_by_caller` field, even when it's not set, so
|
|
6
|
+
// we use this service for compatibility with the hardware wallet.
|
|
7
|
+
export const idlFactory = ({ IDL }) => {
|
|
8
|
+
const NeuronId = IDL.Record({ id: IDL.Nat64 });
|
|
9
|
+
const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
|
|
10
|
+
const KnownNeuronData = IDL.Record({
|
|
11
|
+
name: IDL.Text,
|
|
12
|
+
description: IDL.Opt(IDL.Text),
|
|
13
|
+
});
|
|
14
|
+
const NeuronStakeTransfer = IDL.Record({
|
|
15
|
+
to_subaccount: IDL.Vec(IDL.Nat8),
|
|
16
|
+
neuron_stake_e8s: IDL.Nat64,
|
|
17
|
+
from: IDL.Opt(IDL.Principal),
|
|
18
|
+
memo: IDL.Nat64,
|
|
19
|
+
from_subaccount: IDL.Vec(IDL.Nat8),
|
|
20
|
+
transfer_timestamp: IDL.Nat64,
|
|
21
|
+
block_height: IDL.Nat64,
|
|
22
|
+
});
|
|
23
|
+
const BallotInfo = IDL.Record({
|
|
24
|
+
vote: IDL.Int32,
|
|
25
|
+
proposal_id: IDL.Opt(NeuronId),
|
|
26
|
+
});
|
|
27
|
+
const DissolveState = IDL.Variant({
|
|
28
|
+
DissolveDelaySeconds: IDL.Nat64,
|
|
29
|
+
WhenDissolvedTimestampSeconds: IDL.Nat64,
|
|
30
|
+
});
|
|
31
|
+
const Neuron = IDL.Record({
|
|
32
|
+
id: IDL.Opt(NeuronId),
|
|
33
|
+
staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
|
|
34
|
+
controller: IDL.Opt(IDL.Principal),
|
|
35
|
+
recent_ballots: IDL.Vec(BallotInfo),
|
|
36
|
+
kyc_verified: IDL.Bool,
|
|
37
|
+
neuron_type: IDL.Opt(IDL.Int32),
|
|
38
|
+
not_for_profit: IDL.Bool,
|
|
39
|
+
maturity_e8s_equivalent: IDL.Nat64,
|
|
40
|
+
cached_neuron_stake_e8s: IDL.Nat64,
|
|
41
|
+
created_timestamp_seconds: IDL.Nat64,
|
|
42
|
+
auto_stake_maturity: IDL.Opt(IDL.Bool),
|
|
43
|
+
aging_since_timestamp_seconds: IDL.Nat64,
|
|
44
|
+
hot_keys: IDL.Vec(IDL.Principal),
|
|
45
|
+
account: IDL.Vec(IDL.Nat8),
|
|
46
|
+
joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
47
|
+
dissolve_state: IDL.Opt(DissolveState),
|
|
48
|
+
followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
49
|
+
neuron_fees_e8s: IDL.Nat64,
|
|
50
|
+
transfer: IDL.Opt(NeuronStakeTransfer),
|
|
51
|
+
known_neuron_data: IDL.Opt(KnownNeuronData),
|
|
52
|
+
spawn_at_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
53
|
+
});
|
|
54
|
+
const NeuronInfo = IDL.Record({
|
|
55
|
+
dissolve_delay_seconds: IDL.Nat64,
|
|
56
|
+
recent_ballots: IDL.Vec(BallotInfo),
|
|
57
|
+
neuron_type: IDL.Opt(IDL.Int32),
|
|
58
|
+
created_timestamp_seconds: IDL.Nat64,
|
|
59
|
+
state: IDL.Int32,
|
|
60
|
+
stake_e8s: IDL.Nat64,
|
|
61
|
+
joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
62
|
+
retrieved_at_timestamp_seconds: IDL.Nat64,
|
|
63
|
+
known_neuron_data: IDL.Opt(KnownNeuronData),
|
|
64
|
+
voting_power: IDL.Nat64,
|
|
65
|
+
age_seconds: IDL.Nat64,
|
|
66
|
+
});
|
|
67
|
+
const ListNeurons = IDL.Record({
|
|
68
|
+
neuron_ids: IDL.Vec(IDL.Nat64),
|
|
69
|
+
include_neurons_readable_by_caller: IDL.Bool,
|
|
70
|
+
});
|
|
71
|
+
const ListNeuronsResponse = IDL.Record({
|
|
72
|
+
neuron_infos: IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInfo)),
|
|
73
|
+
full_neurons: IDL.Vec(Neuron),
|
|
74
|
+
});
|
|
75
|
+
return IDL.Service({
|
|
76
|
+
list_neurons: IDL.Func([ListNeurons], [ListNeuronsResponse], []),
|
|
77
|
+
});
|
|
78
|
+
};
|
package/dist/candid/sns_wasm.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit a3831c8 (2024-07-11 tags: release-2024-07-10_23-01-base) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
|
|
2
2
|
type AddWasmRequest = record { hash : blob; wasm : opt SnsWasm };
|
|
3
3
|
type AddWasmResponse = record { result : opt Result };
|
|
4
4
|
type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution };
|