@dfinity/nns 0.7.0 → 0.8.0-next-2022-09-23
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 +27 -0
- 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.certified.idl.js +9 -5
- package/dist/candid/sns_wasm.d.ts +24 -21
- package/dist/candid/sns_wasm.did +6 -6
- package/dist/candid/sns_wasm.idl.js +9 -5
- 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-5S3NUDW3.js +2 -0
- package/dist/esm/chunk-5S3NUDW3.js.map +7 -0
- 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/esm/sns_wasm.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-LBNBEXHT.js +0 -2
- package/dist/esm/chunk-LBNBEXHT.js.map +0 -7
- package/dist/esm/chunk-LWTBV6PO.js +0 -2
- package/dist/esm/chunk-LWTBV6PO.js.map +0 -7
|
@@ -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
|
});
|
|
@@ -466,6 +523,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
466
523
|
['query'],
|
|
467
524
|
),
|
|
468
525
|
'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
|
|
526
|
+
'settle_community_fund_participation' : IDL.Func(
|
|
527
|
+
[SettleCommunityFundParticipation],
|
|
528
|
+
[Result],
|
|
529
|
+
[],
|
|
530
|
+
),
|
|
469
531
|
'transfer_gtc_neuron' : IDL.Func([NeuronId, NeuronId], [Result], []),
|
|
470
532
|
'update_node_provider' : IDL.Func([UpdateNodeProvider], [Result], []),
|
|
471
533
|
});
|
|
@@ -551,6 +613,14 @@ export const init = ({ IDL }) => {
|
|
|
551
613
|
'error_message' : IDL.Text,
|
|
552
614
|
'error_type' : IDL.Int32,
|
|
553
615
|
});
|
|
616
|
+
const CfNeuron = IDL.Record({
|
|
617
|
+
'nns_neuron_id' : IDL.Nat64,
|
|
618
|
+
'amount_icp_e8s' : IDL.Nat64,
|
|
619
|
+
});
|
|
620
|
+
const CfParticipant = IDL.Record({
|
|
621
|
+
'hotkey_principal' : IDL.Text,
|
|
622
|
+
'cf_neurons' : IDL.Vec(CfNeuron),
|
|
623
|
+
});
|
|
554
624
|
const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
|
|
555
625
|
const Tally = IDL.Record({
|
|
556
626
|
'no' : IDL.Nat64,
|
|
@@ -590,6 +660,9 @@ export const init = ({ IDL }) => {
|
|
|
590
660
|
'hot_key_to_remove' : IDL.Opt(IDL.Principal),
|
|
591
661
|
});
|
|
592
662
|
const AddHotKey = IDL.Record({ 'new_hot_key' : IDL.Opt(IDL.Principal) });
|
|
663
|
+
const ChangeAutoStakeMaturity = IDL.Record({
|
|
664
|
+
'requested_setting_for_auto_stake_maturity' : IDL.Bool,
|
|
665
|
+
});
|
|
593
666
|
const IncreaseDissolveDelay = IDL.Record({
|
|
594
667
|
'additional_dissolve_delay_seconds' : IDL.Nat32,
|
|
595
668
|
});
|
|
@@ -599,6 +672,7 @@ export const init = ({ IDL }) => {
|
|
|
599
672
|
const Operation = IDL.Variant({
|
|
600
673
|
'RemoveHotKey' : RemoveHotKey,
|
|
601
674
|
'AddHotKey' : AddHotKey,
|
|
675
|
+
'ChangeAutoStakeMaturity' : ChangeAutoStakeMaturity,
|
|
602
676
|
'StopDissolving' : IDL.Record({}),
|
|
603
677
|
'StartDissolving' : IDL.Record({}),
|
|
604
678
|
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
@@ -619,6 +693,9 @@ export const init = ({ IDL }) => {
|
|
|
619
693
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
620
694
|
'nonce' : IDL.Nat64,
|
|
621
695
|
});
|
|
696
|
+
const StakeMaturity = IDL.Record({
|
|
697
|
+
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
698
|
+
});
|
|
622
699
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
623
700
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
624
701
|
const Disburse = IDL.Record({
|
|
@@ -635,6 +712,7 @@ export const init = ({ IDL }) => {
|
|
|
635
712
|
'Merge' : Merge,
|
|
636
713
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
637
714
|
'MakeProposal' : Proposal,
|
|
715
|
+
'StakeMaturity' : StakeMaturity,
|
|
638
716
|
'MergeMaturity' : MergeMaturity,
|
|
639
717
|
'Disburse' : Disburse,
|
|
640
718
|
});
|
|
@@ -651,6 +729,20 @@ export const init = ({ IDL }) => {
|
|
|
651
729
|
'nns_function' : IDL.Int32,
|
|
652
730
|
'payload' : IDL.Vec(IDL.Nat8),
|
|
653
731
|
});
|
|
732
|
+
const Params = IDL.Record({
|
|
733
|
+
'min_participant_icp_e8s' : IDL.Nat64,
|
|
734
|
+
'max_icp_e8s' : IDL.Nat64,
|
|
735
|
+
'swap_due_timestamp_seconds' : IDL.Nat64,
|
|
736
|
+
'min_participants' : IDL.Nat32,
|
|
737
|
+
'sns_token_e8s' : IDL.Nat64,
|
|
738
|
+
'max_participant_icp_e8s' : IDL.Nat64,
|
|
739
|
+
'min_icp_e8s' : IDL.Nat64,
|
|
740
|
+
});
|
|
741
|
+
const OpenSnsTokenSwap = IDL.Record({
|
|
742
|
+
'community_fund_investment_e8s' : IDL.Opt(IDL.Nat64),
|
|
743
|
+
'target_swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
744
|
+
'params' : IDL.Opt(Params),
|
|
745
|
+
});
|
|
654
746
|
const TimeWindow = IDL.Record({
|
|
655
747
|
'start_timestamp_seconds' : IDL.Nat64,
|
|
656
748
|
'end_timestamp_seconds' : IDL.Nat64,
|
|
@@ -683,6 +775,7 @@ export const init = ({ IDL }) => {
|
|
|
683
775
|
'ManageNeuron' : ManageNeuron,
|
|
684
776
|
'ExecuteNnsFunction' : ExecuteNnsFunction,
|
|
685
777
|
'RewardNodeProvider' : RewardNodeProvider,
|
|
778
|
+
'OpenSnsTokenSwap' : OpenSnsTokenSwap,
|
|
686
779
|
'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
|
|
687
780
|
'SetDefaultFollowees' : SetDefaultFollowees,
|
|
688
781
|
'RewardNodeProviders' : RewardNodeProviders,
|
|
@@ -705,17 +798,22 @@ export const init = ({ IDL }) => {
|
|
|
705
798
|
const ProposalData = IDL.Record({
|
|
706
799
|
'id' : IDL.Opt(NeuronId),
|
|
707
800
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
801
|
+
'cf_participants' : IDL.Vec(CfParticipant),
|
|
708
802
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
709
803
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
710
804
|
'reward_event_round' : IDL.Nat64,
|
|
711
805
|
'failed_timestamp_seconds' : IDL.Nat64,
|
|
712
806
|
'reject_cost_e8s' : IDL.Nat64,
|
|
713
807
|
'latest_tally' : IDL.Opt(Tally),
|
|
808
|
+
'sns_token_swap_lifecycle' : IDL.Opt(IDL.Int32),
|
|
714
809
|
'decided_timestamp_seconds' : IDL.Nat64,
|
|
715
810
|
'proposal' : IDL.Opt(Proposal),
|
|
716
811
|
'proposer' : IDL.Opt(NeuronId),
|
|
717
812
|
'wait_for_quiet_state' : IDL.Opt(WaitForQuietState),
|
|
718
813
|
'executed_timestamp_seconds' : IDL.Nat64,
|
|
814
|
+
'original_total_community_fund_maturity_e8s_equivalent' : IDL.Opt(
|
|
815
|
+
IDL.Nat64
|
|
816
|
+
),
|
|
719
817
|
});
|
|
720
818
|
const Command_2 = IDL.Variant({
|
|
721
819
|
'Spawn' : NeuronId,
|
|
@@ -723,6 +821,7 @@ export const init = ({ IDL }) => {
|
|
|
723
821
|
'Configure' : Configure,
|
|
724
822
|
'Merge' : Merge,
|
|
725
823
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
824
|
+
'SyncCommand' : IDL.Record({}),
|
|
726
825
|
'ClaimOrRefreshNeuron' : ClaimOrRefresh,
|
|
727
826
|
'MergeMaturity' : MergeMaturity,
|
|
728
827
|
'Disburse' : Disburse,
|
|
@@ -741,6 +840,7 @@ export const init = ({ IDL }) => {
|
|
|
741
840
|
});
|
|
742
841
|
const Neuron = IDL.Record({
|
|
743
842
|
'id' : IDL.Opt(NeuronId),
|
|
843
|
+
'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
744
844
|
'controller' : IDL.Opt(IDL.Principal),
|
|
745
845
|
'recent_ballots' : IDL.Vec(BallotInfo),
|
|
746
846
|
'kyc_verified' : IDL.Bool,
|
|
@@ -748,6 +848,7 @@ export const init = ({ IDL }) => {
|
|
|
748
848
|
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
749
849
|
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
750
850
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
851
|
+
'auto_stake_maturity' : IDL.Opt(IDL.Bool),
|
|
751
852
|
'aging_since_timestamp_seconds' : IDL.Nat64,
|
|
752
853
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
753
854
|
'account' : IDL.Vec(IDL.Nat8),
|
|
@@ -764,10 +865,13 @@ export const init = ({ IDL }) => {
|
|
|
764
865
|
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
765
866
|
MostRecentMonthlyNodeProviderRewards
|
|
766
867
|
),
|
|
868
|
+
'maturity_modulation_last_updated_at_timestamp_seconds' : IDL.Opt(
|
|
869
|
+
IDL.Nat64
|
|
870
|
+
),
|
|
767
871
|
'wait_for_quiet_threshold_seconds' : IDL.Nat64,
|
|
768
872
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
769
|
-
'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
|
|
770
873
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
874
|
+
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
771
875
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
772
876
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
773
877
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
@@ -776,7 +880,6 @@ export const init = ({ IDL }) => {
|
|
|
776
880
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
777
881
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
778
882
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
779
|
-
'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
|
|
780
883
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
781
884
|
});
|
|
782
885
|
return [Governance];
|
package/dist/candid/ledger.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { ActorMethod } from "@dfinity/agent";
|
|
1
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
|
+
|
|
2
4
|
export interface AccountBalanceArgs {
|
|
3
5
|
account: AccountIdentifier;
|
|
4
6
|
}
|
|
5
|
-
export type AccountIdentifier =
|
|
7
|
+
export type AccountIdentifier = Uint8Array;
|
|
6
8
|
export interface Archive {
|
|
7
9
|
canister_id: Principal;
|
|
8
10
|
}
|
|
@@ -12,7 +14,7 @@ export interface Archives {
|
|
|
12
14
|
export interface Block {
|
|
13
15
|
transaction: Transaction;
|
|
14
16
|
timestamp: TimeStamp;
|
|
15
|
-
parent_hash: [] | [
|
|
17
|
+
parent_hash: [] | [Uint8Array];
|
|
16
18
|
}
|
|
17
19
|
export type BlockIndex = bigint;
|
|
18
20
|
export interface BlockRange {
|
|
@@ -44,14 +46,12 @@ export type QueryArchiveError =
|
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
| { Other: { error_message: string; error_code: bigint } };
|
|
47
|
-
export type QueryArchiveFn =
|
|
48
|
-
arg_0: GetBlocksArgs
|
|
49
|
-
) => Promise<QueryArchiveResult>;
|
|
49
|
+
export type QueryArchiveFn = ActorMethod<[GetBlocksArgs], QueryArchiveResult>;
|
|
50
50
|
export type QueryArchiveResult =
|
|
51
51
|
| { Ok: BlockRange }
|
|
52
52
|
| { Err: QueryArchiveError };
|
|
53
53
|
export interface QueryBlocksResponse {
|
|
54
|
-
certificate: [] | [
|
|
54
|
+
certificate: [] | [Uint8Array];
|
|
55
55
|
blocks: Array<Block>;
|
|
56
56
|
chain_length: bigint;
|
|
57
57
|
first_block_index: BlockIndex;
|
|
@@ -61,7 +61,7 @@ export interface QueryBlocksResponse {
|
|
|
61
61
|
length: bigint;
|
|
62
62
|
}>;
|
|
63
63
|
}
|
|
64
|
-
export type SubAccount =
|
|
64
|
+
export type SubAccount = Uint8Array;
|
|
65
65
|
export interface TimeStamp {
|
|
66
66
|
timestamp_nanos: bigint;
|
|
67
67
|
}
|
|
@@ -95,12 +95,12 @@ export interface TransferFee {
|
|
|
95
95
|
export type TransferFeeArg = {};
|
|
96
96
|
export type TransferResult = { Ok: BlockIndex } | { Err: TransferError };
|
|
97
97
|
export interface _SERVICE {
|
|
98
|
-
account_balance:
|
|
99
|
-
archives:
|
|
100
|
-
decimals:
|
|
101
|
-
name:
|
|
102
|
-
query_blocks:
|
|
103
|
-
symbol:
|
|
104
|
-
transfer:
|
|
105
|
-
transfer_fee:
|
|
98
|
+
account_balance: ActorMethod<[AccountBalanceArgs], Tokens>;
|
|
99
|
+
archives: ActorMethod<[], Archives>;
|
|
100
|
+
decimals: ActorMethod<[], { decimals: number }>;
|
|
101
|
+
name: ActorMethod<[], { name: string }>;
|
|
102
|
+
query_blocks: ActorMethod<[GetBlocksArgs], QueryBlocksResponse>;
|
|
103
|
+
symbol: ActorMethod<[], { symbol: string }>;
|
|
104
|
+
transfer: ActorMethod<[TransferArgs], TransferResult>;
|
|
105
|
+
transfer_fee: ActorMethod<[TransferFeeArg], TransferFee>;
|
|
106
106
|
}
|
|
@@ -21,6 +21,8 @@ export const idlFactory = ({ IDL }) => {
|
|
|
21
21
|
const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });
|
|
22
22
|
const NeuronDistribution = IDL.Record({
|
|
23
23
|
'controller' : IDL.Opt(IDL.Principal),
|
|
24
|
+
'dissolve_delay_seconds' : IDL.Nat64,
|
|
25
|
+
'memo' : IDL.Nat64,
|
|
24
26
|
'stake_e8s' : IDL.Nat64,
|
|
25
27
|
});
|
|
26
28
|
const DeveloperDistribution = IDL.Record({
|
|
@@ -44,21 +46,18 @@ export const idlFactory = ({ IDL }) => {
|
|
|
44
46
|
});
|
|
45
47
|
const SnsInitPayload = IDL.Record({
|
|
46
48
|
'url' : IDL.Opt(IDL.Text),
|
|
47
|
-
'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
48
49
|
'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),
|
|
49
50
|
'token_symbol' : IDL.Opt(IDL.Text),
|
|
50
|
-
'max_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
51
51
|
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
52
52
|
'logo' : IDL.Opt(IDL.Text),
|
|
53
53
|
'name' : IDL.Opt(IDL.Text),
|
|
54
|
+
'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
|
|
54
55
|
'description' : IDL.Opt(IDL.Text),
|
|
55
|
-
'min_participants' : IDL.Opt(IDL.Nat32),
|
|
56
56
|
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
57
|
+
'sns_initialization_parameters' : IDL.Opt(IDL.Text),
|
|
57
58
|
'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),
|
|
58
59
|
'token_name' : IDL.Opt(IDL.Text),
|
|
59
|
-
'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
60
60
|
'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),
|
|
61
|
-
'min_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
62
61
|
});
|
|
63
62
|
const DeployNewSnsRequest = IDL.Record({
|
|
64
63
|
'sns_init_payload' : IDL.Opt(SnsInitPayload),
|
|
@@ -102,6 +101,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
102
101
|
[DeployNewSnsResponse],
|
|
103
102
|
[],
|
|
104
103
|
),
|
|
104
|
+
'get_latest_sns_version_pretty' : IDL.Func(
|
|
105
|
+
[IDL.Null],
|
|
106
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
107
|
+
[],
|
|
108
|
+
),
|
|
105
109
|
'get_next_sns_version' : IDL.Func(
|
|
106
110
|
[GetNextSnsVersionRequest],
|
|
107
111
|
[GetNextSnsVersionResponse],
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ActorMethod } from "@dfinity/agent";
|
|
1
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
|
+
|
|
2
4
|
export interface AddWasmRequest {
|
|
3
|
-
hash:
|
|
5
|
+
hash: Uint8Array;
|
|
4
6
|
wasm: [] | [SnsWasm];
|
|
5
7
|
}
|
|
6
8
|
export interface AddWasmResponse {
|
|
@@ -36,7 +38,7 @@ export interface GetNextSnsVersionResponse {
|
|
|
36
38
|
next_version: [] | [SnsVersion];
|
|
37
39
|
}
|
|
38
40
|
export interface GetWasmRequest {
|
|
39
|
-
hash:
|
|
41
|
+
hash: Uint8Array;
|
|
40
42
|
}
|
|
41
43
|
export interface GetWasmResponse {
|
|
42
44
|
wasm: [] | [SnsWasm];
|
|
@@ -49,9 +51,11 @@ export interface ListDeployedSnsesResponse {
|
|
|
49
51
|
}
|
|
50
52
|
export interface NeuronDistribution {
|
|
51
53
|
controller: [] | [Principal];
|
|
54
|
+
dissolve_delay_seconds: bigint;
|
|
55
|
+
memo: bigint;
|
|
52
56
|
stake_e8s: bigint;
|
|
53
57
|
}
|
|
54
|
-
export type Result = { Error: SnsWasmError } | { Hash:
|
|
58
|
+
export type Result = { Error: SnsWasmError } | { Hash: Uint8Array };
|
|
55
59
|
export interface SnsCanisterIds {
|
|
56
60
|
root: [] | [Principal];
|
|
57
61
|
swap: [] | [Principal];
|
|
@@ -60,31 +64,28 @@ export interface SnsCanisterIds {
|
|
|
60
64
|
}
|
|
61
65
|
export interface SnsInitPayload {
|
|
62
66
|
url: [] | [string];
|
|
63
|
-
min_participant_icp_e8s: [] | [bigint];
|
|
64
67
|
fallback_controller_principal_ids: Array<string>;
|
|
65
68
|
token_symbol: [] | [string];
|
|
66
|
-
max_icp_e8s: [] | [bigint];
|
|
67
69
|
neuron_minimum_stake_e8s: [] | [bigint];
|
|
68
70
|
logo: [] | [string];
|
|
69
71
|
name: [] | [string];
|
|
72
|
+
neuron_minimum_dissolve_delay_to_vote_seconds: [] | [bigint];
|
|
70
73
|
description: [] | [string];
|
|
71
|
-
min_participants: [] | [number];
|
|
72
74
|
transaction_fee_e8s: [] | [bigint];
|
|
75
|
+
sns_initialization_parameters: [] | [string];
|
|
73
76
|
initial_token_distribution: [] | [InitialTokenDistribution];
|
|
74
77
|
token_name: [] | [string];
|
|
75
|
-
max_participant_icp_e8s: [] | [bigint];
|
|
76
78
|
proposal_reject_cost_e8s: [] | [bigint];
|
|
77
|
-
min_icp_e8s: [] | [bigint];
|
|
78
79
|
}
|
|
79
80
|
export interface SnsVersion {
|
|
80
|
-
archive_wasm_hash:
|
|
81
|
-
root_wasm_hash:
|
|
82
|
-
swap_wasm_hash:
|
|
83
|
-
ledger_wasm_hash:
|
|
84
|
-
governance_wasm_hash:
|
|
81
|
+
archive_wasm_hash: Uint8Array;
|
|
82
|
+
root_wasm_hash: Uint8Array;
|
|
83
|
+
swap_wasm_hash: Uint8Array;
|
|
84
|
+
ledger_wasm_hash: Uint8Array;
|
|
85
|
+
governance_wasm_hash: Uint8Array;
|
|
85
86
|
}
|
|
86
87
|
export interface SnsWasm {
|
|
87
|
-
wasm:
|
|
88
|
+
wasm: Uint8Array;
|
|
88
89
|
canister_type: number;
|
|
89
90
|
}
|
|
90
91
|
export interface SnsWasmCanisterInitPayload {
|
|
@@ -102,11 +103,13 @@ export interface TreasuryDistribution {
|
|
|
102
103
|
total_e8s: bigint;
|
|
103
104
|
}
|
|
104
105
|
export interface _SERVICE {
|
|
105
|
-
add_wasm:
|
|
106
|
-
deploy_new_sns:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
add_wasm: ActorMethod<[AddWasmRequest], AddWasmResponse>;
|
|
107
|
+
deploy_new_sns: ActorMethod<[DeployNewSnsRequest], DeployNewSnsResponse>;
|
|
108
|
+
get_latest_sns_version_pretty: ActorMethod<[null], Array<[string, string]>>;
|
|
109
|
+
get_next_sns_version: ActorMethod<
|
|
110
|
+
[GetNextSnsVersionRequest],
|
|
111
|
+
GetNextSnsVersionResponse
|
|
112
|
+
>;
|
|
113
|
+
get_wasm: ActorMethod<[GetWasmRequest], GetWasmResponse>;
|
|
114
|
+
list_deployed_snses: ActorMethod<[{}], ListDeployedSnsesResponse>;
|
|
112
115
|
}
|
package/dist/candid/sns_wasm.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit fb28a950f1799dec4a67cc21abd3888686ab50d9 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
|
|
2
2
|
type AddWasmRequest = record { hash : vec nat8; wasm : opt SnsWasm };
|
|
3
3
|
type AddWasmResponse = record { result : opt Result };
|
|
4
4
|
type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution };
|
|
@@ -28,6 +28,8 @@ type InitialTokenDistribution = variant {
|
|
|
28
28
|
type ListDeployedSnsesResponse = record { instances : vec DeployedSns };
|
|
29
29
|
type NeuronDistribution = record {
|
|
30
30
|
controller : opt principal;
|
|
31
|
+
dissolve_delay_seconds : nat64;
|
|
32
|
+
memo : nat64;
|
|
31
33
|
stake_e8s : nat64;
|
|
32
34
|
};
|
|
33
35
|
type Result = variant { Error : SnsWasmError; Hash : vec nat8 };
|
|
@@ -39,21 +41,18 @@ type SnsCanisterIds = record {
|
|
|
39
41
|
};
|
|
40
42
|
type SnsInitPayload = record {
|
|
41
43
|
url : opt text;
|
|
42
|
-
min_participant_icp_e8s : opt nat64;
|
|
43
44
|
fallback_controller_principal_ids : vec text;
|
|
44
45
|
token_symbol : opt text;
|
|
45
|
-
max_icp_e8s : opt nat64;
|
|
46
46
|
neuron_minimum_stake_e8s : opt nat64;
|
|
47
47
|
logo : opt text;
|
|
48
48
|
name : opt text;
|
|
49
|
+
neuron_minimum_dissolve_delay_to_vote_seconds : opt nat64;
|
|
49
50
|
description : opt text;
|
|
50
|
-
min_participants : opt nat32;
|
|
51
51
|
transaction_fee_e8s : opt nat64;
|
|
52
|
+
sns_initialization_parameters : opt text;
|
|
52
53
|
initial_token_distribution : opt InitialTokenDistribution;
|
|
53
54
|
token_name : opt text;
|
|
54
|
-
max_participant_icp_e8s : opt nat64;
|
|
55
55
|
proposal_reject_cost_e8s : opt nat64;
|
|
56
|
-
min_icp_e8s : opt nat64;
|
|
57
56
|
};
|
|
58
57
|
type SnsVersion = record {
|
|
59
58
|
archive_wasm_hash : vec nat8;
|
|
@@ -76,6 +75,7 @@ type TreasuryDistribution = record { total_e8s : nat64 };
|
|
|
76
75
|
service : (SnsWasmCanisterInitPayload) -> {
|
|
77
76
|
add_wasm : (AddWasmRequest) -> (AddWasmResponse);
|
|
78
77
|
deploy_new_sns : (DeployNewSnsRequest) -> (DeployNewSnsResponse);
|
|
78
|
+
get_latest_sns_version_pretty : (null) -> (vec record { text; text }) query;
|
|
79
79
|
get_next_sns_version : (GetNextSnsVersionRequest) -> (
|
|
80
80
|
GetNextSnsVersionResponse,
|
|
81
81
|
) query;
|
|
@@ -21,6 +21,8 @@ export const idlFactory = ({ IDL }) => {
|
|
|
21
21
|
const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });
|
|
22
22
|
const NeuronDistribution = IDL.Record({
|
|
23
23
|
'controller' : IDL.Opt(IDL.Principal),
|
|
24
|
+
'dissolve_delay_seconds' : IDL.Nat64,
|
|
25
|
+
'memo' : IDL.Nat64,
|
|
24
26
|
'stake_e8s' : IDL.Nat64,
|
|
25
27
|
});
|
|
26
28
|
const DeveloperDistribution = IDL.Record({
|
|
@@ -44,21 +46,18 @@ export const idlFactory = ({ IDL }) => {
|
|
|
44
46
|
});
|
|
45
47
|
const SnsInitPayload = IDL.Record({
|
|
46
48
|
'url' : IDL.Opt(IDL.Text),
|
|
47
|
-
'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
48
49
|
'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),
|
|
49
50
|
'token_symbol' : IDL.Opt(IDL.Text),
|
|
50
|
-
'max_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
51
51
|
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
52
52
|
'logo' : IDL.Opt(IDL.Text),
|
|
53
53
|
'name' : IDL.Opt(IDL.Text),
|
|
54
|
+
'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
|
|
54
55
|
'description' : IDL.Opt(IDL.Text),
|
|
55
|
-
'min_participants' : IDL.Opt(IDL.Nat32),
|
|
56
56
|
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
57
|
+
'sns_initialization_parameters' : IDL.Opt(IDL.Text),
|
|
57
58
|
'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),
|
|
58
59
|
'token_name' : IDL.Opt(IDL.Text),
|
|
59
|
-
'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
60
60
|
'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),
|
|
61
|
-
'min_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
62
61
|
});
|
|
63
62
|
const DeployNewSnsRequest = IDL.Record({
|
|
64
63
|
'sns_init_payload' : IDL.Opt(SnsInitPayload),
|
|
@@ -102,6 +101,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
102
101
|
[DeployNewSnsResponse],
|
|
103
102
|
[],
|
|
104
103
|
),
|
|
104
|
+
'get_latest_sns_version_pretty' : IDL.Func(
|
|
105
|
+
[IDL.Null],
|
|
106
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
107
|
+
['query'],
|
|
108
|
+
),
|
|
105
109
|
'get_next_sns_version' : IDL.Func(
|
|
106
110
|
[GetNextSnsVersionRequest],
|
|
107
111
|
[GetNextSnsVersionResponse],
|