@dfinity/nns 0.7.0 → 0.8.0-next-2022-09-22
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.d.ts +10 -8
- package/dist/candid/governance.certified.idl.js +107 -4
- package/dist/candid/governance.d.ts +99 -44
- package/dist/candid/governance.did +49 -3
- package/dist/candid/governance.idl.js +107 -4
- package/dist/candid/ledger.d.ts +15 -15
- package/dist/candid/sns_wasm.d.ts +19 -16
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/index.cjs.js.map +2 -2
- package/dist/esm/account_identifier.js +1 -1
- package/dist/esm/{chunk-SXX75EEC.js → chunk-I4ASNREM.js} +3 -3
- package/dist/esm/{chunk-SXX75EEC.js.map → chunk-I4ASNREM.js.map} +2 -2
- package/dist/esm/chunk-NA2JZFZA.js +2 -0
- package/dist/esm/chunk-NA2JZFZA.js.map +7 -0
- package/dist/esm/{chunk-EBY4MEUW.js → chunk-OQ6FZDUA.js} +5 -5
- package/dist/esm/{chunk-EBY4MEUW.js.map → chunk-OQ6FZDUA.js.map} +2 -2
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ledger.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +1 -2
- package/dist/types/types/governance_converters.d.ts +27 -0
- package/dist/types/utils/converter.utils.d.ts +0 -5
- package/package.json +3 -3
- package/dist/esm/chunk-LWTBV6PO.js +0 -2
- package/dist/esm/chunk-LWTBV6PO.js.map +0 -7
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 50c53c8e996e7b00b88c2f43120c46534cc499f6 'rs/nns/governance/canister/governance.did' by import-candid
|
|
2
2
|
type AccountIdentifier = record { hash : vec nat8 };
|
|
3
3
|
type Action = variant {
|
|
4
4
|
RegisterKnownNeuron : KnownNeuron;
|
|
5
5
|
ManageNeuron : ManageNeuron;
|
|
6
6
|
ExecuteNnsFunction : ExecuteNnsFunction;
|
|
7
7
|
RewardNodeProvider : RewardNodeProvider;
|
|
8
|
+
OpenSnsTokenSwap : OpenSnsTokenSwap;
|
|
8
9
|
SetSnsTokenSwapOpenTimeWindow : SetSnsTokenSwapOpenTimeWindow;
|
|
9
10
|
SetDefaultFollowees : SetDefaultFollowees;
|
|
10
11
|
RewardNodeProviders : RewardNodeProviders;
|
|
@@ -24,7 +25,15 @@ type By = variant {
|
|
|
24
25
|
MemoAndController : ClaimOrRefreshNeuronFromAccount;
|
|
25
26
|
Memo : nat64;
|
|
26
27
|
};
|
|
28
|
+
type CfNeuron = record { nns_neuron_id : nat64; amount_icp_e8s : nat64 };
|
|
29
|
+
type CfParticipant = record {
|
|
30
|
+
hotkey_principal : text;
|
|
31
|
+
cf_neurons : vec CfNeuron;
|
|
32
|
+
};
|
|
27
33
|
type Change = variant { ToRemove : NodeProvider; ToAdd : NodeProvider };
|
|
34
|
+
type ChangeAutoStakeMaturity = record {
|
|
35
|
+
requested_setting_for_auto_stake_maturity : bool;
|
|
36
|
+
};
|
|
28
37
|
type ClaimOrRefresh = record { by : opt By };
|
|
29
38
|
type ClaimOrRefreshNeuronFromAccount = record {
|
|
30
39
|
controller : opt principal;
|
|
@@ -42,6 +51,7 @@ type Command = variant {
|
|
|
42
51
|
Merge : Merge;
|
|
43
52
|
DisburseToNeuron : DisburseToNeuron;
|
|
44
53
|
MakeProposal : Proposal;
|
|
54
|
+
StakeMaturity : StakeMaturity;
|
|
45
55
|
MergeMaturity : MergeMaturity;
|
|
46
56
|
Disburse : Disburse;
|
|
47
57
|
};
|
|
@@ -56,6 +66,7 @@ type Command_1 = variant {
|
|
|
56
66
|
Merge : record {};
|
|
57
67
|
DisburseToNeuron : SpawnResponse;
|
|
58
68
|
MakeProposal : MakeProposalResponse;
|
|
69
|
+
StakeMaturity : StakeMaturityResponse;
|
|
59
70
|
MergeMaturity : MergeMaturityResponse;
|
|
60
71
|
Disburse : DisburseResponse;
|
|
61
72
|
};
|
|
@@ -65,10 +76,12 @@ type Command_2 = variant {
|
|
|
65
76
|
Configure : Configure;
|
|
66
77
|
Merge : Merge;
|
|
67
78
|
DisburseToNeuron : DisburseToNeuron;
|
|
79
|
+
SyncCommand : record {};
|
|
68
80
|
ClaimOrRefreshNeuron : ClaimOrRefresh;
|
|
69
81
|
MergeMaturity : MergeMaturity;
|
|
70
82
|
Disburse : Disburse;
|
|
71
83
|
};
|
|
84
|
+
type Committed = record { sns_governance_canister_id : opt principal };
|
|
72
85
|
type Configure = record { operation : opt Operation };
|
|
73
86
|
type Disburse = record {
|
|
74
87
|
to_account : opt AccountIdentifier;
|
|
@@ -92,10 +105,11 @@ type Followees = record { followees : vec NeuronId };
|
|
|
92
105
|
type Governance = record {
|
|
93
106
|
default_followees : vec record { int32; Followees };
|
|
94
107
|
most_recent_monthly_node_provider_rewards : opt MostRecentMonthlyNodeProviderRewards;
|
|
108
|
+
maturity_modulation_last_updated_at_timestamp_seconds : opt nat64;
|
|
95
109
|
wait_for_quiet_threshold_seconds : nat64;
|
|
96
110
|
metrics : opt GovernanceCachedMetrics;
|
|
97
|
-
cached_daily_maturity_modulation : opt float64;
|
|
98
111
|
node_providers : vec NodeProvider;
|
|
112
|
+
cached_daily_maturity_modulation_basis_points : opt int32;
|
|
99
113
|
economics : opt NetworkEconomics;
|
|
100
114
|
spawning_neurons : opt bool;
|
|
101
115
|
latest_reward_event : opt RewardEvent;
|
|
@@ -104,7 +118,6 @@ type Governance = record {
|
|
|
104
118
|
proposals : vec record { nat64; ProposalData };
|
|
105
119
|
in_flight_commands : vec record { nat64; NeuronInFlightCommand };
|
|
106
120
|
neurons : vec record { nat64; Neuron };
|
|
107
|
-
last_updated_maturity_modulation_cache : opt nat64;
|
|
108
121
|
genesis_timestamp_seconds : nat64;
|
|
109
122
|
};
|
|
110
123
|
type GovernanceCachedMetrics = record {
|
|
@@ -182,6 +195,7 @@ type NetworkEconomics = record {
|
|
|
182
195
|
};
|
|
183
196
|
type Neuron = record {
|
|
184
197
|
id : opt NeuronId;
|
|
198
|
+
staked_maturity_e8s_equivalent : opt nat64;
|
|
185
199
|
controller : opt principal;
|
|
186
200
|
recent_ballots : vec BallotInfo;
|
|
187
201
|
kyc_verified : bool;
|
|
@@ -189,6 +203,7 @@ type Neuron = record {
|
|
|
189
203
|
maturity_e8s_equivalent : nat64;
|
|
190
204
|
cached_neuron_stake_e8s : nat64;
|
|
191
205
|
created_timestamp_seconds : nat64;
|
|
206
|
+
auto_stake_maturity : opt bool;
|
|
192
207
|
aging_since_timestamp_seconds : nat64;
|
|
193
208
|
hot_keys : vec principal;
|
|
194
209
|
account : vec nat8;
|
|
@@ -234,9 +249,15 @@ type NodeProvider = record {
|
|
|
234
249
|
id : opt principal;
|
|
235
250
|
reward_account : opt AccountIdentifier;
|
|
236
251
|
};
|
|
252
|
+
type OpenSnsTokenSwap = record {
|
|
253
|
+
community_fund_investment_e8s : opt nat64;
|
|
254
|
+
target_swap_canister_id : opt principal;
|
|
255
|
+
params : opt Params;
|
|
256
|
+
};
|
|
237
257
|
type Operation = variant {
|
|
238
258
|
RemoveHotKey : RemoveHotKey;
|
|
239
259
|
AddHotKey : AddHotKey;
|
|
260
|
+
ChangeAutoStakeMaturity : ChangeAutoStakeMaturity;
|
|
240
261
|
StopDissolving : record {};
|
|
241
262
|
StartDissolving : record {};
|
|
242
263
|
IncreaseDissolveDelay : IncreaseDissolveDelay;
|
|
@@ -244,6 +265,15 @@ type Operation = variant {
|
|
|
244
265
|
LeaveCommunityFund : record {};
|
|
245
266
|
SetDissolveTimestamp : SetDissolveTimestamp;
|
|
246
267
|
};
|
|
268
|
+
type Params = record {
|
|
269
|
+
min_participant_icp_e8s : nat64;
|
|
270
|
+
max_icp_e8s : nat64;
|
|
271
|
+
swap_due_timestamp_seconds : nat64;
|
|
272
|
+
min_participants : nat32;
|
|
273
|
+
sns_token_e8s : nat64;
|
|
274
|
+
max_participant_icp_e8s : nat64;
|
|
275
|
+
min_icp_e8s : nat64;
|
|
276
|
+
};
|
|
247
277
|
type Proposal = record {
|
|
248
278
|
url : text;
|
|
249
279
|
title : opt text;
|
|
@@ -253,17 +283,20 @@ type Proposal = record {
|
|
|
253
283
|
type ProposalData = record {
|
|
254
284
|
id : opt NeuronId;
|
|
255
285
|
failure_reason : opt GovernanceError;
|
|
286
|
+
cf_participants : vec CfParticipant;
|
|
256
287
|
ballots : vec record { nat64; Ballot };
|
|
257
288
|
proposal_timestamp_seconds : nat64;
|
|
258
289
|
reward_event_round : nat64;
|
|
259
290
|
failed_timestamp_seconds : nat64;
|
|
260
291
|
reject_cost_e8s : nat64;
|
|
261
292
|
latest_tally : opt Tally;
|
|
293
|
+
sns_token_swap_lifecycle : opt int32;
|
|
262
294
|
decided_timestamp_seconds : nat64;
|
|
263
295
|
proposal : opt Proposal;
|
|
264
296
|
proposer : opt NeuronId;
|
|
265
297
|
wait_for_quiet_state : opt WaitForQuietState;
|
|
266
298
|
executed_timestamp_seconds : nat64;
|
|
299
|
+
original_total_community_fund_maturity_e8s_equivalent : opt nat64;
|
|
267
300
|
};
|
|
268
301
|
type ProposalInfo = record {
|
|
269
302
|
id : opt NeuronId;
|
|
@@ -291,6 +324,7 @@ type Result_2 = variant { Ok : Neuron; Err : GovernanceError };
|
|
|
291
324
|
type Result_3 = variant { Ok : RewardNodeProviders; Err : GovernanceError };
|
|
292
325
|
type Result_4 = variant { Ok : NeuronInfo; Err : GovernanceError };
|
|
293
326
|
type Result_5 = variant { Ok : NodeProvider; Err : GovernanceError };
|
|
327
|
+
type Result_6 = variant { Committed : Committed; Aborted : record {} };
|
|
294
328
|
type RewardEvent = record {
|
|
295
329
|
day_after_genesis : nat64;
|
|
296
330
|
actual_timestamp_seconds : nat64;
|
|
@@ -321,6 +355,10 @@ type SetSnsTokenSwapOpenTimeWindow = record {
|
|
|
321
355
|
request : opt SetOpenTimeWindowRequest;
|
|
322
356
|
swap_canister_id : opt principal;
|
|
323
357
|
};
|
|
358
|
+
type SettleCommunityFundParticipation = record {
|
|
359
|
+
result : opt Result_6;
|
|
360
|
+
open_sns_token_swap_proposal_id : opt nat64;
|
|
361
|
+
};
|
|
324
362
|
type Spawn = record {
|
|
325
363
|
percentage_to_spawn : opt nat32;
|
|
326
364
|
new_controller : opt principal;
|
|
@@ -328,6 +366,11 @@ type Spawn = record {
|
|
|
328
366
|
};
|
|
329
367
|
type SpawnResponse = record { created_neuron_id : opt NeuronId };
|
|
330
368
|
type Split = record { amount_e8s : nat64 };
|
|
369
|
+
type StakeMaturity = record { percentage_to_stake : opt nat32 };
|
|
370
|
+
type StakeMaturityResponse = record {
|
|
371
|
+
maturity_e8s : nat64;
|
|
372
|
+
staked_maturity_e8s : nat64;
|
|
373
|
+
};
|
|
331
374
|
type Tally = record {
|
|
332
375
|
no : nat64;
|
|
333
376
|
yes : nat64;
|
|
@@ -368,6 +411,9 @@ service : (Governance) -> {
|
|
|
368
411
|
list_node_providers : () -> (ListNodeProvidersResponse) query;
|
|
369
412
|
list_proposals : (ListProposalInfo) -> (ListProposalInfoResponse) query;
|
|
370
413
|
manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
|
|
414
|
+
settle_community_fund_participation : (SettleCommunityFundParticipation) -> (
|
|
415
|
+
Result,
|
|
416
|
+
);
|
|
371
417
|
transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result);
|
|
372
418
|
update_node_provider : (UpdateNodeProvider) -> (Result);
|
|
373
419
|
}
|
|
@@ -80,6 +80,14 @@ export const idlFactory = ({ IDL }) => {
|
|
|
80
80
|
'error_message' : IDL.Text,
|
|
81
81
|
'error_type' : IDL.Int32,
|
|
82
82
|
});
|
|
83
|
+
const CfNeuron = IDL.Record({
|
|
84
|
+
'nns_neuron_id' : IDL.Nat64,
|
|
85
|
+
'amount_icp_e8s' : IDL.Nat64,
|
|
86
|
+
});
|
|
87
|
+
const CfParticipant = IDL.Record({
|
|
88
|
+
'hotkey_principal' : IDL.Text,
|
|
89
|
+
'cf_neurons' : IDL.Vec(CfNeuron),
|
|
90
|
+
});
|
|
83
91
|
const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
|
|
84
92
|
const Tally = IDL.Record({
|
|
85
93
|
'no' : IDL.Nat64,
|
|
@@ -119,6 +127,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
119
127
|
'hot_key_to_remove' : IDL.Opt(IDL.Principal),
|
|
120
128
|
});
|
|
121
129
|
const AddHotKey = IDL.Record({ 'new_hot_key' : IDL.Opt(IDL.Principal) });
|
|
130
|
+
const ChangeAutoStakeMaturity = IDL.Record({
|
|
131
|
+
'requested_setting_for_auto_stake_maturity' : IDL.Bool,
|
|
132
|
+
});
|
|
122
133
|
const IncreaseDissolveDelay = IDL.Record({
|
|
123
134
|
'additional_dissolve_delay_seconds' : IDL.Nat32,
|
|
124
135
|
});
|
|
@@ -128,6 +139,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
128
139
|
const Operation = IDL.Variant({
|
|
129
140
|
'RemoveHotKey' : RemoveHotKey,
|
|
130
141
|
'AddHotKey' : AddHotKey,
|
|
142
|
+
'ChangeAutoStakeMaturity' : ChangeAutoStakeMaturity,
|
|
131
143
|
'StopDissolving' : IDL.Record({}),
|
|
132
144
|
'StartDissolving' : IDL.Record({}),
|
|
133
145
|
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
@@ -148,6 +160,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
148
160
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
149
161
|
'nonce' : IDL.Nat64,
|
|
150
162
|
});
|
|
163
|
+
const StakeMaturity = IDL.Record({
|
|
164
|
+
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
165
|
+
});
|
|
151
166
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
152
167
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
153
168
|
const Disburse = IDL.Record({
|
|
@@ -164,6 +179,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
164
179
|
'Merge' : Merge,
|
|
165
180
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
166
181
|
'MakeProposal' : Proposal,
|
|
182
|
+
'StakeMaturity' : StakeMaturity,
|
|
167
183
|
'MergeMaturity' : MergeMaturity,
|
|
168
184
|
'Disburse' : Disburse,
|
|
169
185
|
});
|
|
@@ -180,6 +196,20 @@ export const idlFactory = ({ IDL }) => {
|
|
|
180
196
|
'nns_function' : IDL.Int32,
|
|
181
197
|
'payload' : IDL.Vec(IDL.Nat8),
|
|
182
198
|
});
|
|
199
|
+
const Params = IDL.Record({
|
|
200
|
+
'min_participant_icp_e8s' : IDL.Nat64,
|
|
201
|
+
'max_icp_e8s' : IDL.Nat64,
|
|
202
|
+
'swap_due_timestamp_seconds' : IDL.Nat64,
|
|
203
|
+
'min_participants' : IDL.Nat32,
|
|
204
|
+
'sns_token_e8s' : IDL.Nat64,
|
|
205
|
+
'max_participant_icp_e8s' : IDL.Nat64,
|
|
206
|
+
'min_icp_e8s' : IDL.Nat64,
|
|
207
|
+
});
|
|
208
|
+
const OpenSnsTokenSwap = IDL.Record({
|
|
209
|
+
'community_fund_investment_e8s' : IDL.Opt(IDL.Nat64),
|
|
210
|
+
'target_swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
211
|
+
'params' : IDL.Opt(Params),
|
|
212
|
+
});
|
|
183
213
|
const TimeWindow = IDL.Record({
|
|
184
214
|
'start_timestamp_seconds' : IDL.Nat64,
|
|
185
215
|
'end_timestamp_seconds' : IDL.Nat64,
|
|
@@ -212,6 +242,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
212
242
|
'ManageNeuron' : ManageNeuron,
|
|
213
243
|
'ExecuteNnsFunction' : ExecuteNnsFunction,
|
|
214
244
|
'RewardNodeProvider' : RewardNodeProvider,
|
|
245
|
+
'OpenSnsTokenSwap' : OpenSnsTokenSwap,
|
|
215
246
|
'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
|
|
216
247
|
'SetDefaultFollowees' : SetDefaultFollowees,
|
|
217
248
|
'RewardNodeProviders' : RewardNodeProviders,
|
|
@@ -234,17 +265,22 @@ export const idlFactory = ({ IDL }) => {
|
|
|
234
265
|
const ProposalData = IDL.Record({
|
|
235
266
|
'id' : IDL.Opt(NeuronId),
|
|
236
267
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
268
|
+
'cf_participants' : IDL.Vec(CfParticipant),
|
|
237
269
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
238
270
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
239
271
|
'reward_event_round' : IDL.Nat64,
|
|
240
272
|
'failed_timestamp_seconds' : IDL.Nat64,
|
|
241
273
|
'reject_cost_e8s' : IDL.Nat64,
|
|
242
274
|
'latest_tally' : IDL.Opt(Tally),
|
|
275
|
+
'sns_token_swap_lifecycle' : IDL.Opt(IDL.Int32),
|
|
243
276
|
'decided_timestamp_seconds' : IDL.Nat64,
|
|
244
277
|
'proposal' : IDL.Opt(Proposal),
|
|
245
278
|
'proposer' : IDL.Opt(NeuronId),
|
|
246
279
|
'wait_for_quiet_state' : IDL.Opt(WaitForQuietState),
|
|
247
280
|
'executed_timestamp_seconds' : IDL.Nat64,
|
|
281
|
+
'original_total_community_fund_maturity_e8s_equivalent' : IDL.Opt(
|
|
282
|
+
IDL.Nat64
|
|
283
|
+
),
|
|
248
284
|
});
|
|
249
285
|
const Command_2 = IDL.Variant({
|
|
250
286
|
'Spawn' : NeuronId,
|
|
@@ -252,6 +288,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
252
288
|
'Configure' : Configure,
|
|
253
289
|
'Merge' : Merge,
|
|
254
290
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
291
|
+
'SyncCommand' : IDL.Record({}),
|
|
255
292
|
'ClaimOrRefreshNeuron' : ClaimOrRefresh,
|
|
256
293
|
'MergeMaturity' : MergeMaturity,
|
|
257
294
|
'Disburse' : Disburse,
|
|
@@ -270,6 +307,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
270
307
|
});
|
|
271
308
|
const Neuron = IDL.Record({
|
|
272
309
|
'id' : IDL.Opt(NeuronId),
|
|
310
|
+
'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
273
311
|
'controller' : IDL.Opt(IDL.Principal),
|
|
274
312
|
'recent_ballots' : IDL.Vec(BallotInfo),
|
|
275
313
|
'kyc_verified' : IDL.Bool,
|
|
@@ -277,6 +315,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
277
315
|
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
278
316
|
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
279
317
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
318
|
+
'auto_stake_maturity' : IDL.Opt(IDL.Bool),
|
|
280
319
|
'aging_since_timestamp_seconds' : IDL.Nat64,
|
|
281
320
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
282
321
|
'account' : IDL.Vec(IDL.Nat8),
|
|
@@ -293,10 +332,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
293
332
|
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
294
333
|
MostRecentMonthlyNodeProviderRewards
|
|
295
334
|
),
|
|
335
|
+
'maturity_modulation_last_updated_at_timestamp_seconds' : IDL.Opt(
|
|
336
|
+
IDL.Nat64
|
|
337
|
+
),
|
|
296
338
|
'wait_for_quiet_threshold_seconds' : IDL.Nat64,
|
|
297
339
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
298
|
-
'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
|
|
299
340
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
341
|
+
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
300
342
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
301
343
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
302
344
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
@@ -305,7 +347,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
305
347
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
306
348
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
307
349
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
308
|
-
'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
|
|
309
350
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
310
351
|
});
|
|
311
352
|
const Result = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : GovernanceError });
|
|
@@ -387,6 +428,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
387
428
|
const MakeProposalResponse = IDL.Record({
|
|
388
429
|
'proposal_id' : IDL.Opt(NeuronId),
|
|
389
430
|
});
|
|
431
|
+
const StakeMaturityResponse = IDL.Record({
|
|
432
|
+
'maturity_e8s' : IDL.Nat64,
|
|
433
|
+
'staked_maturity_e8s' : IDL.Nat64,
|
|
434
|
+
});
|
|
390
435
|
const MergeMaturityResponse = IDL.Record({
|
|
391
436
|
'merged_maturity_e8s' : IDL.Nat64,
|
|
392
437
|
'new_stake_e8s' : IDL.Nat64,
|
|
@@ -403,10 +448,22 @@ export const idlFactory = ({ IDL }) => {
|
|
|
403
448
|
'Merge' : IDL.Record({}),
|
|
404
449
|
'DisburseToNeuron' : SpawnResponse,
|
|
405
450
|
'MakeProposal' : MakeProposalResponse,
|
|
451
|
+
'StakeMaturity' : StakeMaturityResponse,
|
|
406
452
|
'MergeMaturity' : MergeMaturityResponse,
|
|
407
453
|
'Disburse' : DisburseResponse,
|
|
408
454
|
});
|
|
409
455
|
const ManageNeuronResponse = IDL.Record({ 'command' : IDL.Opt(Command_1) });
|
|
456
|
+
const Committed = IDL.Record({
|
|
457
|
+
'sns_governance_canister_id' : IDL.Opt(IDL.Principal),
|
|
458
|
+
});
|
|
459
|
+
const Result_6 = IDL.Variant({
|
|
460
|
+
'Committed' : Committed,
|
|
461
|
+
'Aborted' : IDL.Record({}),
|
|
462
|
+
});
|
|
463
|
+
const SettleCommunityFundParticipation = IDL.Record({
|
|
464
|
+
'result' : IDL.Opt(Result_6),
|
|
465
|
+
'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),
|
|
466
|
+
});
|
|
410
467
|
const UpdateNodeProvider = IDL.Record({
|
|
411
468
|
'reward_account' : IDL.Opt(AccountIdentifier),
|
|
412
469
|
});
|
|
@@ -466,6 +523,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
466
523
|
['query'],
|
|
467
524
|
),
|
|
468
525
|
'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
|
|
526
|
+
'settle_community_fund_participation' : IDL.Func(
|
|
527
|
+
[SettleCommunityFundParticipation],
|
|
528
|
+
[Result],
|
|
529
|
+
[],
|
|
530
|
+
),
|
|
469
531
|
'transfer_gtc_neuron' : IDL.Func([NeuronId, NeuronId], [Result], []),
|
|
470
532
|
'update_node_provider' : IDL.Func([UpdateNodeProvider], [Result], []),
|
|
471
533
|
});
|
|
@@ -551,6 +613,14 @@ export const init = ({ IDL }) => {
|
|
|
551
613
|
'error_message' : IDL.Text,
|
|
552
614
|
'error_type' : IDL.Int32,
|
|
553
615
|
});
|
|
616
|
+
const CfNeuron = IDL.Record({
|
|
617
|
+
'nns_neuron_id' : IDL.Nat64,
|
|
618
|
+
'amount_icp_e8s' : IDL.Nat64,
|
|
619
|
+
});
|
|
620
|
+
const CfParticipant = IDL.Record({
|
|
621
|
+
'hotkey_principal' : IDL.Text,
|
|
622
|
+
'cf_neurons' : IDL.Vec(CfNeuron),
|
|
623
|
+
});
|
|
554
624
|
const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 });
|
|
555
625
|
const Tally = IDL.Record({
|
|
556
626
|
'no' : IDL.Nat64,
|
|
@@ -590,6 +660,9 @@ export const init = ({ IDL }) => {
|
|
|
590
660
|
'hot_key_to_remove' : IDL.Opt(IDL.Principal),
|
|
591
661
|
});
|
|
592
662
|
const AddHotKey = IDL.Record({ 'new_hot_key' : IDL.Opt(IDL.Principal) });
|
|
663
|
+
const ChangeAutoStakeMaturity = IDL.Record({
|
|
664
|
+
'requested_setting_for_auto_stake_maturity' : IDL.Bool,
|
|
665
|
+
});
|
|
593
666
|
const IncreaseDissolveDelay = IDL.Record({
|
|
594
667
|
'additional_dissolve_delay_seconds' : IDL.Nat32,
|
|
595
668
|
});
|
|
@@ -599,6 +672,7 @@ export const init = ({ IDL }) => {
|
|
|
599
672
|
const Operation = IDL.Variant({
|
|
600
673
|
'RemoveHotKey' : RemoveHotKey,
|
|
601
674
|
'AddHotKey' : AddHotKey,
|
|
675
|
+
'ChangeAutoStakeMaturity' : ChangeAutoStakeMaturity,
|
|
602
676
|
'StopDissolving' : IDL.Record({}),
|
|
603
677
|
'StartDissolving' : IDL.Record({}),
|
|
604
678
|
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
@@ -619,6 +693,9 @@ export const init = ({ IDL }) => {
|
|
|
619
693
|
'new_controller' : IDL.Opt(IDL.Principal),
|
|
620
694
|
'nonce' : IDL.Nat64,
|
|
621
695
|
});
|
|
696
|
+
const StakeMaturity = IDL.Record({
|
|
697
|
+
'percentage_to_stake' : IDL.Opt(IDL.Nat32),
|
|
698
|
+
});
|
|
622
699
|
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
623
700
|
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
624
701
|
const Disburse = IDL.Record({
|
|
@@ -635,6 +712,7 @@ export const init = ({ IDL }) => {
|
|
|
635
712
|
'Merge' : Merge,
|
|
636
713
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
637
714
|
'MakeProposal' : Proposal,
|
|
715
|
+
'StakeMaturity' : StakeMaturity,
|
|
638
716
|
'MergeMaturity' : MergeMaturity,
|
|
639
717
|
'Disburse' : Disburse,
|
|
640
718
|
});
|
|
@@ -651,6 +729,20 @@ export const init = ({ IDL }) => {
|
|
|
651
729
|
'nns_function' : IDL.Int32,
|
|
652
730
|
'payload' : IDL.Vec(IDL.Nat8),
|
|
653
731
|
});
|
|
732
|
+
const Params = IDL.Record({
|
|
733
|
+
'min_participant_icp_e8s' : IDL.Nat64,
|
|
734
|
+
'max_icp_e8s' : IDL.Nat64,
|
|
735
|
+
'swap_due_timestamp_seconds' : IDL.Nat64,
|
|
736
|
+
'min_participants' : IDL.Nat32,
|
|
737
|
+
'sns_token_e8s' : IDL.Nat64,
|
|
738
|
+
'max_participant_icp_e8s' : IDL.Nat64,
|
|
739
|
+
'min_icp_e8s' : IDL.Nat64,
|
|
740
|
+
});
|
|
741
|
+
const OpenSnsTokenSwap = IDL.Record({
|
|
742
|
+
'community_fund_investment_e8s' : IDL.Opt(IDL.Nat64),
|
|
743
|
+
'target_swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
744
|
+
'params' : IDL.Opt(Params),
|
|
745
|
+
});
|
|
654
746
|
const TimeWindow = IDL.Record({
|
|
655
747
|
'start_timestamp_seconds' : IDL.Nat64,
|
|
656
748
|
'end_timestamp_seconds' : IDL.Nat64,
|
|
@@ -683,6 +775,7 @@ export const init = ({ IDL }) => {
|
|
|
683
775
|
'ManageNeuron' : ManageNeuron,
|
|
684
776
|
'ExecuteNnsFunction' : ExecuteNnsFunction,
|
|
685
777
|
'RewardNodeProvider' : RewardNodeProvider,
|
|
778
|
+
'OpenSnsTokenSwap' : OpenSnsTokenSwap,
|
|
686
779
|
'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
|
|
687
780
|
'SetDefaultFollowees' : SetDefaultFollowees,
|
|
688
781
|
'RewardNodeProviders' : RewardNodeProviders,
|
|
@@ -705,17 +798,22 @@ export const init = ({ IDL }) => {
|
|
|
705
798
|
const ProposalData = IDL.Record({
|
|
706
799
|
'id' : IDL.Opt(NeuronId),
|
|
707
800
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
801
|
+
'cf_participants' : IDL.Vec(CfParticipant),
|
|
708
802
|
'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
|
|
709
803
|
'proposal_timestamp_seconds' : IDL.Nat64,
|
|
710
804
|
'reward_event_round' : IDL.Nat64,
|
|
711
805
|
'failed_timestamp_seconds' : IDL.Nat64,
|
|
712
806
|
'reject_cost_e8s' : IDL.Nat64,
|
|
713
807
|
'latest_tally' : IDL.Opt(Tally),
|
|
808
|
+
'sns_token_swap_lifecycle' : IDL.Opt(IDL.Int32),
|
|
714
809
|
'decided_timestamp_seconds' : IDL.Nat64,
|
|
715
810
|
'proposal' : IDL.Opt(Proposal),
|
|
716
811
|
'proposer' : IDL.Opt(NeuronId),
|
|
717
812
|
'wait_for_quiet_state' : IDL.Opt(WaitForQuietState),
|
|
718
813
|
'executed_timestamp_seconds' : IDL.Nat64,
|
|
814
|
+
'original_total_community_fund_maturity_e8s_equivalent' : IDL.Opt(
|
|
815
|
+
IDL.Nat64
|
|
816
|
+
),
|
|
719
817
|
});
|
|
720
818
|
const Command_2 = IDL.Variant({
|
|
721
819
|
'Spawn' : NeuronId,
|
|
@@ -723,6 +821,7 @@ export const init = ({ IDL }) => {
|
|
|
723
821
|
'Configure' : Configure,
|
|
724
822
|
'Merge' : Merge,
|
|
725
823
|
'DisburseToNeuron' : DisburseToNeuron,
|
|
824
|
+
'SyncCommand' : IDL.Record({}),
|
|
726
825
|
'ClaimOrRefreshNeuron' : ClaimOrRefresh,
|
|
727
826
|
'MergeMaturity' : MergeMaturity,
|
|
728
827
|
'Disburse' : Disburse,
|
|
@@ -741,6 +840,7 @@ export const init = ({ IDL }) => {
|
|
|
741
840
|
});
|
|
742
841
|
const Neuron = IDL.Record({
|
|
743
842
|
'id' : IDL.Opt(NeuronId),
|
|
843
|
+
'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64),
|
|
744
844
|
'controller' : IDL.Opt(IDL.Principal),
|
|
745
845
|
'recent_ballots' : IDL.Vec(BallotInfo),
|
|
746
846
|
'kyc_verified' : IDL.Bool,
|
|
@@ -748,6 +848,7 @@ export const init = ({ IDL }) => {
|
|
|
748
848
|
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
749
849
|
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
750
850
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
851
|
+
'auto_stake_maturity' : IDL.Opt(IDL.Bool),
|
|
751
852
|
'aging_since_timestamp_seconds' : IDL.Nat64,
|
|
752
853
|
'hot_keys' : IDL.Vec(IDL.Principal),
|
|
753
854
|
'account' : IDL.Vec(IDL.Nat8),
|
|
@@ -764,10 +865,13 @@ export const init = ({ IDL }) => {
|
|
|
764
865
|
'most_recent_monthly_node_provider_rewards' : IDL.Opt(
|
|
765
866
|
MostRecentMonthlyNodeProviderRewards
|
|
766
867
|
),
|
|
868
|
+
'maturity_modulation_last_updated_at_timestamp_seconds' : IDL.Opt(
|
|
869
|
+
IDL.Nat64
|
|
870
|
+
),
|
|
767
871
|
'wait_for_quiet_threshold_seconds' : IDL.Nat64,
|
|
768
872
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
769
|
-
'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
|
|
770
873
|
'node_providers' : IDL.Vec(NodeProvider),
|
|
874
|
+
'cached_daily_maturity_modulation_basis_points' : IDL.Opt(IDL.Int32),
|
|
771
875
|
'economics' : IDL.Opt(NetworkEconomics),
|
|
772
876
|
'spawning_neurons' : IDL.Opt(IDL.Bool),
|
|
773
877
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
@@ -776,7 +880,6 @@ export const init = ({ IDL }) => {
|
|
|
776
880
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
777
881
|
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
|
|
778
882
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
|
|
779
|
-
'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
|
|
780
883
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
781
884
|
});
|
|
782
885
|
return [Governance];
|
package/dist/candid/ledger.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { ActorMethod } from "@dfinity/agent";
|
|
1
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
|
+
|
|
2
4
|
export interface AccountBalanceArgs {
|
|
3
5
|
account: AccountIdentifier;
|
|
4
6
|
}
|
|
5
|
-
export type AccountIdentifier =
|
|
7
|
+
export type AccountIdentifier = Uint8Array;
|
|
6
8
|
export interface Archive {
|
|
7
9
|
canister_id: Principal;
|
|
8
10
|
}
|
|
@@ -12,7 +14,7 @@ export interface Archives {
|
|
|
12
14
|
export interface Block {
|
|
13
15
|
transaction: Transaction;
|
|
14
16
|
timestamp: TimeStamp;
|
|
15
|
-
parent_hash: [] | [
|
|
17
|
+
parent_hash: [] | [Uint8Array];
|
|
16
18
|
}
|
|
17
19
|
export type BlockIndex = bigint;
|
|
18
20
|
export interface BlockRange {
|
|
@@ -44,14 +46,12 @@ export type QueryArchiveError =
|
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
| { Other: { error_message: string; error_code: bigint } };
|
|
47
|
-
export type QueryArchiveFn =
|
|
48
|
-
arg_0: GetBlocksArgs
|
|
49
|
-
) => Promise<QueryArchiveResult>;
|
|
49
|
+
export type QueryArchiveFn = ActorMethod<[GetBlocksArgs], QueryArchiveResult>;
|
|
50
50
|
export type QueryArchiveResult =
|
|
51
51
|
| { Ok: BlockRange }
|
|
52
52
|
| { Err: QueryArchiveError };
|
|
53
53
|
export interface QueryBlocksResponse {
|
|
54
|
-
certificate: [] | [
|
|
54
|
+
certificate: [] | [Uint8Array];
|
|
55
55
|
blocks: Array<Block>;
|
|
56
56
|
chain_length: bigint;
|
|
57
57
|
first_block_index: BlockIndex;
|
|
@@ -61,7 +61,7 @@ export interface QueryBlocksResponse {
|
|
|
61
61
|
length: bigint;
|
|
62
62
|
}>;
|
|
63
63
|
}
|
|
64
|
-
export type SubAccount =
|
|
64
|
+
export type SubAccount = Uint8Array;
|
|
65
65
|
export interface TimeStamp {
|
|
66
66
|
timestamp_nanos: bigint;
|
|
67
67
|
}
|
|
@@ -95,12 +95,12 @@ export interface TransferFee {
|
|
|
95
95
|
export type TransferFeeArg = {};
|
|
96
96
|
export type TransferResult = { Ok: BlockIndex } | { Err: TransferError };
|
|
97
97
|
export interface _SERVICE {
|
|
98
|
-
account_balance:
|
|
99
|
-
archives:
|
|
100
|
-
decimals:
|
|
101
|
-
name:
|
|
102
|
-
query_blocks:
|
|
103
|
-
symbol:
|
|
104
|
-
transfer:
|
|
105
|
-
transfer_fee:
|
|
98
|
+
account_balance: ActorMethod<[AccountBalanceArgs], Tokens>;
|
|
99
|
+
archives: ActorMethod<[], Archives>;
|
|
100
|
+
decimals: ActorMethod<[], { decimals: number }>;
|
|
101
|
+
name: ActorMethod<[], { name: string }>;
|
|
102
|
+
query_blocks: ActorMethod<[GetBlocksArgs], QueryBlocksResponse>;
|
|
103
|
+
symbol: ActorMethod<[], { symbol: string }>;
|
|
104
|
+
transfer: ActorMethod<[TransferArgs], TransferResult>;
|
|
105
|
+
transfer_fee: ActorMethod<[TransferFeeArg], TransferFee>;
|
|
106
106
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ActorMethod } from "@dfinity/agent";
|
|
1
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
|
+
|
|
2
4
|
export interface AddWasmRequest {
|
|
3
|
-
hash:
|
|
5
|
+
hash: Uint8Array;
|
|
4
6
|
wasm: [] | [SnsWasm];
|
|
5
7
|
}
|
|
6
8
|
export interface AddWasmResponse {
|
|
@@ -36,7 +38,7 @@ export interface GetNextSnsVersionResponse {
|
|
|
36
38
|
next_version: [] | [SnsVersion];
|
|
37
39
|
}
|
|
38
40
|
export interface GetWasmRequest {
|
|
39
|
-
hash:
|
|
41
|
+
hash: Uint8Array;
|
|
40
42
|
}
|
|
41
43
|
export interface GetWasmResponse {
|
|
42
44
|
wasm: [] | [SnsWasm];
|
|
@@ -51,7 +53,7 @@ export interface NeuronDistribution {
|
|
|
51
53
|
controller: [] | [Principal];
|
|
52
54
|
stake_e8s: bigint;
|
|
53
55
|
}
|
|
54
|
-
export type Result = { Error: SnsWasmError } | { Hash:
|
|
56
|
+
export type Result = { Error: SnsWasmError } | { Hash: Uint8Array };
|
|
55
57
|
export interface SnsCanisterIds {
|
|
56
58
|
root: [] | [Principal];
|
|
57
59
|
swap: [] | [Principal];
|
|
@@ -77,14 +79,14 @@ export interface SnsInitPayload {
|
|
|
77
79
|
min_icp_e8s: [] | [bigint];
|
|
78
80
|
}
|
|
79
81
|
export interface SnsVersion {
|
|
80
|
-
archive_wasm_hash:
|
|
81
|
-
root_wasm_hash:
|
|
82
|
-
swap_wasm_hash:
|
|
83
|
-
ledger_wasm_hash:
|
|
84
|
-
governance_wasm_hash:
|
|
82
|
+
archive_wasm_hash: Uint8Array;
|
|
83
|
+
root_wasm_hash: Uint8Array;
|
|
84
|
+
swap_wasm_hash: Uint8Array;
|
|
85
|
+
ledger_wasm_hash: Uint8Array;
|
|
86
|
+
governance_wasm_hash: Uint8Array;
|
|
85
87
|
}
|
|
86
88
|
export interface SnsWasm {
|
|
87
|
-
wasm:
|
|
89
|
+
wasm: Uint8Array;
|
|
88
90
|
canister_type: number;
|
|
89
91
|
}
|
|
90
92
|
export interface SnsWasmCanisterInitPayload {
|
|
@@ -102,11 +104,12 @@ export interface TreasuryDistribution {
|
|
|
102
104
|
total_e8s: bigint;
|
|
103
105
|
}
|
|
104
106
|
export interface _SERVICE {
|
|
105
|
-
add_wasm:
|
|
106
|
-
deploy_new_sns:
|
|
107
|
-
get_next_sns_version:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
add_wasm: ActorMethod<[AddWasmRequest], AddWasmResponse>;
|
|
108
|
+
deploy_new_sns: ActorMethod<[DeployNewSnsRequest], DeployNewSnsResponse>;
|
|
109
|
+
get_next_sns_version: ActorMethod<
|
|
110
|
+
[GetNextSnsVersionRequest],
|
|
111
|
+
GetNextSnsVersionResponse
|
|
112
|
+
>;
|
|
113
|
+
get_wasm: ActorMethod<[GetWasmRequest], GetWasmResponse>;
|
|
114
|
+
list_deployed_snses: ActorMethod<[{}], ListDeployedSnsesResponse>;
|
|
112
115
|
}
|