@dfinity/nns 0.5.0 → 0.6.0-nightly-2022-07-21
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 +1 -1
- package/dist/candid/genesis_token.certified.idl.d.ts +2 -0
- package/dist/candid/genesis_token.certified.idl.js +2 -1
- package/dist/candid/genesis_token.d.ts +33 -0
- package/dist/candid/genesis_token.did +23 -22
- package/dist/candid/genesis_token.idl.d.ts +0 -8
- package/dist/candid/genesis_token.idl.js +2 -1
- package/dist/candid/governance.certified.idl.js +86 -33
- package/dist/candid/{governanceTypes.d.ts → governance.d.ts} +28 -1
- package/dist/candid/governance.did +26 -5
- package/dist/candid/governance.idl.d.ts +0 -3
- package/dist/candid/governance.idl.js +86 -33
- package/dist/candid/ledger.certified.idl.js +1 -1
- package/dist/candid/{ledgerTypes.d.ts → ledger.d.ts} +0 -5
- package/dist/candid/ledger.did +2 -2
- package/dist/candid/ledger.idl.d.ts +0 -3
- package/dist/candid/ledger.idl.js +1 -1
- package/dist/candid/sns_wasm.certified.idl.d.ts +2 -0
- package/dist/candid/sns_wasm.certified.idl.js +117 -0
- package/dist/candid/sns_wasm.d.ts +106 -0
- package/dist/candid/sns_wasm.did +76 -0
- package/dist/candid/sns_wasm.idl.d.ts +2 -0
- package/dist/candid/sns_wasm.idl.js +117 -0
- package/dist/cjs/index.cjs.js +32 -32
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/account_identifier.js +1 -1
- package/dist/esm/chunk-CKIW7YKS.js +2 -0
- package/dist/esm/chunk-CKIW7YKS.js.map +7 -0
- package/dist/esm/{chunk-S37GZOMR.js → chunk-FZGMZSQZ.js} +3 -3
- package/dist/esm/chunk-FZGMZSQZ.js.map +7 -0
- package/dist/esm/chunk-H6I2Z4SN.js +7 -0
- package/dist/esm/chunk-H6I2Z4SN.js.map +7 -0
- package/dist/esm/{chunk-FL7E4DL3.js → chunk-IPUXUCZB.js} +2 -2
- package/dist/esm/chunk-IPUXUCZB.js.map +7 -0
- package/dist/esm/chunk-JUIC5FZJ.js +2 -0
- package/dist/esm/chunk-JUIC5FZJ.js.map +7 -0
- package/dist/esm/chunk-MGC7CRB4.js +11 -0
- package/dist/esm/chunk-MGC7CRB4.js.map +7 -0
- package/dist/esm/chunk-NN3MUNHF.js +2 -0
- package/dist/esm/chunk-NN3MUNHF.js.map +7 -0
- package/dist/esm/chunk-NNJFBVJ3.js +831 -0
- package/dist/esm/{chunk-EDMSX7GK.js.map → chunk-NNJFBVJ3.js.map} +3 -3
- package/dist/esm/{chunk-MTPVFXPH.js → chunk-RHCXRQFK.js} +2 -2
- package/dist/esm/{chunk-MTPVFXPH.js.map → chunk-RHCXRQFK.js.map} +1 -1
- package/dist/esm/chunk-TLWRX3CX.js +9 -0
- package/dist/esm/chunk-TLWRX3CX.js.map +7 -0
- package/dist/esm/genesis_token.canister.js +2 -0
- package/dist/esm/{genesis_token.js.map → genesis_token.canister.js.map} +0 -0
- package/dist/esm/governance.canister.js +2 -0
- package/dist/esm/{governance.js.map → governance.canister.js.map} +0 -0
- package/dist/esm/icp.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ledger.canister.js +2 -0
- package/dist/esm/{ledger.js.map → ledger.canister.js.map} +0 -0
- package/dist/esm/sns_wasm.canister.js +2 -0
- package/dist/esm/sns_wasm.canister.js.map +7 -0
- package/dist/proto/governance.proto +2 -0
- package/dist/proto/governance_pb.d.ts +7 -0
- package/dist/proto/governance_pb.js +57 -2
- package/dist/types/account_identifier.d.ts +3 -1
- package/dist/types/canisters/governance/request.converters.d.ts +4 -3
- package/dist/types/canisters/governance/request.proto.converters.d.ts +2 -2
- package/dist/types/canisters/governance/response.converters.d.ts +12 -5
- package/dist/types/canisters/governance/services.d.ts +1 -2
- package/dist/types/canisters/ledger/ledger.request.converts.d.ts +2 -2
- package/dist/types/constants/canister_ids.d.ts +1 -0
- package/dist/types/errors/governance.errors.d.ts +2 -2
- package/dist/types/errors/ledger.errors.d.ts +2 -2
- package/dist/types/genesis_token.canister.d.ts +11 -0
- package/dist/types/{governance.d.ts → governance.canister.d.ts} +11 -5
- package/dist/types/index.d.ts +8 -5
- package/dist/types/{ledger.d.ts → ledger.canister.d.ts} +4 -4
- package/dist/types/sns_wasm.canister.d.ts +11 -0
- package/dist/types/types/canister.options.d.ts +8 -0
- package/dist/types/types/governance.options.d.ts +5 -0
- package/dist/types/types/governance_converters.d.ts +22 -5
- package/dist/types/types/ledger.options.d.ts +15 -0
- package/dist/types/types/ledger_converters.d.ts +3 -3
- package/dist/types/types/sns_wasm.options.d.ts +3 -0
- package/dist/types/utils/account_identifier.utils.d.ts +2 -2
- package/dist/types/utils/actor.utils.d.ts +14 -0
- package/dist/types/utils/agent.utils.d.ts +1 -1
- package/dist/types/utils/did.utils.d.ts +1 -0
- package/dist/types/utils/proto.utils.d.ts +2 -2
- package/package.json +10 -36
- package/dist/esm/chunk-BDJ6FQPO.js +0 -2
- package/dist/esm/chunk-BDJ6FQPO.js.map +0 -7
- package/dist/esm/chunk-C2ZTAHQL.js +0 -3
- package/dist/esm/chunk-C2ZTAHQL.js.map +0 -7
- package/dist/esm/chunk-CVYDMRZA.js +0 -7
- package/dist/esm/chunk-CVYDMRZA.js.map +0 -7
- package/dist/esm/chunk-EDMSX7GK.js +0 -831
- package/dist/esm/chunk-FL7E4DL3.js.map +0 -7
- package/dist/esm/chunk-KXYKDST6.js +0 -17
- package/dist/esm/chunk-KXYKDST6.js.map +0 -7
- package/dist/esm/chunk-S37GZOMR.js.map +0 -7
- package/dist/esm/chunk-SOPGOKKH.js +0 -2
- package/dist/esm/chunk-SOPGOKKH.js.map +0 -7
- package/dist/esm/genesis_token.js +0 -2
- package/dist/esm/governance.js +0 -2
- package/dist/esm/ledger.js +0 -2
- package/dist/types/genesis_token.d.ts +0 -17
- package/dist/types/types/governance.d.ts +0 -10
- package/dist/types/types/ledger.d.ts +0 -18
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
/* Do not edit. Compiled with ./scripts/compile-idl-js from candid/governance.did */
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/governance.did */
|
|
2
2
|
export const idlFactory = ({ IDL }) => {
|
|
3
3
|
const Proposal = IDL.Rec();
|
|
4
4
|
const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
5
5
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
6
|
+
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
7
|
+
const NodeProvider = IDL.Record({
|
|
8
|
+
'id' : IDL.Opt(IDL.Principal),
|
|
9
|
+
'reward_account' : IDL.Opt(AccountIdentifier),
|
|
10
|
+
});
|
|
11
|
+
const RewardToNeuron = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64 });
|
|
12
|
+
const RewardToAccount = IDL.Record({
|
|
13
|
+
'to_account' : IDL.Opt(AccountIdentifier),
|
|
14
|
+
});
|
|
15
|
+
const RewardMode = IDL.Variant({
|
|
16
|
+
'RewardToNeuron' : RewardToNeuron,
|
|
17
|
+
'RewardToAccount' : RewardToAccount,
|
|
18
|
+
});
|
|
19
|
+
const RewardNodeProvider = IDL.Record({
|
|
20
|
+
'node_provider' : IDL.Opt(NodeProvider),
|
|
21
|
+
'reward_mode' : IDL.Opt(RewardMode),
|
|
22
|
+
'amount_e8s' : IDL.Nat64,
|
|
23
|
+
});
|
|
24
|
+
const MostRecentMonthlyNodeProviderRewards = IDL.Record({
|
|
25
|
+
'timestamp' : IDL.Nat64,
|
|
26
|
+
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
27
|
+
});
|
|
6
28
|
const GovernanceCachedMetrics = IDL.Record({
|
|
7
29
|
'not_dissolving_neurons_e8s_buckets' : IDL.Vec(
|
|
8
30
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
@@ -29,11 +51,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
29
51
|
'community_fund_total_staked_e8s' : IDL.Nat64,
|
|
30
52
|
'timestamp_seconds' : IDL.Nat64,
|
|
31
53
|
});
|
|
32
|
-
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
33
|
-
const NodeProvider = IDL.Record({
|
|
34
|
-
'id' : IDL.Opt(IDL.Principal),
|
|
35
|
-
'reward_account' : IDL.Opt(AccountIdentifier),
|
|
36
|
-
});
|
|
37
54
|
const NetworkEconomics = IDL.Record({
|
|
38
55
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
39
56
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -115,6 +132,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
115
132
|
'StartDissolving' : IDL.Record({}),
|
|
116
133
|
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
117
134
|
'JoinCommunityFund' : IDL.Record({}),
|
|
135
|
+
'LeaveCommunityFund' : IDL.Record({}),
|
|
118
136
|
'SetDissolveTimestamp' : SetDissolveTimestamp,
|
|
119
137
|
});
|
|
120
138
|
const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
|
|
@@ -162,18 +180,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
162
180
|
'nns_function' : IDL.Int32,
|
|
163
181
|
'payload' : IDL.Vec(IDL.Nat8),
|
|
164
182
|
});
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
'
|
|
183
|
+
const TimeWindow = IDL.Record({
|
|
184
|
+
'start_timestamp_seconds' : IDL.Nat64,
|
|
185
|
+
'end_timestamp_seconds' : IDL.Nat64,
|
|
168
186
|
});
|
|
169
|
-
const
|
|
170
|
-
'
|
|
171
|
-
'RewardToAccount' : RewardToAccount,
|
|
187
|
+
const SetOpenTimeWindowRequest = IDL.Record({
|
|
188
|
+
'open_time_window' : IDL.Opt(TimeWindow),
|
|
172
189
|
});
|
|
173
|
-
const
|
|
174
|
-
'
|
|
175
|
-
'
|
|
176
|
-
'amount_e8s' : IDL.Nat64,
|
|
190
|
+
const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
|
|
191
|
+
'request' : IDL.Opt(SetOpenTimeWindowRequest),
|
|
192
|
+
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
177
193
|
});
|
|
178
194
|
const SetDefaultFollowees = IDL.Record({
|
|
179
195
|
'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
@@ -196,6 +212,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
196
212
|
'ManageNeuron' : ManageNeuron,
|
|
197
213
|
'ExecuteNnsFunction' : ExecuteNnsFunction,
|
|
198
214
|
'RewardNodeProvider' : RewardNodeProvider,
|
|
215
|
+
'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
|
|
199
216
|
'SetDefaultFollowees' : SetDefaultFollowees,
|
|
200
217
|
'RewardNodeProviders' : RewardNodeProviders,
|
|
201
218
|
'ManageNetworkEconomics' : NetworkEconomics,
|
|
@@ -230,7 +247,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
230
247
|
'executed_timestamp_seconds' : IDL.Nat64,
|
|
231
248
|
});
|
|
232
249
|
const Command_2 = IDL.Variant({
|
|
233
|
-
'Spawn' :
|
|
250
|
+
'Spawn' : NeuronId,
|
|
234
251
|
'Split' : Split,
|
|
235
252
|
'Configure' : Configure,
|
|
236
253
|
'Merge' : Merge,
|
|
@@ -269,19 +286,26 @@ export const idlFactory = ({ IDL }) => {
|
|
|
269
286
|
'neuron_fees_e8s' : IDL.Nat64,
|
|
270
287
|
'transfer' : IDL.Opt(NeuronStakeTransfer),
|
|
271
288
|
'known_neuron_data' : IDL.Opt(KnownNeuronData),
|
|
289
|
+
'spawn_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
272
290
|
});
|
|
273
291
|
const Governance = IDL.Record({
|
|
274
292
|
'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
293
|
+
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
294
|
+
MostRecentMonthlyNodeProviderRewards
|
|
295
|
+
),
|
|
275
296
|
'wait_for_quiet_threshold_seconds' : IDL.Nat64,
|
|
276
297
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
298
|
+
'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
|
|
277
299
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
278
300
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
301
|
+
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
279
302
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
280
303
|
'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
|
|
281
304
|
'short_voting_period_seconds' : IDL.Nat64,
|
|
282
305
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
283
306
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
284
307
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
308
|
+
'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
|
|
285
309
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
286
310
|
});
|
|
287
311
|
const Result = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : GovernanceError });
|
|
@@ -405,6 +429,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
405
429
|
['query'],
|
|
406
430
|
),
|
|
407
431
|
'get_monthly_node_provider_rewards' : IDL.Func([], [Result_3], []),
|
|
432
|
+
'get_most_recent_monthly_node_provider_rewards' : IDL.Func(
|
|
433
|
+
[],
|
|
434
|
+
[IDL.Opt(MostRecentMonthlyNodeProviderRewards)],
|
|
435
|
+
['query'],
|
|
436
|
+
),
|
|
408
437
|
'get_network_economics_parameters' : IDL.Func(
|
|
409
438
|
[],
|
|
410
439
|
[NetworkEconomics],
|
|
@@ -445,6 +474,28 @@ export const init = ({ IDL }) => {
|
|
|
445
474
|
const Proposal = IDL.Rec();
|
|
446
475
|
const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
447
476
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
477
|
+
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
478
|
+
const NodeProvider = IDL.Record({
|
|
479
|
+
'id' : IDL.Opt(IDL.Principal),
|
|
480
|
+
'reward_account' : IDL.Opt(AccountIdentifier),
|
|
481
|
+
});
|
|
482
|
+
const RewardToNeuron = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64 });
|
|
483
|
+
const RewardToAccount = IDL.Record({
|
|
484
|
+
'to_account' : IDL.Opt(AccountIdentifier),
|
|
485
|
+
});
|
|
486
|
+
const RewardMode = IDL.Variant({
|
|
487
|
+
'RewardToNeuron' : RewardToNeuron,
|
|
488
|
+
'RewardToAccount' : RewardToAccount,
|
|
489
|
+
});
|
|
490
|
+
const RewardNodeProvider = IDL.Record({
|
|
491
|
+
'node_provider' : IDL.Opt(NodeProvider),
|
|
492
|
+
'reward_mode' : IDL.Opt(RewardMode),
|
|
493
|
+
'amount_e8s' : IDL.Nat64,
|
|
494
|
+
});
|
|
495
|
+
const MostRecentMonthlyNodeProviderRewards = IDL.Record({
|
|
496
|
+
'timestamp' : IDL.Nat64,
|
|
497
|
+
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
498
|
+
});
|
|
448
499
|
const GovernanceCachedMetrics = IDL.Record({
|
|
449
500
|
'not_dissolving_neurons_e8s_buckets' : IDL.Vec(
|
|
450
501
|
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
@@ -471,11 +522,6 @@ export const init = ({ IDL }) => {
|
|
|
471
522
|
'community_fund_total_staked_e8s' : IDL.Nat64,
|
|
472
523
|
'timestamp_seconds' : IDL.Nat64,
|
|
473
524
|
});
|
|
474
|
-
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
475
|
-
const NodeProvider = IDL.Record({
|
|
476
|
-
'id' : IDL.Opt(IDL.Principal),
|
|
477
|
-
'reward_account' : IDL.Opt(AccountIdentifier),
|
|
478
|
-
});
|
|
479
525
|
const NetworkEconomics = IDL.Record({
|
|
480
526
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
481
527
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -557,6 +603,7 @@ export const init = ({ IDL }) => {
|
|
|
557
603
|
'StartDissolving' : IDL.Record({}),
|
|
558
604
|
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
559
605
|
'JoinCommunityFund' : IDL.Record({}),
|
|
606
|
+
'LeaveCommunityFund' : IDL.Record({}),
|
|
560
607
|
'SetDissolveTimestamp' : SetDissolveTimestamp,
|
|
561
608
|
});
|
|
562
609
|
const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
|
|
@@ -604,18 +651,16 @@ export const init = ({ IDL }) => {
|
|
|
604
651
|
'nns_function' : IDL.Int32,
|
|
605
652
|
'payload' : IDL.Vec(IDL.Nat8),
|
|
606
653
|
});
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
'
|
|
654
|
+
const TimeWindow = IDL.Record({
|
|
655
|
+
'start_timestamp_seconds' : IDL.Nat64,
|
|
656
|
+
'end_timestamp_seconds' : IDL.Nat64,
|
|
610
657
|
});
|
|
611
|
-
const
|
|
612
|
-
'
|
|
613
|
-
'RewardToAccount' : RewardToAccount,
|
|
658
|
+
const SetOpenTimeWindowRequest = IDL.Record({
|
|
659
|
+
'open_time_window' : IDL.Opt(TimeWindow),
|
|
614
660
|
});
|
|
615
|
-
const
|
|
616
|
-
'
|
|
617
|
-
'
|
|
618
|
-
'amount_e8s' : IDL.Nat64,
|
|
661
|
+
const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
|
|
662
|
+
'request' : IDL.Opt(SetOpenTimeWindowRequest),
|
|
663
|
+
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
619
664
|
});
|
|
620
665
|
const SetDefaultFollowees = IDL.Record({
|
|
621
666
|
'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
@@ -638,6 +683,7 @@ export const init = ({ IDL }) => {
|
|
|
638
683
|
'ManageNeuron' : ManageNeuron,
|
|
639
684
|
'ExecuteNnsFunction' : ExecuteNnsFunction,
|
|
640
685
|
'RewardNodeProvider' : RewardNodeProvider,
|
|
686
|
+
'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
|
|
641
687
|
'SetDefaultFollowees' : SetDefaultFollowees,
|
|
642
688
|
'RewardNodeProviders' : RewardNodeProviders,
|
|
643
689
|
'ManageNetworkEconomics' : NetworkEconomics,
|
|
@@ -672,7 +718,7 @@ export const init = ({ IDL }) => {
|
|
|
672
718
|
'executed_timestamp_seconds' : IDL.Nat64,
|
|
673
719
|
});
|
|
674
720
|
const Command_2 = IDL.Variant({
|
|
675
|
-
'Spawn' :
|
|
721
|
+
'Spawn' : NeuronId,
|
|
676
722
|
'Split' : Split,
|
|
677
723
|
'Configure' : Configure,
|
|
678
724
|
'Merge' : Merge,
|
|
@@ -711,19 +757,26 @@ export const init = ({ IDL }) => {
|
|
|
711
757
|
'neuron_fees_e8s' : IDL.Nat64,
|
|
712
758
|
'transfer' : IDL.Opt(NeuronStakeTransfer),
|
|
713
759
|
'known_neuron_data' : IDL.Opt(KnownNeuronData),
|
|
760
|
+
'spawn_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
714
761
|
});
|
|
715
762
|
const Governance = IDL.Record({
|
|
716
763
|
'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
764
|
+
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
765
|
+
MostRecentMonthlyNodeProviderRewards
|
|
766
|
+
),
|
|
717
767
|
'wait_for_quiet_threshold_seconds' : IDL.Nat64,
|
|
718
768
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
769
|
+
'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
|
|
719
770
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
720
771
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
772
|
+
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
721
773
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
722
774
|
'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
|
|
723
775
|
'short_voting_period_seconds' : IDL.Nat64,
|
|
724
776
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
725
777
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
726
778
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
779
|
+
'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
|
|
727
780
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
728
781
|
});
|
|
729
782
|
return [Governance];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Do not edit. Compiled with ./scripts/compile-idl-js from candid/ledger.did */
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/ledger.did */
|
|
2
2
|
export const idlFactory = ({ IDL }) => {
|
|
3
3
|
const BlockIndex = IDL.Nat64;
|
|
4
4
|
const GetBlocksArgs = IDL.Record({
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
/* Do not edit. Compiled with Canlist https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/ from candid/genesis_token.did */
|
|
2
|
-
// Added manually the IDL part
|
|
3
|
-
import type { IDL } from "@dfinity/candid";
|
|
4
1
|
import type { Principal } from "@dfinity/principal";
|
|
5
|
-
export const idlFactory: IDL.InterfaceFactory;
|
|
6
|
-
|
|
7
2
|
export interface AccountBalanceArgs {
|
|
8
3
|
account: AccountIdentifier;
|
|
9
4
|
}
|
package/dist/candid/ledger.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Generated from IC repo commit d1f1bbefafa90fd444a9088e377bf68c78ee0f3f 'rs/rosetta-api/ledger_canister/ledger.did' by import-candid
|
|
2
2
|
// This is the official Ledger interface that is guaranteed to be backward compatible.
|
|
3
3
|
|
|
4
4
|
// Amount of tokens, measured in 10^-8 of a token.
|
|
@@ -247,4 +247,4 @@ service : {
|
|
|
247
247
|
|
|
248
248
|
// Returns the existing archive canisters information.
|
|
249
249
|
archives : () -> (Archives) query;
|
|
250
|
-
}
|
|
250
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Do not edit. Compiled with ./scripts/compile-idl-js from candid/ledger.did */
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/ledger.did */
|
|
2
2
|
export const idlFactory = ({ IDL }) => {
|
|
3
3
|
const AccountIdentifier = IDL.Vec(IDL.Nat8);
|
|
4
4
|
const AccountBalanceArgs = IDL.Record({ 'account' : AccountIdentifier });
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/sns_wasm.did */
|
|
2
|
+
export const idlFactory = ({ IDL }) => {
|
|
3
|
+
const SnsWasmCanisterInitPayload = IDL.Record({
|
|
4
|
+
'sns_subnet_ids' : IDL.Vec(IDL.Principal),
|
|
5
|
+
});
|
|
6
|
+
const SnsWasm = IDL.Record({
|
|
7
|
+
'wasm' : IDL.Vec(IDL.Nat8),
|
|
8
|
+
'canister_type' : IDL.Int32,
|
|
9
|
+
});
|
|
10
|
+
const AddWasmRequest = IDL.Record({
|
|
11
|
+
'hash' : IDL.Vec(IDL.Nat8),
|
|
12
|
+
'wasm' : IDL.Opt(SnsWasm),
|
|
13
|
+
});
|
|
14
|
+
const SnsWasmError = IDL.Record({ 'message' : IDL.Text });
|
|
15
|
+
const Result = IDL.Variant({
|
|
16
|
+
'Error' : SnsWasmError,
|
|
17
|
+
'Hash' : IDL.Vec(IDL.Nat8),
|
|
18
|
+
});
|
|
19
|
+
const AddWasmResponse = IDL.Record({ 'result' : IDL.Opt(Result) });
|
|
20
|
+
const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });
|
|
21
|
+
const NeuronDistribution = IDL.Record({
|
|
22
|
+
'controller' : IDL.Opt(IDL.Principal),
|
|
23
|
+
'stake_e8s' : IDL.Nat64,
|
|
24
|
+
});
|
|
25
|
+
const DeveloperDistribution = IDL.Record({
|
|
26
|
+
'developer_neurons' : IDL.Vec(NeuronDistribution),
|
|
27
|
+
});
|
|
28
|
+
const AirdropDistribution = IDL.Record({
|
|
29
|
+
'airdrop_neurons' : IDL.Vec(NeuronDistribution),
|
|
30
|
+
});
|
|
31
|
+
const SwapDistribution = IDL.Record({
|
|
32
|
+
'total_e8s' : IDL.Nat64,
|
|
33
|
+
'initial_swap_amount_e8s' : IDL.Nat64,
|
|
34
|
+
});
|
|
35
|
+
const FractionalDeveloperVotingPower = IDL.Record({
|
|
36
|
+
'treasury_distribution' : IDL.Opt(TreasuryDistribution),
|
|
37
|
+
'developer_distribution' : IDL.Opt(DeveloperDistribution),
|
|
38
|
+
'airdrop_distribution' : IDL.Opt(AirdropDistribution),
|
|
39
|
+
'swap_distribution' : IDL.Opt(SwapDistribution),
|
|
40
|
+
});
|
|
41
|
+
const InitialTokenDistribution = IDL.Variant({
|
|
42
|
+
'FractionalDeveloperVotingPower' : FractionalDeveloperVotingPower,
|
|
43
|
+
});
|
|
44
|
+
const SnsInitPayload = IDL.Record({
|
|
45
|
+
'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
46
|
+
'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),
|
|
47
|
+
'token_symbol' : IDL.Opt(IDL.Text),
|
|
48
|
+
'max_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
49
|
+
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
50
|
+
'min_participants' : IDL.Opt(IDL.Nat32),
|
|
51
|
+
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
52
|
+
'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),
|
|
53
|
+
'token_name' : IDL.Opt(IDL.Text),
|
|
54
|
+
'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
55
|
+
'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),
|
|
56
|
+
'min_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
57
|
+
});
|
|
58
|
+
const DeployNewSnsRequest = IDL.Record({
|
|
59
|
+
'sns_init_payload' : IDL.Opt(SnsInitPayload),
|
|
60
|
+
});
|
|
61
|
+
const SnsCanisterIds = IDL.Record({
|
|
62
|
+
'root' : IDL.Opt(IDL.Principal),
|
|
63
|
+
'swap' : IDL.Opt(IDL.Principal),
|
|
64
|
+
'ledger' : IDL.Opt(IDL.Principal),
|
|
65
|
+
'governance' : IDL.Opt(IDL.Principal),
|
|
66
|
+
});
|
|
67
|
+
const DeployNewSnsResponse = IDL.Record({
|
|
68
|
+
'subnet_id' : IDL.Opt(IDL.Principal),
|
|
69
|
+
'error' : IDL.Opt(SnsWasmError),
|
|
70
|
+
'canisters' : IDL.Opt(SnsCanisterIds),
|
|
71
|
+
});
|
|
72
|
+
const SnsVersion = IDL.Record({
|
|
73
|
+
'root_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
74
|
+
'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
75
|
+
'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
76
|
+
'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
77
|
+
});
|
|
78
|
+
const GetNextSnsVersionRequest = IDL.Record({
|
|
79
|
+
'current_version' : IDL.Opt(SnsVersion),
|
|
80
|
+
});
|
|
81
|
+
const GetNextSnsVersionResponse = IDL.Record({
|
|
82
|
+
'next_version' : IDL.Opt(SnsVersion),
|
|
83
|
+
});
|
|
84
|
+
const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
85
|
+
const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });
|
|
86
|
+
const DeployedSns = IDL.Record({
|
|
87
|
+
'root_canister_id' : IDL.Opt(IDL.Principal),
|
|
88
|
+
});
|
|
89
|
+
const ListDeployedSnsesResponse = IDL.Record({
|
|
90
|
+
'instances' : IDL.Vec(DeployedSns),
|
|
91
|
+
});
|
|
92
|
+
return IDL.Service({
|
|
93
|
+
'add_wasm' : IDL.Func([AddWasmRequest], [AddWasmResponse], []),
|
|
94
|
+
'deploy_new_sns' : IDL.Func(
|
|
95
|
+
[DeployNewSnsRequest],
|
|
96
|
+
[DeployNewSnsResponse],
|
|
97
|
+
[],
|
|
98
|
+
),
|
|
99
|
+
'get_next_sns_version' : IDL.Func(
|
|
100
|
+
[GetNextSnsVersionRequest],
|
|
101
|
+
[GetNextSnsVersionResponse],
|
|
102
|
+
[],
|
|
103
|
+
),
|
|
104
|
+
'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], []),
|
|
105
|
+
'list_deployed_snses' : IDL.Func(
|
|
106
|
+
[IDL.Record({})],
|
|
107
|
+
[ListDeployedSnsesResponse],
|
|
108
|
+
[],
|
|
109
|
+
),
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
export const init = ({ IDL }) => {
|
|
113
|
+
const SnsWasmCanisterInitPayload = IDL.Record({
|
|
114
|
+
'sns_subnet_ids' : IDL.Vec(IDL.Principal),
|
|
115
|
+
});
|
|
116
|
+
return [SnsWasmCanisterInitPayload];
|
|
117
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { Principal } from "@dfinity/principal";
|
|
2
|
+
export interface AddWasmRequest {
|
|
3
|
+
hash: Array<number>;
|
|
4
|
+
wasm: [] | [SnsWasm];
|
|
5
|
+
}
|
|
6
|
+
export interface AddWasmResponse {
|
|
7
|
+
result: [] | [Result];
|
|
8
|
+
}
|
|
9
|
+
export interface AirdropDistribution {
|
|
10
|
+
airdrop_neurons: Array<NeuronDistribution>;
|
|
11
|
+
}
|
|
12
|
+
export interface DeployNewSnsRequest {
|
|
13
|
+
sns_init_payload: [] | [SnsInitPayload];
|
|
14
|
+
}
|
|
15
|
+
export interface DeployNewSnsResponse {
|
|
16
|
+
subnet_id: [] | [Principal];
|
|
17
|
+
error: [] | [SnsWasmError];
|
|
18
|
+
canisters: [] | [SnsCanisterIds];
|
|
19
|
+
}
|
|
20
|
+
export interface DeployedSns {
|
|
21
|
+
root_canister_id: [] | [Principal];
|
|
22
|
+
}
|
|
23
|
+
export interface DeveloperDistribution {
|
|
24
|
+
developer_neurons: Array<NeuronDistribution>;
|
|
25
|
+
}
|
|
26
|
+
export interface FractionalDeveloperVotingPower {
|
|
27
|
+
treasury_distribution: [] | [TreasuryDistribution];
|
|
28
|
+
developer_distribution: [] | [DeveloperDistribution];
|
|
29
|
+
airdrop_distribution: [] | [AirdropDistribution];
|
|
30
|
+
swap_distribution: [] | [SwapDistribution];
|
|
31
|
+
}
|
|
32
|
+
export interface GetNextSnsVersionRequest {
|
|
33
|
+
current_version: [] | [SnsVersion];
|
|
34
|
+
}
|
|
35
|
+
export interface GetNextSnsVersionResponse {
|
|
36
|
+
next_version: [] | [SnsVersion];
|
|
37
|
+
}
|
|
38
|
+
export interface GetWasmRequest {
|
|
39
|
+
hash: Array<number>;
|
|
40
|
+
}
|
|
41
|
+
export interface GetWasmResponse {
|
|
42
|
+
wasm: [] | [SnsWasm];
|
|
43
|
+
}
|
|
44
|
+
export type InitialTokenDistribution = {
|
|
45
|
+
FractionalDeveloperVotingPower: FractionalDeveloperVotingPower;
|
|
46
|
+
};
|
|
47
|
+
export interface ListDeployedSnsesResponse {
|
|
48
|
+
instances: Array<DeployedSns>;
|
|
49
|
+
}
|
|
50
|
+
export interface NeuronDistribution {
|
|
51
|
+
controller: [] | [Principal];
|
|
52
|
+
stake_e8s: bigint;
|
|
53
|
+
}
|
|
54
|
+
export type Result = { Error: SnsWasmError } | { Hash: Array<number> };
|
|
55
|
+
export interface SnsCanisterIds {
|
|
56
|
+
root: [] | [Principal];
|
|
57
|
+
swap: [] | [Principal];
|
|
58
|
+
ledger: [] | [Principal];
|
|
59
|
+
governance: [] | [Principal];
|
|
60
|
+
}
|
|
61
|
+
export interface SnsInitPayload {
|
|
62
|
+
min_participant_icp_e8s: [] | [bigint];
|
|
63
|
+
fallback_controller_principal_ids: Array<string>;
|
|
64
|
+
token_symbol: [] | [string];
|
|
65
|
+
max_icp_e8s: [] | [bigint];
|
|
66
|
+
neuron_minimum_stake_e8s: [] | [bigint];
|
|
67
|
+
min_participants: [] | [number];
|
|
68
|
+
transaction_fee_e8s: [] | [bigint];
|
|
69
|
+
initial_token_distribution: [] | [InitialTokenDistribution];
|
|
70
|
+
token_name: [] | [string];
|
|
71
|
+
max_participant_icp_e8s: [] | [bigint];
|
|
72
|
+
proposal_reject_cost_e8s: [] | [bigint];
|
|
73
|
+
min_icp_e8s: [] | [bigint];
|
|
74
|
+
}
|
|
75
|
+
export interface SnsVersion {
|
|
76
|
+
root_wasm_hash: Array<number>;
|
|
77
|
+
swap_wasm_hash: Array<number>;
|
|
78
|
+
ledger_wasm_hash: Array<number>;
|
|
79
|
+
governance_wasm_hash: Array<number>;
|
|
80
|
+
}
|
|
81
|
+
export interface SnsWasm {
|
|
82
|
+
wasm: Array<number>;
|
|
83
|
+
canister_type: number;
|
|
84
|
+
}
|
|
85
|
+
export interface SnsWasmCanisterInitPayload {
|
|
86
|
+
sns_subnet_ids: Array<Principal>;
|
|
87
|
+
}
|
|
88
|
+
export interface SnsWasmError {
|
|
89
|
+
message: string;
|
|
90
|
+
}
|
|
91
|
+
export interface SwapDistribution {
|
|
92
|
+
total_e8s: bigint;
|
|
93
|
+
initial_swap_amount_e8s: bigint;
|
|
94
|
+
}
|
|
95
|
+
export interface TreasuryDistribution {
|
|
96
|
+
total_e8s: bigint;
|
|
97
|
+
}
|
|
98
|
+
export interface _SERVICE {
|
|
99
|
+
add_wasm: (arg_0: AddWasmRequest) => Promise<AddWasmResponse>;
|
|
100
|
+
deploy_new_sns: (arg_0: DeployNewSnsRequest) => Promise<DeployNewSnsResponse>;
|
|
101
|
+
get_next_sns_version: (
|
|
102
|
+
arg_0: GetNextSnsVersionRequest
|
|
103
|
+
) => Promise<GetNextSnsVersionResponse>;
|
|
104
|
+
get_wasm: (arg_0: GetWasmRequest) => Promise<GetWasmResponse>;
|
|
105
|
+
list_deployed_snses: (arg_0: {}) => Promise<ListDeployedSnsesResponse>;
|
|
106
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Generated from IC repo commit d1f1bbefafa90fd444a9088e377bf68c78ee0f3f 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
|
|
2
|
+
type AddWasmRequest = record { hash : vec nat8; wasm : opt SnsWasm };
|
|
3
|
+
type AddWasmResponse = record { result : opt Result };
|
|
4
|
+
type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution };
|
|
5
|
+
type DeployNewSnsRequest = record { sns_init_payload : opt SnsInitPayload };
|
|
6
|
+
type DeployNewSnsResponse = record {
|
|
7
|
+
subnet_id : opt principal;
|
|
8
|
+
error : opt SnsWasmError;
|
|
9
|
+
canisters : opt SnsCanisterIds;
|
|
10
|
+
};
|
|
11
|
+
type DeployedSns = record { root_canister_id : opt principal };
|
|
12
|
+
type DeveloperDistribution = record {
|
|
13
|
+
developer_neurons : vec NeuronDistribution;
|
|
14
|
+
};
|
|
15
|
+
type FractionalDeveloperVotingPower = record {
|
|
16
|
+
treasury_distribution : opt TreasuryDistribution;
|
|
17
|
+
developer_distribution : opt DeveloperDistribution;
|
|
18
|
+
airdrop_distribution : opt AirdropDistribution;
|
|
19
|
+
swap_distribution : opt SwapDistribution;
|
|
20
|
+
};
|
|
21
|
+
type GetNextSnsVersionRequest = record { current_version : opt SnsVersion };
|
|
22
|
+
type GetNextSnsVersionResponse = record { next_version : opt SnsVersion };
|
|
23
|
+
type GetWasmRequest = record { hash : vec nat8 };
|
|
24
|
+
type GetWasmResponse = record { wasm : opt SnsWasm };
|
|
25
|
+
type InitialTokenDistribution = variant {
|
|
26
|
+
FractionalDeveloperVotingPower : FractionalDeveloperVotingPower;
|
|
27
|
+
};
|
|
28
|
+
type ListDeployedSnsesResponse = record { instances : vec DeployedSns };
|
|
29
|
+
type NeuronDistribution = record {
|
|
30
|
+
controller : opt principal;
|
|
31
|
+
stake_e8s : nat64;
|
|
32
|
+
};
|
|
33
|
+
type Result = variant { Error : SnsWasmError; Hash : vec nat8 };
|
|
34
|
+
type SnsCanisterIds = record {
|
|
35
|
+
root : opt principal;
|
|
36
|
+
swap : opt principal;
|
|
37
|
+
ledger : opt principal;
|
|
38
|
+
governance : opt principal;
|
|
39
|
+
};
|
|
40
|
+
type SnsInitPayload = record {
|
|
41
|
+
min_participant_icp_e8s : opt nat64;
|
|
42
|
+
fallback_controller_principal_ids : vec text;
|
|
43
|
+
token_symbol : opt text;
|
|
44
|
+
max_icp_e8s : opt nat64;
|
|
45
|
+
neuron_minimum_stake_e8s : opt nat64;
|
|
46
|
+
min_participants : opt nat32;
|
|
47
|
+
transaction_fee_e8s : opt nat64;
|
|
48
|
+
initial_token_distribution : opt InitialTokenDistribution;
|
|
49
|
+
token_name : opt text;
|
|
50
|
+
max_participant_icp_e8s : opt nat64;
|
|
51
|
+
proposal_reject_cost_e8s : opt nat64;
|
|
52
|
+
min_icp_e8s : opt nat64;
|
|
53
|
+
};
|
|
54
|
+
type SnsVersion = record {
|
|
55
|
+
root_wasm_hash : vec nat8;
|
|
56
|
+
swap_wasm_hash : vec nat8;
|
|
57
|
+
ledger_wasm_hash : vec nat8;
|
|
58
|
+
governance_wasm_hash : vec nat8;
|
|
59
|
+
};
|
|
60
|
+
type SnsWasm = record { wasm : vec nat8; canister_type : int32 };
|
|
61
|
+
type SnsWasmCanisterInitPayload = record { sns_subnet_ids : vec principal };
|
|
62
|
+
type SnsWasmError = record { message : text };
|
|
63
|
+
type SwapDistribution = record {
|
|
64
|
+
total_e8s : nat64;
|
|
65
|
+
initial_swap_amount_e8s : nat64;
|
|
66
|
+
};
|
|
67
|
+
type TreasuryDistribution = record { total_e8s : nat64 };
|
|
68
|
+
service : (SnsWasmCanisterInitPayload) -> {
|
|
69
|
+
add_wasm : (AddWasmRequest) -> (AddWasmResponse);
|
|
70
|
+
deploy_new_sns : (DeployNewSnsRequest) -> (DeployNewSnsResponse);
|
|
71
|
+
get_next_sns_version : (GetNextSnsVersionRequest) -> (
|
|
72
|
+
GetNextSnsVersionResponse,
|
|
73
|
+
) query;
|
|
74
|
+
get_wasm : (GetWasmRequest) -> (GetWasmResponse) query;
|
|
75
|
+
list_deployed_snses : (record {}) -> (ListDeployedSnsesResponse) query;
|
|
76
|
+
}
|