@dfinity/nns 4.0.2 → 5.0.0-next-2024-05-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -32
- package/dist/candid/genesis_token.d.ts +3 -0
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +64 -0
- package/dist/candid/governance.d.ts +38 -0
- package/dist/candid/governance.did +42 -12
- package/dist/candid/governance.idl.js +68 -0
- package/dist/candid/governance_test.certified.idl.js +64 -0
- package/dist/candid/governance_test.d.ts +38 -0
- package/dist/candid/governance_test.did +42 -12
- package/dist/candid/governance_test.idl.js +68 -0
- package/dist/candid/sns_wasm.certified.idl.js +16 -0
- package/dist/candid/sns_wasm.d.ts +22 -0
- package/dist/candid/sns_wasm.did +24 -12
- package/dist/candid/sns_wasm.idl.js +16 -0
- package/dist/cjs/index.cjs.js +1 -2
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/chunk-AN6DZS5M.js +19 -0
- package/dist/esm/chunk-AN6DZS5M.js.map +7 -0
- package/dist/esm/chunk-IDYCQLH5.js +2 -0
- package/dist/esm/chunk-IDYCQLH5.js.map +7 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +4 -4
- package/dist/esm/sns_wasm.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +7 -7
- package/dist/types/canisters/governance/response.converters.d.ts +1 -6
- package/dist/types/enums/governance.enums.d.ts +6 -1
- package/dist/types/errors/governance.errors.d.ts +0 -2
- package/dist/types/governance.canister.d.ts +16 -28
- package/dist/types/sns_wasm.canister.d.ts +1 -1
- package/dist/types/types/governance_converters.d.ts +15 -0
- package/package.json +7 -8
- package/dist/esm/chunk-4ZPVMCGL.js +0 -2
- package/dist/esm/chunk-4ZPVMCGL.js.map +0 -7
- package/dist/esm/chunk-LZ5FA3UO.js +0 -20
- package/dist/esm/chunk-LZ5FA3UO.js.map +0 -7
- package/dist/types/canisters/governance/request.proto.converters.d.ts +0 -16
- package/dist/types/canisters/governance/response.proto.converters.d.ts +0 -1
- package/dist/types/utils/proto.utils.d.ts +0 -25
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
2
|
-
type AccountIdentifier = record { hash :
|
|
1
|
+
// Generated from IC repo commit f58424c (2024-04-24 tags: release-2024-05-01_23-01-storage-layer) 'rs/nns/governance/canister/governance_test.did' by import-candid
|
|
2
|
+
type AccountIdentifier = record { hash : blob };
|
|
3
3
|
type Action = variant {
|
|
4
4
|
RegisterKnownNeuron : KnownNeuron;
|
|
5
5
|
ManageNeuron : ManageNeuron;
|
|
@@ -34,7 +34,7 @@ type CanisterStatusResultV2 = record {
|
|
|
34
34
|
memory_size : opt nat64;
|
|
35
35
|
cycles : opt nat64;
|
|
36
36
|
idle_cycles_burned_per_day : opt nat64;
|
|
37
|
-
module_hash :
|
|
37
|
+
module_hash : blob;
|
|
38
38
|
};
|
|
39
39
|
type CanisterSummary = record {
|
|
40
40
|
status : opt CanisterStatusResultV2;
|
|
@@ -124,6 +124,7 @@ type CreateServiceNervousSystem = record {
|
|
|
124
124
|
swap_parameters : opt SwapParameters;
|
|
125
125
|
initial_token_distribution : opt InitialTokenDistribution;
|
|
126
126
|
};
|
|
127
|
+
type Decimal = record { human_readable : opt text };
|
|
127
128
|
type DerivedProposalInformation = record {
|
|
128
129
|
swap_background_information : opt SwapBackgroundInformation;
|
|
129
130
|
};
|
|
@@ -147,7 +148,7 @@ type DissolveState = variant {
|
|
|
147
148
|
WhenDissolvedTimestampSeconds : nat64;
|
|
148
149
|
};
|
|
149
150
|
type Duration = record { seconds : opt nat64 };
|
|
150
|
-
type ExecuteNnsFunction = record { nns_function : int32; payload :
|
|
151
|
+
type ExecuteNnsFunction = record { nns_function : int32; payload : blob };
|
|
151
152
|
type Follow = record { topic : int32; followees : vec NeuronId };
|
|
152
153
|
type Followees = record { followees : vec NeuronId };
|
|
153
154
|
type Followers = record { followers : vec NeuronId };
|
|
@@ -166,6 +167,7 @@ type Governance = record {
|
|
|
166
167
|
node_providers : vec NodeProvider;
|
|
167
168
|
cached_daily_maturity_modulation_basis_points : opt int32;
|
|
168
169
|
economics : opt NetworkEconomics;
|
|
170
|
+
restore_aging_summary : opt RestoreAgingSummary;
|
|
169
171
|
spawning_neurons : opt bool;
|
|
170
172
|
latest_reward_event : opt RewardEvent;
|
|
171
173
|
to_claim_transfers : vec NeuronStakeTransfer;
|
|
@@ -173,6 +175,7 @@ type Governance = record {
|
|
|
173
175
|
topic_followee_index : vec record { int32; FollowersMap };
|
|
174
176
|
migrations : opt Migrations;
|
|
175
177
|
proposals : vec record { nat64; ProposalData };
|
|
178
|
+
xdr_conversion_rate : opt XdrConversionRate;
|
|
176
179
|
in_flight_commands : vec record { nat64; NeuronInFlightCommand };
|
|
177
180
|
neurons : vec record { nat64; Neuron };
|
|
178
181
|
genesis_timestamp_seconds : nat64;
|
|
@@ -276,7 +279,10 @@ type ListProposalInfo = record {
|
|
|
276
279
|
include_status : vec int32;
|
|
277
280
|
};
|
|
278
281
|
type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo };
|
|
279
|
-
type MakeProposalResponse = record {
|
|
282
|
+
type MakeProposalResponse = record {
|
|
283
|
+
message : opt text;
|
|
284
|
+
proposal_id : opt NeuronId;
|
|
285
|
+
};
|
|
280
286
|
type MakingSnsProposal = record {
|
|
281
287
|
proposal : opt Proposal;
|
|
282
288
|
caller : opt principal;
|
|
@@ -323,6 +329,7 @@ type NetworkEconomics = record {
|
|
|
323
329
|
neuron_spawn_dissolve_delay_seconds : nat64;
|
|
324
330
|
minimum_icp_xdr_rate : nat64;
|
|
325
331
|
maximum_node_provider_rewards_e8s : nat64;
|
|
332
|
+
neurons_fund_economics : opt NeuronsFundEconomics;
|
|
326
333
|
};
|
|
327
334
|
type Neuron = record {
|
|
328
335
|
id : opt NeuronId;
|
|
@@ -338,7 +345,7 @@ type Neuron = record {
|
|
|
338
345
|
auto_stake_maturity : opt bool;
|
|
339
346
|
aging_since_timestamp_seconds : nat64;
|
|
340
347
|
hot_keys : vec principal;
|
|
341
|
-
account :
|
|
348
|
+
account : blob;
|
|
342
349
|
joined_community_fund_timestamp_seconds : opt nat64;
|
|
343
350
|
dissolve_state : opt DissolveState;
|
|
344
351
|
followees : vec record { int32; Followees };
|
|
@@ -363,10 +370,7 @@ type NeuronDistribution = record {
|
|
|
363
370
|
stake : opt Tokens;
|
|
364
371
|
};
|
|
365
372
|
type NeuronId = record { id : nat64 };
|
|
366
|
-
type NeuronIdOrSubaccount = variant {
|
|
367
|
-
Subaccount : vec nat8;
|
|
368
|
-
NeuronId : NeuronId;
|
|
369
|
-
};
|
|
373
|
+
type NeuronIdOrSubaccount = variant { Subaccount : blob; NeuronId : NeuronId };
|
|
370
374
|
type NeuronInFlightCommand = record {
|
|
371
375
|
command : opt Command_2;
|
|
372
376
|
timestamp : nat64;
|
|
@@ -385,11 +389,11 @@ type NeuronInfo = record {
|
|
|
385
389
|
age_seconds : nat64;
|
|
386
390
|
};
|
|
387
391
|
type NeuronStakeTransfer = record {
|
|
388
|
-
to_subaccount :
|
|
392
|
+
to_subaccount : blob;
|
|
389
393
|
neuron_stake_e8s : nat64;
|
|
390
394
|
from : opt principal;
|
|
391
395
|
memo : nat64;
|
|
392
|
-
from_subaccount :
|
|
396
|
+
from_subaccount : blob;
|
|
393
397
|
transfer_timestamp : nat64;
|
|
394
398
|
block_height : nat64;
|
|
395
399
|
};
|
|
@@ -403,6 +407,17 @@ type NeuronsFundData = record {
|
|
|
403
407
|
initial_neurons_fund_participation : opt NeuronsFundParticipation;
|
|
404
408
|
neurons_fund_refunds : opt NeuronsFundSnapshot;
|
|
405
409
|
};
|
|
410
|
+
type NeuronsFundEconomics = record {
|
|
411
|
+
maximum_icp_xdr_rate : opt Percentage;
|
|
412
|
+
neurons_fund_matched_funding_curve_coefficients : opt NeuronsFundMatchedFundingCurveCoefficients;
|
|
413
|
+
max_theoretical_neurons_fund_participation_amount_xdr : opt Decimal;
|
|
414
|
+
minimum_icp_xdr_rate : opt Percentage;
|
|
415
|
+
};
|
|
416
|
+
type NeuronsFundMatchedFundingCurveCoefficients = record {
|
|
417
|
+
contribution_threshold_xdr : opt Decimal;
|
|
418
|
+
one_third_participation_milestone_xdr : opt Decimal;
|
|
419
|
+
full_participation_milestone_xdr : opt Decimal;
|
|
420
|
+
};
|
|
406
421
|
type NeuronsFundNeuron = record {
|
|
407
422
|
hotkey_principal : opt text;
|
|
408
423
|
is_capped : opt bool;
|
|
@@ -513,6 +528,16 @@ type ProposalInfo = record {
|
|
|
513
528
|
};
|
|
514
529
|
type RegisterVote = record { vote : int32; proposal : opt NeuronId };
|
|
515
530
|
type RemoveHotKey = record { hot_key_to_remove : opt principal };
|
|
531
|
+
type RestoreAgingNeuronGroup = record {
|
|
532
|
+
count : opt nat64;
|
|
533
|
+
previous_total_stake_e8s : opt nat64;
|
|
534
|
+
current_total_stake_e8s : opt nat64;
|
|
535
|
+
group_type : int32;
|
|
536
|
+
};
|
|
537
|
+
type RestoreAgingSummary = record {
|
|
538
|
+
groups : vec RestoreAgingNeuronGroup;
|
|
539
|
+
timestamp_seconds : opt nat64;
|
|
540
|
+
};
|
|
516
541
|
type Result = variant { Ok; Err : GovernanceError };
|
|
517
542
|
type Result_1 = variant { Error : GovernanceError; NeuronId : NeuronId };
|
|
518
543
|
type Result_10 = variant { Ok : Ok_1; Err : GovernanceError };
|
|
@@ -629,6 +654,10 @@ type VotingRewardParameters = record {
|
|
|
629
654
|
final_reward_rate : opt Percentage;
|
|
630
655
|
};
|
|
631
656
|
type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 };
|
|
657
|
+
type XdrConversionRate = record {
|
|
658
|
+
xdr_permyriad_per_icp : opt nat64;
|
|
659
|
+
timestamp_seconds : opt nat64;
|
|
660
|
+
};
|
|
632
661
|
service : (Governance) -> {
|
|
633
662
|
claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
|
|
634
663
|
claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (
|
|
@@ -657,6 +686,7 @@ service : (Governance) -> {
|
|
|
657
686
|
get_node_provider_by_caller : (null) -> (Result_7) query;
|
|
658
687
|
get_pending_proposals : () -> (vec ProposalInfo) query;
|
|
659
688
|
get_proposal_info : (nat64) -> (opt ProposalInfo) query;
|
|
689
|
+
get_restore_aging_summary : () -> (RestoreAgingSummary) query;
|
|
660
690
|
list_known_neurons : () -> (ListKnownNeuronsResponse) query;
|
|
661
691
|
list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
|
|
662
692
|
list_node_providers : () -> (ListNodeProvidersResponse) query;
|
|
@@ -246,6 +246,20 @@ export const idlFactory = ({ IDL }) => {
|
|
|
246
246
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
247
247
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
248
248
|
});
|
|
249
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
250
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
251
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
252
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
253
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
254
|
+
});
|
|
255
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
256
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
257
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
258
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
259
|
+
),
|
|
260
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
261
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
262
|
+
});
|
|
249
263
|
const NetworkEconomics = IDL.Record({
|
|
250
264
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
251
265
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -255,6 +269,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
255
269
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
256
270
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
257
271
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
272
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
258
273
|
});
|
|
259
274
|
const ApproveGenesisKyc = IDL.Record({
|
|
260
275
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -354,6 +369,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
354
369
|
'timestamp_seconds' : IDL.Nat64,
|
|
355
370
|
'seed_neuron_count' : IDL.Nat64,
|
|
356
371
|
});
|
|
372
|
+
const RestoreAgingNeuronGroup = IDL.Record({
|
|
373
|
+
'count' : IDL.Opt(IDL.Nat64),
|
|
374
|
+
'previous_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
375
|
+
'current_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
376
|
+
'group_type' : IDL.Int32,
|
|
377
|
+
});
|
|
378
|
+
const RestoreAgingSummary = IDL.Record({
|
|
379
|
+
'groups' : IDL.Vec(RestoreAgingNeuronGroup),
|
|
380
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
381
|
+
});
|
|
357
382
|
const RewardEvent = IDL.Record({
|
|
358
383
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
359
384
|
'day_after_genesis' : IDL.Nat64,
|
|
@@ -493,6 +518,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
493
518
|
IDL.Nat64
|
|
494
519
|
),
|
|
495
520
|
});
|
|
521
|
+
const XdrConversionRate = IDL.Record({
|
|
522
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
523
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
524
|
+
});
|
|
496
525
|
const Command_2 = IDL.Variant({
|
|
497
526
|
'Spawn' : NeuronId,
|
|
498
527
|
'Split' : Split,
|
|
@@ -554,6 +583,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
554
583
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
555
584
|
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
556
585
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
586
|
+
'restore_aging_summary' : IDL.Opt(RestoreAgingSummary),
|
|
557
587
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
558
588
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
559
589
|
'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
|
|
@@ -561,6 +591,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
561
591
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
562
592
|
'migrations' : IDL.Opt(Migrations),
|
|
563
593
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
594
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
564
595
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
565
596
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
566
597
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -671,6 +702,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
671
702
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
672
703
|
});
|
|
673
704
|
const MakeProposalResponse = IDL.Record({
|
|
705
|
+
'message' : IDL.Opt(IDL.Text),
|
|
674
706
|
'proposal_id' : IDL.Opt(NeuronId),
|
|
675
707
|
});
|
|
676
708
|
const StakeMaturityResponse = IDL.Record({
|
|
@@ -790,6 +822,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
790
822
|
[IDL.Opt(ProposalInfo)],
|
|
791
823
|
['query'],
|
|
792
824
|
),
|
|
825
|
+
'get_restore_aging_summary' : IDL.Func(
|
|
826
|
+
[],
|
|
827
|
+
[RestoreAgingSummary],
|
|
828
|
+
['query'],
|
|
829
|
+
),
|
|
793
830
|
'list_known_neurons' : IDL.Func([], [ListKnownNeuronsResponse], ['query']),
|
|
794
831
|
'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
|
|
795
832
|
'list_node_providers' : IDL.Func(
|
|
@@ -1070,6 +1107,20 @@ export const init = ({ IDL }) => {
|
|
|
1070
1107
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
1071
1108
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
1072
1109
|
});
|
|
1110
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
1111
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
1112
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
1113
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1114
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1115
|
+
});
|
|
1116
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
1117
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1118
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
1119
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
1120
|
+
),
|
|
1121
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
1122
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1123
|
+
});
|
|
1073
1124
|
const NetworkEconomics = IDL.Record({
|
|
1074
1125
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
1075
1126
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -1079,6 +1130,7 @@ export const init = ({ IDL }) => {
|
|
|
1079
1130
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
1080
1131
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
1081
1132
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
1133
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
1082
1134
|
});
|
|
1083
1135
|
const ApproveGenesisKyc = IDL.Record({
|
|
1084
1136
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -1178,6 +1230,16 @@ export const init = ({ IDL }) => {
|
|
|
1178
1230
|
'timestamp_seconds' : IDL.Nat64,
|
|
1179
1231
|
'seed_neuron_count' : IDL.Nat64,
|
|
1180
1232
|
});
|
|
1233
|
+
const RestoreAgingNeuronGroup = IDL.Record({
|
|
1234
|
+
'count' : IDL.Opt(IDL.Nat64),
|
|
1235
|
+
'previous_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
1236
|
+
'current_total_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
1237
|
+
'group_type' : IDL.Int32,
|
|
1238
|
+
});
|
|
1239
|
+
const RestoreAgingSummary = IDL.Record({
|
|
1240
|
+
'groups' : IDL.Vec(RestoreAgingNeuronGroup),
|
|
1241
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1242
|
+
});
|
|
1181
1243
|
const RewardEvent = IDL.Record({
|
|
1182
1244
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
1183
1245
|
'day_after_genesis' : IDL.Nat64,
|
|
@@ -1317,6 +1379,10 @@ export const init = ({ IDL }) => {
|
|
|
1317
1379
|
IDL.Nat64
|
|
1318
1380
|
),
|
|
1319
1381
|
});
|
|
1382
|
+
const XdrConversionRate = IDL.Record({
|
|
1383
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1384
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1385
|
+
});
|
|
1320
1386
|
const Command_2 = IDL.Variant({
|
|
1321
1387
|
'Spawn' : NeuronId,
|
|
1322
1388
|
'Split' : Split,
|
|
@@ -1378,6 +1444,7 @@ export const init = ({ IDL }) => {
|
|
|
1378
1444
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
1379
1445
|
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
1380
1446
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
1447
|
+
'restore_aging_summary' : IDL.Opt(RestoreAgingSummary),
|
|
1381
1448
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
1382
1449
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
1383
1450
|
'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
|
|
@@ -1385,6 +1452,7 @@ export const init = ({ IDL }) => {
|
|
|
1385
1452
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
1386
1453
|
'migrations' : IDL.Opt(Migrations),
|
|
1387
1454
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
1455
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
1388
1456
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
1389
1457
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
1390
1458
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -191,6 +191,17 @@ export const idlFactory = ({ IDL }) => {
|
|
|
191
191
|
});
|
|
192
192
|
const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
193
193
|
const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });
|
|
194
|
+
const GetWasmMetadataRequest = IDL.Record({
|
|
195
|
+
'hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
196
|
+
});
|
|
197
|
+
const MetadataSection = IDL.Record({
|
|
198
|
+
'contents' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
199
|
+
'name' : IDL.Opt(IDL.Text),
|
|
200
|
+
'visibility' : IDL.Opt(IDL.Text),
|
|
201
|
+
});
|
|
202
|
+
const Ok = IDL.Record({ 'sections' : IDL.Vec(MetadataSection) });
|
|
203
|
+
const Result_1 = IDL.Variant({ 'Ok' : Ok, 'Error' : SnsWasmError });
|
|
204
|
+
const GetWasmMetadataResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });
|
|
194
205
|
const SnsUpgrade = IDL.Record({
|
|
195
206
|
'next_version' : IDL.Opt(SnsVersion),
|
|
196
207
|
'current_version' : IDL.Opt(SnsVersion),
|
|
@@ -276,6 +287,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
276
287
|
[],
|
|
277
288
|
),
|
|
278
289
|
'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], []),
|
|
290
|
+
'get_wasm_metadata' : IDL.Func(
|
|
291
|
+
[GetWasmMetadataRequest],
|
|
292
|
+
[GetWasmMetadataResponse],
|
|
293
|
+
[],
|
|
294
|
+
),
|
|
279
295
|
'insert_upgrade_path_entries' : IDL.Func(
|
|
280
296
|
[InsertUpgradePathEntriesRequest],
|
|
281
297
|
[InsertUpgradePathEntriesResponse],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ActorMethod } from "@dfinity/agent";
|
|
2
|
+
import type { IDL } from "@dfinity/candid";
|
|
2
3
|
import type { Principal } from "@dfinity/principal";
|
|
3
4
|
|
|
4
5
|
export interface AddWasmRequest {
|
|
@@ -83,6 +84,12 @@ export interface GetNextSnsVersionResponse {
|
|
|
83
84
|
export interface GetSnsSubnetIdsResponse {
|
|
84
85
|
sns_subnet_ids: Array<Principal>;
|
|
85
86
|
}
|
|
87
|
+
export interface GetWasmMetadataRequest {
|
|
88
|
+
hash: [] | [Uint8Array | number[]];
|
|
89
|
+
}
|
|
90
|
+
export interface GetWasmMetadataResponse {
|
|
91
|
+
result: [] | [Result_1];
|
|
92
|
+
}
|
|
86
93
|
export interface GetWasmRequest {
|
|
87
94
|
hash: Uint8Array | number[];
|
|
88
95
|
}
|
|
@@ -124,6 +131,11 @@ export interface ListUpgradeStepsRequest {
|
|
|
124
131
|
export interface ListUpgradeStepsResponse {
|
|
125
132
|
steps: Array<ListUpgradeStep>;
|
|
126
133
|
}
|
|
134
|
+
export interface MetadataSection {
|
|
135
|
+
contents: [] | [Uint8Array | number[]];
|
|
136
|
+
name: [] | [string];
|
|
137
|
+
visibility: [] | [string];
|
|
138
|
+
}
|
|
127
139
|
export interface NeuronBasketConstructionParameters {
|
|
128
140
|
dissolve_delay_interval_seconds: bigint;
|
|
129
141
|
count: bigint;
|
|
@@ -146,6 +158,9 @@ export interface NeuronsFundParticipationConstraints {
|
|
|
146
158
|
| []
|
|
147
159
|
| [IdealMatchedParticipationFunction];
|
|
148
160
|
}
|
|
161
|
+
export interface Ok {
|
|
162
|
+
sections: Array<MetadataSection>;
|
|
163
|
+
}
|
|
149
164
|
export interface PrettySnsVersion {
|
|
150
165
|
archive_wasm_hash: string;
|
|
151
166
|
root_wasm_hash: string;
|
|
@@ -155,6 +170,7 @@ export interface PrettySnsVersion {
|
|
|
155
170
|
index_wasm_hash: string;
|
|
156
171
|
}
|
|
157
172
|
export type Result = { Error: SnsWasmError } | { Hash: Uint8Array | number[] };
|
|
173
|
+
export type Result_1 = { Ok: Ok } | { Error: SnsWasmError };
|
|
158
174
|
export interface SnsCanisterIds {
|
|
159
175
|
root: [] | [Principal];
|
|
160
176
|
swap: [] | [Principal];
|
|
@@ -270,6 +286,10 @@ export interface _SERVICE {
|
|
|
270
286
|
>;
|
|
271
287
|
get_sns_subnet_ids: ActorMethod<[{}], GetSnsSubnetIdsResponse>;
|
|
272
288
|
get_wasm: ActorMethod<[GetWasmRequest], GetWasmResponse>;
|
|
289
|
+
get_wasm_metadata: ActorMethod<
|
|
290
|
+
[GetWasmMetadataRequest],
|
|
291
|
+
GetWasmMetadataResponse
|
|
292
|
+
>;
|
|
273
293
|
insert_upgrade_path_entries: ActorMethod<
|
|
274
294
|
[InsertUpgradePathEntriesRequest],
|
|
275
295
|
InsertUpgradePathEntriesResponse
|
|
@@ -288,3 +308,5 @@ export interface _SERVICE {
|
|
|
288
308
|
UpdateSnsSubnetListResponse
|
|
289
309
|
>;
|
|
290
310
|
}
|
|
311
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
312
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
package/dist/candid/sns_wasm.did
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
2
|
-
type AddWasmRequest = record { hash :
|
|
1
|
+
// Generated from IC repo commit f58424c (2024-04-24 tags: release-2024-05-01_23-01-storage-layer) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
|
|
2
|
+
type AddWasmRequest = record { hash : blob; wasm : opt SnsWasm };
|
|
3
3
|
type AddWasmResponse = record { result : opt Result };
|
|
4
4
|
type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution };
|
|
5
5
|
type Canister = record { id : opt principal };
|
|
@@ -59,7 +59,9 @@ type GetNextSnsVersionRequest = record {
|
|
|
59
59
|
};
|
|
60
60
|
type GetNextSnsVersionResponse = record { next_version : opt SnsVersion };
|
|
61
61
|
type GetSnsSubnetIdsResponse = record { sns_subnet_ids : vec principal };
|
|
62
|
-
type
|
|
62
|
+
type GetWasmMetadataRequest = record { hash : opt blob };
|
|
63
|
+
type GetWasmMetadataResponse = record { result : opt Result_1 };
|
|
64
|
+
type GetWasmRequest = record { hash : blob };
|
|
63
65
|
type GetWasmResponse = record { wasm : opt SnsWasm };
|
|
64
66
|
type IdealMatchedParticipationFunction = record {
|
|
65
67
|
serialized_representation : opt text;
|
|
@@ -90,6 +92,11 @@ type ListUpgradeStepsRequest = record {
|
|
|
90
92
|
sns_governance_canister_id : opt principal;
|
|
91
93
|
};
|
|
92
94
|
type ListUpgradeStepsResponse = record { steps : vec ListUpgradeStep };
|
|
95
|
+
type MetadataSection = record {
|
|
96
|
+
contents : opt blob;
|
|
97
|
+
name : opt text;
|
|
98
|
+
visibility : opt text;
|
|
99
|
+
};
|
|
93
100
|
type NeuronBasketConstructionParameters = record {
|
|
94
101
|
dissolve_delay_interval_seconds : nat64;
|
|
95
102
|
count : nat64;
|
|
@@ -108,6 +115,7 @@ type NeuronsFundParticipationConstraints = record {
|
|
|
108
115
|
min_direct_participation_threshold_icp_e8s : opt nat64;
|
|
109
116
|
ideal_matched_participation_function : opt IdealMatchedParticipationFunction;
|
|
110
117
|
};
|
|
118
|
+
type Ok = record { sections : vec MetadataSection };
|
|
111
119
|
type PrettySnsVersion = record {
|
|
112
120
|
archive_wasm_hash : text;
|
|
113
121
|
root_wasm_hash : text;
|
|
@@ -116,7 +124,8 @@ type PrettySnsVersion = record {
|
|
|
116
124
|
governance_wasm_hash : text;
|
|
117
125
|
index_wasm_hash : text;
|
|
118
126
|
};
|
|
119
|
-
type Result = variant { Error : SnsWasmError; Hash :
|
|
127
|
+
type Result = variant { Error : SnsWasmError; Hash : blob };
|
|
128
|
+
type Result_1 = variant { Ok : Ok; Error : SnsWasmError };
|
|
120
129
|
type SnsCanisterIds = record {
|
|
121
130
|
root : opt principal;
|
|
122
131
|
swap : opt principal;
|
|
@@ -170,14 +179,14 @@ type SnsUpgrade = record {
|
|
|
170
179
|
current_version : opt SnsVersion;
|
|
171
180
|
};
|
|
172
181
|
type SnsVersion = record {
|
|
173
|
-
archive_wasm_hash :
|
|
174
|
-
root_wasm_hash :
|
|
175
|
-
swap_wasm_hash :
|
|
176
|
-
ledger_wasm_hash :
|
|
177
|
-
governance_wasm_hash :
|
|
178
|
-
index_wasm_hash :
|
|
179
|
-
};
|
|
180
|
-
type SnsWasm = record { wasm :
|
|
182
|
+
archive_wasm_hash : blob;
|
|
183
|
+
root_wasm_hash : blob;
|
|
184
|
+
swap_wasm_hash : blob;
|
|
185
|
+
ledger_wasm_hash : blob;
|
|
186
|
+
governance_wasm_hash : blob;
|
|
187
|
+
index_wasm_hash : blob;
|
|
188
|
+
};
|
|
189
|
+
type SnsWasm = record { wasm : blob; canister_type : int32 };
|
|
181
190
|
type SnsWasmCanisterInitPayload = record {
|
|
182
191
|
allowed_principals : vec principal;
|
|
183
192
|
access_controls_enabled : bool;
|
|
@@ -218,6 +227,9 @@ service : (SnsWasmCanisterInitPayload) -> {
|
|
|
218
227
|
) query;
|
|
219
228
|
get_sns_subnet_ids : (record {}) -> (GetSnsSubnetIdsResponse) query;
|
|
220
229
|
get_wasm : (GetWasmRequest) -> (GetWasmResponse) query;
|
|
230
|
+
get_wasm_metadata : (GetWasmMetadataRequest) -> (
|
|
231
|
+
GetWasmMetadataResponse,
|
|
232
|
+
) query;
|
|
221
233
|
insert_upgrade_path_entries : (InsertUpgradePathEntriesRequest) -> (
|
|
222
234
|
InsertUpgradePathEntriesResponse,
|
|
223
235
|
);
|
|
@@ -191,6 +191,17 @@ export const idlFactory = ({ IDL }) => {
|
|
|
191
191
|
});
|
|
192
192
|
const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
193
193
|
const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });
|
|
194
|
+
const GetWasmMetadataRequest = IDL.Record({
|
|
195
|
+
'hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
196
|
+
});
|
|
197
|
+
const MetadataSection = IDL.Record({
|
|
198
|
+
'contents' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
199
|
+
'name' : IDL.Opt(IDL.Text),
|
|
200
|
+
'visibility' : IDL.Opt(IDL.Text),
|
|
201
|
+
});
|
|
202
|
+
const Ok = IDL.Record({ 'sections' : IDL.Vec(MetadataSection) });
|
|
203
|
+
const Result_1 = IDL.Variant({ 'Ok' : Ok, 'Error' : SnsWasmError });
|
|
204
|
+
const GetWasmMetadataResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });
|
|
194
205
|
const SnsUpgrade = IDL.Record({
|
|
195
206
|
'next_version' : IDL.Opt(SnsVersion),
|
|
196
207
|
'current_version' : IDL.Opt(SnsVersion),
|
|
@@ -276,6 +287,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
276
287
|
['query'],
|
|
277
288
|
),
|
|
278
289
|
'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], ['query']),
|
|
290
|
+
'get_wasm_metadata' : IDL.Func(
|
|
291
|
+
[GetWasmMetadataRequest],
|
|
292
|
+
[GetWasmMetadataResponse],
|
|
293
|
+
['query'],
|
|
294
|
+
),
|
|
279
295
|
'insert_upgrade_path_entries' : IDL.Func(
|
|
280
296
|
[InsertUpgradePathEntriesRequest],
|
|
281
297
|
[InsertUpgradePathEntriesResponse],
|