@dfinity/nns 0.7.0 → 0.8.0-next-2022-09-22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/candid/genesis_token.d.ts +10 -8
- package/dist/candid/governance.certified.idl.js +107 -4
- package/dist/candid/governance.d.ts +99 -44
- package/dist/candid/governance.did +49 -3
- package/dist/candid/governance.idl.js +107 -4
- package/dist/candid/ledger.d.ts +15 -15
- package/dist/candid/sns_wasm.d.ts +19 -16
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/index.cjs.js.map +2 -2
- package/dist/esm/account_identifier.js +1 -1
- package/dist/esm/{chunk-SXX75EEC.js → chunk-I4ASNREM.js} +3 -3
- package/dist/esm/{chunk-SXX75EEC.js.map → chunk-I4ASNREM.js.map} +2 -2
- package/dist/esm/chunk-NA2JZFZA.js +2 -0
- package/dist/esm/chunk-NA2JZFZA.js.map +7 -0
- package/dist/esm/{chunk-EBY4MEUW.js → chunk-OQ6FZDUA.js} +5 -5
- package/dist/esm/{chunk-EBY4MEUW.js.map → chunk-OQ6FZDUA.js.map} +2 -2
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ledger.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +1 -2
- package/dist/types/types/governance_converters.d.ts +27 -0
- package/dist/types/utils/converter.utils.d.ts +0 -5
- package/package.json +3 -3
- package/dist/esm/chunk-LWTBV6PO.js +0 -2
- package/dist/esm/chunk-LWTBV6PO.js.map +0 -7
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { ActorMethod } from "@dfinity/agent";
|
|
1
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
|
+
|
|
2
4
|
export interface AccountState {
|
|
3
5
|
authenticated_principal_id: [] | [Principal];
|
|
4
6
|
successfully_transferred_neurons: Array<TransferredNeuron>;
|
|
@@ -22,12 +24,12 @@ export interface TransferredNeuron {
|
|
|
22
24
|
neuron_id: [] | [NeuronId];
|
|
23
25
|
}
|
|
24
26
|
export interface _SERVICE {
|
|
25
|
-
balance:
|
|
26
|
-
claim_neurons:
|
|
27
|
-
donate_account:
|
|
28
|
-
forward_whitelisted_unclaimed_accounts:
|
|
29
|
-
get_account:
|
|
30
|
-
get_build_metadata:
|
|
31
|
-
len:
|
|
32
|
-
total:
|
|
27
|
+
balance: ActorMethod<[string], number>;
|
|
28
|
+
claim_neurons: ActorMethod<[string], Result>;
|
|
29
|
+
donate_account: ActorMethod<[string], Result_1>;
|
|
30
|
+
forward_whitelisted_unclaimed_accounts: ActorMethod<[null], Result_1>;
|
|
31
|
+
get_account: ActorMethod<[string], Result_2>;
|
|
32
|
+
get_build_metadata: ActorMethod<[], string>;
|
|
33
|
+
len: ActorMethod<[], number>;
|
|
34
|
+
total: ActorMethod<[], number>;
|
|
33
35
|
}
|
|
@@ -80,6 +80,14 @@ export const idlFactory = ({ IDL }) => {
|
|
|
80
80
|
'error_message' : IDL.Text,
|
|
81
81
|
'error_type' : IDL.Int32,
|
|
82
82
|
});
|
|
83
|
+
const CfNeuron = IDL.Record({
|
|
84
|
+
'nns_neuron_id' : IDL.Nat64,
|
|
85
|
+
'amount_icp_e8s' : IDL.Nat64,
|
|
86
|
+
});
|
|
87
|
+
const CfParticipant = IDL.Record({
|
|
88
|
+
'hotkey_principal' : IDL.Text,
|
|
89
|
+
'cf_neurons' : IDL.Vec(CfNeuron),
|
|
90
|
+
});
|
|
83
91
|
const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
|
|
84
92
|
const Tally = IDL.Record({
|
|
85
93
|
'no' : IDL.Nat64,
|
|
@@ -119,6 +127,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
119
127
|
'hot_key_to_remove' : IDL.Opt(IDL.Principal),
|
|
120
128
|
});
|
|
121
129
|
const AddHotKey = IDL.Record({ 'new_hot_key' : IDL.Opt(IDL.Principal) });
|
|
130
|
+
const ChangeAutoStakeMaturity = IDL.Record({
|
|
131
|
+
'requested_setting_for_auto_stake_maturity' : IDL.Bool,
|
|
132
|
+
});
|
|
122
133
|
const IncreaseDissolveDelay = IDL.Record({
|
|
123
134
|
'additional_dissolve_delay_seconds' : IDL.Nat32,
|
|
124
135
|
});
|
|
@@ -128,6 +139,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
128
139
|
const Operation = IDL.Variant({
|
|
129
140
|
'RemoveHotKey' : RemoveHotKey,
|
|
130
141
|
'AddHotKey' : AddHotKey,
|
|
142
|
+
'ChangeAutoStakeMaturity' : ChangeAutoStakeMaturity,
|
|
131
143
|
'StopDissolving' : IDL.Record({}),
|
|
132
144
|
'StartDissolving' : IDL.Record({}),
|
|
133
145
|
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
@@ -148,6 +160,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
148
160
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
149
161
|
'nonce' : IDL.Nat64,
|
|
150
162
|
});
|
|
163
|
+
const StakeMaturity = IDL.Record({
|
|
164
|
+
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
165
|
+
});
|
|
151
166
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
152
167
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
153
168
|
const Disburse = IDL.Record({
|
|
@@ -164,6 +179,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
164
179
|
'Merge' : Merge,
|
|
165
180
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
166
181
|
'MakeProposal' : Proposal,
|
|
182
|
+
'StakeMaturity' : StakeMaturity,
|
|
167
183
|
'MergeMaturity' : MergeMaturity,
|
|
168
184
|
'Disburse' : Disburse,
|
|
169
185
|
});
|
|
@@ -180,6 +196,20 @@ export const idlFactory = ({ IDL }) => {
|
|
|
180
196
|
'nns_function' : IDL.Int32,
|
|
181
197
|
'payload' : IDL.Vec(IDL.Nat8),
|
|
182
198
|
});
|
|
199
|
+
const Params = IDL.Record({
|
|
200
|
+
'min_participant_icp_e8s' : IDL.Nat64,
|
|
201
|
+
'max_icp_e8s' : IDL.Nat64,
|
|
202
|
+
'swap_due_timestamp_seconds' : IDL.Nat64,
|
|
203
|
+
'min_participants' : IDL.Nat32,
|
|
204
|
+
'sns_token_e8s' : IDL.Nat64,
|
|
205
|
+
'max_participant_icp_e8s' : IDL.Nat64,
|
|
206
|
+
'min_icp_e8s' : IDL.Nat64,
|
|
207
|
+
});
|
|
208
|
+
const OpenSnsTokenSwap = IDL.Record({
|
|
209
|
+
'community_fund_investment_e8s' : IDL.Opt(IDL.Nat64),
|
|
210
|
+
'target_swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
211
|
+
'params' : IDL.Opt(Params),
|
|
212
|
+
});
|
|
183
213
|
const TimeWindow = IDL.Record({
|
|
184
214
|
'start_timestamp_seconds' : IDL.Nat64,
|
|
185
215
|
'end_timestamp_seconds' : IDL.Nat64,
|
|
@@ -212,6 +242,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
212
242
|
'ManageNeuron' : ManageNeuron,
|
|
213
243
|
'ExecuteNnsFunction' : ExecuteNnsFunction,
|
|
214
244
|
'RewardNodeProvider' : RewardNodeProvider,
|
|
245
|
+
'OpenSnsTokenSwap' : OpenSnsTokenSwap,
|
|
215
246
|
'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
|
|
216
247
|
'SetDefaultFollowees' : SetDefaultFollowees,
|
|
217
248
|
'RewardNodeProviders' : RewardNodeProviders,
|
|
@@ -234,17 +265,22 @@ export const idlFactory = ({ IDL }) => {
|
|
|
234
265
|
const ProposalData = IDL.Record({
|
|
235
266
|
'id' : IDL.Opt(NeuronId),
|
|
236
267
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
268
|
+
'cf_participants' : IDL.Vec(CfParticipant),
|
|
237
269
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
238
270
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
239
271
|
'reward_event_round' : IDL.Nat64,
|
|
240
272
|
'failed_timestamp_seconds' : IDL.Nat64,
|
|
241
273
|
'reject_cost_e8s' : IDL.Nat64,
|
|
242
274
|
'latest_tally' : IDL.Opt(Tally),
|
|
275
|
+
'sns_token_swap_lifecycle' : IDL.Opt(IDL.Int32),
|
|
243
276
|
'decided_timestamp_seconds' : IDL.Nat64,
|
|
244
277
|
'proposal' : IDL.Opt(Proposal),
|
|
245
278
|
'proposer' : IDL.Opt(NeuronId),
|
|
246
279
|
'wait_for_quiet_state' : IDL.Opt(WaitForQuietState),
|
|
247
280
|
'executed_timestamp_seconds' : IDL.Nat64,
|
|
281
|
+
'original_total_community_fund_maturity_e8s_equivalent' : IDL.Opt(
|
|
282
|
+
IDL.Nat64
|
|
283
|
+
),
|
|
248
284
|
});
|
|
249
285
|
const Command_2 = IDL.Variant({
|
|
250
286
|
'Spawn' : NeuronId,
|
|
@@ -252,6 +288,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
252
288
|
'Configure' : Configure,
|
|
253
289
|
'Merge' : Merge,
|
|
254
290
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
291
|
+
'SyncCommand' : IDL.Record({}),
|
|
255
292
|
'ClaimOrRefreshNeuron' : ClaimOrRefresh,
|
|
256
293
|
'MergeMaturity' : MergeMaturity,
|
|
257
294
|
'Disburse' : Disburse,
|
|
@@ -270,6 +307,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
270
307
|
});
|
|
271
308
|
const Neuron = IDL.Record({
|
|
272
309
|
'id' : IDL.Opt(NeuronId),
|
|
310
|
+
'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
273
311
|
'controller' : IDL.Opt(IDL.Principal),
|
|
274
312
|
'recent_ballots' : IDL.Vec(BallotInfo),
|
|
275
313
|
'kyc_verified' : IDL.Bool,
|
|
@@ -277,6 +315,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
277
315
|
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
278
316
|
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
279
317
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
318
|
+
'auto_stake_maturity' : IDL.Opt(IDL.Bool),
|
|
280
319
|
'aging_since_timestamp_seconds' : IDL.Nat64,
|
|
281
320
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
282
321
|
'account' : IDL.Vec(IDL.Nat8),
|
|
@@ -293,10 +332,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
293
332
|
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
294
333
|
MostRecentMonthlyNodeProviderRewards
|
|
295
334
|
),
|
|
335
|
+
'maturity_modulation_last_updated_at_timestamp_seconds' : IDL.Opt(
|
|
336
|
+
IDL.Nat64
|
|
337
|
+
),
|
|
296
338
|
'wait_for_quiet_threshold_seconds' : IDL.Nat64,
|
|
297
339
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
298
|
-
'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
|
|
299
340
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
341
|
+
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
300
342
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
301
343
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
302
344
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
@@ -305,7 +347,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
305
347
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
306
348
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
307
349
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
308
|
-
'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
|
|
309
350
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
310
351
|
});
|
|
311
352
|
const Result = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : GovernanceError });
|
|
@@ -387,6 +428,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
387
428
|
const MakeProposalResponse = IDL.Record({
|
|
388
429
|
'proposal_id' : IDL.Opt(NeuronId),
|
|
389
430
|
});
|
|
431
|
+
const StakeMaturityResponse = IDL.Record({
|
|
432
|
+
'maturity_e8s' : IDL.Nat64,
|
|
433
|
+
'staked_maturity_e8s' : IDL.Nat64,
|
|
434
|
+
});
|
|
390
435
|
const MergeMaturityResponse = IDL.Record({
|
|
391
436
|
'merged_maturity_e8s' : IDL.Nat64,
|
|
392
437
|
'new_stake_e8s' : IDL.Nat64,
|
|
@@ -403,10 +448,22 @@ export const idlFactory = ({ IDL }) => {
|
|
|
403
448
|
'Merge' : IDL.Record({}),
|
|
404
449
|
'DisburseToNeuron' : SpawnResponse,
|
|
405
450
|
'MakeProposal' : MakeProposalResponse,
|
|
451
|
+
'StakeMaturity' : StakeMaturityResponse,
|
|
406
452
|
'MergeMaturity' : MergeMaturityResponse,
|
|
407
453
|
'Disburse' : DisburseResponse,
|
|
408
454
|
});
|
|
409
455
|
const ManageNeuronResponse = IDL.Record({ 'command' : IDL.Opt(Command_1) });
|
|
456
|
+
const Committed = IDL.Record({
|
|
457
|
+
'sns_governance_canister_id' : IDL.Opt(IDL.Principal),
|
|
458
|
+
});
|
|
459
|
+
const Result_6 = IDL.Variant({
|
|
460
|
+
'Committed' : Committed,
|
|
461
|
+
'Aborted' : IDL.Record({}),
|
|
462
|
+
});
|
|
463
|
+
const SettleCommunityFundParticipation = IDL.Record({
|
|
464
|
+
'result' : IDL.Opt(Result_6),
|
|
465
|
+
'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),
|
|
466
|
+
});
|
|
410
467
|
const UpdateNodeProvider = IDL.Record({
|
|
411
468
|
'reward_account' : IDL.Opt(AccountIdentifier),
|
|
412
469
|
});
|
|
@@ -454,6 +511,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
454
511
|
[],
|
|
455
512
|
),
|
|
456
513
|
'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
|
|
514
|
+
'settle_community_fund_participation' : IDL.Func(
|
|
515
|
+
[SettleCommunityFundParticipation],
|
|
516
|
+
[Result],
|
|
517
|
+
[],
|
|
518
|
+
),
|
|
457
519
|
'transfer_gtc_neuron' : IDL.Func([NeuronId, NeuronId], [Result], []),
|
|
458
520
|
'update_node_provider' : IDL.Func([UpdateNodeProvider], [Result], []),
|
|
459
521
|
});
|
|
@@ -539,6 +601,14 @@ export const init = ({ IDL }) => {
|
|
|
539
601
|
'error_message' : IDL.Text,
|
|
540
602
|
'error_type' : IDL.Int32,
|
|
541
603
|
});
|
|
604
|
+
const CfNeuron = IDL.Record({
|
|
605
|
+
'nns_neuron_id' : IDL.Nat64,
|
|
606
|
+
'amount_icp_e8s' : IDL.Nat64,
|
|
607
|
+
});
|
|
608
|
+
const CfParticipant = IDL.Record({
|
|
609
|
+
'hotkey_principal' : IDL.Text,
|
|
610
|
+
'cf_neurons' : IDL.Vec(CfNeuron),
|
|
611
|
+
});
|
|
542
612
|
const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
|
|
543
613
|
const Tally = IDL.Record({
|
|
544
614
|
'no' : IDL.Nat64,
|
|
@@ -578,6 +648,9 @@ export const init = ({ IDL }) => {
|
|
|
578
648
|
'hot_key_to_remove' : IDL.Opt(IDL.Principal),
|
|
579
649
|
});
|
|
580
650
|
const AddHotKey = IDL.Record({ 'new_hot_key' : IDL.Opt(IDL.Principal) });
|
|
651
|
+
const ChangeAutoStakeMaturity = IDL.Record({
|
|
652
|
+
'requested_setting_for_auto_stake_maturity' : IDL.Bool,
|
|
653
|
+
});
|
|
581
654
|
const IncreaseDissolveDelay = IDL.Record({
|
|
582
655
|
'additional_dissolve_delay_seconds' : IDL.Nat32,
|
|
583
656
|
});
|
|
@@ -587,6 +660,7 @@ export const init = ({ IDL }) => {
|
|
|
587
660
|
const Operation = IDL.Variant({
|
|
588
661
|
'RemoveHotKey' : RemoveHotKey,
|
|
589
662
|
'AddHotKey' : AddHotKey,
|
|
663
|
+
'ChangeAutoStakeMaturity' : ChangeAutoStakeMaturity,
|
|
590
664
|
'StopDissolving' : IDL.Record({}),
|
|
591
665
|
'StartDissolving' : IDL.Record({}),
|
|
592
666
|
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
@@ -607,6 +681,9 @@ export const init = ({ IDL }) => {
|
|
|
607
681
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
608
682
|
'nonce' : IDL.Nat64,
|
|
609
683
|
});
|
|
684
|
+
const StakeMaturity = IDL.Record({
|
|
685
|
+
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
686
|
+
});
|
|
610
687
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
611
688
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
612
689
|
const Disburse = IDL.Record({
|
|
@@ -623,6 +700,7 @@ export const init = ({ IDL }) => {
|
|
|
623
700
|
'Merge' : Merge,
|
|
624
701
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
625
702
|
'MakeProposal' : Proposal,
|
|
703
|
+
'StakeMaturity' : StakeMaturity,
|
|
626
704
|
'MergeMaturity' : MergeMaturity,
|
|
627
705
|
'Disburse' : Disburse,
|
|
628
706
|
});
|
|
@@ -639,6 +717,20 @@ export const init = ({ IDL }) => {
|
|
|
639
717
|
'nns_function' : IDL.Int32,
|
|
640
718
|
'payload' : IDL.Vec(IDL.Nat8),
|
|
641
719
|
});
|
|
720
|
+
const Params = IDL.Record({
|
|
721
|
+
'min_participant_icp_e8s' : IDL.Nat64,
|
|
722
|
+
'max_icp_e8s' : IDL.Nat64,
|
|
723
|
+
'swap_due_timestamp_seconds' : IDL.Nat64,
|
|
724
|
+
'min_participants' : IDL.Nat32,
|
|
725
|
+
'sns_token_e8s' : IDL.Nat64,
|
|
726
|
+
'max_participant_icp_e8s' : IDL.Nat64,
|
|
727
|
+
'min_icp_e8s' : IDL.Nat64,
|
|
728
|
+
});
|
|
729
|
+
const OpenSnsTokenSwap = IDL.Record({
|
|
730
|
+
'community_fund_investment_e8s' : IDL.Opt(IDL.Nat64),
|
|
731
|
+
'target_swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
732
|
+
'params' : IDL.Opt(Params),
|
|
733
|
+
});
|
|
642
734
|
const TimeWindow = IDL.Record({
|
|
643
735
|
'start_timestamp_seconds' : IDL.Nat64,
|
|
644
736
|
'end_timestamp_seconds' : IDL.Nat64,
|
|
@@ -671,6 +763,7 @@ export const init = ({ IDL }) => {
|
|
|
671
763
|
'ManageNeuron' : ManageNeuron,
|
|
672
764
|
'ExecuteNnsFunction' : ExecuteNnsFunction,
|
|
673
765
|
'RewardNodeProvider' : RewardNodeProvider,
|
|
766
|
+
'OpenSnsTokenSwap' : OpenSnsTokenSwap,
|
|
674
767
|
'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
|
|
675
768
|
'SetDefaultFollowees' : SetDefaultFollowees,
|
|
676
769
|
'RewardNodeProviders' : RewardNodeProviders,
|
|
@@ -693,17 +786,22 @@ export const init = ({ IDL }) => {
|
|
|
693
786
|
const ProposalData = IDL.Record({
|
|
694
787
|
'id' : IDL.Opt(NeuronId),
|
|
695
788
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
789
|
+
'cf_participants' : IDL.Vec(CfParticipant),
|
|
696
790
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
697
791
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
698
792
|
'reward_event_round' : IDL.Nat64,
|
|
699
793
|
'failed_timestamp_seconds' : IDL.Nat64,
|
|
700
794
|
'reject_cost_e8s' : IDL.Nat64,
|
|
701
795
|
'latest_tally' : IDL.Opt(Tally),
|
|
796
|
+
'sns_token_swap_lifecycle' : IDL.Opt(IDL.Int32),
|
|
702
797
|
'decided_timestamp_seconds' : IDL.Nat64,
|
|
703
798
|
'proposal' : IDL.Opt(Proposal),
|
|
704
799
|
'proposer' : IDL.Opt(NeuronId),
|
|
705
800
|
'wait_for_quiet_state' : IDL.Opt(WaitForQuietState),
|
|
706
801
|
'executed_timestamp_seconds' : IDL.Nat64,
|
|
802
|
+
'original_total_community_fund_maturity_e8s_equivalent' : IDL.Opt(
|
|
803
|
+
IDL.Nat64
|
|
804
|
+
),
|
|
707
805
|
});
|
|
708
806
|
const Command_2 = IDL.Variant({
|
|
709
807
|
'Spawn' : NeuronId,
|
|
@@ -711,6 +809,7 @@ export const init = ({ IDL }) => {
|
|
|
711
809
|
'Configure' : Configure,
|
|
712
810
|
'Merge' : Merge,
|
|
713
811
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
812
|
+
'SyncCommand' : IDL.Record({}),
|
|
714
813
|
'ClaimOrRefreshNeuron' : ClaimOrRefresh,
|
|
715
814
|
'MergeMaturity' : MergeMaturity,
|
|
716
815
|
'Disburse' : Disburse,
|
|
@@ -729,6 +828,7 @@ export const init = ({ IDL }) => {
|
|
|
729
828
|
});
|
|
730
829
|
const Neuron = IDL.Record({
|
|
731
830
|
'id' : IDL.Opt(NeuronId),
|
|
831
|
+
'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
732
832
|
'controller' : IDL.Opt(IDL.Principal),
|
|
733
833
|
'recent_ballots' : IDL.Vec(BallotInfo),
|
|
734
834
|
'kyc_verified' : IDL.Bool,
|
|
@@ -736,6 +836,7 @@ export const init = ({ IDL }) => {
|
|
|
736
836
|
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
737
837
|
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
738
838
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
839
|
+
'auto_stake_maturity' : IDL.Opt(IDL.Bool),
|
|
739
840
|
'aging_since_timestamp_seconds' : IDL.Nat64,
|
|
740
841
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
741
842
|
'account' : IDL.Vec(IDL.Nat8),
|
|
@@ -752,10 +853,13 @@ export const init = ({ IDL }) => {
|
|
|
752
853
|
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
753
854
|
MostRecentMonthlyNodeProviderRewards
|
|
754
855
|
),
|
|
856
|
+
'maturity_modulation_last_updated_at_timestamp_seconds' : IDL.Opt(
|
|
857
|
+
IDL.Nat64
|
|
858
|
+
),
|
|
755
859
|
'wait_for_quiet_threshold_seconds' : IDL.Nat64,
|
|
756
860
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
757
|
-
'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
|
|
758
861
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
862
|
+
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
759
863
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
760
864
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
761
865
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
@@ -764,7 +868,6 @@ export const init = ({ IDL }) => {
|
|
|
764
868
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
765
869
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
766
870
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
767
|
-
'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
|
|
768
871
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
769
872
|
});
|
|
770
873
|
return [Governance];
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { ActorMethod } from "@dfinity/agent";
|
|
1
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
|
+
|
|
2
4
|
export interface AccountIdentifier {
|
|
3
|
-
hash:
|
|
5
|
+
hash: Uint8Array;
|
|
4
6
|
}
|
|
5
7
|
export type Action =
|
|
6
8
|
| { RegisterKnownNeuron: KnownNeuron }
|
|
7
9
|
| { ManageNeuron: ManageNeuron }
|
|
8
10
|
| { ExecuteNnsFunction: ExecuteNnsFunction }
|
|
9
11
|
| { RewardNodeProvider: RewardNodeProvider }
|
|
12
|
+
| { OpenSnsTokenSwap: OpenSnsTokenSwap }
|
|
10
13
|
| { SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow }
|
|
11
14
|
| { SetDefaultFollowees: SetDefaultFollowees }
|
|
12
15
|
| { RewardNodeProviders: RewardNodeProviders }
|
|
@@ -38,7 +41,18 @@ export type By =
|
|
|
38
41
|
| { NeuronIdOrSubaccount: {} }
|
|
39
42
|
| { MemoAndController: ClaimOrRefreshNeuronFromAccount }
|
|
40
43
|
| { Memo: bigint };
|
|
44
|
+
export interface CfNeuron {
|
|
45
|
+
nns_neuron_id: bigint;
|
|
46
|
+
amount_icp_e8s: bigint;
|
|
47
|
+
}
|
|
48
|
+
export interface CfParticipant {
|
|
49
|
+
hotkey_principal: string;
|
|
50
|
+
cf_neurons: Array<CfNeuron>;
|
|
51
|
+
}
|
|
41
52
|
export type Change = { ToRemove: NodeProvider } | { ToAdd: NodeProvider };
|
|
53
|
+
export interface ChangeAutoStakeMaturity {
|
|
54
|
+
requested_setting_for_auto_stake_maturity: boolean;
|
|
55
|
+
}
|
|
42
56
|
export interface ClaimOrRefresh {
|
|
43
57
|
by: [] | [By];
|
|
44
58
|
}
|
|
@@ -62,6 +76,7 @@ export type Command =
|
|
|
62
76
|
| { Merge: Merge }
|
|
63
77
|
| { DisburseToNeuron: DisburseToNeuron }
|
|
64
78
|
| { MakeProposal: Proposal }
|
|
79
|
+
| { StakeMaturity: StakeMaturity }
|
|
65
80
|
| { MergeMaturity: MergeMaturity }
|
|
66
81
|
| { Disburse: Disburse };
|
|
67
82
|
export type Command_1 =
|
|
@@ -75,6 +90,7 @@ export type Command_1 =
|
|
|
75
90
|
| { Merge: {} }
|
|
76
91
|
| { DisburseToNeuron: SpawnResponse }
|
|
77
92
|
| { MakeProposal: MakeProposalResponse }
|
|
93
|
+
| { StakeMaturity: StakeMaturityResponse }
|
|
78
94
|
| { MergeMaturity: MergeMaturityResponse }
|
|
79
95
|
| { Disburse: DisburseResponse };
|
|
80
96
|
export type Command_2 =
|
|
@@ -83,9 +99,13 @@ export type Command_2 =
|
|
|
83
99
|
| { Configure: Configure }
|
|
84
100
|
| { Merge: Merge }
|
|
85
101
|
| { DisburseToNeuron: DisburseToNeuron }
|
|
102
|
+
| { SyncCommand: {} }
|
|
86
103
|
| { ClaimOrRefreshNeuron: ClaimOrRefresh }
|
|
87
104
|
| { MergeMaturity: MergeMaturity }
|
|
88
105
|
| { Disburse: Disburse };
|
|
106
|
+
export interface Committed {
|
|
107
|
+
sns_governance_canister_id: [] | [Principal];
|
|
108
|
+
}
|
|
89
109
|
export interface Configure {
|
|
90
110
|
operation: [] | [Operation];
|
|
91
111
|
}
|
|
@@ -108,7 +128,7 @@ export type DissolveState =
|
|
|
108
128
|
| { WhenDissolvedTimestampSeconds: bigint };
|
|
109
129
|
export interface ExecuteNnsFunction {
|
|
110
130
|
nns_function: number;
|
|
111
|
-
payload:
|
|
131
|
+
payload: Uint8Array;
|
|
112
132
|
}
|
|
113
133
|
export interface Follow {
|
|
114
134
|
topic: number;
|
|
@@ -122,10 +142,11 @@ export interface Governance {
|
|
|
122
142
|
most_recent_monthly_node_provider_rewards:
|
|
123
143
|
| []
|
|
124
144
|
| [MostRecentMonthlyNodeProviderRewards];
|
|
145
|
+
maturity_modulation_last_updated_at_timestamp_seconds: [] | [bigint];
|
|
125
146
|
wait_for_quiet_threshold_seconds: bigint;
|
|
126
147
|
metrics: [] | [GovernanceCachedMetrics];
|
|
127
|
-
cached_daily_maturity_modulation: [] | [number];
|
|
128
148
|
node_providers: Array<NodeProvider>;
|
|
149
|
+
cached_daily_maturity_modulation_basis_points: [] | [number];
|
|
129
150
|
economics: [] | [NetworkEconomics];
|
|
130
151
|
spawning_neurons: [] | [boolean];
|
|
131
152
|
latest_reward_event: [] | [RewardEvent];
|
|
@@ -134,7 +155,6 @@ export interface Governance {
|
|
|
134
155
|
proposals: Array<[bigint, ProposalData]>;
|
|
135
156
|
in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
|
|
136
157
|
neurons: Array<[bigint, Neuron]>;
|
|
137
|
-
last_updated_maturity_modulation_cache: [] | [bigint];
|
|
138
158
|
genesis_timestamp_seconds: bigint;
|
|
139
159
|
}
|
|
140
160
|
export interface GovernanceCachedMetrics {
|
|
@@ -174,7 +194,7 @@ export interface ListKnownNeuronsResponse {
|
|
|
174
194
|
known_neurons: Array<KnownNeuron>;
|
|
175
195
|
}
|
|
176
196
|
export interface ListNeurons {
|
|
177
|
-
neuron_ids:
|
|
197
|
+
neuron_ids: BigUint64Array;
|
|
178
198
|
include_neurons_readable_by_caller: boolean;
|
|
179
199
|
}
|
|
180
200
|
export interface ListNeuronsResponse {
|
|
@@ -185,11 +205,11 @@ export interface ListNodeProvidersResponse {
|
|
|
185
205
|
node_providers: Array<NodeProvider>;
|
|
186
206
|
}
|
|
187
207
|
export interface ListProposalInfo {
|
|
188
|
-
include_reward_status:
|
|
208
|
+
include_reward_status: Int32Array;
|
|
189
209
|
before_proposal: [] | [NeuronId];
|
|
190
210
|
limit: number;
|
|
191
|
-
exclude_topic:
|
|
192
|
-
include_status:
|
|
211
|
+
exclude_topic: Int32Array;
|
|
212
|
+
include_status: Int32Array;
|
|
193
213
|
}
|
|
194
214
|
export interface ListProposalInfoResponse {
|
|
195
215
|
proposal_info: Array<ProposalInfo>;
|
|
@@ -234,6 +254,7 @@ export interface NetworkEconomics {
|
|
|
234
254
|
}
|
|
235
255
|
export interface Neuron {
|
|
236
256
|
id: [] | [NeuronId];
|
|
257
|
+
staked_maturity_e8s_equivalent: [] | [bigint];
|
|
237
258
|
controller: [] | [Principal];
|
|
238
259
|
recent_ballots: Array<BallotInfo>;
|
|
239
260
|
kyc_verified: boolean;
|
|
@@ -241,9 +262,10 @@ export interface Neuron {
|
|
|
241
262
|
maturity_e8s_equivalent: bigint;
|
|
242
263
|
cached_neuron_stake_e8s: bigint;
|
|
243
264
|
created_timestamp_seconds: bigint;
|
|
265
|
+
auto_stake_maturity: [] | [boolean];
|
|
244
266
|
aging_since_timestamp_seconds: bigint;
|
|
245
267
|
hot_keys: Array<Principal>;
|
|
246
|
-
account:
|
|
268
|
+
account: Uint8Array;
|
|
247
269
|
joined_community_fund_timestamp_seconds: [] | [bigint];
|
|
248
270
|
dissolve_state: [] | [DissolveState];
|
|
249
271
|
followees: Array<[number, Followees]>;
|
|
@@ -256,7 +278,7 @@ export interface NeuronId {
|
|
|
256
278
|
id: bigint;
|
|
257
279
|
}
|
|
258
280
|
export type NeuronIdOrSubaccount =
|
|
259
|
-
| { Subaccount:
|
|
281
|
+
| { Subaccount: Uint8Array }
|
|
260
282
|
| { NeuronId: NeuronId };
|
|
261
283
|
export interface NeuronInFlightCommand {
|
|
262
284
|
command: [] | [Command_2];
|
|
@@ -275,11 +297,11 @@ export interface NeuronInfo {
|
|
|
275
297
|
age_seconds: bigint;
|
|
276
298
|
}
|
|
277
299
|
export interface NeuronStakeTransfer {
|
|
278
|
-
to_subaccount:
|
|
300
|
+
to_subaccount: Uint8Array;
|
|
279
301
|
neuron_stake_e8s: bigint;
|
|
280
302
|
from: [] | [Principal];
|
|
281
303
|
memo: bigint;
|
|
282
|
-
from_subaccount:
|
|
304
|
+
from_subaccount: Uint8Array;
|
|
283
305
|
transfer_timestamp: bigint;
|
|
284
306
|
block_height: bigint;
|
|
285
307
|
}
|
|
@@ -287,15 +309,30 @@ export interface NodeProvider {
|
|
|
287
309
|
id: [] | [Principal];
|
|
288
310
|
reward_account: [] | [AccountIdentifier];
|
|
289
311
|
}
|
|
312
|
+
export interface OpenSnsTokenSwap {
|
|
313
|
+
community_fund_investment_e8s: [] | [bigint];
|
|
314
|
+
target_swap_canister_id: [] | [Principal];
|
|
315
|
+
params: [] | [Params];
|
|
316
|
+
}
|
|
290
317
|
export type Operation =
|
|
291
318
|
| { RemoveHotKey: RemoveHotKey }
|
|
292
319
|
| { AddHotKey: AddHotKey }
|
|
320
|
+
| { ChangeAutoStakeMaturity: ChangeAutoStakeMaturity }
|
|
293
321
|
| { StopDissolving: {} }
|
|
294
322
|
| { StartDissolving: {} }
|
|
295
323
|
| { IncreaseDissolveDelay: IncreaseDissolveDelay }
|
|
296
324
|
| { JoinCommunityFund: {} }
|
|
297
325
|
| { LeaveCommunityFund: {} }
|
|
298
326
|
| { SetDissolveTimestamp: SetDissolveTimestamp };
|
|
327
|
+
export interface Params {
|
|
328
|
+
min_participant_icp_e8s: bigint;
|
|
329
|
+
max_icp_e8s: bigint;
|
|
330
|
+
swap_due_timestamp_seconds: bigint;
|
|
331
|
+
min_participants: number;
|
|
332
|
+
sns_token_e8s: bigint;
|
|
333
|
+
max_participant_icp_e8s: bigint;
|
|
334
|
+
min_icp_e8s: bigint;
|
|
335
|
+
}
|
|
299
336
|
export interface Proposal {
|
|
300
337
|
url: string;
|
|
301
338
|
title: [] | [string];
|
|
@@ -305,17 +342,20 @@ export interface Proposal {
|
|
|
305
342
|
export interface ProposalData {
|
|
306
343
|
id: [] | [NeuronId];
|
|
307
344
|
failure_reason: [] | [GovernanceError];
|
|
345
|
+
cf_participants: Array<CfParticipant>;
|
|
308
346
|
ballots: Array<[bigint, Ballot]>;
|
|
309
347
|
proposal_timestamp_seconds: bigint;
|
|
310
348
|
reward_event_round: bigint;
|
|
311
349
|
failed_timestamp_seconds: bigint;
|
|
312
350
|
reject_cost_e8s: bigint;
|
|
313
351
|
latest_tally: [] | [Tally];
|
|
352
|
+
sns_token_swap_lifecycle: [] | [number];
|
|
314
353
|
decided_timestamp_seconds: bigint;
|
|
315
354
|
proposal: [] | [Proposal];
|
|
316
355
|
proposer: [] | [NeuronId];
|
|
317
356
|
wait_for_quiet_state: [] | [WaitForQuietState];
|
|
318
357
|
executed_timestamp_seconds: bigint;
|
|
358
|
+
original_total_community_fund_maturity_e8s_equivalent: [] | [bigint];
|
|
319
359
|
}
|
|
320
360
|
export interface ProposalInfo {
|
|
321
361
|
id: [] | [NeuronId];
|
|
@@ -348,6 +388,7 @@ export type Result_2 = { Ok: Neuron } | { Err: GovernanceError };
|
|
|
348
388
|
export type Result_3 = { Ok: RewardNodeProviders } | { Err: GovernanceError };
|
|
349
389
|
export type Result_4 = { Ok: NeuronInfo } | { Err: GovernanceError };
|
|
350
390
|
export type Result_5 = { Ok: NodeProvider } | { Err: GovernanceError };
|
|
391
|
+
export type Result_6 = { Committed: Committed } | { Aborted: {} };
|
|
351
392
|
export interface RewardEvent {
|
|
352
393
|
day_after_genesis: bigint;
|
|
353
394
|
actual_timestamp_seconds: bigint;
|
|
@@ -385,6 +426,10 @@ export interface SetSnsTokenSwapOpenTimeWindow {
|
|
|
385
426
|
request: [] | [SetOpenTimeWindowRequest];
|
|
386
427
|
swap_canister_id: [] | [Principal];
|
|
387
428
|
}
|
|
429
|
+
export interface SettleCommunityFundParticipation {
|
|
430
|
+
result: [] | [Result_6];
|
|
431
|
+
open_sns_token_swap_proposal_id: [] | [bigint];
|
|
432
|
+
}
|
|
388
433
|
export interface Spawn {
|
|
389
434
|
percentage_to_spawn: [] | [number];
|
|
390
435
|
new_controller: [] | [Principal];
|
|
@@ -396,6 +441,13 @@ export interface SpawnResponse {
|
|
|
396
441
|
export interface Split {
|
|
397
442
|
amount_e8s: bigint;
|
|
398
443
|
}
|
|
444
|
+
export interface StakeMaturity {
|
|
445
|
+
percentage_to_stake: [] | [number];
|
|
446
|
+
}
|
|
447
|
+
export interface StakeMaturityResponse {
|
|
448
|
+
maturity_e8s: bigint;
|
|
449
|
+
staked_maturity_e8s: bigint;
|
|
450
|
+
}
|
|
399
451
|
export interface Tally {
|
|
400
452
|
no: bigint;
|
|
401
453
|
yes: bigint;
|
|
@@ -413,38 +465,41 @@ export interface WaitForQuietState {
|
|
|
413
465
|
current_deadline_timestamp_seconds: bigint;
|
|
414
466
|
}
|
|
415
467
|
export interface _SERVICE {
|
|
416
|
-
claim_gtc_neurons:
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
468
|
+
claim_gtc_neurons: ActorMethod<[Principal, Array<NeuronId>], Result>;
|
|
469
|
+
claim_or_refresh_neuron_from_account: ActorMethod<
|
|
470
|
+
[ClaimOrRefreshNeuronFromAccount],
|
|
471
|
+
ClaimOrRefreshNeuronFromAccountResponse
|
|
472
|
+
>;
|
|
473
|
+
get_build_metadata: ActorMethod<[], string>;
|
|
474
|
+
get_full_neuron: ActorMethod<[bigint], Result_2>;
|
|
475
|
+
get_full_neuron_by_id_or_subaccount: ActorMethod<
|
|
476
|
+
[NeuronIdOrSubaccount],
|
|
477
|
+
Result_2
|
|
478
|
+
>;
|
|
479
|
+
get_monthly_node_provider_rewards: ActorMethod<[], Result_3>;
|
|
480
|
+
get_most_recent_monthly_node_provider_rewards: ActorMethod<
|
|
481
|
+
[],
|
|
430
482
|
[] | [MostRecentMonthlyNodeProviderRewards]
|
|
431
483
|
>;
|
|
432
|
-
get_network_economics_parameters:
|
|
433
|
-
get_neuron_ids:
|
|
434
|
-
get_neuron_info:
|
|
435
|
-
get_neuron_info_by_id_or_subaccount:
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
484
|
+
get_network_economics_parameters: ActorMethod<[], NetworkEconomics>;
|
|
485
|
+
get_neuron_ids: ActorMethod<[], BigUint64Array>;
|
|
486
|
+
get_neuron_info: ActorMethod<[bigint], Result_4>;
|
|
487
|
+
get_neuron_info_by_id_or_subaccount: ActorMethod<
|
|
488
|
+
[NeuronIdOrSubaccount],
|
|
489
|
+
Result_4
|
|
490
|
+
>;
|
|
491
|
+
get_node_provider_by_caller: ActorMethod<[null], Result_5>;
|
|
492
|
+
get_pending_proposals: ActorMethod<[], Array<ProposalInfo>>;
|
|
493
|
+
get_proposal_info: ActorMethod<[bigint], [] | [ProposalInfo]>;
|
|
494
|
+
list_known_neurons: ActorMethod<[], ListKnownNeuronsResponse>;
|
|
495
|
+
list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
|
|
496
|
+
list_node_providers: ActorMethod<[], ListNodeProvidersResponse>;
|
|
497
|
+
list_proposals: ActorMethod<[ListProposalInfo], ListProposalInfoResponse>;
|
|
498
|
+
manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
|
|
499
|
+
settle_community_fund_participation: ActorMethod<
|
|
500
|
+
[SettleCommunityFundParticipation],
|
|
501
|
+
Result
|
|
502
|
+
>;
|
|
503
|
+
transfer_gtc_neuron: ActorMethod<[NeuronId, NeuronId], Result>;
|
|
504
|
+
update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;
|
|
450
505
|
}
|