@dfinity/nns 8.0.0 → 8.0.1-next-2024-12-04
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 +6 -0
- package/dist/candid/governance.d.ts +4 -0
- package/dist/candid/governance.did +18 -1
- package/dist/candid/governance.idl.js +6 -0
- package/dist/candid/governance_test.certified.idl.js +6 -0
- package/dist/candid/governance_test.d.ts +4 -0
- package/dist/candid/governance_test.did +18 -1
- package/dist/candid/governance_test.idl.js +6 -0
- package/dist/candid/sns_wasm.did +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/chunk-UIWKDLUM.js +19 -0
- package/dist/esm/chunk-UIWKDLUM.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 +3 -3
- package/dist/types/types/governance_converters.d.ts +4 -0
- package/package.json +7 -7
- package/dist/esm/chunk-XGNDCDDQ.js +0 -19
- package/dist/esm/chunk-XGNDCDDQ.js.map +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit f9085db (2024-11-28 tags: release-2024-11-28_03-15-revert-hashes-in-blocks) 'rs/nns/gtc/canister/gtc.did' by import-candid
|
|
2
2
|
type AccountState = record {
|
|
3
3
|
authenticated_principal_id : opt principal;
|
|
4
4
|
successfully_transferred_neurons : vec TransferredNeuron;
|
|
@@ -22,6 +22,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
22
22
|
'topic' : IDL.Int32,
|
|
23
23
|
'followees' : IDL.Vec(NeuronId),
|
|
24
24
|
});
|
|
25
|
+
const RefreshVotingPower = IDL.Record({});
|
|
25
26
|
const ClaimOrRefreshNeuronFromAccount = IDL.Record({
|
|
26
27
|
'controller' : IDL.Opt(IDL.Principal),
|
|
27
28
|
'memo' : IDL.Nat64,
|
|
@@ -86,6 +87,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
86
87
|
'Spawn' : Spawn,
|
|
87
88
|
'Split' : Split,
|
|
88
89
|
'Follow' : Follow,
|
|
90
|
+
'RefreshVotingPower' : RefreshVotingPower,
|
|
89
91
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
90
92
|
'Configure' : Configure,
|
|
91
93
|
'RegisterVote' : RegisterVote,
|
|
@@ -808,6 +810,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
808
810
|
})
|
|
809
811
|
);
|
|
810
812
|
const SpawnResponse = IDL.Record({ 'created_neuron_id' : IDL.Opt(NeuronId) });
|
|
813
|
+
const RefreshVotingPowerResponse = IDL.Record({});
|
|
811
814
|
const ClaimOrRefreshResponse = IDL.Record({
|
|
812
815
|
'refreshed_neuron_id' : IDL.Opt(NeuronId),
|
|
813
816
|
});
|
|
@@ -835,6 +838,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
835
838
|
'Spawn' : SpawnResponse,
|
|
836
839
|
'Split' : SpawnResponse,
|
|
837
840
|
'Follow' : IDL.Record({}),
|
|
841
|
+
'RefreshVotingPower' : RefreshVotingPowerResponse,
|
|
838
842
|
'ClaimOrRefresh' : ClaimOrRefreshResponse,
|
|
839
843
|
'Configure' : IDL.Record({}),
|
|
840
844
|
'RegisterVote' : IDL.Record({}),
|
|
@@ -991,6 +995,7 @@ export const init = ({ IDL }) => {
|
|
|
991
995
|
'topic' : IDL.Int32,
|
|
992
996
|
'followees' : IDL.Vec(NeuronId),
|
|
993
997
|
});
|
|
998
|
+
const RefreshVotingPower = IDL.Record({});
|
|
994
999
|
const ClaimOrRefreshNeuronFromAccount = IDL.Record({
|
|
995
1000
|
'controller' : IDL.Opt(IDL.Principal),
|
|
996
1001
|
'memo' : IDL.Nat64,
|
|
@@ -1055,6 +1060,7 @@ export const init = ({ IDL }) => {
|
|
|
1055
1060
|
'Spawn' : Spawn,
|
|
1056
1061
|
'Split' : Split,
|
|
1057
1062
|
'Follow' : Follow,
|
|
1063
|
+
'RefreshVotingPower' : RefreshVotingPower,
|
|
1058
1064
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
1059
1065
|
'Configure' : Configure,
|
|
1060
1066
|
'RegisterVote' : RegisterVote,
|
|
@@ -91,6 +91,7 @@ export type Command =
|
|
|
91
91
|
| { Spawn: Spawn }
|
|
92
92
|
| { Split: Split }
|
|
93
93
|
| { Follow: Follow }
|
|
94
|
+
| { RefreshVotingPower: RefreshVotingPower }
|
|
94
95
|
| { ClaimOrRefresh: ClaimOrRefresh }
|
|
95
96
|
| { Configure: Configure }
|
|
96
97
|
| { RegisterVote: RegisterVote }
|
|
@@ -105,6 +106,7 @@ export type Command_1 =
|
|
|
105
106
|
| { Spawn: SpawnResponse }
|
|
106
107
|
| { Split: SpawnResponse }
|
|
107
108
|
| { Follow: {} }
|
|
109
|
+
| { RefreshVotingPower: RefreshVotingPowerResponse }
|
|
108
110
|
| { ClaimOrRefresh: ClaimOrRefreshResponse }
|
|
109
111
|
| { Configure: {} }
|
|
110
112
|
| { RegisterVote: {} }
|
|
@@ -716,6 +718,8 @@ export interface ProposalInfo {
|
|
|
716
718
|
proposer: [] | [NeuronId];
|
|
717
719
|
executed_timestamp_seconds: bigint;
|
|
718
720
|
}
|
|
721
|
+
export type RefreshVotingPower = {};
|
|
722
|
+
export type RefreshVotingPowerResponse = {};
|
|
719
723
|
export interface RegisterVote {
|
|
720
724
|
vote: number;
|
|
721
725
|
proposal: [] | [ProposalId];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit f9085db (2024-11-28 tags: release-2024-11-28_03-15-revert-hashes-in-blocks) 'rs/nns/governance/canister/governance.did' by import-candid
|
|
2
2
|
type AccountIdentifier = record {
|
|
3
3
|
hash : blob;
|
|
4
4
|
};
|
|
@@ -108,6 +108,21 @@ type ClaimOrRefreshResponse = record {
|
|
|
108
108
|
refreshed_neuron_id : opt NeuronId;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
+
// This is one way for a neuron to make sure that its deciding_voting_power is
|
|
112
|
+
// not less than its potential_voting_power. See the description of those fields
|
|
113
|
+
// in Neuron.
|
|
114
|
+
type RefreshVotingPower = record {
|
|
115
|
+
// Intentionally left blank.
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type RefreshVotingPowerResponse = record {
|
|
119
|
+
// Intentionally left blank.
|
|
120
|
+
//
|
|
121
|
+
// We could add information such as the value in the neuron's
|
|
122
|
+
// voting_power_refreshed_timestamp_second's field, but let's keep things
|
|
123
|
+
// minimal until we discover there is a "real need". YAGNI.
|
|
124
|
+
};
|
|
125
|
+
|
|
111
126
|
type Command = variant {
|
|
112
127
|
Spawn : Spawn;
|
|
113
128
|
Split : Split;
|
|
@@ -121,6 +136,7 @@ type Command = variant {
|
|
|
121
136
|
StakeMaturity : StakeMaturity;
|
|
122
137
|
MergeMaturity : MergeMaturity;
|
|
123
138
|
Disburse : Disburse;
|
|
139
|
+
RefreshVotingPower : RefreshVotingPower;
|
|
124
140
|
};
|
|
125
141
|
|
|
126
142
|
type Command_1 = variant {
|
|
@@ -137,6 +153,7 @@ type Command_1 = variant {
|
|
|
137
153
|
StakeMaturity : StakeMaturityResponse;
|
|
138
154
|
MergeMaturity : MergeMaturityResponse;
|
|
139
155
|
Disburse : DisburseResponse;
|
|
156
|
+
RefreshVotingPower : RefreshVotingPowerResponse;
|
|
140
157
|
};
|
|
141
158
|
|
|
142
159
|
type Command_2 = variant {
|
|
@@ -22,6 +22,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
22
22
|
'topic' : IDL.Int32,
|
|
23
23
|
'followees' : IDL.Vec(NeuronId),
|
|
24
24
|
});
|
|
25
|
+
const RefreshVotingPower = IDL.Record({});
|
|
25
26
|
const ClaimOrRefreshNeuronFromAccount = IDL.Record({
|
|
26
27
|
'controller' : IDL.Opt(IDL.Principal),
|
|
27
28
|
'memo' : IDL.Nat64,
|
|
@@ -86,6 +87,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
86
87
|
'Spawn' : Spawn,
|
|
87
88
|
'Split' : Split,
|
|
88
89
|
'Follow' : Follow,
|
|
90
|
+
'RefreshVotingPower' : RefreshVotingPower,
|
|
89
91
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
90
92
|
'Configure' : Configure,
|
|
91
93
|
'RegisterVote' : RegisterVote,
|
|
@@ -808,6 +810,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
808
810
|
})
|
|
809
811
|
);
|
|
810
812
|
const SpawnResponse = IDL.Record({ 'created_neuron_id' : IDL.Opt(NeuronId) });
|
|
813
|
+
const RefreshVotingPowerResponse = IDL.Record({});
|
|
811
814
|
const ClaimOrRefreshResponse = IDL.Record({
|
|
812
815
|
'refreshed_neuron_id' : IDL.Opt(NeuronId),
|
|
813
816
|
});
|
|
@@ -835,6 +838,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
835
838
|
'Spawn' : SpawnResponse,
|
|
836
839
|
'Split' : SpawnResponse,
|
|
837
840
|
'Follow' : IDL.Record({}),
|
|
841
|
+
'RefreshVotingPower' : RefreshVotingPowerResponse,
|
|
838
842
|
'ClaimOrRefresh' : ClaimOrRefreshResponse,
|
|
839
843
|
'Configure' : IDL.Record({}),
|
|
840
844
|
'RegisterVote' : IDL.Record({}),
|
|
@@ -1007,6 +1011,7 @@ export const init = ({ IDL }) => {
|
|
|
1007
1011
|
'topic' : IDL.Int32,
|
|
1008
1012
|
'followees' : IDL.Vec(NeuronId),
|
|
1009
1013
|
});
|
|
1014
|
+
const RefreshVotingPower = IDL.Record({});
|
|
1010
1015
|
const ClaimOrRefreshNeuronFromAccount = IDL.Record({
|
|
1011
1016
|
'controller' : IDL.Opt(IDL.Principal),
|
|
1012
1017
|
'memo' : IDL.Nat64,
|
|
@@ -1071,6 +1076,7 @@ export const init = ({ IDL }) => {
|
|
|
1071
1076
|
'Spawn' : Spawn,
|
|
1072
1077
|
'Split' : Split,
|
|
1073
1078
|
'Follow' : Follow,
|
|
1079
|
+
'RefreshVotingPower' : RefreshVotingPower,
|
|
1074
1080
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
1075
1081
|
'Configure' : Configure,
|
|
1076
1082
|
'RegisterVote' : RegisterVote,
|
|
@@ -22,6 +22,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
22
22
|
'topic' : IDL.Int32,
|
|
23
23
|
'followees' : IDL.Vec(NeuronId),
|
|
24
24
|
});
|
|
25
|
+
const RefreshVotingPower = IDL.Record({});
|
|
25
26
|
const ClaimOrRefreshNeuronFromAccount = IDL.Record({
|
|
26
27
|
'controller' : IDL.Opt(IDL.Principal),
|
|
27
28
|
'memo' : IDL.Nat64,
|
|
@@ -86,6 +87,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
86
87
|
'Spawn' : Spawn,
|
|
87
88
|
'Split' : Split,
|
|
88
89
|
'Follow' : Follow,
|
|
90
|
+
'RefreshVotingPower' : RefreshVotingPower,
|
|
89
91
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
90
92
|
'Configure' : Configure,
|
|
91
93
|
'RegisterVote' : RegisterVote,
|
|
@@ -808,6 +810,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
808
810
|
})
|
|
809
811
|
);
|
|
810
812
|
const SpawnResponse = IDL.Record({ 'created_neuron_id' : IDL.Opt(NeuronId) });
|
|
813
|
+
const RefreshVotingPowerResponse = IDL.Record({});
|
|
811
814
|
const ClaimOrRefreshResponse = IDL.Record({
|
|
812
815
|
'refreshed_neuron_id' : IDL.Opt(NeuronId),
|
|
813
816
|
});
|
|
@@ -835,6 +838,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
835
838
|
'Spawn' : SpawnResponse,
|
|
836
839
|
'Split' : SpawnResponse,
|
|
837
840
|
'Follow' : IDL.Record({}),
|
|
841
|
+
'RefreshVotingPower' : RefreshVotingPowerResponse,
|
|
838
842
|
'ClaimOrRefresh' : ClaimOrRefreshResponse,
|
|
839
843
|
'Configure' : IDL.Record({}),
|
|
840
844
|
'RegisterVote' : IDL.Record({}),
|
|
@@ -992,6 +996,7 @@ export const init = ({ IDL }) => {
|
|
|
992
996
|
'topic' : IDL.Int32,
|
|
993
997
|
'followees' : IDL.Vec(NeuronId),
|
|
994
998
|
});
|
|
999
|
+
const RefreshVotingPower = IDL.Record({});
|
|
995
1000
|
const ClaimOrRefreshNeuronFromAccount = IDL.Record({
|
|
996
1001
|
'controller' : IDL.Opt(IDL.Principal),
|
|
997
1002
|
'memo' : IDL.Nat64,
|
|
@@ -1056,6 +1061,7 @@ export const init = ({ IDL }) => {
|
|
|
1056
1061
|
'Spawn' : Spawn,
|
|
1057
1062
|
'Split' : Split,
|
|
1058
1063
|
'Follow' : Follow,
|
|
1064
|
+
'RefreshVotingPower' : RefreshVotingPower,
|
|
1059
1065
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
1060
1066
|
'Configure' : Configure,
|
|
1061
1067
|
'RegisterVote' : RegisterVote,
|
|
@@ -91,6 +91,7 @@ export type Command =
|
|
|
91
91
|
| { Spawn: Spawn }
|
|
92
92
|
| { Split: Split }
|
|
93
93
|
| { Follow: Follow }
|
|
94
|
+
| { RefreshVotingPower: RefreshVotingPower }
|
|
94
95
|
| { ClaimOrRefresh: ClaimOrRefresh }
|
|
95
96
|
| { Configure: Configure }
|
|
96
97
|
| { RegisterVote: RegisterVote }
|
|
@@ -105,6 +106,7 @@ export type Command_1 =
|
|
|
105
106
|
| { Spawn: SpawnResponse }
|
|
106
107
|
| { Split: SpawnResponse }
|
|
107
108
|
| { Follow: {} }
|
|
109
|
+
| { RefreshVotingPower: RefreshVotingPowerResponse }
|
|
108
110
|
| { ClaimOrRefresh: ClaimOrRefreshResponse }
|
|
109
111
|
| { Configure: {} }
|
|
110
112
|
| { RegisterVote: {} }
|
|
@@ -716,6 +718,8 @@ export interface ProposalInfo {
|
|
|
716
718
|
proposer: [] | [NeuronId];
|
|
717
719
|
executed_timestamp_seconds: bigint;
|
|
718
720
|
}
|
|
721
|
+
export type RefreshVotingPower = {};
|
|
722
|
+
export type RefreshVotingPowerResponse = {};
|
|
719
723
|
export interface RegisterVote {
|
|
720
724
|
vote: number;
|
|
721
725
|
proposal: [] | [ProposalId];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit f9085db (2024-11-28 tags: release-2024-11-28_03-15-revert-hashes-in-blocks) 'rs/nns/governance/canister/governance_test.did' by import-candid
|
|
2
2
|
type AccountIdentifier = record {
|
|
3
3
|
hash : blob;
|
|
4
4
|
};
|
|
@@ -108,6 +108,21 @@ type ClaimOrRefreshResponse = record {
|
|
|
108
108
|
refreshed_neuron_id : opt NeuronId;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
+
// This is one way for a neuron to make sure that its deciding_voting_power is
|
|
112
|
+
// not less than its potential_voting_power. See the description of those fields
|
|
113
|
+
// in Neuron.
|
|
114
|
+
type RefreshVotingPower = record {
|
|
115
|
+
// Intentionally left blank.
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type RefreshVotingPowerResponse = record {
|
|
119
|
+
// Intentionally left blank.
|
|
120
|
+
//
|
|
121
|
+
// We could add information such as the value in the neuron's
|
|
122
|
+
// voting_power_refreshed_timestamp_second's field, but let's keep things
|
|
123
|
+
// minimal until we discover there is a "real need". YAGNI.
|
|
124
|
+
};
|
|
125
|
+
|
|
111
126
|
type Command = variant {
|
|
112
127
|
Spawn : Spawn;
|
|
113
128
|
Split : Split;
|
|
@@ -121,6 +136,7 @@ type Command = variant {
|
|
|
121
136
|
StakeMaturity : StakeMaturity;
|
|
122
137
|
MergeMaturity : MergeMaturity;
|
|
123
138
|
Disburse : Disburse;
|
|
139
|
+
RefreshVotingPower : RefreshVotingPower;
|
|
124
140
|
};
|
|
125
141
|
|
|
126
142
|
type Command_1 = variant {
|
|
@@ -137,6 +153,7 @@ type Command_1 = variant {
|
|
|
137
153
|
StakeMaturity : StakeMaturityResponse;
|
|
138
154
|
MergeMaturity : MergeMaturityResponse;
|
|
139
155
|
Disburse : DisburseResponse;
|
|
156
|
+
RefreshVotingPower : RefreshVotingPowerResponse;
|
|
140
157
|
};
|
|
141
158
|
|
|
142
159
|
type Command_2 = variant {
|
|
@@ -22,6 +22,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
22
22
|
'topic' : IDL.Int32,
|
|
23
23
|
'followees' : IDL.Vec(NeuronId),
|
|
24
24
|
});
|
|
25
|
+
const RefreshVotingPower = IDL.Record({});
|
|
25
26
|
const ClaimOrRefreshNeuronFromAccount = IDL.Record({
|
|
26
27
|
'controller' : IDL.Opt(IDL.Principal),
|
|
27
28
|
'memo' : IDL.Nat64,
|
|
@@ -86,6 +87,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
86
87
|
'Spawn' : Spawn,
|
|
87
88
|
'Split' : Split,
|
|
88
89
|
'Follow' : Follow,
|
|
90
|
+
'RefreshVotingPower' : RefreshVotingPower,
|
|
89
91
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
90
92
|
'Configure' : Configure,
|
|
91
93
|
'RegisterVote' : RegisterVote,
|
|
@@ -808,6 +810,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
808
810
|
})
|
|
809
811
|
);
|
|
810
812
|
const SpawnResponse = IDL.Record({ 'created_neuron_id' : IDL.Opt(NeuronId) });
|
|
813
|
+
const RefreshVotingPowerResponse = IDL.Record({});
|
|
811
814
|
const ClaimOrRefreshResponse = IDL.Record({
|
|
812
815
|
'refreshed_neuron_id' : IDL.Opt(NeuronId),
|
|
813
816
|
});
|
|
@@ -835,6 +838,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
835
838
|
'Spawn' : SpawnResponse,
|
|
836
839
|
'Split' : SpawnResponse,
|
|
837
840
|
'Follow' : IDL.Record({}),
|
|
841
|
+
'RefreshVotingPower' : RefreshVotingPowerResponse,
|
|
838
842
|
'ClaimOrRefresh' : ClaimOrRefreshResponse,
|
|
839
843
|
'Configure' : IDL.Record({}),
|
|
840
844
|
'RegisterVote' : IDL.Record({}),
|
|
@@ -1008,6 +1012,7 @@ export const init = ({ IDL }) => {
|
|
|
1008
1012
|
'topic' : IDL.Int32,
|
|
1009
1013
|
'followees' : IDL.Vec(NeuronId),
|
|
1010
1014
|
});
|
|
1015
|
+
const RefreshVotingPower = IDL.Record({});
|
|
1011
1016
|
const ClaimOrRefreshNeuronFromAccount = IDL.Record({
|
|
1012
1017
|
'controller' : IDL.Opt(IDL.Principal),
|
|
1013
1018
|
'memo' : IDL.Nat64,
|
|
@@ -1072,6 +1077,7 @@ export const init = ({ IDL }) => {
|
|
|
1072
1077
|
'Spawn' : Spawn,
|
|
1073
1078
|
'Split' : Split,
|
|
1074
1079
|
'Follow' : Follow,
|
|
1080
|
+
'RefreshVotingPower' : RefreshVotingPower,
|
|
1075
1081
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
1076
1082
|
'Configure' : Configure,
|
|
1077
1083
|
'RegisterVote' : RegisterVote,
|
package/dist/candid/sns_wasm.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit f9085db (2024-11-28 tags: release-2024-11-28_03-15-revert-hashes-in-blocks) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
|
|
2
2
|
type AddWasmRequest = record {
|
|
3
3
|
hash : blob;
|
|
4
4
|
wasm : opt SnsWasm;
|