@dfinity/nns 4.0.2 → 5.0.0
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 +41 -0
- package/dist/candid/governance.d.ts +26 -0
- package/dist/candid/governance.did +30 -12
- package/dist/candid/governance.idl.js +41 -0
- package/dist/candid/governance_test.certified.idl.js +41 -0
- package/dist/candid/governance_test.d.ts +26 -0
- package/dist/candid/governance_test.did +30 -12
- package/dist/candid/governance_test.idl.js +41 -0
- package/dist/candid/sns_wasm.d.ts +3 -0
- package/dist/candid/sns_wasm.did +12 -12
- package/dist/cjs/index.cjs.js +1 -2
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/chunk-T6KTQFXP.js +19 -0
- package/dist/esm/chunk-T6KTQFXP.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/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 +6 -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
|
@@ -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),
|
|
@@ -493,6 +508,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
493
508
|
IDL.Nat64
|
|
494
509
|
),
|
|
495
510
|
});
|
|
511
|
+
const XdrConversionRate = IDL.Record({
|
|
512
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
513
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
514
|
+
});
|
|
496
515
|
const Command_2 = IDL.Variant({
|
|
497
516
|
'Spawn' : NeuronId,
|
|
498
517
|
'Split' : Split,
|
|
@@ -561,6 +580,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
561
580
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
562
581
|
'migrations' : IDL.Opt(Migrations),
|
|
563
582
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
583
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
564
584
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
565
585
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
566
586
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -671,6 +691,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
671
691
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
672
692
|
});
|
|
673
693
|
const MakeProposalResponse = IDL.Record({
|
|
694
|
+
'message' : IDL.Opt(IDL.Text),
|
|
674
695
|
'proposal_id' : IDL.Opt(NeuronId),
|
|
675
696
|
});
|
|
676
697
|
const StakeMaturityResponse = IDL.Record({
|
|
@@ -1069,6 +1090,20 @@ export const init = ({ IDL }) => {
|
|
|
1069
1090
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
1070
1091
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
1071
1092
|
});
|
|
1093
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
1094
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
1095
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
1096
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1097
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1098
|
+
});
|
|
1099
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
1100
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1101
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
1102
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
1103
|
+
),
|
|
1104
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
1105
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1106
|
+
});
|
|
1072
1107
|
const NetworkEconomics = IDL.Record({
|
|
1073
1108
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
1074
1109
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -1078,6 +1113,7 @@ export const init = ({ IDL }) => {
|
|
|
1078
1113
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
1079
1114
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
1080
1115
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
1116
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
1081
1117
|
});
|
|
1082
1118
|
const ApproveGenesisKyc = IDL.Record({
|
|
1083
1119
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -1316,6 +1352,10 @@ export const init = ({ IDL }) => {
|
|
|
1316
1352
|
IDL.Nat64
|
|
1317
1353
|
),
|
|
1318
1354
|
});
|
|
1355
|
+
const XdrConversionRate = IDL.Record({
|
|
1356
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1357
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1358
|
+
});
|
|
1319
1359
|
const Command_2 = IDL.Variant({
|
|
1320
1360
|
'Spawn' : NeuronId,
|
|
1321
1361
|
'Split' : Split,
|
|
@@ -1384,6 +1424,7 @@ export const init = ({ IDL }) => {
|
|
|
1384
1424
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
1385
1425
|
'migrations' : IDL.Opt(Migrations),
|
|
1386
1426
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
1427
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
1387
1428
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
1388
1429
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
1389
1430
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -246,6 +246,20 @@ export const idlFactory = ({ IDL }) => {
|
|
|
246
246
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
247
247
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
248
248
|
});
|
|
249
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
250
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
251
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
252
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
253
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
254
|
+
});
|
|
255
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
256
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
257
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
258
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
259
|
+
),
|
|
260
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
261
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
262
|
+
});
|
|
249
263
|
const NetworkEconomics = IDL.Record({
|
|
250
264
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
251
265
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -255,6 +269,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
255
269
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
256
270
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
257
271
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
272
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
258
273
|
});
|
|
259
274
|
const ApproveGenesisKyc = IDL.Record({
|
|
260
275
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -493,6 +508,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
493
508
|
IDL.Nat64
|
|
494
509
|
),
|
|
495
510
|
});
|
|
511
|
+
const XdrConversionRate = IDL.Record({
|
|
512
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
513
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
514
|
+
});
|
|
496
515
|
const Command_2 = IDL.Variant({
|
|
497
516
|
'Spawn' : NeuronId,
|
|
498
517
|
'Split' : Split,
|
|
@@ -561,6 +580,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
561
580
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
562
581
|
'migrations' : IDL.Opt(Migrations),
|
|
563
582
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
583
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
564
584
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
565
585
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
566
586
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -671,6 +691,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
671
691
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
672
692
|
});
|
|
673
693
|
const MakeProposalResponse = IDL.Record({
|
|
694
|
+
'message' : IDL.Opt(IDL.Text),
|
|
674
695
|
'proposal_id' : IDL.Opt(NeuronId),
|
|
675
696
|
});
|
|
676
697
|
const StakeMaturityResponse = IDL.Record({
|
|
@@ -1058,6 +1079,20 @@ export const init = ({ IDL }) => {
|
|
|
1058
1079
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
1059
1080
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
1060
1081
|
});
|
|
1082
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
1083
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
1084
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
1085
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1086
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1087
|
+
});
|
|
1088
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
1089
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1090
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
1091
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
1092
|
+
),
|
|
1093
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
1094
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1095
|
+
});
|
|
1061
1096
|
const NetworkEconomics = IDL.Record({
|
|
1062
1097
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
1063
1098
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -1067,6 +1102,7 @@ export const init = ({ IDL }) => {
|
|
|
1067
1102
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
1068
1103
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
1069
1104
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
1105
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
1070
1106
|
});
|
|
1071
1107
|
const ApproveGenesisKyc = IDL.Record({
|
|
1072
1108
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -1305,6 +1341,10 @@ export const init = ({ IDL }) => {
|
|
|
1305
1341
|
IDL.Nat64
|
|
1306
1342
|
),
|
|
1307
1343
|
});
|
|
1344
|
+
const XdrConversionRate = IDL.Record({
|
|
1345
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1346
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1347
|
+
});
|
|
1308
1348
|
const Command_2 = IDL.Variant({
|
|
1309
1349
|
'Spawn' : NeuronId,
|
|
1310
1350
|
'Split' : Split,
|
|
@@ -1373,6 +1413,7 @@ export const init = ({ IDL }) => {
|
|
|
1373
1413
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
1374
1414
|
'migrations' : IDL.Opt(Migrations),
|
|
1375
1415
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
1416
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
1376
1417
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
1377
1418
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
1378
1419
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ActorMethod } from "@dfinity/agent";
|
|
2
|
+
import type { IDL } from "@dfinity/candid";
|
|
2
3
|
import type { Principal } from "@dfinity/principal";
|
|
3
4
|
|
|
4
5
|
export interface AccountIdentifier {
|
|
@@ -149,6 +150,9 @@ export interface CreateServiceNervousSystem {
|
|
|
149
150
|
swap_parameters: [] | [SwapParameters];
|
|
150
151
|
initial_token_distribution: [] | [InitialTokenDistribution];
|
|
151
152
|
}
|
|
153
|
+
export interface Decimal {
|
|
154
|
+
human_readable: [] | [string];
|
|
155
|
+
}
|
|
152
156
|
export interface DerivedProposalInformation {
|
|
153
157
|
swap_background_information: [] | [SwapBackgroundInformation];
|
|
154
158
|
}
|
|
@@ -221,6 +225,7 @@ export interface Governance {
|
|
|
221
225
|
topic_followee_index: Array<[number, FollowersMap]>;
|
|
222
226
|
migrations: [] | [Migrations];
|
|
223
227
|
proposals: Array<[bigint, ProposalData]>;
|
|
228
|
+
xdr_conversion_rate: [] | [XdrConversionRate];
|
|
224
229
|
in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
|
|
225
230
|
neurons: Array<[bigint, Neuron]>;
|
|
226
231
|
genesis_timestamp_seconds: bigint;
|
|
@@ -337,6 +342,7 @@ export interface ListProposalInfoResponse {
|
|
|
337
342
|
proposal_info: Array<ProposalInfo>;
|
|
338
343
|
}
|
|
339
344
|
export interface MakeProposalResponse {
|
|
345
|
+
message: [] | [string];
|
|
340
346
|
proposal_id: [] | [NeuronId];
|
|
341
347
|
}
|
|
342
348
|
export interface MakingSnsProposal {
|
|
@@ -393,6 +399,7 @@ export interface NetworkEconomics {
|
|
|
393
399
|
neuron_spawn_dissolve_delay_seconds: bigint;
|
|
394
400
|
minimum_icp_xdr_rate: bigint;
|
|
395
401
|
maximum_node_provider_rewards_e8s: bigint;
|
|
402
|
+
neurons_fund_economics: [] | [NeuronsFundEconomics];
|
|
396
403
|
}
|
|
397
404
|
export interface Neuron {
|
|
398
405
|
id: [] | [NeuronId];
|
|
@@ -474,6 +481,19 @@ export interface NeuronsFundData {
|
|
|
474
481
|
initial_neurons_fund_participation: [] | [NeuronsFundParticipation];
|
|
475
482
|
neurons_fund_refunds: [] | [NeuronsFundSnapshot];
|
|
476
483
|
}
|
|
484
|
+
export interface NeuronsFundEconomics {
|
|
485
|
+
maximum_icp_xdr_rate: [] | [Percentage];
|
|
486
|
+
neurons_fund_matched_funding_curve_coefficients:
|
|
487
|
+
| []
|
|
488
|
+
| [NeuronsFundMatchedFundingCurveCoefficients];
|
|
489
|
+
max_theoretical_neurons_fund_participation_amount_xdr: [] | [Decimal];
|
|
490
|
+
minimum_icp_xdr_rate: [] | [Percentage];
|
|
491
|
+
}
|
|
492
|
+
export interface NeuronsFundMatchedFundingCurveCoefficients {
|
|
493
|
+
contribution_threshold_xdr: [] | [Decimal];
|
|
494
|
+
one_third_participation_milestone_xdr: [] | [Decimal];
|
|
495
|
+
full_participation_milestone_xdr: [] | [Decimal];
|
|
496
|
+
}
|
|
477
497
|
export interface NeuronsFundNeuron {
|
|
478
498
|
hotkey_principal: [] | [string];
|
|
479
499
|
is_capped: [] | [boolean];
|
|
@@ -741,6 +761,10 @@ export interface VotingRewardParameters {
|
|
|
741
761
|
export interface WaitForQuietState {
|
|
742
762
|
current_deadline_timestamp_seconds: bigint;
|
|
743
763
|
}
|
|
764
|
+
export interface XdrConversionRate {
|
|
765
|
+
xdr_permyriad_per_icp: [] | [bigint];
|
|
766
|
+
timestamp_seconds: [] | [bigint];
|
|
767
|
+
}
|
|
744
768
|
export interface _SERVICE {
|
|
745
769
|
claim_gtc_neurons: ActorMethod<[Principal, Array<NeuronId>], Result>;
|
|
746
770
|
claim_or_refresh_neuron_from_account: ActorMethod<
|
|
@@ -792,3 +816,5 @@ export interface _SERVICE {
|
|
|
792
816
|
update_neuron: ActorMethod<[Neuron], [] | [GovernanceError]>;
|
|
793
817
|
update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;
|
|
794
818
|
}
|
|
819
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
820
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
2
|
-
type AccountIdentifier = record { hash :
|
|
1
|
+
// Generated from IC repo commit 30a4021 (2024-03-28 tags: release-2024-03-27_23-01-p2p) '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 };
|
|
@@ -173,6 +174,7 @@ type Governance = record {
|
|
|
173
174
|
topic_followee_index : vec record { int32; FollowersMap };
|
|
174
175
|
migrations : opt Migrations;
|
|
175
176
|
proposals : vec record { nat64; ProposalData };
|
|
177
|
+
xdr_conversion_rate : opt XdrConversionRate;
|
|
176
178
|
in_flight_commands : vec record { nat64; NeuronInFlightCommand };
|
|
177
179
|
neurons : vec record { nat64; Neuron };
|
|
178
180
|
genesis_timestamp_seconds : nat64;
|
|
@@ -276,7 +278,10 @@ type ListProposalInfo = record {
|
|
|
276
278
|
include_status : vec int32;
|
|
277
279
|
};
|
|
278
280
|
type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo };
|
|
279
|
-
type MakeProposalResponse = record {
|
|
281
|
+
type MakeProposalResponse = record {
|
|
282
|
+
message : opt text;
|
|
283
|
+
proposal_id : opt NeuronId;
|
|
284
|
+
};
|
|
280
285
|
type MakingSnsProposal = record {
|
|
281
286
|
proposal : opt Proposal;
|
|
282
287
|
caller : opt principal;
|
|
@@ -323,6 +328,7 @@ type NetworkEconomics = record {
|
|
|
323
328
|
neuron_spawn_dissolve_delay_seconds : nat64;
|
|
324
329
|
minimum_icp_xdr_rate : nat64;
|
|
325
330
|
maximum_node_provider_rewards_e8s : nat64;
|
|
331
|
+
neurons_fund_economics : opt NeuronsFundEconomics;
|
|
326
332
|
};
|
|
327
333
|
type Neuron = record {
|
|
328
334
|
id : opt NeuronId;
|
|
@@ -338,7 +344,7 @@ type Neuron = record {
|
|
|
338
344
|
auto_stake_maturity : opt bool;
|
|
339
345
|
aging_since_timestamp_seconds : nat64;
|
|
340
346
|
hot_keys : vec principal;
|
|
341
|
-
account :
|
|
347
|
+
account : blob;
|
|
342
348
|
joined_community_fund_timestamp_seconds : opt nat64;
|
|
343
349
|
dissolve_state : opt DissolveState;
|
|
344
350
|
followees : vec record { int32; Followees };
|
|
@@ -363,10 +369,7 @@ type NeuronDistribution = record {
|
|
|
363
369
|
stake : opt Tokens;
|
|
364
370
|
};
|
|
365
371
|
type NeuronId = record { id : nat64 };
|
|
366
|
-
type NeuronIdOrSubaccount = variant {
|
|
367
|
-
Subaccount : vec nat8;
|
|
368
|
-
NeuronId : NeuronId;
|
|
369
|
-
};
|
|
372
|
+
type NeuronIdOrSubaccount = variant { Subaccount : blob; NeuronId : NeuronId };
|
|
370
373
|
type NeuronInFlightCommand = record {
|
|
371
374
|
command : opt Command_2;
|
|
372
375
|
timestamp : nat64;
|
|
@@ -385,11 +388,11 @@ type NeuronInfo = record {
|
|
|
385
388
|
age_seconds : nat64;
|
|
386
389
|
};
|
|
387
390
|
type NeuronStakeTransfer = record {
|
|
388
|
-
to_subaccount :
|
|
391
|
+
to_subaccount : blob;
|
|
389
392
|
neuron_stake_e8s : nat64;
|
|
390
393
|
from : opt principal;
|
|
391
394
|
memo : nat64;
|
|
392
|
-
from_subaccount :
|
|
395
|
+
from_subaccount : blob;
|
|
393
396
|
transfer_timestamp : nat64;
|
|
394
397
|
block_height : nat64;
|
|
395
398
|
};
|
|
@@ -403,6 +406,17 @@ type NeuronsFundData = record {
|
|
|
403
406
|
initial_neurons_fund_participation : opt NeuronsFundParticipation;
|
|
404
407
|
neurons_fund_refunds : opt NeuronsFundSnapshot;
|
|
405
408
|
};
|
|
409
|
+
type NeuronsFundEconomics = record {
|
|
410
|
+
maximum_icp_xdr_rate : opt Percentage;
|
|
411
|
+
neurons_fund_matched_funding_curve_coefficients : opt NeuronsFundMatchedFundingCurveCoefficients;
|
|
412
|
+
max_theoretical_neurons_fund_participation_amount_xdr : opt Decimal;
|
|
413
|
+
minimum_icp_xdr_rate : opt Percentage;
|
|
414
|
+
};
|
|
415
|
+
type NeuronsFundMatchedFundingCurveCoefficients = record {
|
|
416
|
+
contribution_threshold_xdr : opt Decimal;
|
|
417
|
+
one_third_participation_milestone_xdr : opt Decimal;
|
|
418
|
+
full_participation_milestone_xdr : opt Decimal;
|
|
419
|
+
};
|
|
406
420
|
type NeuronsFundNeuron = record {
|
|
407
421
|
hotkey_principal : opt text;
|
|
408
422
|
is_capped : opt bool;
|
|
@@ -629,6 +643,10 @@ type VotingRewardParameters = record {
|
|
|
629
643
|
final_reward_rate : opt Percentage;
|
|
630
644
|
};
|
|
631
645
|
type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 };
|
|
646
|
+
type XdrConversionRate = record {
|
|
647
|
+
xdr_permyriad_per_icp : opt nat64;
|
|
648
|
+
timestamp_seconds : opt nat64;
|
|
649
|
+
};
|
|
632
650
|
service : (Governance) -> {
|
|
633
651
|
claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
|
|
634
652
|
claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (
|
|
@@ -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),
|
|
@@ -493,6 +508,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
493
508
|
IDL.Nat64
|
|
494
509
|
),
|
|
495
510
|
});
|
|
511
|
+
const XdrConversionRate = IDL.Record({
|
|
512
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
513
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
514
|
+
});
|
|
496
515
|
const Command_2 = IDL.Variant({
|
|
497
516
|
'Spawn' : NeuronId,
|
|
498
517
|
'Split' : Split,
|
|
@@ -561,6 +580,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
561
580
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
562
581
|
'migrations' : IDL.Opt(Migrations),
|
|
563
582
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
583
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
564
584
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
565
585
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
566
586
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -671,6 +691,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
671
691
|
'source_neuron_info' : IDL.Opt(NeuronInfo),
|
|
672
692
|
});
|
|
673
693
|
const MakeProposalResponse = IDL.Record({
|
|
694
|
+
'message' : IDL.Opt(IDL.Text),
|
|
674
695
|
'proposal_id' : IDL.Opt(NeuronId),
|
|
675
696
|
});
|
|
676
697
|
const StakeMaturityResponse = IDL.Record({
|
|
@@ -1070,6 +1091,20 @@ export const init = ({ IDL }) => {
|
|
|
1070
1091
|
'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
|
|
1071
1092
|
'rewards' : IDL.Vec(RewardNodeProvider),
|
|
1072
1093
|
});
|
|
1094
|
+
const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
|
|
1095
|
+
const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
|
|
1096
|
+
'contribution_threshold_xdr' : IDL.Opt(Decimal),
|
|
1097
|
+
'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1098
|
+
'full_participation_milestone_xdr' : IDL.Opt(Decimal),
|
|
1099
|
+
});
|
|
1100
|
+
const NeuronsFundEconomics = IDL.Record({
|
|
1101
|
+
'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1102
|
+
'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
|
|
1103
|
+
NeuronsFundMatchedFundingCurveCoefficients
|
|
1104
|
+
),
|
|
1105
|
+
'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
|
|
1106
|
+
'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
|
|
1107
|
+
});
|
|
1073
1108
|
const NetworkEconomics = IDL.Record({
|
|
1074
1109
|
'neuron_minimum_stake_e8s' : IDL.Nat64,
|
|
1075
1110
|
'max_proposals_to_keep_per_topic' : IDL.Nat32,
|
|
@@ -1079,6 +1114,7 @@ export const init = ({ IDL }) => {
|
|
|
1079
1114
|
'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
|
|
1080
1115
|
'minimum_icp_xdr_rate' : IDL.Nat64,
|
|
1081
1116
|
'maximum_node_provider_rewards_e8s' : IDL.Nat64,
|
|
1117
|
+
'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
|
|
1082
1118
|
});
|
|
1083
1119
|
const ApproveGenesisKyc = IDL.Record({
|
|
1084
1120
|
'principals' : IDL.Vec(IDL.Principal),
|
|
@@ -1317,6 +1353,10 @@ export const init = ({ IDL }) => {
|
|
|
1317
1353
|
IDL.Nat64
|
|
1318
1354
|
),
|
|
1319
1355
|
});
|
|
1356
|
+
const XdrConversionRate = IDL.Record({
|
|
1357
|
+
'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
|
|
1358
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
1359
|
+
});
|
|
1320
1360
|
const Command_2 = IDL.Variant({
|
|
1321
1361
|
'Spawn' : NeuronId,
|
|
1322
1362
|
'Split' : Split,
|
|
@@ -1385,6 +1425,7 @@ export const init = ({ IDL }) => {
|
|
|
1385
1425
|
'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
|
|
1386
1426
|
'migrations' : IDL.Opt(Migrations),
|
|
1387
1427
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
1428
|
+
'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
|
|
1388
1429
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
1389
1430
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
1390
1431
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ActorMethod } from "@dfinity/agent";
|
|
2
|
+
import type { IDL } from "@dfinity/candid";
|
|
2
3
|
import type { Principal } from "@dfinity/principal";
|
|
3
4
|
|
|
4
5
|
export interface AddWasmRequest {
|
|
@@ -288,3 +289,5 @@ export interface _SERVICE {
|
|
|
288
289
|
UpdateSnsSubnetListResponse
|
|
289
290
|
>;
|
|
290
291
|
}
|
|
292
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
293
|
+
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 30a4021 (2024-03-28 tags: release-2024-03-27_23-01-p2p) '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,7 @@ 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 GetWasmRequest = record { hash :
|
|
62
|
+
type GetWasmRequest = record { hash : blob };
|
|
63
63
|
type GetWasmResponse = record { wasm : opt SnsWasm };
|
|
64
64
|
type IdealMatchedParticipationFunction = record {
|
|
65
65
|
serialized_representation : opt text;
|
|
@@ -116,7 +116,7 @@ type PrettySnsVersion = record {
|
|
|
116
116
|
governance_wasm_hash : text;
|
|
117
117
|
index_wasm_hash : text;
|
|
118
118
|
};
|
|
119
|
-
type Result = variant { Error : SnsWasmError; Hash :
|
|
119
|
+
type Result = variant { Error : SnsWasmError; Hash : blob };
|
|
120
120
|
type SnsCanisterIds = record {
|
|
121
121
|
root : opt principal;
|
|
122
122
|
swap : opt principal;
|
|
@@ -170,14 +170,14 @@ type SnsUpgrade = record {
|
|
|
170
170
|
current_version : opt SnsVersion;
|
|
171
171
|
};
|
|
172
172
|
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 :
|
|
173
|
+
archive_wasm_hash : blob;
|
|
174
|
+
root_wasm_hash : blob;
|
|
175
|
+
swap_wasm_hash : blob;
|
|
176
|
+
ledger_wasm_hash : blob;
|
|
177
|
+
governance_wasm_hash : blob;
|
|
178
|
+
index_wasm_hash : blob;
|
|
179
|
+
};
|
|
180
|
+
type SnsWasm = record { wasm : blob; canister_type : int32 };
|
|
181
181
|
type SnsWasmCanisterInitPayload = record {
|
|
182
182
|
allowed_principals : vec principal;
|
|
183
183
|
access_controls_enabled : bool;
|