@dfinity/nns 4.0.2 → 5.0.0-next-2024-05-10
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 +32 -32
- package/dist/candid/genesis_token.d.ts +3 -0
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +64 -0
- package/dist/candid/governance.d.ts +38 -0
- package/dist/candid/governance.did +42 -12
- package/dist/candid/governance.idl.js +68 -0
- package/dist/candid/governance_test.certified.idl.js +64 -0
- package/dist/candid/governance_test.d.ts +38 -0
- package/dist/candid/governance_test.did +42 -12
- package/dist/candid/governance_test.idl.js +68 -0
- package/dist/candid/sns_wasm.certified.idl.js +16 -0
- package/dist/candid/sns_wasm.d.ts +22 -0
- package/dist/candid/sns_wasm.did +24 -12
- package/dist/candid/sns_wasm.idl.js +16 -0
- package/dist/cjs/index.cjs.js +1 -2
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/chunk-AN6DZS5M.js +19 -0
- package/dist/esm/chunk-AN6DZS5M.js.map +7 -0
- package/dist/esm/chunk-IDYCQLH5.js +2 -0
- package/dist/esm/chunk-IDYCQLH5.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 +4 -4
- package/dist/esm/sns_wasm.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +7 -7
- package/dist/types/canisters/governance/response.converters.d.ts +1 -6
- package/dist/types/enums/governance.enums.d.ts +6 -1
- package/dist/types/errors/governance.errors.d.ts +0 -2
- package/dist/types/governance.canister.d.ts +16 -28
- package/dist/types/sns_wasm.canister.d.ts +1 -1
- package/dist/types/types/governance_converters.d.ts +15 -0
- package/package.json +7 -8
- package/dist/esm/chunk-4ZPVMCGL.js +0 -2
- package/dist/esm/chunk-4ZPVMCGL.js.map +0 -7
- package/dist/esm/chunk-LZ5FA3UO.js +0 -20
- package/dist/esm/chunk-LZ5FA3UO.js.map +0 -7
- package/dist/types/canisters/governance/request.proto.converters.d.ts +0 -16
- package/dist/types/canisters/governance/response.proto.converters.d.ts +0 -1
- package/dist/types/utils/proto.utils.d.ts +0 -25
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
2
|
-
type AccountIdentifier = record { hash :
|
|
1
|
+
// Generated from IC repo commit f58424c (2024-04-24 tags: release-2024-05-01_23-01-storage-layer) 'rs/nns/governance/canister/governance.did' by import-candid
|
|
2
|
+
type AccountIdentifier = record { hash : blob };
|
|
3
3
|
type Action = variant {
|
|
4
4
|
RegisterKnownNeuron : KnownNeuron;
|
|
5
5
|
ManageNeuron : ManageNeuron;
|
|
@@ -34,7 +34,7 @@ type CanisterStatusResultV2 = record {
|
|
|
34
34
|
memory_size : opt nat64;
|
|
35
35
|
cycles : opt nat64;
|
|
36
36
|
idle_cycles_burned_per_day : opt nat64;
|
|
37
|
-
module_hash :
|
|
37
|
+
module_hash : blob;
|
|
38
38
|
};
|
|
39
39
|
type CanisterSummary = record {
|
|
40
40
|
status : opt CanisterStatusResultV2;
|
|
@@ -124,6 +124,7 @@ type CreateServiceNervousSystem = record {
|
|
|
124
124
|
swap_parameters : opt SwapParameters;
|
|
125
125
|
initial_token_distribution : opt InitialTokenDistribution;
|
|
126
126
|
};
|
|
127
|
+
type Decimal = record { human_readable : opt text };
|
|
127
128
|
type DerivedProposalInformation = record {
|
|
128
129
|
swap_background_information : opt SwapBackgroundInformation;
|
|
129
130
|
};
|
|
@@ -147,7 +148,7 @@ type DissolveState = variant {
|
|
|
147
148
|
WhenDissolvedTimestampSeconds : nat64;
|
|
148
149
|
};
|
|
149
150
|
type Duration = record { seconds : opt nat64 };
|
|
150
|
-
type ExecuteNnsFunction = record { nns_function : int32; payload :
|
|
151
|
+
type ExecuteNnsFunction = record { nns_function : int32; payload : blob };
|
|
151
152
|
type Follow = record { topic : int32; followees : vec NeuronId };
|
|
152
153
|
type Followees = record { followees : vec NeuronId };
|
|
153
154
|
type Followers = record { followers : vec NeuronId };
|
|
@@ -166,6 +167,7 @@ type Governance = record {
|
|
|
166
167
|
node_providers : vec NodeProvider;
|
|
167
168
|
cached_daily_maturity_modulation_basis_points : opt int32;
|
|
168
169
|
economics : opt NetworkEconomics;
|
|
170
|
+
restore_aging_summary : opt RestoreAgingSummary;
|
|
169
171
|
spawning_neurons : opt bool;
|
|
170
172
|
latest_reward_event : opt RewardEvent;
|
|
171
173
|
to_claim_transfers : vec NeuronStakeTransfer;
|
|
@@ -173,6 +175,7 @@ type Governance = record {
|
|
|
173
175
|
topic_followee_index : vec record { int32; FollowersMap };
|
|
174
176
|
migrations : opt Migrations;
|
|
175
177
|
proposals : vec record { nat64; ProposalData };
|
|
178
|
+
xdr_conversion_rate : opt XdrConversionRate;
|
|
176
179
|
in_flight_commands : vec record { nat64; NeuronInFlightCommand };
|
|
177
180
|
neurons : vec record { nat64; Neuron };
|
|
178
181
|
genesis_timestamp_seconds : nat64;
|
|
@@ -276,7 +279,10 @@ type ListProposalInfo = record {
|
|
|
276
279
|
include_status : vec int32;
|
|
277
280
|
};
|
|
278
281
|
type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo };
|
|
279
|
-
type MakeProposalResponse = record {
|
|
282
|
+
type MakeProposalResponse = record {
|
|
283
|
+
message : opt text;
|
|
284
|
+
proposal_id : opt NeuronId;
|
|
285
|
+
};
|
|
280
286
|
type MakingSnsProposal = record {
|
|
281
287
|
proposal : opt Proposal;
|
|
282
288
|
caller : opt principal;
|
|
@@ -323,6 +329,7 @@ type NetworkEconomics = record {
|
|
|
323
329
|
neuron_spawn_dissolve_delay_seconds : nat64;
|
|
324
330
|
minimum_icp_xdr_rate : nat64;
|
|
325
331
|
maximum_node_provider_rewards_e8s : nat64;
|
|
332
|
+
neurons_fund_economics : opt NeuronsFundEconomics;
|
|
326
333
|
};
|
|
327
334
|
type Neuron = record {
|
|
328
335
|
id : opt NeuronId;
|
|
@@ -338,7 +345,7 @@ type Neuron = record {
|
|
|
338
345
|
auto_stake_maturity : opt bool;
|
|
339
346
|
aging_since_timestamp_seconds : nat64;
|
|
340
347
|
hot_keys : vec principal;
|
|
341
|
-
account :
|
|
348
|
+
account : blob;
|
|
342
349
|
joined_community_fund_timestamp_seconds : opt nat64;
|
|
343
350
|
dissolve_state : opt DissolveState;
|
|
344
351
|
followees : vec record { int32; Followees };
|
|
@@ -363,10 +370,7 @@ type NeuronDistribution = record {
|
|
|
363
370
|
stake : opt Tokens;
|
|
364
371
|
};
|
|
365
372
|
type NeuronId = record { id : nat64 };
|
|
366
|
-
type NeuronIdOrSubaccount = variant {
|
|
367
|
-
Subaccount : vec nat8;
|
|
368
|
-
NeuronId : NeuronId;
|
|
369
|
-
};
|
|
373
|
+
type NeuronIdOrSubaccount = variant { Subaccount : blob; NeuronId : NeuronId };
|
|
370
374
|
type NeuronInFlightCommand = record {
|
|
371
375
|
command : opt Command_2;
|
|
372
376
|
timestamp : nat64;
|
|
@@ -385,11 +389,11 @@ type NeuronInfo = record {
|
|
|
385
389
|
age_seconds : nat64;
|
|
386
390
|
};
|
|
387
391
|
type NeuronStakeTransfer = record {
|
|
388
|
-
to_subaccount :
|
|
392
|
+
to_subaccount : blob;
|
|
389
393
|
neuron_stake_e8s : nat64;
|
|
390
394
|
from : opt principal;
|
|
391
395
|
memo : nat64;
|
|
392
|
-
from_subaccount :
|
|
396
|
+
from_subaccount : blob;
|
|
393
397
|
transfer_timestamp : nat64;
|
|
394
398
|
block_height : nat64;
|
|
395
399
|
};
|
|
@@ -403,6 +407,17 @@ type NeuronsFundData = record {
|
|
|
403
407
|
initial_neurons_fund_participation : opt NeuronsFundParticipation;
|
|
404
408
|
neurons_fund_refunds : opt NeuronsFundSnapshot;
|
|
405
409
|
};
|
|
410
|
+
type NeuronsFundEconomics = record {
|
|
411
|
+
maximum_icp_xdr_rate : opt Percentage;
|
|
412
|
+
neurons_fund_matched_funding_curve_coefficients : opt NeuronsFundMatchedFundingCurveCoefficients;
|
|
413
|
+
max_theoretical_neurons_fund_participation_amount_xdr : opt Decimal;
|
|
414
|
+
minimum_icp_xdr_rate : opt Percentage;
|
|
415
|
+
};
|
|
416
|
+
type NeuronsFundMatchedFundingCurveCoefficients = record {
|
|
417
|
+
contribution_threshold_xdr : opt Decimal;
|
|
418
|
+
one_third_participation_milestone_xdr : opt Decimal;
|
|
419
|
+
full_participation_milestone_xdr : opt Decimal;
|
|
420
|
+
};
|
|
406
421
|
type NeuronsFundNeuron = record {
|
|
407
422
|
hotkey_principal : opt text;
|
|
408
423
|
is_capped : opt bool;
|
|
@@ -513,6 +528,16 @@ type ProposalInfo = record {
|
|
|
513
528
|
};
|
|
514
529
|
type RegisterVote = record { vote : int32; proposal : opt NeuronId };
|
|
515
530
|
type RemoveHotKey = record { hot_key_to_remove : opt principal };
|
|
531
|
+
type RestoreAgingNeuronGroup = record {
|
|
532
|
+
count : opt nat64;
|
|
533
|
+
previous_total_stake_e8s : opt nat64;
|
|
534
|
+
current_total_stake_e8s : opt nat64;
|
|
535
|
+
group_type : int32;
|
|
536
|
+
};
|
|
537
|
+
type RestoreAgingSummary = record {
|
|
538
|
+
groups : vec RestoreAgingNeuronGroup;
|
|
539
|
+
timestamp_seconds : opt nat64;
|
|
540
|
+
};
|
|
516
541
|
type Result = variant { Ok; Err : GovernanceError };
|
|
517
542
|
type Result_1 = variant { Error : GovernanceError; NeuronId : NeuronId };
|
|
518
543
|
type Result_10 = variant { Ok : Ok_1; Err : GovernanceError };
|
|
@@ -629,6 +654,10 @@ type VotingRewardParameters = record {
|
|
|
629
654
|
final_reward_rate : opt Percentage;
|
|
630
655
|
};
|
|
631
656
|
type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 };
|
|
657
|
+
type XdrConversionRate = record {
|
|
658
|
+
xdr_permyriad_per_icp : opt nat64;
|
|
659
|
+
timestamp_seconds : opt nat64;
|
|
660
|
+
};
|
|
632
661
|
service : (Governance) -> {
|
|
633
662
|
claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
|
|
634
663
|
claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (
|
|
@@ -657,6 +686,7 @@ service : (Governance) -> {
|
|
|
657
686
|
get_node_provider_by_caller : (null) -> (Result_7) query;
|
|
658
687
|
get_pending_proposals : () -> (vec ProposalInfo) query;
|
|
659
688
|
get_proposal_info : (nat64) -> (opt ProposalInfo) query;
|
|
689
|
+
get_restore_aging_summary : () -> (RestoreAgingSummary) query;
|
|
660
690
|
list_known_neurons : () -> (ListKnownNeuronsResponse) query;
|
|
661
691
|
list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
|
|
662
692
|
list_node_providers : () -> (ListNodeProvidersResponse) query;
|
|
@@ -246,6 +246,20 @@ export const idlFactory = ({ IDL }) => {
|
|
|
246
246
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
247
247
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
248
248
|
});
|
|
249
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
250
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
251
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
252
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
253
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
254
|
+
});
|
|
255
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
256
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
257
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
258
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
259
|
+
),
|
|
260
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
261
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
262
|
+
});
|
|
249
263
|
const NetworkEconomics = IDL.Record({
|
|
250
264
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
251
265
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -255,6 +269,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
255
269
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
256
270
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
257
271
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
272
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
258
273
|
});
|
|
259
274
|
const ApproveGenesisKyc = IDL.Record({
|
|
260
275
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -354,6 +369,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
354
369
|
'timestamp_seconds' : IDL.Nat64,
|
|
355
370
|
'seed_neuron_count' : IDL.Nat64,
|
|
356
371
|
});
|
|
372
|
+
const RestoreAgingNeuronGroup = IDL.Record({
|
|
373
|
+
'count' : IDL.Opt(IDL.Nat64),
|
|
374
|
+
'previous_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
375
|
+
'current_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
376
|
+
'group_type' : IDL.Int32,
|
|
377
|
+
});
|
|
378
|
+
const RestoreAgingSummary = IDL.Record({
|
|
379
|
+
'groups' : IDL.Vec(RestoreAgingNeuronGroup),
|
|
380
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
381
|
+
});
|
|
357
382
|
const RewardEvent = IDL.Record({
|
|
358
383
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
359
384
|
'day_after_genesis' : IDL.Nat64,
|
|
@@ -493,6 +518,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
493
518
|
IDL.Nat64
|
|
494
519
|
),
|
|
495
520
|
});
|
|
521
|
+
const XdrConversionRate = IDL.Record({
|
|
522
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
523
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
524
|
+
});
|
|
496
525
|
const Command_2 = IDL.Variant({
|
|
497
526
|
'Spawn' : NeuronId,
|
|
498
527
|
'Split' : Split,
|
|
@@ -554,6 +583,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
554
583
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
555
584
|
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
556
585
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
586
|
+
'restore_aging_summary' : IDL.Opt(RestoreAgingSummary),
|
|
557
587
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
558
588
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
559
589
|
'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
|
|
@@ -561,6 +591,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
561
591
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
562
592
|
'migrations' : IDL.Opt(Migrations),
|
|
563
593
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
594
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
564
595
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
565
596
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
566
597
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -671,6 +702,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
671
702
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
672
703
|
});
|
|
673
704
|
const MakeProposalResponse = IDL.Record({
|
|
705
|
+
'message' : IDL.Opt(IDL.Text),
|
|
674
706
|
'proposal_id' : IDL.Opt(NeuronId),
|
|
675
707
|
});
|
|
676
708
|
const StakeMaturityResponse = IDL.Record({
|
|
@@ -790,6 +822,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
790
822
|
[IDL.Opt(ProposalInfo)],
|
|
791
823
|
['query'],
|
|
792
824
|
),
|
|
825
|
+
'get_restore_aging_summary' : IDL.Func(
|
|
826
|
+
[],
|
|
827
|
+
[RestoreAgingSummary],
|
|
828
|
+
['query'],
|
|
829
|
+
),
|
|
793
830
|
'list_known_neurons' : IDL.Func([], [ListKnownNeuronsResponse], ['query']),
|
|
794
831
|
'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
|
|
795
832
|
'list_node_providers' : IDL.Func(
|
|
@@ -1069,6 +1106,20 @@ export const init = ({ IDL }) => {
|
|
|
1069
1106
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
1070
1107
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
1071
1108
|
});
|
|
1109
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
1110
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
1111
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
1112
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1113
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1114
|
+
});
|
|
1115
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
1116
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1117
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
1118
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
1119
|
+
),
|
|
1120
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
1121
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1122
|
+
});
|
|
1072
1123
|
const NetworkEconomics = IDL.Record({
|
|
1073
1124
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
1074
1125
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -1078,6 +1129,7 @@ export const init = ({ IDL }) => {
|
|
|
1078
1129
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
1079
1130
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
1080
1131
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
1132
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
1081
1133
|
});
|
|
1082
1134
|
const ApproveGenesisKyc = IDL.Record({
|
|
1083
1135
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -1177,6 +1229,16 @@ export const init = ({ IDL }) => {
|
|
|
1177
1229
|
'timestamp_seconds' : IDL.Nat64,
|
|
1178
1230
|
'seed_neuron_count' : IDL.Nat64,
|
|
1179
1231
|
});
|
|
1232
|
+
const RestoreAgingNeuronGroup = IDL.Record({
|
|
1233
|
+
'count' : IDL.Opt(IDL.Nat64),
|
|
1234
|
+
'previous_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
1235
|
+
'current_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
1236
|
+
'group_type' : IDL.Int32,
|
|
1237
|
+
});
|
|
1238
|
+
const RestoreAgingSummary = IDL.Record({
|
|
1239
|
+
'groups' : IDL.Vec(RestoreAgingNeuronGroup),
|
|
1240
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1241
|
+
});
|
|
1180
1242
|
const RewardEvent = IDL.Record({
|
|
1181
1243
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
1182
1244
|
'day_after_genesis' : IDL.Nat64,
|
|
@@ -1316,6 +1378,10 @@ export const init = ({ IDL }) => {
|
|
|
1316
1378
|
IDL.Nat64
|
|
1317
1379
|
),
|
|
1318
1380
|
});
|
|
1381
|
+
const XdrConversionRate = IDL.Record({
|
|
1382
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1383
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1384
|
+
});
|
|
1319
1385
|
const Command_2 = IDL.Variant({
|
|
1320
1386
|
'Spawn' : NeuronId,
|
|
1321
1387
|
'Split' : Split,
|
|
@@ -1377,6 +1443,7 @@ export const init = ({ IDL }) => {
|
|
|
1377
1443
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
1378
1444
|
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
1379
1445
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
1446
|
+
'restore_aging_summary' : IDL.Opt(RestoreAgingSummary),
|
|
1380
1447
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
1381
1448
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
1382
1449
|
'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
|
|
@@ -1384,6 +1451,7 @@ export const init = ({ IDL }) => {
|
|
|
1384
1451
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
1385
1452
|
'migrations' : IDL.Opt(Migrations),
|
|
1386
1453
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
1454
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
1387
1455
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
1388
1456
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
1389
1457
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -246,6 +246,20 @@ export const idlFactory = ({ IDL }) => {
|
|
|
246
246
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
247
247
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
248
248
|
});
|
|
249
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
250
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
251
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
252
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
253
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
254
|
+
});
|
|
255
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
256
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
257
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
258
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
259
|
+
),
|
|
260
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
261
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
262
|
+
});
|
|
249
263
|
const NetworkEconomics = IDL.Record({
|
|
250
264
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
251
265
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -255,6 +269,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
255
269
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
256
270
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
257
271
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
272
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
258
273
|
});
|
|
259
274
|
const ApproveGenesisKyc = IDL.Record({
|
|
260
275
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -354,6 +369,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
354
369
|
'timestamp_seconds' : IDL.Nat64,
|
|
355
370
|
'seed_neuron_count' : IDL.Nat64,
|
|
356
371
|
});
|
|
372
|
+
const RestoreAgingNeuronGroup = IDL.Record({
|
|
373
|
+
'count' : IDL.Opt(IDL.Nat64),
|
|
374
|
+
'previous_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
375
|
+
'current_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
376
|
+
'group_type' : IDL.Int32,
|
|
377
|
+
});
|
|
378
|
+
const RestoreAgingSummary = IDL.Record({
|
|
379
|
+
'groups' : IDL.Vec(RestoreAgingNeuronGroup),
|
|
380
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
381
|
+
});
|
|
357
382
|
const RewardEvent = IDL.Record({
|
|
358
383
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
359
384
|
'day_after_genesis' : IDL.Nat64,
|
|
@@ -493,6 +518,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
493
518
|
IDL.Nat64
|
|
494
519
|
),
|
|
495
520
|
});
|
|
521
|
+
const XdrConversionRate = IDL.Record({
|
|
522
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
523
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
524
|
+
});
|
|
496
525
|
const Command_2 = IDL.Variant({
|
|
497
526
|
'Spawn' : NeuronId,
|
|
498
527
|
'Split' : Split,
|
|
@@ -554,6 +583,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
554
583
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
555
584
|
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
556
585
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
586
|
+
'restore_aging_summary' : IDL.Opt(RestoreAgingSummary),
|
|
557
587
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
558
588
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
559
589
|
'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
|
|
@@ -561,6 +591,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
561
591
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
562
592
|
'migrations' : IDL.Opt(Migrations),
|
|
563
593
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
594
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
564
595
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
565
596
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
566
597
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -671,6 +702,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
671
702
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
672
703
|
});
|
|
673
704
|
const MakeProposalResponse = IDL.Record({
|
|
705
|
+
'message' : IDL.Opt(IDL.Text),
|
|
674
706
|
'proposal_id' : IDL.Opt(NeuronId),
|
|
675
707
|
});
|
|
676
708
|
const StakeMaturityResponse = IDL.Record({
|
|
@@ -782,6 +814,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
782
814
|
'get_node_provider_by_caller' : IDL.Func([IDL.Null], [Result_7], []),
|
|
783
815
|
'get_pending_proposals' : IDL.Func([], [IDL.Vec(ProposalInfo)], []),
|
|
784
816
|
'get_proposal_info' : IDL.Func([IDL.Nat64], [IDL.Opt(ProposalInfo)], []),
|
|
817
|
+
'get_restore_aging_summary' : IDL.Func([], [RestoreAgingSummary], []),
|
|
785
818
|
'list_known_neurons' : IDL.Func([], [ListKnownNeuronsResponse], []),
|
|
786
819
|
'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], []),
|
|
787
820
|
'list_node_providers' : IDL.Func([], [ListNodeProvidersResponse], []),
|
|
@@ -1058,6 +1091,20 @@ export const init = ({ IDL }) => {
|
|
|
1058
1091
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
1059
1092
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
1060
1093
|
});
|
|
1094
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
1095
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
1096
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
1097
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1098
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1099
|
+
});
|
|
1100
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
1101
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1102
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
1103
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
1104
|
+
),
|
|
1105
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
1106
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1107
|
+
});
|
|
1061
1108
|
const NetworkEconomics = IDL.Record({
|
|
1062
1109
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
1063
1110
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -1067,6 +1114,7 @@ export const init = ({ IDL }) => {
|
|
|
1067
1114
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
1068
1115
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
1069
1116
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
1117
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
1070
1118
|
});
|
|
1071
1119
|
const ApproveGenesisKyc = IDL.Record({
|
|
1072
1120
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -1166,6 +1214,16 @@ export const init = ({ IDL }) => {
|
|
|
1166
1214
|
'timestamp_seconds' : IDL.Nat64,
|
|
1167
1215
|
'seed_neuron_count' : IDL.Nat64,
|
|
1168
1216
|
});
|
|
1217
|
+
const RestoreAgingNeuronGroup = IDL.Record({
|
|
1218
|
+
'count' : IDL.Opt(IDL.Nat64),
|
|
1219
|
+
'previous_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
1220
|
+
'current_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
1221
|
+
'group_type' : IDL.Int32,
|
|
1222
|
+
});
|
|
1223
|
+
const RestoreAgingSummary = IDL.Record({
|
|
1224
|
+
'groups' : IDL.Vec(RestoreAgingNeuronGroup),
|
|
1225
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1226
|
+
});
|
|
1169
1227
|
const RewardEvent = IDL.Record({
|
|
1170
1228
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
1171
1229
|
'day_after_genesis' : IDL.Nat64,
|
|
@@ -1305,6 +1363,10 @@ export const init = ({ IDL }) => {
|
|
|
1305
1363
|
IDL.Nat64
|
|
1306
1364
|
),
|
|
1307
1365
|
});
|
|
1366
|
+
const XdrConversionRate = IDL.Record({
|
|
1367
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1368
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1369
|
+
});
|
|
1308
1370
|
const Command_2 = IDL.Variant({
|
|
1309
1371
|
'Spawn' : NeuronId,
|
|
1310
1372
|
'Split' : Split,
|
|
@@ -1366,6 +1428,7 @@ export const init = ({ IDL }) => {
|
|
|
1366
1428
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
1367
1429
|
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
1368
1430
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
1431
|
+
'restore_aging_summary' : IDL.Opt(RestoreAgingSummary),
|
|
1369
1432
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
1370
1433
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
1371
1434
|
'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
|
|
@@ -1373,6 +1436,7 @@ export const init = ({ IDL }) => {
|
|
|
1373
1436
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
1374
1437
|
'migrations' : IDL.Opt(Migrations),
|
|
1375
1438
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
1439
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
1376
1440
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
1377
1441
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
1378
1442
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ActorMethod } from "@dfinity/agent";
|
|
2
|
+
import type { IDL } from "@dfinity/candid";
|
|
2
3
|
import type { Principal } from "@dfinity/principal";
|
|
3
4
|
|
|
4
5
|
export interface AccountIdentifier {
|
|
@@ -149,6 +150,9 @@ export interface CreateServiceNervousSystem {
|
|
|
149
150
|
swap_parameters: [] | [SwapParameters];
|
|
150
151
|
initial_token_distribution: [] | [InitialTokenDistribution];
|
|
151
152
|
}
|
|
153
|
+
export interface Decimal {
|
|
154
|
+
human_readable: [] | [string];
|
|
155
|
+
}
|
|
152
156
|
export interface DerivedProposalInformation {
|
|
153
157
|
swap_background_information: [] | [SwapBackgroundInformation];
|
|
154
158
|
}
|
|
@@ -214,6 +218,7 @@ export interface Governance {
|
|
|
214
218
|
node_providers: Array<NodeProvider>;
|
|
215
219
|
cached_daily_maturity_modulation_basis_points: [] | [number];
|
|
216
220
|
economics: [] | [NetworkEconomics];
|
|
221
|
+
restore_aging_summary: [] | [RestoreAgingSummary];
|
|
217
222
|
spawning_neurons: [] | [boolean];
|
|
218
223
|
latest_reward_event: [] | [RewardEvent];
|
|
219
224
|
to_claim_transfers: Array<NeuronStakeTransfer>;
|
|
@@ -221,6 +226,7 @@ export interface Governance {
|
|
|
221
226
|
topic_followee_index: Array<[number, FollowersMap]>;
|
|
222
227
|
migrations: [] | [Migrations];
|
|
223
228
|
proposals: Array<[bigint, ProposalData]>;
|
|
229
|
+
xdr_conversion_rate: [] | [XdrConversionRate];
|
|
224
230
|
in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
|
|
225
231
|
neurons: Array<[bigint, Neuron]>;
|
|
226
232
|
genesis_timestamp_seconds: bigint;
|
|
@@ -337,6 +343,7 @@ export interface ListProposalInfoResponse {
|
|
|
337
343
|
proposal_info: Array<ProposalInfo>;
|
|
338
344
|
}
|
|
339
345
|
export interface MakeProposalResponse {
|
|
346
|
+
message: [] | [string];
|
|
340
347
|
proposal_id: [] | [NeuronId];
|
|
341
348
|
}
|
|
342
349
|
export interface MakingSnsProposal {
|
|
@@ -393,6 +400,7 @@ export interface NetworkEconomics {
|
|
|
393
400
|
neuron_spawn_dissolve_delay_seconds: bigint;
|
|
394
401
|
minimum_icp_xdr_rate: bigint;
|
|
395
402
|
maximum_node_provider_rewards_e8s: bigint;
|
|
403
|
+
neurons_fund_economics: [] | [NeuronsFundEconomics];
|
|
396
404
|
}
|
|
397
405
|
export interface Neuron {
|
|
398
406
|
id: [] | [NeuronId];
|
|
@@ -474,6 +482,19 @@ export interface NeuronsFundData {
|
|
|
474
482
|
initial_neurons_fund_participation: [] | [NeuronsFundParticipation];
|
|
475
483
|
neurons_fund_refunds: [] | [NeuronsFundSnapshot];
|
|
476
484
|
}
|
|
485
|
+
export interface NeuronsFundEconomics {
|
|
486
|
+
maximum_icp_xdr_rate: [] | [Percentage];
|
|
487
|
+
neurons_fund_matched_funding_curve_coefficients:
|
|
488
|
+
| []
|
|
489
|
+
| [NeuronsFundMatchedFundingCurveCoefficients];
|
|
490
|
+
max_theoretical_neurons_fund_participation_amount_xdr: [] | [Decimal];
|
|
491
|
+
minimum_icp_xdr_rate: [] | [Percentage];
|
|
492
|
+
}
|
|
493
|
+
export interface NeuronsFundMatchedFundingCurveCoefficients {
|
|
494
|
+
contribution_threshold_xdr: [] | [Decimal];
|
|
495
|
+
one_third_participation_milestone_xdr: [] | [Decimal];
|
|
496
|
+
full_participation_milestone_xdr: [] | [Decimal];
|
|
497
|
+
}
|
|
477
498
|
export interface NeuronsFundNeuron {
|
|
478
499
|
hotkey_principal: [] | [string];
|
|
479
500
|
is_capped: [] | [boolean];
|
|
@@ -598,6 +619,16 @@ export interface RegisterVote {
|
|
|
598
619
|
export interface RemoveHotKey {
|
|
599
620
|
hot_key_to_remove: [] | [Principal];
|
|
600
621
|
}
|
|
622
|
+
export interface RestoreAgingNeuronGroup {
|
|
623
|
+
count: [] | [bigint];
|
|
624
|
+
previous_total_stake_e8s: [] | [bigint];
|
|
625
|
+
current_total_stake_e8s: [] | [bigint];
|
|
626
|
+
group_type: number;
|
|
627
|
+
}
|
|
628
|
+
export interface RestoreAgingSummary {
|
|
629
|
+
groups: Array<RestoreAgingNeuronGroup>;
|
|
630
|
+
timestamp_seconds: [] | [bigint];
|
|
631
|
+
}
|
|
601
632
|
export type Result = { Ok: null } | { Err: GovernanceError };
|
|
602
633
|
export type Result_1 = { Error: GovernanceError } | { NeuronId: NeuronId };
|
|
603
634
|
export type Result_10 = { Ok: Ok_1 } | { Err: GovernanceError };
|
|
@@ -741,6 +772,10 @@ export interface VotingRewardParameters {
|
|
|
741
772
|
export interface WaitForQuietState {
|
|
742
773
|
current_deadline_timestamp_seconds: bigint;
|
|
743
774
|
}
|
|
775
|
+
export interface XdrConversionRate {
|
|
776
|
+
xdr_permyriad_per_icp: [] | [bigint];
|
|
777
|
+
timestamp_seconds: [] | [bigint];
|
|
778
|
+
}
|
|
744
779
|
export interface _SERVICE {
|
|
745
780
|
claim_gtc_neurons: ActorMethod<[Principal, Array<NeuronId>], Result>;
|
|
746
781
|
claim_or_refresh_neuron_from_account: ActorMethod<
|
|
@@ -774,6 +809,7 @@ export interface _SERVICE {
|
|
|
774
809
|
get_node_provider_by_caller: ActorMethod<[null], Result_7>;
|
|
775
810
|
get_pending_proposals: ActorMethod<[], Array<ProposalInfo>>;
|
|
776
811
|
get_proposal_info: ActorMethod<[bigint], [] | [ProposalInfo]>;
|
|
812
|
+
get_restore_aging_summary: ActorMethod<[], RestoreAgingSummary>;
|
|
777
813
|
list_known_neurons: ActorMethod<[], ListKnownNeuronsResponse>;
|
|
778
814
|
list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
|
|
779
815
|
list_node_providers: ActorMethod<[], ListNodeProvidersResponse>;
|
|
@@ -792,3 +828,5 @@ export interface _SERVICE {
|
|
|
792
828
|
update_neuron: ActorMethod<[Neuron], [] | [GovernanceError]>;
|
|
793
829
|
update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;
|
|
794
830
|
}
|
|
831
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
832
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|