@dfinity/nns 11.1.3 → 11.1.4-next-2025-12-03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +53 -9
- package/dist/candid/governance.d.ts +49 -28
- package/dist/candid/governance.did +30 -8
- package/dist/candid/governance.idl.js +53 -9
- package/dist/candid/governance_test.certified.idl.js +53 -9
- package/dist/candid/governance_test.d.ts +49 -28
- package/dist/candid/governance_test.did +30 -8
- package/dist/candid/governance_test.idl.js +53 -9
- package/dist/candid/sns_wasm.did +1 -1
- package/dist/canisters/governance/request.converters.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +3 -3
- package/dist/types/governance_converters.d.ts +2 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 724ae41 (2025-11-27 tags: release-2025-11-28_03-22-base) 'rs/nns/gtc/canister/gtc.did' by import-candid
|
|
2
2
|
|
|
3
3
|
type AccountState = record {
|
|
4
4
|
authenticated_principal_id : opt principal;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export const idlFactory = ({ IDL }) => {
|
|
10
10
|
const ManageNeuronRequest = IDL.Rec();
|
|
11
11
|
const Proposal = IDL.Rec();
|
|
12
|
+
const SelfDescribingValue = IDL.Rec();
|
|
12
13
|
const NeuronId = IDL.Record({ id: IDL.Nat64 });
|
|
13
14
|
const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
|
|
14
15
|
const DateUtc = IDL.Record({
|
|
@@ -39,6 +40,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
39
40
|
timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
40
41
|
});
|
|
41
42
|
const MonthlyNodeProviderRewards = IDL.Record({
|
|
43
|
+
algorithm_version: IDL.Opt(IDL.Nat32),
|
|
42
44
|
minimum_xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
|
|
43
45
|
end_date: IDL.Opt(DateUtc),
|
|
44
46
|
registry_version: IDL.Opt(IDL.Nat64),
|
|
@@ -386,7 +388,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
386
388
|
to_account: IDL.Opt(AccountIdentifier),
|
|
387
389
|
amount: IDL.Opt(Amount),
|
|
388
390
|
});
|
|
389
|
-
const
|
|
391
|
+
const ManageNeuronProposalCommand = IDL.Variant({
|
|
390
392
|
Spawn: Spawn,
|
|
391
393
|
Split: Split,
|
|
392
394
|
Follow: Follow,
|
|
@@ -407,9 +409,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
407
409
|
Subaccount: IDL.Vec(IDL.Nat8),
|
|
408
410
|
NeuronId: NeuronId,
|
|
409
411
|
});
|
|
410
|
-
const
|
|
412
|
+
const ManageNeuronProposal = IDL.Record({
|
|
411
413
|
id: IDL.Opt(NeuronId),
|
|
412
|
-
command: IDL.Opt(
|
|
414
|
+
command: IDL.Opt(ManageNeuronProposalCommand),
|
|
413
415
|
neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount),
|
|
414
416
|
});
|
|
415
417
|
const Controllers = IDL.Record({ controllers: IDL.Vec(IDL.Principal) });
|
|
@@ -575,7 +577,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
575
577
|
const Action = IDL.Variant({
|
|
576
578
|
RegisterKnownNeuron: KnownNeuron,
|
|
577
579
|
FulfillSubnetRentalRequest: FulfillSubnetRentalRequest,
|
|
578
|
-
ManageNeuron:
|
|
580
|
+
ManageNeuron: ManageNeuronProposal,
|
|
579
581
|
UpdateCanisterSettings: UpdateCanisterSettings,
|
|
580
582
|
InstallCode: InstallCode,
|
|
581
583
|
DeregisterKnownNeuron: DeregisterKnownNeuron,
|
|
@@ -592,12 +594,28 @@ export const idlFactory = ({ IDL }) => {
|
|
|
592
594
|
AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
|
|
593
595
|
Motion: Motion,
|
|
594
596
|
});
|
|
597
|
+
SelfDescribingValue.fill(
|
|
598
|
+
IDL.Variant({
|
|
599
|
+
Int: IDL.Int,
|
|
600
|
+
Map: IDL.Vec(IDL.Tuple(IDL.Text, SelfDescribingValue)),
|
|
601
|
+
Nat: IDL.Nat,
|
|
602
|
+
Blob: IDL.Vec(IDL.Nat8),
|
|
603
|
+
Text: IDL.Text,
|
|
604
|
+
Array: IDL.Vec(SelfDescribingValue),
|
|
605
|
+
}),
|
|
606
|
+
);
|
|
607
|
+
const SelfDescribingProposalAction = IDL.Record({
|
|
608
|
+
type_description: IDL.Opt(IDL.Text),
|
|
609
|
+
type_name: IDL.Opt(IDL.Text),
|
|
610
|
+
value: IDL.Opt(SelfDescribingValue),
|
|
611
|
+
});
|
|
595
612
|
Proposal.fill(
|
|
596
613
|
IDL.Record({
|
|
597
614
|
url: IDL.Text,
|
|
598
615
|
title: IDL.Opt(IDL.Text),
|
|
599
616
|
action: IDL.Opt(Action),
|
|
600
617
|
summary: IDL.Text,
|
|
618
|
+
self_describing_action: IDL.Opt(SelfDescribingProposalAction),
|
|
601
619
|
}),
|
|
602
620
|
);
|
|
603
621
|
const WaitForQuietState = IDL.Record({
|
|
@@ -769,6 +787,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
769
787
|
Ok: NodeProvider,
|
|
770
788
|
Err: GovernanceError,
|
|
771
789
|
});
|
|
790
|
+
const GetPendingProposalsRequest = IDL.Record({
|
|
791
|
+
return_self_describing_action: IDL.Opt(IDL.Bool),
|
|
792
|
+
});
|
|
772
793
|
const ProposalInfo = IDL.Record({
|
|
773
794
|
id: IDL.Opt(ProposalId),
|
|
774
795
|
status: IDL.Int32,
|
|
@@ -842,6 +863,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
842
863
|
node_providers: IDL.Vec(NodeProvider),
|
|
843
864
|
});
|
|
844
865
|
const ListProposalInfoRequest = IDL.Record({
|
|
866
|
+
return_self_describing_action: IDL.Opt(IDL.Bool),
|
|
845
867
|
include_reward_status: IDL.Vec(IDL.Int32),
|
|
846
868
|
omit_large_fields: IDL.Opt(IDL.Bool),
|
|
847
869
|
before_proposal: IDL.Opt(ProposalId),
|
|
@@ -1043,7 +1065,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
1043
1065
|
[],
|
|
1044
1066
|
),
|
|
1045
1067
|
get_node_provider_by_caller: IDL.Func([IDL.Null], [Result_7], []),
|
|
1046
|
-
get_pending_proposals: IDL.Func(
|
|
1068
|
+
get_pending_proposals: IDL.Func(
|
|
1069
|
+
[IDL.Opt(GetPendingProposalsRequest)],
|
|
1070
|
+
[IDL.Vec(ProposalInfo)],
|
|
1071
|
+
[],
|
|
1072
|
+
),
|
|
1047
1073
|
get_proposal_info: IDL.Func([IDL.Nat64], [IDL.Opt(ProposalInfo)], []),
|
|
1048
1074
|
get_restore_aging_summary: IDL.Func([], [RestoreAgingSummary], []),
|
|
1049
1075
|
list_known_neurons: IDL.Func([], [ListKnownNeuronsResponse], []),
|
|
@@ -1087,6 +1113,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
1087
1113
|
|
|
1088
1114
|
export const init = ({ IDL }) => {
|
|
1089
1115
|
const Proposal = IDL.Rec();
|
|
1116
|
+
const SelfDescribingValue = IDL.Rec();
|
|
1090
1117
|
const NeuronId = IDL.Record({ id: IDL.Nat64 });
|
|
1091
1118
|
const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
|
|
1092
1119
|
const DateUtc = IDL.Record({
|
|
@@ -1117,6 +1144,7 @@ export const init = ({ IDL }) => {
|
|
|
1117
1144
|
timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
1118
1145
|
});
|
|
1119
1146
|
const MonthlyNodeProviderRewards = IDL.Record({
|
|
1147
|
+
algorithm_version: IDL.Opt(IDL.Nat32),
|
|
1120
1148
|
minimum_xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
|
|
1121
1149
|
end_date: IDL.Opt(DateUtc),
|
|
1122
1150
|
registry_version: IDL.Opt(IDL.Nat64),
|
|
@@ -1464,7 +1492,7 @@ export const init = ({ IDL }) => {
|
|
|
1464
1492
|
to_account: IDL.Opt(AccountIdentifier),
|
|
1465
1493
|
amount: IDL.Opt(Amount),
|
|
1466
1494
|
});
|
|
1467
|
-
const
|
|
1495
|
+
const ManageNeuronProposalCommand = IDL.Variant({
|
|
1468
1496
|
Spawn: Spawn,
|
|
1469
1497
|
Split: Split,
|
|
1470
1498
|
Follow: Follow,
|
|
@@ -1485,9 +1513,9 @@ export const init = ({ IDL }) => {
|
|
|
1485
1513
|
Subaccount: IDL.Vec(IDL.Nat8),
|
|
1486
1514
|
NeuronId: NeuronId,
|
|
1487
1515
|
});
|
|
1488
|
-
const
|
|
1516
|
+
const ManageNeuronProposal = IDL.Record({
|
|
1489
1517
|
id: IDL.Opt(NeuronId),
|
|
1490
|
-
command: IDL.Opt(
|
|
1518
|
+
command: IDL.Opt(ManageNeuronProposalCommand),
|
|
1491
1519
|
neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount),
|
|
1492
1520
|
});
|
|
1493
1521
|
const Controllers = IDL.Record({ controllers: IDL.Vec(IDL.Principal) });
|
|
@@ -1653,7 +1681,7 @@ export const init = ({ IDL }) => {
|
|
|
1653
1681
|
const Action = IDL.Variant({
|
|
1654
1682
|
RegisterKnownNeuron: KnownNeuron,
|
|
1655
1683
|
FulfillSubnetRentalRequest: FulfillSubnetRentalRequest,
|
|
1656
|
-
ManageNeuron:
|
|
1684
|
+
ManageNeuron: ManageNeuronProposal,
|
|
1657
1685
|
UpdateCanisterSettings: UpdateCanisterSettings,
|
|
1658
1686
|
InstallCode: InstallCode,
|
|
1659
1687
|
DeregisterKnownNeuron: DeregisterKnownNeuron,
|
|
@@ -1670,12 +1698,28 @@ export const init = ({ IDL }) => {
|
|
|
1670
1698
|
AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
|
|
1671
1699
|
Motion: Motion,
|
|
1672
1700
|
});
|
|
1701
|
+
SelfDescribingValue.fill(
|
|
1702
|
+
IDL.Variant({
|
|
1703
|
+
Int: IDL.Int,
|
|
1704
|
+
Map: IDL.Vec(IDL.Tuple(IDL.Text, SelfDescribingValue)),
|
|
1705
|
+
Nat: IDL.Nat,
|
|
1706
|
+
Blob: IDL.Vec(IDL.Nat8),
|
|
1707
|
+
Text: IDL.Text,
|
|
1708
|
+
Array: IDL.Vec(SelfDescribingValue),
|
|
1709
|
+
}),
|
|
1710
|
+
);
|
|
1711
|
+
const SelfDescribingProposalAction = IDL.Record({
|
|
1712
|
+
type_description: IDL.Opt(IDL.Text),
|
|
1713
|
+
type_name: IDL.Opt(IDL.Text),
|
|
1714
|
+
value: IDL.Opt(SelfDescribingValue),
|
|
1715
|
+
});
|
|
1673
1716
|
Proposal.fill(
|
|
1674
1717
|
IDL.Record({
|
|
1675
1718
|
url: IDL.Text,
|
|
1676
1719
|
title: IDL.Opt(IDL.Text),
|
|
1677
1720
|
action: IDL.Opt(Action),
|
|
1678
1721
|
summary: IDL.Text,
|
|
1722
|
+
self_describing_action: IDL.Opt(SelfDescribingProposalAction),
|
|
1679
1723
|
}),
|
|
1680
1724
|
);
|
|
1681
1725
|
const WaitForQuietState = IDL.Record({
|
|
@@ -20,7 +20,7 @@ export interface AccountIdentifier {
|
|
|
20
20
|
export type Action =
|
|
21
21
|
| { RegisterKnownNeuron: KnownNeuron }
|
|
22
22
|
| { FulfillSubnetRentalRequest: FulfillSubnetRentalRequest }
|
|
23
|
-
| { ManageNeuron:
|
|
23
|
+
| { ManageNeuron: ManageNeuronProposal }
|
|
24
24
|
| { UpdateCanisterSettings: UpdateCanisterSettings }
|
|
25
25
|
| { InstallCode: InstallCode }
|
|
26
26
|
| { DeregisterKnownNeuron: DeregisterKnownNeuron }
|
|
@@ -102,25 +102,6 @@ export interface ClaimOrRefreshNeuronFromAccountResponse {
|
|
|
102
102
|
export interface ClaimOrRefreshResponse {
|
|
103
103
|
refreshed_neuron_id: [] | [NeuronId];
|
|
104
104
|
}
|
|
105
|
-
/**
|
|
106
|
-
* KEEP THIS IN SYNC WITH ManageNeuronCommandRequest!
|
|
107
|
-
*/
|
|
108
|
-
export type Command =
|
|
109
|
-
| { Spawn: Spawn }
|
|
110
|
-
| { Split: Split }
|
|
111
|
-
| { Follow: Follow }
|
|
112
|
-
| { DisburseMaturity: DisburseMaturity }
|
|
113
|
-
| { RefreshVotingPower: RefreshVotingPower }
|
|
114
|
-
| { ClaimOrRefresh: ClaimOrRefresh }
|
|
115
|
-
| { Configure: Configure }
|
|
116
|
-
| { RegisterVote: RegisterVote }
|
|
117
|
-
| { Merge: Merge }
|
|
118
|
-
| { DisburseToNeuron: DisburseToNeuron }
|
|
119
|
-
| { SetFollowing: SetFollowing }
|
|
120
|
-
| { MakeProposal: Proposal }
|
|
121
|
-
| { StakeMaturity: StakeMaturity }
|
|
122
|
-
| { MergeMaturity: MergeMaturity }
|
|
123
|
-
| { Disburse: Disburse };
|
|
124
105
|
export type Command_1 =
|
|
125
106
|
| { Error: GovernanceError }
|
|
126
107
|
| { Spawn: SpawnResponse }
|
|
@@ -293,6 +274,9 @@ export interface GetNeuronsFundAuditInfoRequest {
|
|
|
293
274
|
export interface GetNeuronsFundAuditInfoResponse {
|
|
294
275
|
result: [] | [Result_6];
|
|
295
276
|
}
|
|
277
|
+
export interface GetPendingProposalsRequest {
|
|
278
|
+
return_self_describing_action: [] | [boolean];
|
|
279
|
+
}
|
|
296
280
|
export interface GlobalTimeOfDay {
|
|
297
281
|
seconds_after_utc_midnight: [] | [bigint];
|
|
298
282
|
}
|
|
@@ -521,6 +505,7 @@ export interface ListNodeProvidersResponse {
|
|
|
521
505
|
node_providers: Array<NodeProvider>;
|
|
522
506
|
}
|
|
523
507
|
export interface ListProposalInfoRequest {
|
|
508
|
+
return_self_describing_action: [] | [boolean];
|
|
524
509
|
include_reward_status: Int32Array;
|
|
525
510
|
omit_large_fields: [] | [boolean];
|
|
526
511
|
before_proposal: [] | [ProposalId];
|
|
@@ -543,18 +528,37 @@ export interface MakeProposalResponse {
|
|
|
543
528
|
proposal_id: [] | [ProposalId];
|
|
544
529
|
}
|
|
545
530
|
/**
|
|
546
|
-
*
|
|
547
|
-
|
|
531
|
+
* KEEP THIS IN SYNC WITH COMMAND!
|
|
532
|
+
*/
|
|
533
|
+
export type ManageNeuronCommandRequest =
|
|
534
|
+
| { Spawn: Spawn }
|
|
535
|
+
| { Split: Split }
|
|
536
|
+
| { Follow: Follow }
|
|
537
|
+
| { DisburseMaturity: DisburseMaturity }
|
|
538
|
+
| { RefreshVotingPower: RefreshVotingPower }
|
|
539
|
+
| { ClaimOrRefresh: ClaimOrRefresh }
|
|
540
|
+
| { Configure: Configure }
|
|
541
|
+
| { RegisterVote: RegisterVote }
|
|
542
|
+
| { Merge: Merge }
|
|
543
|
+
| { DisburseToNeuron: DisburseToNeuron }
|
|
544
|
+
| { SetFollowing: SetFollowing }
|
|
545
|
+
| { MakeProposal: MakeProposalRequest }
|
|
546
|
+
| { StakeMaturity: StakeMaturity }
|
|
547
|
+
| { MergeMaturity: MergeMaturity }
|
|
548
|
+
| { Disburse: Disburse };
|
|
549
|
+
/**
|
|
550
|
+
* Not to be confused with ManageNeuronRequest. This is only used to represent a manage neuron proposal.
|
|
551
|
+
* (Yes, this is very structurally similar to that, but not actually exactly equivalent)
|
|
548
552
|
*/
|
|
549
|
-
export interface
|
|
553
|
+
export interface ManageNeuronProposal {
|
|
550
554
|
id: [] | [NeuronId];
|
|
551
|
-
command: [] | [
|
|
555
|
+
command: [] | [ManageNeuronProposalCommand];
|
|
552
556
|
neuron_id_or_subaccount: [] | [NeuronIdOrSubaccount];
|
|
553
557
|
}
|
|
554
558
|
/**
|
|
555
|
-
* KEEP THIS IN SYNC WITH
|
|
559
|
+
* KEEP THIS IN SYNC WITH ManageNeuronCommandRequest!
|
|
556
560
|
*/
|
|
557
|
-
export type
|
|
561
|
+
export type ManageNeuronProposalCommand =
|
|
558
562
|
| { Spawn: Spawn }
|
|
559
563
|
| { Split: Split }
|
|
560
564
|
| { Follow: Follow }
|
|
@@ -566,7 +570,7 @@ export type ManageNeuronCommandRequest =
|
|
|
566
570
|
| { Merge: Merge }
|
|
567
571
|
| { DisburseToNeuron: DisburseToNeuron }
|
|
568
572
|
| { SetFollowing: SetFollowing }
|
|
569
|
-
| { MakeProposal:
|
|
573
|
+
| { MakeProposal: Proposal }
|
|
570
574
|
| { StakeMaturity: StakeMaturity }
|
|
571
575
|
| { MergeMaturity: MergeMaturity }
|
|
572
576
|
| { Disburse: Disburse };
|
|
@@ -621,6 +625,7 @@ export interface MergeResponse {
|
|
|
621
625
|
source_neuron_info: [] | [NeuronInfo];
|
|
622
626
|
}
|
|
623
627
|
export interface MonthlyNodeProviderRewards {
|
|
628
|
+
algorithm_version: [] | [number];
|
|
624
629
|
minimum_xdr_permyriad_per_icp: [] | [bigint];
|
|
625
630
|
end_date: [] | [DateUtc];
|
|
626
631
|
registry_version: [] | [bigint];
|
|
@@ -948,6 +953,7 @@ export interface Proposal {
|
|
|
948
953
|
title: [] | [string];
|
|
949
954
|
action: [] | [Action];
|
|
950
955
|
summary: string;
|
|
956
|
+
self_describing_action: [] | [SelfDescribingProposalAction];
|
|
951
957
|
}
|
|
952
958
|
export type ProposalActionRequest =
|
|
953
959
|
| { RegisterKnownNeuron: KnownNeuron }
|
|
@@ -1075,6 +1081,18 @@ export interface RewardToAccount {
|
|
|
1075
1081
|
export interface RewardToNeuron {
|
|
1076
1082
|
dissolve_delay_seconds: bigint;
|
|
1077
1083
|
}
|
|
1084
|
+
export interface SelfDescribingProposalAction {
|
|
1085
|
+
type_description: [] | [string];
|
|
1086
|
+
type_name: [] | [string];
|
|
1087
|
+
value: [] | [SelfDescribingValue];
|
|
1088
|
+
}
|
|
1089
|
+
export type SelfDescribingValue =
|
|
1090
|
+
| { Int: bigint }
|
|
1091
|
+
| { Map: Array<[string, SelfDescribingValue]> }
|
|
1092
|
+
| { Nat: bigint }
|
|
1093
|
+
| { Blob: Uint8Array }
|
|
1094
|
+
| { Text: string }
|
|
1095
|
+
| { Array: Array<SelfDescribingValue> };
|
|
1078
1096
|
export interface SetDefaultFollowees {
|
|
1079
1097
|
default_followees: Array<[number, Followees]>;
|
|
1080
1098
|
}
|
|
@@ -1301,7 +1319,10 @@ export interface _SERVICE {
|
|
|
1301
1319
|
GetNeuronsFundAuditInfoResponse
|
|
1302
1320
|
>;
|
|
1303
1321
|
get_node_provider_by_caller: ActorMethod<[null], Result_7>;
|
|
1304
|
-
get_pending_proposals: ActorMethod<
|
|
1322
|
+
get_pending_proposals: ActorMethod<
|
|
1323
|
+
[[] | [GetPendingProposalsRequest]],
|
|
1324
|
+
Array<ProposalInfo>
|
|
1325
|
+
>;
|
|
1305
1326
|
get_proposal_info: ActorMethod<[bigint], [] | [ProposalInfo]>;
|
|
1306
1327
|
get_restore_aging_summary: ActorMethod<[], RestoreAgingSummary>;
|
|
1307
1328
|
list_known_neurons: ActorMethod<[], ListKnownNeuronsResponse>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 724ae41 (2025-11-27 tags: release-2025-11-28_03-22-base) 'rs/nns/governance/canister/governance.did' by import-candid
|
|
2
2
|
|
|
3
3
|
type AccountIdentifier = record {
|
|
4
4
|
hash : blob;
|
|
@@ -7,7 +7,7 @@ type AccountIdentifier = record {
|
|
|
7
7
|
type Action = variant {
|
|
8
8
|
RegisterKnownNeuron : KnownNeuron;
|
|
9
9
|
DeregisterKnownNeuron : DeregisterKnownNeuron;
|
|
10
|
-
ManageNeuron :
|
|
10
|
+
ManageNeuron : ManageNeuronProposal;
|
|
11
11
|
UpdateCanisterSettings : UpdateCanisterSettings;
|
|
12
12
|
InstallCode : InstallCode;
|
|
13
13
|
StopOrStartCanister : StopOrStartCanister;
|
|
@@ -155,7 +155,7 @@ type SetFollowingResponse = record {
|
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
// KEEP THIS IN SYNC WITH ManageNeuronCommandRequest!
|
|
158
|
-
type
|
|
158
|
+
type ManageNeuronProposalCommand = variant {
|
|
159
159
|
Spawn : Spawn;
|
|
160
160
|
Split : Split;
|
|
161
161
|
Follow : Follow;
|
|
@@ -527,6 +527,7 @@ type ListProposalInfoRequest = record {
|
|
|
527
527
|
exclude_topic : vec int32;
|
|
528
528
|
include_all_manage_neuron_proposals : opt bool;
|
|
529
529
|
include_status : vec int32;
|
|
530
|
+
return_self_describing_action : opt bool;
|
|
530
531
|
};
|
|
531
532
|
|
|
532
533
|
type ListProposalInfoResponse = record {
|
|
@@ -545,11 +546,11 @@ type MakeProposalResponse = record {
|
|
|
545
546
|
proposal_id : opt ProposalId;
|
|
546
547
|
};
|
|
547
548
|
|
|
548
|
-
// Not to be confused with ManageNeuronRequest.
|
|
549
|
-
// similar to that, but not actually exactly equivalent
|
|
550
|
-
type
|
|
549
|
+
// Not to be confused with ManageNeuronRequest. This is only used to represent a manage neuron proposal.
|
|
550
|
+
// (Yes, this is very structurally similar to that, but not actually exactly equivalent)
|
|
551
|
+
type ManageNeuronProposal = record {
|
|
551
552
|
id : opt NeuronId;
|
|
552
|
-
command : opt
|
|
553
|
+
command : opt ManageNeuronProposalCommand;
|
|
553
554
|
neuron_id_or_subaccount : opt NeuronIdOrSubaccount;
|
|
554
555
|
};
|
|
555
556
|
|
|
@@ -622,6 +623,7 @@ type DateUtc = record {
|
|
|
622
623
|
type MonthlyNodeProviderRewards = record {
|
|
623
624
|
minimum_xdr_permyriad_per_icp : opt nat64;
|
|
624
625
|
registry_version : opt nat64;
|
|
626
|
+
algorithm_version : opt nat32;
|
|
625
627
|
node_providers : vec NodeProvider;
|
|
626
628
|
timestamp : nat64;
|
|
627
629
|
start_date : opt DateUtc;
|
|
@@ -1008,6 +1010,7 @@ type Proposal = record {
|
|
|
1008
1010
|
title : opt text;
|
|
1009
1011
|
action : opt Action;
|
|
1010
1012
|
summary : text;
|
|
1013
|
+
self_describing_action : opt SelfDescribingProposalAction;
|
|
1011
1014
|
};
|
|
1012
1015
|
|
|
1013
1016
|
type ProposalActionRequest = variant {
|
|
@@ -1427,6 +1430,25 @@ type Vote = variant {
|
|
|
1427
1430
|
No;
|
|
1428
1431
|
};
|
|
1429
1432
|
|
|
1433
|
+
type SelfDescribingProposalAction = record {
|
|
1434
|
+
type_name : opt text;
|
|
1435
|
+
type_description : opt text;
|
|
1436
|
+
value : opt SelfDescribingValue;
|
|
1437
|
+
};
|
|
1438
|
+
|
|
1439
|
+
type SelfDescribingValue = variant {
|
|
1440
|
+
Blob : blob;
|
|
1441
|
+
Text : text;
|
|
1442
|
+
Nat : nat;
|
|
1443
|
+
Int : int;
|
|
1444
|
+
Array : vec SelfDescribingValue;
|
|
1445
|
+
Map : vec record { text; SelfDescribingValue };
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1448
|
+
type GetPendingProposalsRequest = record {
|
|
1449
|
+
return_self_describing_action : opt bool;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1430
1452
|
service : (Governance) -> {
|
|
1431
1453
|
claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
|
|
1432
1454
|
claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (
|
|
@@ -1454,7 +1476,7 @@ service : (Governance) -> {
|
|
|
1454
1476
|
GetNeuronsFundAuditInfoResponse,
|
|
1455
1477
|
) query;
|
|
1456
1478
|
get_node_provider_by_caller : (null) -> (Result_7) query;
|
|
1457
|
-
get_pending_proposals : () -> (vec ProposalInfo) query;
|
|
1479
|
+
get_pending_proposals : (opt GetPendingProposalsRequest) -> (vec ProposalInfo) query;
|
|
1458
1480
|
get_proposal_info : (nat64) -> (opt ProposalInfo) query;
|
|
1459
1481
|
get_restore_aging_summary : () -> (RestoreAgingSummary) query;
|
|
1460
1482
|
list_known_neurons : () -> (ListKnownNeuronsResponse) query;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export const idlFactory = ({ IDL }) => {
|
|
10
10
|
const ManageNeuronRequest = IDL.Rec();
|
|
11
11
|
const Proposal = IDL.Rec();
|
|
12
|
+
const SelfDescribingValue = IDL.Rec();
|
|
12
13
|
const NeuronId = IDL.Record({ id: IDL.Nat64 });
|
|
13
14
|
const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
|
|
14
15
|
const DateUtc = IDL.Record({
|
|
@@ -39,6 +40,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
39
40
|
timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
40
41
|
});
|
|
41
42
|
const MonthlyNodeProviderRewards = IDL.Record({
|
|
43
|
+
algorithm_version: IDL.Opt(IDL.Nat32),
|
|
42
44
|
minimum_xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
|
|
43
45
|
end_date: IDL.Opt(DateUtc),
|
|
44
46
|
registry_version: IDL.Opt(IDL.Nat64),
|
|
@@ -386,7 +388,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
386
388
|
to_account: IDL.Opt(AccountIdentifier),
|
|
387
389
|
amount: IDL.Opt(Amount),
|
|
388
390
|
});
|
|
389
|
-
const
|
|
391
|
+
const ManageNeuronProposalCommand = IDL.Variant({
|
|
390
392
|
Spawn: Spawn,
|
|
391
393
|
Split: Split,
|
|
392
394
|
Follow: Follow,
|
|
@@ -407,9 +409,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
407
409
|
Subaccount: IDL.Vec(IDL.Nat8),
|
|
408
410
|
NeuronId: NeuronId,
|
|
409
411
|
});
|
|
410
|
-
const
|
|
412
|
+
const ManageNeuronProposal = IDL.Record({
|
|
411
413
|
id: IDL.Opt(NeuronId),
|
|
412
|
-
command: IDL.Opt(
|
|
414
|
+
command: IDL.Opt(ManageNeuronProposalCommand),
|
|
413
415
|
neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount),
|
|
414
416
|
});
|
|
415
417
|
const Controllers = IDL.Record({ controllers: IDL.Vec(IDL.Principal) });
|
|
@@ -575,7 +577,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
575
577
|
const Action = IDL.Variant({
|
|
576
578
|
RegisterKnownNeuron: KnownNeuron,
|
|
577
579
|
FulfillSubnetRentalRequest: FulfillSubnetRentalRequest,
|
|
578
|
-
ManageNeuron:
|
|
580
|
+
ManageNeuron: ManageNeuronProposal,
|
|
579
581
|
UpdateCanisterSettings: UpdateCanisterSettings,
|
|
580
582
|
InstallCode: InstallCode,
|
|
581
583
|
DeregisterKnownNeuron: DeregisterKnownNeuron,
|
|
@@ -592,12 +594,28 @@ export const idlFactory = ({ IDL }) => {
|
|
|
592
594
|
AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
|
|
593
595
|
Motion: Motion,
|
|
594
596
|
});
|
|
597
|
+
SelfDescribingValue.fill(
|
|
598
|
+
IDL.Variant({
|
|
599
|
+
Int: IDL.Int,
|
|
600
|
+
Map: IDL.Vec(IDL.Tuple(IDL.Text, SelfDescribingValue)),
|
|
601
|
+
Nat: IDL.Nat,
|
|
602
|
+
Blob: IDL.Vec(IDL.Nat8),
|
|
603
|
+
Text: IDL.Text,
|
|
604
|
+
Array: IDL.Vec(SelfDescribingValue),
|
|
605
|
+
}),
|
|
606
|
+
);
|
|
607
|
+
const SelfDescribingProposalAction = IDL.Record({
|
|
608
|
+
type_description: IDL.Opt(IDL.Text),
|
|
609
|
+
type_name: IDL.Opt(IDL.Text),
|
|
610
|
+
value: IDL.Opt(SelfDescribingValue),
|
|
611
|
+
});
|
|
595
612
|
Proposal.fill(
|
|
596
613
|
IDL.Record({
|
|
597
614
|
url: IDL.Text,
|
|
598
615
|
title: IDL.Opt(IDL.Text),
|
|
599
616
|
action: IDL.Opt(Action),
|
|
600
617
|
summary: IDL.Text,
|
|
618
|
+
self_describing_action: IDL.Opt(SelfDescribingProposalAction),
|
|
601
619
|
}),
|
|
602
620
|
);
|
|
603
621
|
const WaitForQuietState = IDL.Record({
|
|
@@ -769,6 +787,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
769
787
|
Ok: NodeProvider,
|
|
770
788
|
Err: GovernanceError,
|
|
771
789
|
});
|
|
790
|
+
const GetPendingProposalsRequest = IDL.Record({
|
|
791
|
+
return_self_describing_action: IDL.Opt(IDL.Bool),
|
|
792
|
+
});
|
|
772
793
|
const ProposalInfo = IDL.Record({
|
|
773
794
|
id: IDL.Opt(ProposalId),
|
|
774
795
|
status: IDL.Int32,
|
|
@@ -842,6 +863,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
842
863
|
node_providers: IDL.Vec(NodeProvider),
|
|
843
864
|
});
|
|
844
865
|
const ListProposalInfoRequest = IDL.Record({
|
|
866
|
+
return_self_describing_action: IDL.Opt(IDL.Bool),
|
|
845
867
|
include_reward_status: IDL.Vec(IDL.Int32),
|
|
846
868
|
omit_large_fields: IDL.Opt(IDL.Bool),
|
|
847
869
|
before_proposal: IDL.Opt(ProposalId),
|
|
@@ -1047,7 +1069,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
1047
1069
|
["query"],
|
|
1048
1070
|
),
|
|
1049
1071
|
get_node_provider_by_caller: IDL.Func([IDL.Null], [Result_7], ["query"]),
|
|
1050
|
-
get_pending_proposals: IDL.Func(
|
|
1072
|
+
get_pending_proposals: IDL.Func(
|
|
1073
|
+
[IDL.Opt(GetPendingProposalsRequest)],
|
|
1074
|
+
[IDL.Vec(ProposalInfo)],
|
|
1075
|
+
["query"],
|
|
1076
|
+
),
|
|
1051
1077
|
get_proposal_info: IDL.Func(
|
|
1052
1078
|
[IDL.Nat64],
|
|
1053
1079
|
[IDL.Opt(ProposalInfo)],
|
|
@@ -1095,6 +1121,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
1095
1121
|
|
|
1096
1122
|
export const init = ({ IDL }) => {
|
|
1097
1123
|
const Proposal = IDL.Rec();
|
|
1124
|
+
const SelfDescribingValue = IDL.Rec();
|
|
1098
1125
|
const NeuronId = IDL.Record({ id: IDL.Nat64 });
|
|
1099
1126
|
const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
|
|
1100
1127
|
const DateUtc = IDL.Record({
|
|
@@ -1125,6 +1152,7 @@ export const init = ({ IDL }) => {
|
|
|
1125
1152
|
timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
1126
1153
|
});
|
|
1127
1154
|
const MonthlyNodeProviderRewards = IDL.Record({
|
|
1155
|
+
algorithm_version: IDL.Opt(IDL.Nat32),
|
|
1128
1156
|
minimum_xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
|
|
1129
1157
|
end_date: IDL.Opt(DateUtc),
|
|
1130
1158
|
registry_version: IDL.Opt(IDL.Nat64),
|
|
@@ -1472,7 +1500,7 @@ export const init = ({ IDL }) => {
|
|
|
1472
1500
|
to_account: IDL.Opt(AccountIdentifier),
|
|
1473
1501
|
amount: IDL.Opt(Amount),
|
|
1474
1502
|
});
|
|
1475
|
-
const
|
|
1503
|
+
const ManageNeuronProposalCommand = IDL.Variant({
|
|
1476
1504
|
Spawn: Spawn,
|
|
1477
1505
|
Split: Split,
|
|
1478
1506
|
Follow: Follow,
|
|
@@ -1493,9 +1521,9 @@ export const init = ({ IDL }) => {
|
|
|
1493
1521
|
Subaccount: IDL.Vec(IDL.Nat8),
|
|
1494
1522
|
NeuronId: NeuronId,
|
|
1495
1523
|
});
|
|
1496
|
-
const
|
|
1524
|
+
const ManageNeuronProposal = IDL.Record({
|
|
1497
1525
|
id: IDL.Opt(NeuronId),
|
|
1498
|
-
command: IDL.Opt(
|
|
1526
|
+
command: IDL.Opt(ManageNeuronProposalCommand),
|
|
1499
1527
|
neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount),
|
|
1500
1528
|
});
|
|
1501
1529
|
const Controllers = IDL.Record({ controllers: IDL.Vec(IDL.Principal) });
|
|
@@ -1661,7 +1689,7 @@ export const init = ({ IDL }) => {
|
|
|
1661
1689
|
const Action = IDL.Variant({
|
|
1662
1690
|
RegisterKnownNeuron: KnownNeuron,
|
|
1663
1691
|
FulfillSubnetRentalRequest: FulfillSubnetRentalRequest,
|
|
1664
|
-
ManageNeuron:
|
|
1692
|
+
ManageNeuron: ManageNeuronProposal,
|
|
1665
1693
|
UpdateCanisterSettings: UpdateCanisterSettings,
|
|
1666
1694
|
InstallCode: InstallCode,
|
|
1667
1695
|
DeregisterKnownNeuron: DeregisterKnownNeuron,
|
|
@@ -1678,12 +1706,28 @@ export const init = ({ IDL }) => {
|
|
|
1678
1706
|
AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
|
|
1679
1707
|
Motion: Motion,
|
|
1680
1708
|
});
|
|
1709
|
+
SelfDescribingValue.fill(
|
|
1710
|
+
IDL.Variant({
|
|
1711
|
+
Int: IDL.Int,
|
|
1712
|
+
Map: IDL.Vec(IDL.Tuple(IDL.Text, SelfDescribingValue)),
|
|
1713
|
+
Nat: IDL.Nat,
|
|
1714
|
+
Blob: IDL.Vec(IDL.Nat8),
|
|
1715
|
+
Text: IDL.Text,
|
|
1716
|
+
Array: IDL.Vec(SelfDescribingValue),
|
|
1717
|
+
}),
|
|
1718
|
+
);
|
|
1719
|
+
const SelfDescribingProposalAction = IDL.Record({
|
|
1720
|
+
type_description: IDL.Opt(IDL.Text),
|
|
1721
|
+
type_name: IDL.Opt(IDL.Text),
|
|
1722
|
+
value: IDL.Opt(SelfDescribingValue),
|
|
1723
|
+
});
|
|
1681
1724
|
Proposal.fill(
|
|
1682
1725
|
IDL.Record({
|
|
1683
1726
|
url: IDL.Text,
|
|
1684
1727
|
title: IDL.Opt(IDL.Text),
|
|
1685
1728
|
action: IDL.Opt(Action),
|
|
1686
1729
|
summary: IDL.Text,
|
|
1730
|
+
self_describing_action: IDL.Opt(SelfDescribingProposalAction),
|
|
1687
1731
|
}),
|
|
1688
1732
|
);
|
|
1689
1733
|
const WaitForQuietState = IDL.Record({
|