@dfinity/nns 0.2.0 → 0.2.2-nightly-2022-03-01
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/governance.certified.idl.d.ts +2 -0
- package/dist/candid/governance.certified.idl.js +704 -0
- package/dist/candid/governance.did +338 -0
- package/dist/candid/governance.idl.d.ts +5 -0
- package/dist/candid/governance.idl.js +712 -0
- package/dist/candid/governanceTypes.d.ts +413 -0
- package/dist/candid/payloads.did +168 -0
- package/dist/candid/payloads.idl.d.ts +20 -0
- package/dist/candid/payloads.idl.js +163 -0
- package/dist/cjs/index.cjs.js +24 -24
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/account_identifier.js +1 -1
- package/dist/esm/chunk-6OQVGWT6.js +2 -0
- package/dist/esm/{chunk-X2SHUWG3.js.map → chunk-6OQVGWT6.js.map} +1 -1
- package/dist/esm/{chunk-NYI672WX.js → chunk-7EVRADY2.js} +3 -3
- package/dist/esm/{chunk-NYI672WX.js.map → chunk-7EVRADY2.js.map} +3 -3
- package/dist/esm/{chunk-IQ5S76MI.js → chunk-AM6IY7TS.js} +2 -2
- package/dist/esm/{chunk-IQ5S76MI.js.map → chunk-AM6IY7TS.js.map} +2 -2
- package/dist/esm/chunk-HSRX7H3U.js +3 -0
- package/dist/esm/chunk-HSRX7H3U.js.map +7 -0
- package/dist/esm/{chunk-FVDRR6PO.js → chunk-L3JQ3U5O.js} +2 -2
- package/dist/esm/{chunk-FVDRR6PO.js.map → chunk-L3JQ3U5O.js.map} +0 -0
- package/dist/esm/chunk-RZ4VIRGX.js +4 -0
- package/dist/esm/chunk-RZ4VIRGX.js.map +7 -0
- package/dist/esm/{chunk-HFWTAZD7.js → chunk-TABWYRQA.js} +11 -11
- package/dist/esm/{chunk-HFWTAZD7.js.map → chunk-TABWYRQA.js.map} +1 -1
- package/dist/esm/governance.js +1 -1
- package/dist/esm/icp.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ledger.js +1 -1
- package/dist/proto/base_types.proto +60 -0
- package/dist/proto/base_types_pb.d.ts +144 -0
- package/dist/proto/base_types_pb.js +1071 -0
- package/dist/proto/ledger.proto +277 -0
- package/dist/proto/ledger_pb.d.ts +911 -0
- package/dist/proto/ledger_pb.js +6555 -0
- package/dist/types/canisters/governance/request.converters.d.ts +2 -1
- package/dist/types/governance.d.ts +43 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/governance.d.ts +14 -0
- package/dist/types/types/ledger.d.ts +1 -1
- package/package.json +10 -7
- package/dist/esm/chunk-4FZAJTYF.js +0 -2
- package/dist/esm/chunk-4FZAJTYF.js.map +0 -7
- package/dist/esm/chunk-AM5HOKAH.js +0 -2
- package/dist/esm/chunk-AM5HOKAH.js.map +0 -7
- package/dist/esm/chunk-LNMGZ6W7.js +0 -3
- package/dist/esm/chunk-LNMGZ6W7.js.map +0 -7
- package/dist/esm/chunk-SO23SIWX.js +0 -3
- package/dist/esm/chunk-SO23SIWX.js.map +0 -7
- package/dist/esm/chunk-X2SHUWG3.js +0 -2
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import type { Principal } from "@dfinity/principal";
|
|
2
|
+
export interface AccountIdentifier {
|
|
3
|
+
hash: Array<number>;
|
|
4
|
+
}
|
|
5
|
+
export type Action =
|
|
6
|
+
| { RegisterKnownNeuron: KnownNeuron }
|
|
7
|
+
| { ManageNeuron: ManageNeuron }
|
|
8
|
+
| { ExecuteNnsFunction: ExecuteNnsFunction }
|
|
9
|
+
| { RewardNodeProvider: RewardNodeProvider }
|
|
10
|
+
| { SetDefaultFollowees: SetDefaultFollowees }
|
|
11
|
+
| { RewardNodeProviders: RewardNodeProviders }
|
|
12
|
+
| { ManageNetworkEconomics: NetworkEconomics }
|
|
13
|
+
| { ApproveGenesisKyc: ApproveGenesisKyc }
|
|
14
|
+
| { AddOrRemoveNodeProvider: AddOrRemoveNodeProvider }
|
|
15
|
+
| { Motion: Motion };
|
|
16
|
+
export interface AddHotKey {
|
|
17
|
+
new_hot_key: [] | [Principal];
|
|
18
|
+
}
|
|
19
|
+
export interface AddOrRemoveNodeProvider {
|
|
20
|
+
change: [] | [Change];
|
|
21
|
+
}
|
|
22
|
+
export interface Amount {
|
|
23
|
+
e8s: bigint;
|
|
24
|
+
}
|
|
25
|
+
export interface ApproveGenesisKyc {
|
|
26
|
+
principals: Array<Principal>;
|
|
27
|
+
}
|
|
28
|
+
export interface Ballot {
|
|
29
|
+
vote: number;
|
|
30
|
+
voting_power: bigint;
|
|
31
|
+
}
|
|
32
|
+
export interface BallotInfo {
|
|
33
|
+
vote: number;
|
|
34
|
+
proposal_id: [] | [NeuronId];
|
|
35
|
+
}
|
|
36
|
+
export type By =
|
|
37
|
+
| { NeuronIdOrSubaccount: {} }
|
|
38
|
+
| { MemoAndController: ClaimOrRefreshNeuronFromAccount }
|
|
39
|
+
| { Memo: bigint };
|
|
40
|
+
export type Change = { ToRemove: NodeProvider } | { ToAdd: NodeProvider };
|
|
41
|
+
export interface ClaimOrRefresh {
|
|
42
|
+
by: [] | [By];
|
|
43
|
+
}
|
|
44
|
+
export interface ClaimOrRefreshNeuronFromAccount {
|
|
45
|
+
controller: [] | [Principal];
|
|
46
|
+
memo: bigint;
|
|
47
|
+
}
|
|
48
|
+
export interface ClaimOrRefreshNeuronFromAccountResponse {
|
|
49
|
+
result: [] | [Result_1];
|
|
50
|
+
}
|
|
51
|
+
export interface ClaimOrRefreshResponse {
|
|
52
|
+
refreshed_neuron_id: [] | [NeuronId];
|
|
53
|
+
}
|
|
54
|
+
export type Command =
|
|
55
|
+
| { Spawn: Spawn }
|
|
56
|
+
| { Split: Split }
|
|
57
|
+
| { Follow: Follow }
|
|
58
|
+
| { ClaimOrRefresh: ClaimOrRefresh }
|
|
59
|
+
| { Configure: Configure }
|
|
60
|
+
| { RegisterVote: RegisterVote }
|
|
61
|
+
| { Merge: Merge }
|
|
62
|
+
| { DisburseToNeuron: DisburseToNeuron }
|
|
63
|
+
| { MakeProposal: Proposal }
|
|
64
|
+
| { MergeMaturity: MergeMaturity }
|
|
65
|
+
| { Disburse: Disburse };
|
|
66
|
+
export type Command_1 =
|
|
67
|
+
| { Error: GovernanceError }
|
|
68
|
+
| { Spawn: SpawnResponse }
|
|
69
|
+
| { Split: SpawnResponse }
|
|
70
|
+
| { Follow: {} }
|
|
71
|
+
| { ClaimOrRefresh: ClaimOrRefreshResponse }
|
|
72
|
+
| { Configure: {} }
|
|
73
|
+
| { RegisterVote: {} }
|
|
74
|
+
| { Merge: {} }
|
|
75
|
+
| { DisburseToNeuron: SpawnResponse }
|
|
76
|
+
| { MakeProposal: MakeProposalResponse }
|
|
77
|
+
| { MergeMaturity: MergeMaturityResponse }
|
|
78
|
+
| { Disburse: DisburseResponse };
|
|
79
|
+
export type Command_2 =
|
|
80
|
+
| { Spawn: Spawn }
|
|
81
|
+
| { Split: Split }
|
|
82
|
+
| { Configure: Configure }
|
|
83
|
+
| { Merge: Merge }
|
|
84
|
+
| { DisburseToNeuron: DisburseToNeuron }
|
|
85
|
+
| { ClaimOrRefreshNeuron: ClaimOrRefresh }
|
|
86
|
+
| { MergeMaturity: MergeMaturity }
|
|
87
|
+
| { Disburse: Disburse };
|
|
88
|
+
export interface Configure {
|
|
89
|
+
operation: [] | [Operation];
|
|
90
|
+
}
|
|
91
|
+
export interface Disburse {
|
|
92
|
+
to_account: [] | [AccountIdentifier];
|
|
93
|
+
amount: [] | [Amount];
|
|
94
|
+
}
|
|
95
|
+
export interface DisburseResponse {
|
|
96
|
+
transfer_block_height: bigint;
|
|
97
|
+
}
|
|
98
|
+
export interface DisburseToNeuron {
|
|
99
|
+
dissolve_delay_seconds: bigint;
|
|
100
|
+
kyc_verified: boolean;
|
|
101
|
+
amount_e8s: bigint;
|
|
102
|
+
new_controller: [] | [Principal];
|
|
103
|
+
nonce: bigint;
|
|
104
|
+
}
|
|
105
|
+
export type DissolveState =
|
|
106
|
+
| { DissolveDelaySeconds: bigint }
|
|
107
|
+
| { WhenDissolvedTimestampSeconds: bigint };
|
|
108
|
+
export interface ExecuteNnsFunction {
|
|
109
|
+
nns_function: number;
|
|
110
|
+
payload: Array<number>;
|
|
111
|
+
}
|
|
112
|
+
export interface Follow {
|
|
113
|
+
topic: number;
|
|
114
|
+
followees: Array<NeuronId>;
|
|
115
|
+
}
|
|
116
|
+
export interface Followees {
|
|
117
|
+
followees: Array<NeuronId>;
|
|
118
|
+
}
|
|
119
|
+
export interface Governance {
|
|
120
|
+
default_followees: Array<[number, Followees]>;
|
|
121
|
+
wait_for_quiet_threshold_seconds: bigint;
|
|
122
|
+
metrics: [] | [GovernanceCachedMetrics];
|
|
123
|
+
node_providers: Array<NodeProvider>;
|
|
124
|
+
economics: [] | [NetworkEconomics];
|
|
125
|
+
latest_reward_event: [] | [RewardEvent];
|
|
126
|
+
to_claim_transfers: Array<NeuronStakeTransfer>;
|
|
127
|
+
short_voting_period_seconds: bigint;
|
|
128
|
+
proposals: Array<[bigint, ProposalData]>;
|
|
129
|
+
in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
|
|
130
|
+
neurons: Array<[bigint, Neuron]>;
|
|
131
|
+
genesis_timestamp_seconds: bigint;
|
|
132
|
+
}
|
|
133
|
+
export interface GovernanceCachedMetrics {
|
|
134
|
+
not_dissolving_neurons_e8s_buckets: Array<[bigint, number]>;
|
|
135
|
+
garbage_collectable_neurons_count: bigint;
|
|
136
|
+
neurons_with_invalid_stake_count: bigint;
|
|
137
|
+
not_dissolving_neurons_count_buckets: Array<[bigint, bigint]>;
|
|
138
|
+
total_supply_icp: bigint;
|
|
139
|
+
neurons_with_less_than_6_months_dissolve_delay_count: bigint;
|
|
140
|
+
dissolved_neurons_count: bigint;
|
|
141
|
+
total_staked_e8s: bigint;
|
|
142
|
+
not_dissolving_neurons_count: bigint;
|
|
143
|
+
dissolved_neurons_e8s: bigint;
|
|
144
|
+
neurons_with_less_than_6_months_dissolve_delay_e8s: bigint;
|
|
145
|
+
dissolving_neurons_count_buckets: Array<[bigint, bigint]>;
|
|
146
|
+
dissolving_neurons_count: bigint;
|
|
147
|
+
dissolving_neurons_e8s_buckets: Array<[bigint, number]>;
|
|
148
|
+
community_fund_total_staked_e8s: bigint;
|
|
149
|
+
timestamp_seconds: bigint;
|
|
150
|
+
}
|
|
151
|
+
export interface GovernanceError {
|
|
152
|
+
error_message: string;
|
|
153
|
+
error_type: number;
|
|
154
|
+
}
|
|
155
|
+
export interface IncreaseDissolveDelay {
|
|
156
|
+
additional_dissolve_delay_seconds: number;
|
|
157
|
+
}
|
|
158
|
+
export interface KnownNeuron {
|
|
159
|
+
id: [] | [NeuronId];
|
|
160
|
+
known_neuron_data: [] | [KnownNeuronData];
|
|
161
|
+
}
|
|
162
|
+
export interface KnownNeuronData {
|
|
163
|
+
name: string;
|
|
164
|
+
description: [] | [string];
|
|
165
|
+
}
|
|
166
|
+
export interface ListKnownNeuronsResponse {
|
|
167
|
+
known_neurons: Array<KnownNeuron>;
|
|
168
|
+
}
|
|
169
|
+
export interface ListNeurons {
|
|
170
|
+
neuron_ids: Array<bigint>;
|
|
171
|
+
include_neurons_readable_by_caller: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface ListNeuronsResponse {
|
|
174
|
+
neuron_infos: Array<[bigint, NeuronInfo]>;
|
|
175
|
+
full_neurons: Array<Neuron>;
|
|
176
|
+
}
|
|
177
|
+
export interface ListProposalInfo {
|
|
178
|
+
include_reward_status: Array<number>;
|
|
179
|
+
before_proposal: [] | [NeuronId];
|
|
180
|
+
limit: number;
|
|
181
|
+
exclude_topic: Array<number>;
|
|
182
|
+
include_status: Array<number>;
|
|
183
|
+
}
|
|
184
|
+
export interface ListProposalInfoResponse {
|
|
185
|
+
proposal_info: Array<ProposalInfo>;
|
|
186
|
+
}
|
|
187
|
+
export interface MakeProposalResponse {
|
|
188
|
+
proposal_id: [] | [NeuronId];
|
|
189
|
+
}
|
|
190
|
+
export interface ManageNeuron {
|
|
191
|
+
id: [] | [NeuronId];
|
|
192
|
+
command: [] | [Command];
|
|
193
|
+
neuron_id_or_subaccount: [] | [NeuronIdOrSubaccount];
|
|
194
|
+
}
|
|
195
|
+
export interface ManageNeuronResponse {
|
|
196
|
+
command: [] | [Command_1];
|
|
197
|
+
}
|
|
198
|
+
export interface Merge {
|
|
199
|
+
source_neuron_id: [] | [NeuronId];
|
|
200
|
+
}
|
|
201
|
+
export interface MergeMaturity {
|
|
202
|
+
percentage_to_merge: number;
|
|
203
|
+
}
|
|
204
|
+
export interface MergeMaturityResponse {
|
|
205
|
+
merged_maturity_e8s: bigint;
|
|
206
|
+
new_stake_e8s: bigint;
|
|
207
|
+
}
|
|
208
|
+
export interface Motion {
|
|
209
|
+
motion_text: string;
|
|
210
|
+
}
|
|
211
|
+
export interface NetworkEconomics {
|
|
212
|
+
neuron_minimum_stake_e8s: bigint;
|
|
213
|
+
max_proposals_to_keep_per_topic: number;
|
|
214
|
+
neuron_management_fee_per_proposal_e8s: bigint;
|
|
215
|
+
reject_cost_e8s: bigint;
|
|
216
|
+
transaction_fee_e8s: bigint;
|
|
217
|
+
neuron_spawn_dissolve_delay_seconds: bigint;
|
|
218
|
+
minimum_icp_xdr_rate: bigint;
|
|
219
|
+
maximum_node_provider_rewards_e8s: bigint;
|
|
220
|
+
}
|
|
221
|
+
export interface Neuron {
|
|
222
|
+
id: [] | [NeuronId];
|
|
223
|
+
controller: [] | [Principal];
|
|
224
|
+
recent_ballots: Array<BallotInfo>;
|
|
225
|
+
kyc_verified: boolean;
|
|
226
|
+
not_for_profit: boolean;
|
|
227
|
+
maturity_e8s_equivalent: bigint;
|
|
228
|
+
cached_neuron_stake_e8s: bigint;
|
|
229
|
+
created_timestamp_seconds: bigint;
|
|
230
|
+
aging_since_timestamp_seconds: bigint;
|
|
231
|
+
hot_keys: Array<Principal>;
|
|
232
|
+
account: Array<number>;
|
|
233
|
+
joined_community_fund_timestamp_seconds: [] | [bigint];
|
|
234
|
+
dissolve_state: [] | [DissolveState];
|
|
235
|
+
followees: Array<[number, Followees]>;
|
|
236
|
+
neuron_fees_e8s: bigint;
|
|
237
|
+
transfer: [] | [NeuronStakeTransfer];
|
|
238
|
+
known_neuron_data: [] | [KnownNeuronData];
|
|
239
|
+
}
|
|
240
|
+
export interface NeuronId {
|
|
241
|
+
id: bigint;
|
|
242
|
+
}
|
|
243
|
+
export type NeuronIdOrSubaccount =
|
|
244
|
+
| { Subaccount: Array<number> }
|
|
245
|
+
| { NeuronId: NeuronId };
|
|
246
|
+
export interface NeuronInFlightCommand {
|
|
247
|
+
command: [] | [Command_2];
|
|
248
|
+
timestamp: bigint;
|
|
249
|
+
}
|
|
250
|
+
export interface NeuronInfo {
|
|
251
|
+
dissolve_delay_seconds: bigint;
|
|
252
|
+
recent_ballots: Array<BallotInfo>;
|
|
253
|
+
created_timestamp_seconds: bigint;
|
|
254
|
+
state: number;
|
|
255
|
+
stake_e8s: bigint;
|
|
256
|
+
joined_community_fund_timestamp_seconds: [] | [bigint];
|
|
257
|
+
retrieved_at_timestamp_seconds: bigint;
|
|
258
|
+
known_neuron_data: [] | [KnownNeuronData];
|
|
259
|
+
voting_power: bigint;
|
|
260
|
+
age_seconds: bigint;
|
|
261
|
+
}
|
|
262
|
+
export interface NeuronStakeTransfer {
|
|
263
|
+
to_subaccount: Array<number>;
|
|
264
|
+
neuron_stake_e8s: bigint;
|
|
265
|
+
from: [] | [Principal];
|
|
266
|
+
memo: bigint;
|
|
267
|
+
from_subaccount: Array<number>;
|
|
268
|
+
transfer_timestamp: bigint;
|
|
269
|
+
block_height: bigint;
|
|
270
|
+
}
|
|
271
|
+
export interface NodeProvider {
|
|
272
|
+
id: [] | [Principal];
|
|
273
|
+
reward_account: [] | [AccountIdentifier];
|
|
274
|
+
}
|
|
275
|
+
export type Operation =
|
|
276
|
+
| { RemoveHotKey: RemoveHotKey }
|
|
277
|
+
| { AddHotKey: AddHotKey }
|
|
278
|
+
| { StopDissolving: {} }
|
|
279
|
+
| { StartDissolving: {} }
|
|
280
|
+
| { IncreaseDissolveDelay: IncreaseDissolveDelay }
|
|
281
|
+
| { JoinCommunityFund: {} }
|
|
282
|
+
| { SetDissolveTimestamp: SetDissolveTimestamp };
|
|
283
|
+
export interface Proposal {
|
|
284
|
+
url: string;
|
|
285
|
+
title: [] | [string];
|
|
286
|
+
action: [] | [Action];
|
|
287
|
+
summary: string;
|
|
288
|
+
}
|
|
289
|
+
export interface ProposalData {
|
|
290
|
+
id: [] | [NeuronId];
|
|
291
|
+
failure_reason: [] | [GovernanceError];
|
|
292
|
+
ballots: Array<[bigint, Ballot]>;
|
|
293
|
+
proposal_timestamp_seconds: bigint;
|
|
294
|
+
reward_event_round: bigint;
|
|
295
|
+
failed_timestamp_seconds: bigint;
|
|
296
|
+
reject_cost_e8s: bigint;
|
|
297
|
+
latest_tally: [] | [Tally];
|
|
298
|
+
decided_timestamp_seconds: bigint;
|
|
299
|
+
proposal: [] | [Proposal];
|
|
300
|
+
proposer: [] | [NeuronId];
|
|
301
|
+
wait_for_quiet_state: [] | [WaitForQuietState];
|
|
302
|
+
executed_timestamp_seconds: bigint;
|
|
303
|
+
}
|
|
304
|
+
export interface ProposalInfo {
|
|
305
|
+
id: [] | [NeuronId];
|
|
306
|
+
status: number;
|
|
307
|
+
topic: number;
|
|
308
|
+
failure_reason: [] | [GovernanceError];
|
|
309
|
+
ballots: Array<[bigint, Ballot]>;
|
|
310
|
+
proposal_timestamp_seconds: bigint;
|
|
311
|
+
reward_event_round: bigint;
|
|
312
|
+
deadline_timestamp_seconds: [] | [bigint];
|
|
313
|
+
failed_timestamp_seconds: bigint;
|
|
314
|
+
reject_cost_e8s: bigint;
|
|
315
|
+
latest_tally: [] | [Tally];
|
|
316
|
+
reward_status: number;
|
|
317
|
+
decided_timestamp_seconds: bigint;
|
|
318
|
+
proposal: [] | [Proposal];
|
|
319
|
+
proposer: [] | [NeuronId];
|
|
320
|
+
executed_timestamp_seconds: bigint;
|
|
321
|
+
}
|
|
322
|
+
export interface RegisterVote {
|
|
323
|
+
vote: number;
|
|
324
|
+
proposal: [] | [NeuronId];
|
|
325
|
+
}
|
|
326
|
+
export interface RemoveHotKey {
|
|
327
|
+
hot_key_to_remove: [] | [Principal];
|
|
328
|
+
}
|
|
329
|
+
export type Result = { Ok: null } | { Err: GovernanceError };
|
|
330
|
+
export type Result_1 = { Error: GovernanceError } | { NeuronId: NeuronId };
|
|
331
|
+
export type Result_2 = { Ok: Neuron } | { Err: GovernanceError };
|
|
332
|
+
export type Result_3 = { Ok: RewardNodeProviders } | { Err: GovernanceError };
|
|
333
|
+
export type Result_4 = { Ok: NeuronInfo } | { Err: GovernanceError };
|
|
334
|
+
export interface RewardEvent {
|
|
335
|
+
day_after_genesis: bigint;
|
|
336
|
+
actual_timestamp_seconds: bigint;
|
|
337
|
+
distributed_e8s_equivalent: bigint;
|
|
338
|
+
settled_proposals: Array<NeuronId>;
|
|
339
|
+
}
|
|
340
|
+
export type RewardMode =
|
|
341
|
+
| { RewardToNeuron: RewardToNeuron }
|
|
342
|
+
| { RewardToAccount: RewardToAccount };
|
|
343
|
+
export interface RewardNodeProvider {
|
|
344
|
+
node_provider: [] | [NodeProvider];
|
|
345
|
+
reward_mode: [] | [RewardMode];
|
|
346
|
+
amount_e8s: bigint;
|
|
347
|
+
}
|
|
348
|
+
export interface RewardNodeProviders {
|
|
349
|
+
rewards: Array<RewardNodeProvider>;
|
|
350
|
+
}
|
|
351
|
+
export interface RewardToAccount {
|
|
352
|
+
to_account: [] | [AccountIdentifier];
|
|
353
|
+
}
|
|
354
|
+
export interface RewardToNeuron {
|
|
355
|
+
dissolve_delay_seconds: bigint;
|
|
356
|
+
}
|
|
357
|
+
export interface SetDefaultFollowees {
|
|
358
|
+
default_followees: Array<[number, Followees]>;
|
|
359
|
+
}
|
|
360
|
+
export interface SetDissolveTimestamp {
|
|
361
|
+
dissolve_timestamp_seconds: bigint;
|
|
362
|
+
}
|
|
363
|
+
export interface Spawn {
|
|
364
|
+
new_controller: [] | [Principal];
|
|
365
|
+
nonce: [] | [bigint];
|
|
366
|
+
}
|
|
367
|
+
export interface SpawnResponse {
|
|
368
|
+
created_neuron_id: [] | [NeuronId];
|
|
369
|
+
}
|
|
370
|
+
export interface Split {
|
|
371
|
+
amount_e8s: bigint;
|
|
372
|
+
}
|
|
373
|
+
export interface Tally {
|
|
374
|
+
no: bigint;
|
|
375
|
+
yes: bigint;
|
|
376
|
+
total: bigint;
|
|
377
|
+
timestamp_seconds: bigint;
|
|
378
|
+
}
|
|
379
|
+
export interface UpdateNodeProvider {
|
|
380
|
+
reward_account: [] | [AccountIdentifier];
|
|
381
|
+
}
|
|
382
|
+
export interface WaitForQuietState {
|
|
383
|
+
current_deadline_timestamp_seconds: bigint;
|
|
384
|
+
}
|
|
385
|
+
export interface _SERVICE {
|
|
386
|
+
claim_gtc_neurons: (
|
|
387
|
+
arg_0: Principal,
|
|
388
|
+
arg_1: Array<NeuronId>
|
|
389
|
+
) => Promise<Result>;
|
|
390
|
+
claim_or_refresh_neuron_from_account: (
|
|
391
|
+
arg_0: ClaimOrRefreshNeuronFromAccount
|
|
392
|
+
) => Promise<ClaimOrRefreshNeuronFromAccountResponse>;
|
|
393
|
+
get_full_neuron: (arg_0: bigint) => Promise<Result_2>;
|
|
394
|
+
get_full_neuron_by_id_or_subaccount: (
|
|
395
|
+
arg_0: NeuronIdOrSubaccount
|
|
396
|
+
) => Promise<Result_2>;
|
|
397
|
+
get_monthly_node_provider_rewards: () => Promise<Result_3>;
|
|
398
|
+
get_neuron_ids: () => Promise<Array<bigint>>;
|
|
399
|
+
get_neuron_info: (arg_0: bigint) => Promise<Result_4>;
|
|
400
|
+
get_neuron_info_by_id_or_subaccount: (
|
|
401
|
+
arg_0: NeuronIdOrSubaccount
|
|
402
|
+
) => Promise<Result_4>;
|
|
403
|
+
get_pending_proposals: () => Promise<Array<ProposalInfo>>;
|
|
404
|
+
get_proposal_info: (arg_0: bigint) => Promise<[] | [ProposalInfo]>;
|
|
405
|
+
list_known_neurons: () => Promise<ListKnownNeuronsResponse>;
|
|
406
|
+
list_neurons: (arg_0: ListNeurons) => Promise<ListNeuronsResponse>;
|
|
407
|
+
list_proposals: (
|
|
408
|
+
arg_0: ListProposalInfo
|
|
409
|
+
) => Promise<ListProposalInfoResponse>;
|
|
410
|
+
manage_neuron: (arg_0: ManageNeuron) => Promise<ManageNeuronResponse>;
|
|
411
|
+
transfer_gtc_neuron: (arg_0: NeuronId, arg_1: NeuronId) => Promise<Result>;
|
|
412
|
+
update_node_provider: (arg_0: UpdateNodeProvider) => Promise<Result>;
|
|
413
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// Generated by running `cargo run --bin nns_functions_candid_gen`
|
|
2
|
+
|
|
3
|
+
type AddNodeOperatorPayload = record {
|
|
4
|
+
node_operator_principal_id : opt principal;
|
|
5
|
+
node_allowance : nat64;
|
|
6
|
+
node_provider_principal_id : opt principal;
|
|
7
|
+
};
|
|
8
|
+
type AddNodesToSubnetPayload = record {
|
|
9
|
+
subnet_id : principal;
|
|
10
|
+
node_ids : vec principal;
|
|
11
|
+
};
|
|
12
|
+
type AddOrRemoveDataCentersProposalPayload = record {
|
|
13
|
+
data_centers_to_add : vec DataCenterRecord;
|
|
14
|
+
data_centers_to_remove : vec text;
|
|
15
|
+
};
|
|
16
|
+
type BlessReplicaVersionPayload = record {
|
|
17
|
+
node_manager_sha256_hex : text;
|
|
18
|
+
release_package_url : text;
|
|
19
|
+
sha256_hex : text;
|
|
20
|
+
replica_version_id : text;
|
|
21
|
+
release_package_sha256_hex : text;
|
|
22
|
+
node_manager_binary_url : text;
|
|
23
|
+
binary_url : text;
|
|
24
|
+
};
|
|
25
|
+
type CanisterAction = variant { Start; Stop };
|
|
26
|
+
type CreateSubnetPayload = record {
|
|
27
|
+
unit_delay_millis : nat64;
|
|
28
|
+
max_instructions_per_round : nat64;
|
|
29
|
+
features : SubnetFeatures;
|
|
30
|
+
max_instructions_per_message : nat64;
|
|
31
|
+
gossip_registry_poll_period_ms : nat32;
|
|
32
|
+
max_ingress_bytes_per_message : nat64;
|
|
33
|
+
dkg_dealings_per_block : nat64;
|
|
34
|
+
max_block_payload_size : nat64;
|
|
35
|
+
max_instructions_per_install_code : nat64;
|
|
36
|
+
start_as_nns : bool;
|
|
37
|
+
is_halted : bool;
|
|
38
|
+
gossip_pfn_evaluation_period_ms : nat32;
|
|
39
|
+
max_ingress_messages_per_block : nat64;
|
|
40
|
+
gossip_max_artifact_streams_per_peer : nat32;
|
|
41
|
+
replica_version_id : text;
|
|
42
|
+
gossip_max_duplicity : nat32;
|
|
43
|
+
gossip_max_chunk_wait_ms : nat32;
|
|
44
|
+
dkg_interval_length : nat64;
|
|
45
|
+
subnet_id_override : opt principal;
|
|
46
|
+
ingress_bytes_per_block_soft_cap : nat64;
|
|
47
|
+
initial_notary_delay_millis : nat64;
|
|
48
|
+
gossip_max_chunk_size : nat32;
|
|
49
|
+
subnet_type : SubnetType;
|
|
50
|
+
gossip_retransmission_request_ms : nat32;
|
|
51
|
+
gossip_receive_check_cache_size : nat32;
|
|
52
|
+
node_ids : vec principal;
|
|
53
|
+
};
|
|
54
|
+
type DataCenterRecord = record {
|
|
55
|
+
id : text;
|
|
56
|
+
gps : opt Gps;
|
|
57
|
+
region : text;
|
|
58
|
+
owner : text;
|
|
59
|
+
};
|
|
60
|
+
type Gps = record { latitude : float32; longitude : float32 };
|
|
61
|
+
type NodeRewardRate = record { xdr_permyriad_per_node_per_month : nat64 };
|
|
62
|
+
type NodeRewardRates = record { rates : vec record { text; NodeRewardRate } };
|
|
63
|
+
type RecoverSubnetPayload = record {
|
|
64
|
+
height : nat64;
|
|
65
|
+
replacement_nodes : opt vec principal;
|
|
66
|
+
subnet_id : principal;
|
|
67
|
+
registry_store_uri : opt record { text; text; nat64 };
|
|
68
|
+
state_hash : vec nat8;
|
|
69
|
+
time_ns : nat64;
|
|
70
|
+
};
|
|
71
|
+
type RemoveNodeOperatorsPayload = record {
|
|
72
|
+
node_operators_to_remove : vec vec nat8;
|
|
73
|
+
};
|
|
74
|
+
type RemoveNodesFromSubnetPayload = record { node_ids : vec principal };
|
|
75
|
+
type RerouteCanisterRangePayload = record {
|
|
76
|
+
range_end_inclusive : principal;
|
|
77
|
+
range_start_inclusive : principal;
|
|
78
|
+
destination_subnet : principal;
|
|
79
|
+
};
|
|
80
|
+
type SetAuthorizedSubnetworkListArgs = record {
|
|
81
|
+
who : opt principal;
|
|
82
|
+
subnets : vec principal;
|
|
83
|
+
};
|
|
84
|
+
type SetFirewallConfigPayload = record {
|
|
85
|
+
ipv4_prefixes : vec text;
|
|
86
|
+
firewall_config : text;
|
|
87
|
+
ipv6_prefixes : vec text;
|
|
88
|
+
};
|
|
89
|
+
type StopOrStartNnsCanisterProposalPayload = record {
|
|
90
|
+
action : CanisterAction;
|
|
91
|
+
canister_id : principal;
|
|
92
|
+
};
|
|
93
|
+
type SubnetFeatures = record { ecdsa_signatures : bool };
|
|
94
|
+
type SubnetType = variant { application; verified_application; system };
|
|
95
|
+
type UpdateIcpXdrConversionRatePayload = record {
|
|
96
|
+
data_source : text;
|
|
97
|
+
xdr_permyriad_per_icp : nat64;
|
|
98
|
+
timestamp_seconds : nat64;
|
|
99
|
+
};
|
|
100
|
+
type UpdateNodeOperatorConfigPayload = record {
|
|
101
|
+
node_operator_id : opt principal;
|
|
102
|
+
node_allowance : opt nat64;
|
|
103
|
+
rewardable_nodes : vec record { text; nat32 };
|
|
104
|
+
dc_id : opt text;
|
|
105
|
+
};
|
|
106
|
+
type UpdateNodeRewardsTableProposalPayload = record {
|
|
107
|
+
new_entries : vec record { text; NodeRewardRates };
|
|
108
|
+
};
|
|
109
|
+
type UpdateSubnetPayload = record {
|
|
110
|
+
unit_delay_millis : opt nat64;
|
|
111
|
+
max_duplicity : opt nat32;
|
|
112
|
+
max_instructions_per_round : opt nat64;
|
|
113
|
+
features : opt SubnetFeatures;
|
|
114
|
+
set_gossip_config_to_default : bool;
|
|
115
|
+
max_instructions_per_message : opt nat64;
|
|
116
|
+
pfn_evaluation_period_ms : opt nat32;
|
|
117
|
+
subnet_id : principal;
|
|
118
|
+
max_ingress_bytes_per_message : opt nat64;
|
|
119
|
+
dkg_dealings_per_block : opt nat64;
|
|
120
|
+
max_block_payload_size : opt nat64;
|
|
121
|
+
max_instructions_per_install_code : opt nat64;
|
|
122
|
+
start_as_nns : opt bool;
|
|
123
|
+
is_halted : opt bool;
|
|
124
|
+
max_number_of_canisters : opt nat64;
|
|
125
|
+
advert_best_effort_percentage : opt nat32;
|
|
126
|
+
retransmission_request_ms : opt nat32;
|
|
127
|
+
dkg_interval_length : opt nat64;
|
|
128
|
+
registry_poll_period_ms : opt nat32;
|
|
129
|
+
max_chunk_wait_ms : opt nat32;
|
|
130
|
+
receive_check_cache_size : opt nat32;
|
|
131
|
+
ssh_backup_access : opt vec text;
|
|
132
|
+
ingress_bytes_per_block_soft_cap : opt nat64;
|
|
133
|
+
max_chunk_size : opt nat32;
|
|
134
|
+
initial_notary_delay_millis : opt nat64;
|
|
135
|
+
max_artifact_streams_per_peer : opt nat32;
|
|
136
|
+
subnet_type : opt SubnetType;
|
|
137
|
+
ssh_readonly_access : opt vec text;
|
|
138
|
+
};
|
|
139
|
+
type UpdateSubnetReplicaVersionPayload = record {
|
|
140
|
+
subnet_id : principal;
|
|
141
|
+
replica_version_id : text;
|
|
142
|
+
};
|
|
143
|
+
type UpdateUnassignedNodesConfigPayload = record {
|
|
144
|
+
replica_version : opt text;
|
|
145
|
+
ssh_readonly_access : opt vec text;
|
|
146
|
+
};
|
|
147
|
+
service : {
|
|
148
|
+
add_node_operator : (AddNodeOperatorPayload) -> ();
|
|
149
|
+
add_nodes_to_subnet : (AddNodesToSubnetPayload) -> ();
|
|
150
|
+
add_or_remove_data_centers : (AddOrRemoveDataCentersProposalPayload) -> ();
|
|
151
|
+
bless_replica_version : (BlessReplicaVersionPayload) -> ();
|
|
152
|
+
clear_provisional_whitelist : () -> ();
|
|
153
|
+
create_subnet : (CreateSubnetPayload) -> ();
|
|
154
|
+
recover_subnet : (RecoverSubnetPayload) -> ();
|
|
155
|
+
remove_node_operators : (RemoveNodeOperatorsPayload) -> ();
|
|
156
|
+
remove_nodes : (RemoveNodesFromSubnetPayload) -> ();
|
|
157
|
+
remove_nodes_from_subnet : (RemoveNodesFromSubnetPayload) -> ();
|
|
158
|
+
reroute_canister_range : (RerouteCanisterRangePayload) -> ();
|
|
159
|
+
set_authorized_subnetwork_list : (SetAuthorizedSubnetworkListArgs) -> ();
|
|
160
|
+
set_firewall_config : (SetFirewallConfigPayload) -> ();
|
|
161
|
+
stop_or_start_nns_canister : (StopOrStartNnsCanisterProposalPayload) -> ();
|
|
162
|
+
update_icp_xdr_conversion_rate : (UpdateIcpXdrConversionRatePayload) -> ();
|
|
163
|
+
update_node_operator_config : (UpdateNodeOperatorConfigPayload) -> ();
|
|
164
|
+
update_node_rewards_table : (UpdateNodeRewardsTableProposalPayload) -> ();
|
|
165
|
+
update_subnet : (UpdateSubnetPayload) -> ();
|
|
166
|
+
update_subnet_replica_version : (UpdateSubnetReplicaVersionPayload) -> ();
|
|
167
|
+
update_unassigned_nodes_config : (UpdateUnassignedNodesConfigPayload) -> ();
|
|
168
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IDL } from "@dfinity/candid";
|
|
2
|
+
|
|
3
|
+
export const AddNodeOperatorPayload: IDL.RecordClass;
|
|
4
|
+
export const AddNodesToSubnetPayload: IDL.RecordClass;
|
|
5
|
+
export const AddOrRemoveDataCentersProposalPayload: IDL.RecordClass;
|
|
6
|
+
export const BlessReplicaVersionPayload: IDL.RecordClass;
|
|
7
|
+
export const CreateSubnetPayload: IDL.RecordClass;
|
|
8
|
+
export const RecoverSubnetPayload: IDL.RecordClass;
|
|
9
|
+
export const RemoveNodeOperatorsPayload: IDL.RecordClass;
|
|
10
|
+
export const RemoveNodesFromSubnetPayload: IDL.RecordClass;
|
|
11
|
+
export const RerouteCanisterRangePayload: IDL.RecordClass;
|
|
12
|
+
export const SetAuthorizedSubnetworkListArgs: IDL.RecordClass;
|
|
13
|
+
export const SetFirewallConfigPayload: IDL.RecordClass;
|
|
14
|
+
export const StopOrStartNnsCanisterProposalPayload: IDL.RecordClass;
|
|
15
|
+
export const UpdateIcpXdrConversionRatePayload: IDL.RecordClass;
|
|
16
|
+
export const UpdateNodeOperatorConfigPayload: IDL.RecordClass;
|
|
17
|
+
export const UpdateNodeRewardsTableProposalPayload: IDL.RecordClass;
|
|
18
|
+
export const UpdateSubnetPayload: IDL.RecordClass;
|
|
19
|
+
export const UpdateSubnetReplicaVersionPayload: IDL.RecordClass;
|
|
20
|
+
export const UpdateUnassignedNodesConfigPayload: IDL.RecordClass;
|