@dfinity/nns 0.7.0 → 0.8.0-next-2022-09-23
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 +27 -0
- 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.certified.idl.js +9 -5
- package/dist/candid/sns_wasm.d.ts +24 -21
- package/dist/candid/sns_wasm.did +6 -6
- package/dist/candid/sns_wasm.idl.js +9 -5
- 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-5S3NUDW3.js +2 -0
- package/dist/esm/chunk-5S3NUDW3.js.map +7 -0
- 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/esm/sns_wasm.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-LBNBEXHT.js +0 -2
- package/dist/esm/chunk-LBNBEXHT.js.map +0 -7
- package/dist/esm/chunk-LWTBV6PO.js +0 -2
- package/dist/esm/chunk-LWTBV6PO.js.map +0 -7
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { ActorMethod } from "@dfinity/agent";
|
|
1
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
|
+
|
|
2
4
|
export interface AccountIdentifier {
|
|
3
|
-
hash:
|
|
5
|
+
hash: Uint8Array;
|
|
4
6
|
}
|
|
5
7
|
export type Action =
|
|
6
8
|
| { RegisterKnownNeuron: KnownNeuron }
|
|
7
9
|
| { ManageNeuron: ManageNeuron }
|
|
8
10
|
| { ExecuteNnsFunction: ExecuteNnsFunction }
|
|
9
11
|
| { RewardNodeProvider: RewardNodeProvider }
|
|
12
|
+
| { OpenSnsTokenSwap: OpenSnsTokenSwap }
|
|
10
13
|
| { SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow }
|
|
11
14
|
| { SetDefaultFollowees: SetDefaultFollowees }
|
|
12
15
|
| { RewardNodeProviders: RewardNodeProviders }
|
|
@@ -38,7 +41,18 @@ export type By =
|
|
|
38
41
|
| { NeuronIdOrSubaccount: {} }
|
|
39
42
|
| { MemoAndController: ClaimOrRefreshNeuronFromAccount }
|
|
40
43
|
| { Memo: bigint };
|
|
44
|
+
export interface CfNeuron {
|
|
45
|
+
nns_neuron_id: bigint;
|
|
46
|
+
amount_icp_e8s: bigint;
|
|
47
|
+
}
|
|
48
|
+
export interface CfParticipant {
|
|
49
|
+
hotkey_principal: string;
|
|
50
|
+
cf_neurons: Array<CfNeuron>;
|
|
51
|
+
}
|
|
41
52
|
export type Change = { ToRemove: NodeProvider } | { ToAdd: NodeProvider };
|
|
53
|
+
export interface ChangeAutoStakeMaturity {
|
|
54
|
+
requested_setting_for_auto_stake_maturity: boolean;
|
|
55
|
+
}
|
|
42
56
|
export interface ClaimOrRefresh {
|
|
43
57
|
by: [] | [By];
|
|
44
58
|
}
|
|
@@ -62,6 +76,7 @@ export type Command =
|
|
|
62
76
|
| { Merge: Merge }
|
|
63
77
|
| { DisburseToNeuron: DisburseToNeuron }
|
|
64
78
|
| { MakeProposal: Proposal }
|
|
79
|
+
| { StakeMaturity: StakeMaturity }
|
|
65
80
|
| { MergeMaturity: MergeMaturity }
|
|
66
81
|
| { Disburse: Disburse };
|
|
67
82
|
export type Command_1 =
|
|
@@ -75,6 +90,7 @@ export type Command_1 =
|
|
|
75
90
|
| { Merge: {} }
|
|
76
91
|
| { DisburseToNeuron: SpawnResponse }
|
|
77
92
|
| { MakeProposal: MakeProposalResponse }
|
|
93
|
+
| { StakeMaturity: StakeMaturityResponse }
|
|
78
94
|
| { MergeMaturity: MergeMaturityResponse }
|
|
79
95
|
| { Disburse: DisburseResponse };
|
|
80
96
|
export type Command_2 =
|
|
@@ -83,9 +99,13 @@ export type Command_2 =
|
|
|
83
99
|
| { Configure: Configure }
|
|
84
100
|
| { Merge: Merge }
|
|
85
101
|
| { DisburseToNeuron: DisburseToNeuron }
|
|
102
|
+
| { SyncCommand: {} }
|
|
86
103
|
| { ClaimOrRefreshNeuron: ClaimOrRefresh }
|
|
87
104
|
| { MergeMaturity: MergeMaturity }
|
|
88
105
|
| { Disburse: Disburse };
|
|
106
|
+
export interface Committed {
|
|
107
|
+
sns_governance_canister_id: [] | [Principal];
|
|
108
|
+
}
|
|
89
109
|
export interface Configure {
|
|
90
110
|
operation: [] | [Operation];
|
|
91
111
|
}
|
|
@@ -108,7 +128,7 @@ export type DissolveState =
|
|
|
108
128
|
| { WhenDissolvedTimestampSeconds: bigint };
|
|
109
129
|
export interface ExecuteNnsFunction {
|
|
110
130
|
nns_function: number;
|
|
111
|
-
payload:
|
|
131
|
+
payload: Uint8Array;
|
|
112
132
|
}
|
|
113
133
|
export interface Follow {
|
|
114
134
|
topic: number;
|
|
@@ -122,10 +142,11 @@ export interface Governance {
|
|
|
122
142
|
most_recent_monthly_node_provider_rewards:
|
|
123
143
|
| []
|
|
124
144
|
| [MostRecentMonthlyNodeProviderRewards];
|
|
145
|
+
maturity_modulation_last_updated_at_timestamp_seconds: [] | [bigint];
|
|
125
146
|
wait_for_quiet_threshold_seconds: bigint;
|
|
126
147
|
metrics: [] | [GovernanceCachedMetrics];
|
|
127
|
-
cached_daily_maturity_modulation: [] | [number];
|
|
128
148
|
node_providers: Array<NodeProvider>;
|
|
149
|
+
cached_daily_maturity_modulation_basis_points: [] | [number];
|
|
129
150
|
economics: [] | [NetworkEconomics];
|
|
130
151
|
spawning_neurons: [] | [boolean];
|
|
131
152
|
latest_reward_event: [] | [RewardEvent];
|
|
@@ -134,7 +155,6 @@ export interface Governance {
|
|
|
134
155
|
proposals: Array<[bigint, ProposalData]>;
|
|
135
156
|
in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
|
|
136
157
|
neurons: Array<[bigint, Neuron]>;
|
|
137
|
-
last_updated_maturity_modulation_cache: [] | [bigint];
|
|
138
158
|
genesis_timestamp_seconds: bigint;
|
|
139
159
|
}
|
|
140
160
|
export interface GovernanceCachedMetrics {
|
|
@@ -174,7 +194,7 @@ export interface ListKnownNeuronsResponse {
|
|
|
174
194
|
known_neurons: Array<KnownNeuron>;
|
|
175
195
|
}
|
|
176
196
|
export interface ListNeurons {
|
|
177
|
-
neuron_ids:
|
|
197
|
+
neuron_ids: BigUint64Array;
|
|
178
198
|
include_neurons_readable_by_caller: boolean;
|
|
179
199
|
}
|
|
180
200
|
export interface ListNeuronsResponse {
|
|
@@ -185,11 +205,11 @@ export interface ListNodeProvidersResponse {
|
|
|
185
205
|
node_providers: Array<NodeProvider>;
|
|
186
206
|
}
|
|
187
207
|
export interface ListProposalInfo {
|
|
188
|
-
include_reward_status:
|
|
208
|
+
include_reward_status: Int32Array;
|
|
189
209
|
before_proposal: [] | [NeuronId];
|
|
190
210
|
limit: number;
|
|
191
|
-
exclude_topic:
|
|
192
|
-
include_status:
|
|
211
|
+
exclude_topic: Int32Array;
|
|
212
|
+
include_status: Int32Array;
|
|
193
213
|
}
|
|
194
214
|
export interface ListProposalInfoResponse {
|
|
195
215
|
proposal_info: Array<ProposalInfo>;
|
|
@@ -234,6 +254,7 @@ export interface NetworkEconomics {
|
|
|
234
254
|
}
|
|
235
255
|
export interface Neuron {
|
|
236
256
|
id: [] | [NeuronId];
|
|
257
|
+
staked_maturity_e8s_equivalent: [] | [bigint];
|
|
237
258
|
controller: [] | [Principal];
|
|
238
259
|
recent_ballots: Array<BallotInfo>;
|
|
239
260
|
kyc_verified: boolean;
|
|
@@ -241,9 +262,10 @@ export interface Neuron {
|
|
|
241
262
|
maturity_e8s_equivalent: bigint;
|
|
242
263
|
cached_neuron_stake_e8s: bigint;
|
|
243
264
|
created_timestamp_seconds: bigint;
|
|
265
|
+
auto_stake_maturity: [] | [boolean];
|
|
244
266
|
aging_since_timestamp_seconds: bigint;
|
|
245
267
|
hot_keys: Array<Principal>;
|
|
246
|
-
account:
|
|
268
|
+
account: Uint8Array;
|
|
247
269
|
joined_community_fund_timestamp_seconds: [] | [bigint];
|
|
248
270
|
dissolve_state: [] | [DissolveState];
|
|
249
271
|
followees: Array<[number, Followees]>;
|
|
@@ -256,7 +278,7 @@ export interface NeuronId {
|
|
|
256
278
|
id: bigint;
|
|
257
279
|
}
|
|
258
280
|
export type NeuronIdOrSubaccount =
|
|
259
|
-
| { Subaccount:
|
|
281
|
+
| { Subaccount: Uint8Array }
|
|
260
282
|
| { NeuronId: NeuronId };
|
|
261
283
|
export interface NeuronInFlightCommand {
|
|
262
284
|
command: [] | [Command_2];
|
|
@@ -275,11 +297,11 @@ export interface NeuronInfo {
|
|
|
275
297
|
age_seconds: bigint;
|
|
276
298
|
}
|
|
277
299
|
export interface NeuronStakeTransfer {
|
|
278
|
-
to_subaccount:
|
|
300
|
+
to_subaccount: Uint8Array;
|
|
279
301
|
neuron_stake_e8s: bigint;
|
|
280
302
|
from: [] | [Principal];
|
|
281
303
|
memo: bigint;
|
|
282
|
-
from_subaccount:
|
|
304
|
+
from_subaccount: Uint8Array;
|
|
283
305
|
transfer_timestamp: bigint;
|
|
284
306
|
block_height: bigint;
|
|
285
307
|
}
|
|
@@ -287,15 +309,30 @@ export interface NodeProvider {
|
|
|
287
309
|
id: [] | [Principal];
|
|
288
310
|
reward_account: [] | [AccountIdentifier];
|
|
289
311
|
}
|
|
312
|
+
export interface OpenSnsTokenSwap {
|
|
313
|
+
community_fund_investment_e8s: [] | [bigint];
|
|
314
|
+
target_swap_canister_id: [] | [Principal];
|
|
315
|
+
params: [] | [Params];
|
|
316
|
+
}
|
|
290
317
|
export type Operation =
|
|
291
318
|
| { RemoveHotKey: RemoveHotKey }
|
|
292
319
|
| { AddHotKey: AddHotKey }
|
|
320
|
+
| { ChangeAutoStakeMaturity: ChangeAutoStakeMaturity }
|
|
293
321
|
| { StopDissolving: {} }
|
|
294
322
|
| { StartDissolving: {} }
|
|
295
323
|
| { IncreaseDissolveDelay: IncreaseDissolveDelay }
|
|
296
324
|
| { JoinCommunityFund: {} }
|
|
297
325
|
| { LeaveCommunityFund: {} }
|
|
298
326
|
| { SetDissolveTimestamp: SetDissolveTimestamp };
|
|
327
|
+
export interface Params {
|
|
328
|
+
min_participant_icp_e8s: bigint;
|
|
329
|
+
max_icp_e8s: bigint;
|
|
330
|
+
swap_due_timestamp_seconds: bigint;
|
|
331
|
+
min_participants: number;
|
|
332
|
+
sns_token_e8s: bigint;
|
|
333
|
+
max_participant_icp_e8s: bigint;
|
|
334
|
+
min_icp_e8s: bigint;
|
|
335
|
+
}
|
|
299
336
|
export interface Proposal {
|
|
300
337
|
url: string;
|
|
301
338
|
title: [] | [string];
|
|
@@ -305,17 +342,20 @@ export interface Proposal {
|
|
|
305
342
|
export interface ProposalData {
|
|
306
343
|
id: [] | [NeuronId];
|
|
307
344
|
failure_reason: [] | [GovernanceError];
|
|
345
|
+
cf_participants: Array<CfParticipant>;
|
|
308
346
|
ballots: Array<[bigint, Ballot]>;
|
|
309
347
|
proposal_timestamp_seconds: bigint;
|
|
310
348
|
reward_event_round: bigint;
|
|
311
349
|
failed_timestamp_seconds: bigint;
|
|
312
350
|
reject_cost_e8s: bigint;
|
|
313
351
|
latest_tally: [] | [Tally];
|
|
352
|
+
sns_token_swap_lifecycle: [] | [number];
|
|
314
353
|
decided_timestamp_seconds: bigint;
|
|
315
354
|
proposal: [] | [Proposal];
|
|
316
355
|
proposer: [] | [NeuronId];
|
|
317
356
|
wait_for_quiet_state: [] | [WaitForQuietState];
|
|
318
357
|
executed_timestamp_seconds: bigint;
|
|
358
|
+
original_total_community_fund_maturity_e8s_equivalent: [] | [bigint];
|
|
319
359
|
}
|
|
320
360
|
export interface ProposalInfo {
|
|
321
361
|
id: [] | [NeuronId];
|
|
@@ -348,6 +388,7 @@ export type Result_2 = { Ok: Neuron } | { Err: GovernanceError };
|
|
|
348
388
|
export type Result_3 = { Ok: RewardNodeProviders } | { Err: GovernanceError };
|
|
349
389
|
export type Result_4 = { Ok: NeuronInfo } | { Err: GovernanceError };
|
|
350
390
|
export type Result_5 = { Ok: NodeProvider } | { Err: GovernanceError };
|
|
391
|
+
export type Result_6 = { Committed: Committed } | { Aborted: {} };
|
|
351
392
|
export interface RewardEvent {
|
|
352
393
|
day_after_genesis: bigint;
|
|
353
394
|
actual_timestamp_seconds: bigint;
|
|
@@ -385,6 +426,10 @@ export interface SetSnsTokenSwapOpenTimeWindow {
|
|
|
385
426
|
request: [] | [SetOpenTimeWindowRequest];
|
|
386
427
|
swap_canister_id: [] | [Principal];
|
|
387
428
|
}
|
|
429
|
+
export interface SettleCommunityFundParticipation {
|
|
430
|
+
result: [] | [Result_6];
|
|
431
|
+
open_sns_token_swap_proposal_id: [] | [bigint];
|
|
432
|
+
}
|
|
388
433
|
export interface Spawn {
|
|
389
434
|
percentage_to_spawn: [] | [number];
|
|
390
435
|
new_controller: [] | [Principal];
|
|
@@ -396,6 +441,13 @@ export interface SpawnResponse {
|
|
|
396
441
|
export interface Split {
|
|
397
442
|
amount_e8s: bigint;
|
|
398
443
|
}
|
|
444
|
+
export interface StakeMaturity {
|
|
445
|
+
percentage_to_stake: [] | [number];
|
|
446
|
+
}
|
|
447
|
+
export interface StakeMaturityResponse {
|
|
448
|
+
maturity_e8s: bigint;
|
|
449
|
+
staked_maturity_e8s: bigint;
|
|
450
|
+
}
|
|
399
451
|
export interface Tally {
|
|
400
452
|
no: bigint;
|
|
401
453
|
yes: bigint;
|
|
@@ -413,38 +465,41 @@ export interface WaitForQuietState {
|
|
|
413
465
|
current_deadline_timestamp_seconds: bigint;
|
|
414
466
|
}
|
|
415
467
|
export interface _SERVICE {
|
|
416
|
-
claim_gtc_neurons:
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
468
|
+
claim_gtc_neurons: ActorMethod<[Principal, Array<NeuronId>], Result>;
|
|
469
|
+
claim_or_refresh_neuron_from_account: ActorMethod<
|
|
470
|
+
[ClaimOrRefreshNeuronFromAccount],
|
|
471
|
+
ClaimOrRefreshNeuronFromAccountResponse
|
|
472
|
+
>;
|
|
473
|
+
get_build_metadata: ActorMethod<[], string>;
|
|
474
|
+
get_full_neuron: ActorMethod<[bigint], Result_2>;
|
|
475
|
+
get_full_neuron_by_id_or_subaccount: ActorMethod<
|
|
476
|
+
[NeuronIdOrSubaccount],
|
|
477
|
+
Result_2
|
|
478
|
+
>;
|
|
479
|
+
get_monthly_node_provider_rewards: ActorMethod<[], Result_3>;
|
|
480
|
+
get_most_recent_monthly_node_provider_rewards: ActorMethod<
|
|
481
|
+
[],
|
|
430
482
|
[] | [MostRecentMonthlyNodeProviderRewards]
|
|
431
483
|
>;
|
|
432
|
-
get_network_economics_parameters:
|
|
433
|
-
get_neuron_ids:
|
|
434
|
-
get_neuron_info:
|
|
435
|
-
get_neuron_info_by_id_or_subaccount:
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
484
|
+
get_network_economics_parameters: ActorMethod<[], NetworkEconomics>;
|
|
485
|
+
get_neuron_ids: ActorMethod<[], BigUint64Array>;
|
|
486
|
+
get_neuron_info: ActorMethod<[bigint], Result_4>;
|
|
487
|
+
get_neuron_info_by_id_or_subaccount: ActorMethod<
|
|
488
|
+
[NeuronIdOrSubaccount],
|
|
489
|
+
Result_4
|
|
490
|
+
>;
|
|
491
|
+
get_node_provider_by_caller: ActorMethod<[null], Result_5>;
|
|
492
|
+
get_pending_proposals: ActorMethod<[], Array<ProposalInfo>>;
|
|
493
|
+
get_proposal_info: ActorMethod<[bigint], [] | [ProposalInfo]>;
|
|
494
|
+
list_known_neurons: ActorMethod<[], ListKnownNeuronsResponse>;
|
|
495
|
+
list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
|
|
496
|
+
list_node_providers: ActorMethod<[], ListNodeProvidersResponse>;
|
|
497
|
+
list_proposals: ActorMethod<[ListProposalInfo], ListProposalInfoResponse>;
|
|
498
|
+
manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
|
|
499
|
+
settle_community_fund_participation: ActorMethod<
|
|
500
|
+
[SettleCommunityFundParticipation],
|
|
501
|
+
Result
|
|
502
|
+
>;
|
|
503
|
+
transfer_gtc_neuron: ActorMethod<[NeuronId, NeuronId], Result>;
|
|
504
|
+
update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;
|
|
450
505
|
}
|
|
@@ -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
|
}
|