@hiveio/wax-api-hafbe 1.27.12
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/LICENSE.md +7 -0
- package/README.md +26 -0
- package/index.d.ts +932 -0
- package/index.js +84 -0
- package/package.json +29 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright (c) 2025 Hive community
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# hafbe-api API definitions
|
|
2
|
+
|
|
3
|
+
Wax REST API definitions for hafbe-api
|
|
4
|
+
|
|
5
|
+
> This package has been auto-generated by the @hiveio/wax-spec-generator script
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
In order to use this package, you have to install it:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @hiveio/wax-api-hafbe
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And import into your Wax project:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import WaxExtendedData from '@hiveio/wax-api-hafbe';
|
|
19
|
+
import { createHiveChain } from '@hiveio/wax';
|
|
20
|
+
|
|
21
|
+
const chainExtended = (await createHiveChain()).extendRest(WaxExtendedData);
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
See the license in the [LICENSE.md](LICENSE.md) file
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,932 @@
|
|
|
1
|
+
type TEmptyReq = {}
|
|
2
|
+
export enum HafbeTypesCommentType {
|
|
3
|
+
Post = "post",
|
|
4
|
+
Comment = "comment",
|
|
5
|
+
All = "all",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export enum HafbeTypesSortDirection {
|
|
9
|
+
Asc = "asc",
|
|
10
|
+
Desc = "desc",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum HafbeTypesOrderByVotes {
|
|
14
|
+
Voter = "voter",
|
|
15
|
+
Vests = "vests",
|
|
16
|
+
AccountVests = "account_vests",
|
|
17
|
+
ProxiedVests = "proxied_vests",
|
|
18
|
+
Timestamp = "timestamp",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum HafbeTypesOrderByWitness {
|
|
22
|
+
Witness = "witness",
|
|
23
|
+
Rank = "rank",
|
|
24
|
+
Url = "url",
|
|
25
|
+
Votes = "votes",
|
|
26
|
+
VotesDailyChange = "votes_daily_change",
|
|
27
|
+
VotersNum = "voters_num",
|
|
28
|
+
VotersNumDailyChange = "voters_num_daily_change",
|
|
29
|
+
PriceFeed = "price_feed",
|
|
30
|
+
Bias = "bias",
|
|
31
|
+
BlockSize = "block_size",
|
|
32
|
+
SigningKey = "signing_key",
|
|
33
|
+
Version = "version",
|
|
34
|
+
FeedUpdatedAt = "feed_updated_at",
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface HafbeTypesWitness {
|
|
38
|
+
/** witness''s account name */
|
|
39
|
+
witness_name?: string;
|
|
40
|
+
/** the current rank of the witness according to the votes cast on the blockchain. The top 20 witnesses (ranks 1 - 20) will produce blocks each round. */
|
|
41
|
+
rank?: number;
|
|
42
|
+
/** the witness''s home page */
|
|
43
|
+
url?: string;
|
|
44
|
+
/** the total weight of votes cast in favor of this witness, expressed in VESTS */
|
|
45
|
+
vests?: string;
|
|
46
|
+
/** the increase or decrease in votes for this witness over the last 24 hours, expressed in vests */
|
|
47
|
+
votes_daily_change?: string;
|
|
48
|
+
/** the number of voters for this witness */
|
|
49
|
+
voters_num?: number;
|
|
50
|
+
/** the increase or decrease in the number of voters voting for this witness over the last 24 hours */
|
|
51
|
+
voters_num_daily_change?: number;
|
|
52
|
+
/** the current price feed provided by the witness in HIVE/HBD */
|
|
53
|
+
price_feed?: number;
|
|
54
|
+
/**
|
|
55
|
+
* When setting the price feed, you specify the base and quote. Typically, if market conditions are stable and, for example, HBD is trading at 0.25 USD on exchanges, a witness would set:
|
|
56
|
+
* base: 0.250 HBD
|
|
57
|
+
* quote: 1.000 HIVE
|
|
58
|
+
* (This indicates that one HIVE costs 0.25 HBD.) However, if the peg is not maintained and HBD does not equal 1 USD (either higher or lower), the witness can adjust the feed accordingly. For instance, if HBD is trading at only 0.90 USD on exchanges, the witness might set:
|
|
59
|
+
* base: 0.250 HBD
|
|
60
|
+
* quote: 1.100 HIVE
|
|
61
|
+
* In this case, the bias is 10%%
|
|
62
|
+
*/
|
|
63
|
+
bias?: number;
|
|
64
|
+
/**
|
|
65
|
+
* timestamp when feed was updated
|
|
66
|
+
* @format date-time
|
|
67
|
+
*/
|
|
68
|
+
feed_updated_at?: string;
|
|
69
|
+
/** the maximum block size the witness is currently voting for, in bytes */
|
|
70
|
+
block_size?: number;
|
|
71
|
+
/** the key used to verify blocks signed by this witness */
|
|
72
|
+
signing_key?: string;
|
|
73
|
+
/** the version of hived the witness is running */
|
|
74
|
+
version?: string;
|
|
75
|
+
/** the number of blocks the witness should have generated but didn''t (over the entire lifetime of the blockchain) */
|
|
76
|
+
missed_blocks?: number;
|
|
77
|
+
/** the interest rate the witness is voting for */
|
|
78
|
+
hbd_interest_rate?: number;
|
|
79
|
+
/** the last block number created by the witness */
|
|
80
|
+
last_confirmed_block_num?: number;
|
|
81
|
+
/** the cost of creating an account. */
|
|
82
|
+
account_creation_fee?: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface HafbeTypesWitnessesReturn {
|
|
86
|
+
/** Total number of witnesses */
|
|
87
|
+
total_witnesses?: number;
|
|
88
|
+
/** Total number of pages */
|
|
89
|
+
total_pages?: number;
|
|
90
|
+
/** List of witness parameters */
|
|
91
|
+
witnesses?: HafbeTypesWitness[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface HafbeTypesWitnessVoter {
|
|
95
|
+
/** account name of the voter */
|
|
96
|
+
voter_name?: string;
|
|
97
|
+
/** number of vests this voter is directly voting with */
|
|
98
|
+
vests?: string;
|
|
99
|
+
/** number of vests in the voter''s account. if some vests are delegated, they will not be counted in voting */
|
|
100
|
+
account_vests?: string;
|
|
101
|
+
/** the number of vests proxied to this account */
|
|
102
|
+
proxied_vests?: string;
|
|
103
|
+
/**
|
|
104
|
+
* the time this account last changed its voting power
|
|
105
|
+
* @format date-time
|
|
106
|
+
*/
|
|
107
|
+
timestamp?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface HafbeTypesWitnessVoterHistory {
|
|
111
|
+
/** Total number of votes */
|
|
112
|
+
total_votes?: number;
|
|
113
|
+
/** Total number of pages */
|
|
114
|
+
total_pages?: number;
|
|
115
|
+
/** List of votes results */
|
|
116
|
+
voters?: HafbeTypesWitnessVoter[];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface HafbeTypesWitnessVotesHistoryRecord {
|
|
120
|
+
/** account name of the voter */
|
|
121
|
+
voter_name?: string;
|
|
122
|
+
/** whether the voter approved or rejected the witness */
|
|
123
|
+
approve?: boolean;
|
|
124
|
+
/** number of vests this voter is directly voting with */
|
|
125
|
+
vests?: string;
|
|
126
|
+
/** number of vests in the voter''s account. if some vests are delegated, they will not be counted in voting */
|
|
127
|
+
account_vests?: string;
|
|
128
|
+
/** the number of vests proxied to this account */
|
|
129
|
+
proxied_vests?: string;
|
|
130
|
+
/**
|
|
131
|
+
* the time of the vote change
|
|
132
|
+
* @format date-time
|
|
133
|
+
*/
|
|
134
|
+
timestamp?: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface HafbeTypesWitnessVotesHistory {
|
|
138
|
+
/** Total number of votes */
|
|
139
|
+
total_votes?: number;
|
|
140
|
+
/** Total number of pages */
|
|
141
|
+
total_pages?: number;
|
|
142
|
+
/** List of witness votes */
|
|
143
|
+
votes_history?: HafbeTypesWitnessVotesHistoryRecord[];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface HafbeTypesAccount {
|
|
147
|
+
/** account''s identification number */
|
|
148
|
+
id?: number;
|
|
149
|
+
/** account''s name */
|
|
150
|
+
name?: string;
|
|
151
|
+
/** information whether the account can vote or not */
|
|
152
|
+
can_vote?: boolean;
|
|
153
|
+
/** information whether made a prove of work */
|
|
154
|
+
mined?: boolean;
|
|
155
|
+
/** an account to which the account has designated as its proxy */
|
|
156
|
+
proxy?: string;
|
|
157
|
+
/** an account to which the account has designated as its recovery account */
|
|
158
|
+
recovery_account?: string;
|
|
159
|
+
/**
|
|
160
|
+
* time when the last account recovery was performed
|
|
161
|
+
* @format date-time
|
|
162
|
+
*/
|
|
163
|
+
last_account_recovery?: string;
|
|
164
|
+
/**
|
|
165
|
+
* date of account creation
|
|
166
|
+
* @format date-time
|
|
167
|
+
*/
|
|
168
|
+
created?: string;
|
|
169
|
+
/** numerical rating of the user based on upvotes and downvotes on user''s posts */
|
|
170
|
+
reputation?: number;
|
|
171
|
+
/** pool of prepaid accounts available for user allocation. These accounts are pre-registered and can be claimed by users as needed */
|
|
172
|
+
pending_claimed_accounts?: number;
|
|
173
|
+
/** parameter encompasses personalized profile information */
|
|
174
|
+
json_metadata?: string;
|
|
175
|
+
/** parameter encompasses personalized profile information */
|
|
176
|
+
posting_json_metadata?: string;
|
|
177
|
+
/** url to profile image */
|
|
178
|
+
profile_image?: string;
|
|
179
|
+
/** number of HIVE backed dollars the account has */
|
|
180
|
+
hbd_balance?: number;
|
|
181
|
+
/** account''s HIVE balance */
|
|
182
|
+
balance?: number;
|
|
183
|
+
/** account''s VEST balance */
|
|
184
|
+
vesting_shares?: string;
|
|
185
|
+
/** the VEST balance, presented in HIVE, is calculated based on the current HIVE price */
|
|
186
|
+
vesting_balance?: number;
|
|
187
|
+
/** saving balance of HIVE backed dollars */
|
|
188
|
+
hbd_saving_balance?: number;
|
|
189
|
+
/** HIVE saving balance */
|
|
190
|
+
savings_balance?: number;
|
|
191
|
+
/** number representing how many payouts are pending from user''s saving balance */
|
|
192
|
+
savings_withdraw_requests?: number;
|
|
193
|
+
/** not yet claimed HIVE backed dollars stored in hbd reward balance */
|
|
194
|
+
reward_hbd_balance?: number;
|
|
195
|
+
/** not yet claimed HIVE stored in hive reward balance */
|
|
196
|
+
reward_hive_balance?: number;
|
|
197
|
+
/** not yet claimed VESTS stored in vest reward balance */
|
|
198
|
+
reward_vesting_balance?: string;
|
|
199
|
+
/** the reward vesting balance, denominated in HIVE, is determined by the prevailing HIVE price at the time of reward reception */
|
|
200
|
+
reward_vesting_hive?: number;
|
|
201
|
+
/** rewards obtained by posting and commenting expressed in VEST */
|
|
202
|
+
posting_rewards?: string;
|
|
203
|
+
/** curator''s reward expressed in VEST */
|
|
204
|
+
curation_rewards?: string;
|
|
205
|
+
/** VESTS delegated to another user, account''s power is lowered by delegated VESTS */
|
|
206
|
+
delegated_vesting_shares?: string;
|
|
207
|
+
/** VESTS received from another user, account''s power is increased by received VESTS */
|
|
208
|
+
received_vesting_shares?: string;
|
|
209
|
+
/** recursive proxy of VESTS */
|
|
210
|
+
proxied_vsf_votes?: string[];
|
|
211
|
+
/** the total VESTS already withdrawn from active withdrawals */
|
|
212
|
+
withdrawn?: string;
|
|
213
|
+
/** received until the withdrawal is complete, with each installment amounting to 1/13 of the withdrawn total */
|
|
214
|
+
vesting_withdraw_rate?: string;
|
|
215
|
+
/** the remaining total VESTS needed to complete withdrawals */
|
|
216
|
+
to_withdraw?: string;
|
|
217
|
+
/** list of account receiving the part of a withdrawal */
|
|
218
|
+
withdraw_routes?: number;
|
|
219
|
+
/** blocked VESTS by a withdrawal */
|
|
220
|
+
delayed_vests?: string;
|
|
221
|
+
/** the roster of witnesses voted by the account */
|
|
222
|
+
witness_votes?: string[];
|
|
223
|
+
/** count of witness_votes */
|
|
224
|
+
witnesses_voted_for?: number;
|
|
225
|
+
/** the number of operations performed by the account */
|
|
226
|
+
ops_count?: number;
|
|
227
|
+
/** whether account is a witness */
|
|
228
|
+
is_witness?: boolean;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @maxItems 2
|
|
233
|
+
* @minItems 2
|
|
234
|
+
*/
|
|
235
|
+
export type HafbeTypesAuthWithWeight = (string | number)[];
|
|
236
|
+
|
|
237
|
+
export interface HafbeTypesAuthorityType {
|
|
238
|
+
key_auths?: HafbeTypesAuthWithWeight[];
|
|
239
|
+
account_auths?: HafbeTypesAuthWithWeight[];
|
|
240
|
+
weight_threshold?: number;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface HafbeTypesAccountAuthority {
|
|
244
|
+
/** the most powerful key because it can change any key of an account, including the owner key. Ideally it is meant to be stored offline, and only used to recover a compromised account */
|
|
245
|
+
owner?: HafbeTypesAuthorityType;
|
|
246
|
+
/** key meant for more sensitive tasks such as transferring funds, power up/down transactions, converting Hive Dollars, voting for witnesses, updating profile details and avatar, and placing a market order */
|
|
247
|
+
active?: HafbeTypesAuthorityType;
|
|
248
|
+
/** key allows accounts to post, comment, edit, vote, reblog and follow or mute other accounts */
|
|
249
|
+
posting?: HafbeTypesAuthorityType;
|
|
250
|
+
/** default key to be used for memo encryption */
|
|
251
|
+
memo?: string;
|
|
252
|
+
/** key used by a witness to sign blocks */
|
|
253
|
+
witness_signing?: string;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface HafbeTypesProxyPower {
|
|
257
|
+
account?: string;
|
|
258
|
+
/** @format date-time */
|
|
259
|
+
proxy_date?: string;
|
|
260
|
+
/** Own vesting shares plus sum of proxied vesting shares (levels 1–4) decreased by delayed vests */
|
|
261
|
+
proxied_vests?: string;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface HafbeTypesBlockRange {
|
|
265
|
+
from?: number;
|
|
266
|
+
to?: number;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface HafbeTypesBlockOperations {
|
|
270
|
+
/** operation type identifier */
|
|
271
|
+
op_type_id?: number;
|
|
272
|
+
/** amount of operations in block */
|
|
273
|
+
op_count?: number;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface HafbeTypesBlocksearch {
|
|
277
|
+
/** block number */
|
|
278
|
+
block_num?: number;
|
|
279
|
+
/**
|
|
280
|
+
* creation date
|
|
281
|
+
* @format date-time
|
|
282
|
+
*/
|
|
283
|
+
created_at?: string;
|
|
284
|
+
/** account name of block''s producer */
|
|
285
|
+
producer_account?: string;
|
|
286
|
+
/** operation type identifier */
|
|
287
|
+
producer_reward?: string;
|
|
288
|
+
/** count of transactions in block */
|
|
289
|
+
trx_count?: number;
|
|
290
|
+
/** block hash in a blockchain is a unique, fixed-length string generated by applying a cryptographic hash function to a block''s contents */
|
|
291
|
+
hash?: string;
|
|
292
|
+
/** hash of a previous block */
|
|
293
|
+
prev?: string;
|
|
294
|
+
/** List of block_operation */
|
|
295
|
+
operations?: HafbeTypesBlockOperations[];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface HafbeTypesBlockHistory {
|
|
299
|
+
/** Total number of blocks */
|
|
300
|
+
total_blocks?: number;
|
|
301
|
+
/** Total number of pages */
|
|
302
|
+
total_pages?: number;
|
|
303
|
+
/** Range of blocks that contains the returned pages */
|
|
304
|
+
block_range?: HafbeTypesBlockRange;
|
|
305
|
+
/** List of block results */
|
|
306
|
+
blocks_result?: HafbeTypesBlocksearch[];
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface HafbeTypesPermlink {
|
|
310
|
+
/** unique post identifier containing post''s title and generated number */
|
|
311
|
+
permlink?: string;
|
|
312
|
+
/** operation block number */
|
|
313
|
+
block?: number;
|
|
314
|
+
/** hash of the transaction */
|
|
315
|
+
trx_id?: string;
|
|
316
|
+
/**
|
|
317
|
+
* creation date
|
|
318
|
+
* @format date-time
|
|
319
|
+
*/
|
|
320
|
+
timestamp?: string;
|
|
321
|
+
/** unique operation identifier with an encoded block number and operation type id */
|
|
322
|
+
operation_id?: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface HafbeTypesPermlinkHistory {
|
|
326
|
+
/** Total number of permlinks */
|
|
327
|
+
total_permlinks?: number;
|
|
328
|
+
/** Total number of pages */
|
|
329
|
+
total_pages?: number;
|
|
330
|
+
/** Range of blocks that contains the returned pages */
|
|
331
|
+
block_range?: HafbeTypesBlockRange;
|
|
332
|
+
/** List of permlinks */
|
|
333
|
+
permlinks_result?: HafbeTypesPermlink[];
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export interface HafbeTypesLatestBlocks {
|
|
337
|
+
/** block number */
|
|
338
|
+
block_num?: number;
|
|
339
|
+
/** witness that created the block */
|
|
340
|
+
witness?: string;
|
|
341
|
+
/** List of block_operation */
|
|
342
|
+
operations?: HafbeTypesBlockOperations[];
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export type HafbeTypesArrayOfLatestBlocks = HafbeTypesLatestBlocks[];
|
|
346
|
+
|
|
347
|
+
export interface HafbeTypesInputTypeReturn {
|
|
348
|
+
/** operation type id */
|
|
349
|
+
input_type?: string;
|
|
350
|
+
/** number of operations in the block */
|
|
351
|
+
input_value?: string[];
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface HafbeTypesOperationBody {
|
|
355
|
+
type?: string;
|
|
356
|
+
value?: object;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export interface HafbeTypesOperation {
|
|
360
|
+
/** operation body */
|
|
361
|
+
op?: any;
|
|
362
|
+
/** operation block number */
|
|
363
|
+
block?: number;
|
|
364
|
+
/** hash of the transaction */
|
|
365
|
+
trx_id?: string;
|
|
366
|
+
/** operation identifier that indicates its sequence number in transaction */
|
|
367
|
+
op_pos?: number;
|
|
368
|
+
/** operation type identifier */
|
|
369
|
+
op_type_id?: number;
|
|
370
|
+
/**
|
|
371
|
+
* the time operation was included in the blockchain
|
|
372
|
+
* @format date-time
|
|
373
|
+
*/
|
|
374
|
+
timestamp?: string;
|
|
375
|
+
/** true if is a virtual operation */
|
|
376
|
+
virtual_op?: boolean;
|
|
377
|
+
/** unique operation identifier with an encoded block number and operation type id */
|
|
378
|
+
operation_id?: string;
|
|
379
|
+
/** transaction identifier that indicates its sequence number in block */
|
|
380
|
+
trx_in_block?: number;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export interface HafbeTypesOperationHistory {
|
|
384
|
+
/** Total number of operations */
|
|
385
|
+
total_operations?: number;
|
|
386
|
+
/** Total number of pages */
|
|
387
|
+
total_pages?: number;
|
|
388
|
+
/** List of operation results */
|
|
389
|
+
operations_result?: HafbeTypesOperation[];
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export enum HafbeTypesGranularity {
|
|
393
|
+
Daily = "daily",
|
|
394
|
+
Monthly = "monthly",
|
|
395
|
+
Yearly = "yearly",
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface HafbeTypesTransactionStats {
|
|
399
|
+
/**
|
|
400
|
+
* the time transaction was included in the blockchain
|
|
401
|
+
* @format date-time
|
|
402
|
+
*/
|
|
403
|
+
date?: string;
|
|
404
|
+
/** amount of transactions */
|
|
405
|
+
trx_count?: number;
|
|
406
|
+
/** avarage amount of transactions in block */
|
|
407
|
+
avg_trx?: number;
|
|
408
|
+
/** minimal amount of transactions in block */
|
|
409
|
+
min_trx?: number;
|
|
410
|
+
/** maximum amount of transactions in block */
|
|
411
|
+
max_trx?: number;
|
|
412
|
+
/** last block number in time range */
|
|
413
|
+
last_block_num?: number;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export type HafbeTypesArrayOfTransactionStats = HafbeTypesTransactionStats[];
|
|
417
|
+
|
|
418
|
+
export type HafbeTypesArrayOfProxyPower = HafbeTypesProxyPower[];
|
|
419
|
+
|
|
420
|
+
export interface HafbeEndpointsGetWitnessesParams {
|
|
421
|
+
/**
|
|
422
|
+
* Return page on `page` number, defaults to `1`
|
|
423
|
+
* @default 1
|
|
424
|
+
*/
|
|
425
|
+
page?: number;
|
|
426
|
+
/**
|
|
427
|
+
* Return max `page-size` operations per page, defaults to `100`
|
|
428
|
+
* @default 100
|
|
429
|
+
*/
|
|
430
|
+
"page-size"?: number;
|
|
431
|
+
/**
|
|
432
|
+
* Sort key:
|
|
433
|
+
*
|
|
434
|
+
* * `witness` - the witness name
|
|
435
|
+
*
|
|
436
|
+
* * `rank` - their current rank (highest weight of votes => lowest rank)
|
|
437
|
+
*
|
|
438
|
+
* * `url` - the witness url
|
|
439
|
+
*
|
|
440
|
+
* * `votes` - total number of votes
|
|
441
|
+
*
|
|
442
|
+
* * `votes_daily_change` - change in `votes` in the last 24 hours
|
|
443
|
+
*
|
|
444
|
+
* * `voters_num` - total number of voters approving the witness
|
|
445
|
+
*
|
|
446
|
+
* * `voters_num_daily_change` - change in `voters_num` in the last 24 hours
|
|
447
|
+
*
|
|
448
|
+
* * `price_feed` - their current published value for the HIVE/HBD price feed
|
|
449
|
+
*
|
|
450
|
+
* * `feed_updated_at` - feed update timestamp
|
|
451
|
+
*
|
|
452
|
+
* * `bias` - if HBD is trading at only 0.90 USD on exchanges, the witness might set:
|
|
453
|
+
* base: 0.250 HBD
|
|
454
|
+
* quote: 1.100 HIVE
|
|
455
|
+
* In this case, the bias is 10%%
|
|
456
|
+
*
|
|
457
|
+
* * `block_size` - the block size they are voting for
|
|
458
|
+
*
|
|
459
|
+
* * `signing_key` - the witness'' block-signing public key
|
|
460
|
+
*
|
|
461
|
+
* * `version` - the version of hived the witness is running
|
|
462
|
+
* @default "votes"
|
|
463
|
+
*/
|
|
464
|
+
sort?: HafbeTypesOrderByWitness;
|
|
465
|
+
/**
|
|
466
|
+
* Sort order:
|
|
467
|
+
*
|
|
468
|
+
* * `asc` - Ascending, from A to Z or smallest to largest
|
|
469
|
+
*
|
|
470
|
+
* * `desc` - Descending, from Z to A or largest to smallest
|
|
471
|
+
* @default "desc"
|
|
472
|
+
*/
|
|
473
|
+
direction?: HafbeTypesSortDirection;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export interface HafbeEndpointsGetWitnessVotersParams {
|
|
477
|
+
/**
|
|
478
|
+
* When provided, only votes associated with this account will be included in the results,
|
|
479
|
+
* allowing for targeted analysis of an individual account''s voting activity.
|
|
480
|
+
* @default null
|
|
481
|
+
*/
|
|
482
|
+
"voter-name"?: string;
|
|
483
|
+
/**
|
|
484
|
+
* Return page on `page` number, defaults to `1`
|
|
485
|
+
* @default 1
|
|
486
|
+
*/
|
|
487
|
+
page?: number;
|
|
488
|
+
/**
|
|
489
|
+
* Return max `page-size` operations per page, defaults to `100`
|
|
490
|
+
* @default 100
|
|
491
|
+
*/
|
|
492
|
+
"page-size"?: number;
|
|
493
|
+
/**
|
|
494
|
+
* Sort order:
|
|
495
|
+
*
|
|
496
|
+
* * `voter` - account name of voter
|
|
497
|
+
*
|
|
498
|
+
* * `vests` - total voting power = account_vests + proxied_vests of voter
|
|
499
|
+
*
|
|
500
|
+
* * `account_vests` - direct vests of voter
|
|
501
|
+
*
|
|
502
|
+
* * `proxied_vests` - proxied vests of voter
|
|
503
|
+
*
|
|
504
|
+
* * `timestamp` - last time voter voted for the witness
|
|
505
|
+
* @default "vests"
|
|
506
|
+
*/
|
|
507
|
+
sort?: HafbeTypesOrderByVotes;
|
|
508
|
+
/**
|
|
509
|
+
* Sort order:
|
|
510
|
+
*
|
|
511
|
+
* * `asc` - Ascending, from A to Z or smallest to largest
|
|
512
|
+
*
|
|
513
|
+
* * `desc` - Descending, from Z to A or largest to smallest
|
|
514
|
+
* @default "desc"
|
|
515
|
+
*/
|
|
516
|
+
direction?: HafbeTypesSortDirection;
|
|
517
|
+
/** witness account name */
|
|
518
|
+
accountName: string;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export interface HafbeEndpointsGetWitnessVotesHistoryParams {
|
|
522
|
+
/**
|
|
523
|
+
* When provided, only votes associated with this account will be included in the results,
|
|
524
|
+
* allowing for targeted analysis of an individual account''s voting activity.
|
|
525
|
+
* @default null
|
|
526
|
+
*/
|
|
527
|
+
"voter-name"?: string;
|
|
528
|
+
/**
|
|
529
|
+
* Return page on `page` number, defaults to `1`
|
|
530
|
+
* @default 1
|
|
531
|
+
*/
|
|
532
|
+
page?: number;
|
|
533
|
+
/**
|
|
534
|
+
* Return max `page-size` operations per page, defaults to `100`
|
|
535
|
+
* @default 100
|
|
536
|
+
*/
|
|
537
|
+
"page-size"?: number;
|
|
538
|
+
/** @default "desc" */
|
|
539
|
+
direction?: HafbeTypesSortDirection;
|
|
540
|
+
/**
|
|
541
|
+
* Lower limit of the block range, can be represented either by a block-number (integer) or a timestamp (in the format YYYY-MM-DD HH:MI:SS).
|
|
542
|
+
*
|
|
543
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
544
|
+
* where the block''s `created_at` is more than or equal to the given `timestamp` (i.e. `block''s created_at >= timestamp`).
|
|
545
|
+
*
|
|
546
|
+
* The function will interpret and convert the input based on its format, example input:
|
|
547
|
+
*
|
|
548
|
+
* * `2016-09-15 19:47:21`
|
|
549
|
+
*
|
|
550
|
+
* * `5000000`
|
|
551
|
+
* @default null
|
|
552
|
+
*/
|
|
553
|
+
"from-block"?: string;
|
|
554
|
+
/**
|
|
555
|
+
* Similar to the from-block parameter, can either be a block-number (integer) or a timestamp (formatted as YYYY-MM-DD HH:MI:SS).
|
|
556
|
+
*
|
|
557
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
558
|
+
* where the block''s `created_at` is less than or equal to the given `timestamp` (i.e. `block''s created_at <= timestamp`).
|
|
559
|
+
*
|
|
560
|
+
* The function will convert the value depending on its format, example input:
|
|
561
|
+
*
|
|
562
|
+
* * `2016-09-15 19:47:21`
|
|
563
|
+
*
|
|
564
|
+
* * `5000000`
|
|
565
|
+
* @default null
|
|
566
|
+
*/
|
|
567
|
+
"to-block"?: string;
|
|
568
|
+
/** witness account name */
|
|
569
|
+
accountName: string;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export interface HafbeEndpointsGetAccountProxiesPowerParams {
|
|
573
|
+
/**
|
|
574
|
+
* 1-based page number (100 rows per page)
|
|
575
|
+
* @min 1
|
|
576
|
+
* @default 1
|
|
577
|
+
*/
|
|
578
|
+
page?: number;
|
|
579
|
+
/** Name of the proxy account */
|
|
580
|
+
accountName: string;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export interface HafbeEndpointsGetCommentPermlinksParams {
|
|
584
|
+
/**
|
|
585
|
+
* Sort order:
|
|
586
|
+
*
|
|
587
|
+
* * `post` - permlinks related to root posts
|
|
588
|
+
*
|
|
589
|
+
* * `comment` - permlinks related to comments
|
|
590
|
+
*
|
|
591
|
+
* * `all` - both, posts and comments
|
|
592
|
+
* @default "all"
|
|
593
|
+
*/
|
|
594
|
+
"comment-type"?: HafbeTypesCommentType;
|
|
595
|
+
/**
|
|
596
|
+
* Return page on `page` number, defaults to `1`
|
|
597
|
+
* @default 1
|
|
598
|
+
*/
|
|
599
|
+
page?: number;
|
|
600
|
+
/**
|
|
601
|
+
* Return max `page-size` operations per page, defaults to `100`
|
|
602
|
+
* @default 100
|
|
603
|
+
*/
|
|
604
|
+
"page-size"?: number;
|
|
605
|
+
/**
|
|
606
|
+
* Lower limit of the block range, can be represented either by a block-number (integer) or a timestamp (in the format YYYY-MM-DD HH:MI:SS).
|
|
607
|
+
*
|
|
608
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
609
|
+
* where the block''s `created_at` is more than or equal to the given `timestamp` (i.e. `block''s created_at >= timestamp`).
|
|
610
|
+
*
|
|
611
|
+
* The function will interpret and convert the input based on its format, example input:
|
|
612
|
+
*
|
|
613
|
+
* * `2016-09-15 19:47:21`
|
|
614
|
+
*
|
|
615
|
+
* * `5000000`
|
|
616
|
+
* @default null
|
|
617
|
+
*/
|
|
618
|
+
"from-block"?: string;
|
|
619
|
+
/**
|
|
620
|
+
* Similar to the from-block parameter, can either be a block-number (integer) or a timestamp (formatted as YYYY-MM-DD HH:MI:SS).
|
|
621
|
+
*
|
|
622
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
623
|
+
* where the block''s `created_at` is less than or equal to the given `timestamp` (i.e. `block''s created_at <= timestamp`).
|
|
624
|
+
*
|
|
625
|
+
* The function will convert the value depending on its format, example input:
|
|
626
|
+
*
|
|
627
|
+
* * `2016-09-15 19:47:21`
|
|
628
|
+
*
|
|
629
|
+
* * `5000000`
|
|
630
|
+
* @default null
|
|
631
|
+
*/
|
|
632
|
+
"to-block"?: string;
|
|
633
|
+
/** Account to get operations for */
|
|
634
|
+
accountName: string;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export interface HafbeEndpointsGetCommentOperationsParams {
|
|
638
|
+
/**
|
|
639
|
+
* List of operation types to include. If NULL, all comment operation types will be included.
|
|
640
|
+
* comment-related operation type ids: `0, 1, 17, 19, 51, 52, 53, 61, 63, 72, 73`
|
|
641
|
+
* @default null
|
|
642
|
+
*/
|
|
643
|
+
"operation-types"?: string;
|
|
644
|
+
/**
|
|
645
|
+
* Return page on `page` number, defaults to `1`
|
|
646
|
+
* @default 1
|
|
647
|
+
*/
|
|
648
|
+
page?: number;
|
|
649
|
+
/**
|
|
650
|
+
* Return max `page-size` operations per page, defaults to `100`
|
|
651
|
+
* @default 100
|
|
652
|
+
*/
|
|
653
|
+
"page-size"?: number;
|
|
654
|
+
/**
|
|
655
|
+
* Sort order:
|
|
656
|
+
*
|
|
657
|
+
* * `asc` - Ascending, from A to Z or smallest to largest
|
|
658
|
+
*
|
|
659
|
+
* * `desc` - Descending, from Z to A or largest to smallest
|
|
660
|
+
* @default "asc"
|
|
661
|
+
*/
|
|
662
|
+
direction?: HafbeTypesSortDirection;
|
|
663
|
+
/**
|
|
664
|
+
* If the operation length exceeds the `data-size-limit`,
|
|
665
|
+
* the operation body is replaced with a placeholder (defaults to `200000`).
|
|
666
|
+
* @default 200000
|
|
667
|
+
*/
|
|
668
|
+
"data-size-limit"?: number;
|
|
669
|
+
/** Account to get operations for */
|
|
670
|
+
accountName: string;
|
|
671
|
+
/** Unique post identifier containing post''s title and generated number */
|
|
672
|
+
permlink: string;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
export interface HafbeEndpointsGetBlockByOpParams {
|
|
676
|
+
/**
|
|
677
|
+
* List of operations: if the parameter is NULL, all operations will be included.
|
|
678
|
+
* example: `18,12`
|
|
679
|
+
* @default null
|
|
680
|
+
*/
|
|
681
|
+
"operation-types"?: string;
|
|
682
|
+
/**
|
|
683
|
+
* Filter operations by the account that created them.
|
|
684
|
+
* @default null
|
|
685
|
+
*/
|
|
686
|
+
"account-name"?: string;
|
|
687
|
+
/**
|
|
688
|
+
* Return page on `page` number, defaults to `NULL`
|
|
689
|
+
* @default null
|
|
690
|
+
*/
|
|
691
|
+
page?: number;
|
|
692
|
+
/**
|
|
693
|
+
* Return max `page-size` operations per page, defaults to `100`
|
|
694
|
+
* @default 100
|
|
695
|
+
*/
|
|
696
|
+
"page-size"?: number;
|
|
697
|
+
/**
|
|
698
|
+
* Sort order:
|
|
699
|
+
*
|
|
700
|
+
* * `asc` - Ascending, from A to Z or smallest to largest
|
|
701
|
+
*
|
|
702
|
+
* * `desc` - Descending, from Z to A or largest to smallest
|
|
703
|
+
* @default "desc"
|
|
704
|
+
*/
|
|
705
|
+
direction?: HafbeTypesSortDirection;
|
|
706
|
+
/**
|
|
707
|
+
* Lower limit of the block range, can be represented either by a block-number (integer) or a timestamp (in the format YYYY-MM-DD HH:MI:SS).
|
|
708
|
+
*
|
|
709
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
710
|
+
* where the block''s `created_at` is more than or equal to the given `timestamp` (i.e. `block''s created_at >= timestamp`).
|
|
711
|
+
*
|
|
712
|
+
* The function will interpret and convert the input based on its format, example input:
|
|
713
|
+
*
|
|
714
|
+
* * `2016-09-15 19:47:21`
|
|
715
|
+
*
|
|
716
|
+
* * `5000000`
|
|
717
|
+
* @default null
|
|
718
|
+
*/
|
|
719
|
+
"from-block"?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Similar to the from-block parameter, can either be a block-number (integer) or a timestamp (formatted as YYYY-MM-DD HH:MI:SS).
|
|
722
|
+
*
|
|
723
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
724
|
+
* where the block''s `created_at` is less than or equal to the given `timestamp` (i.e. `block''s created_at <= timestamp`).
|
|
725
|
+
*
|
|
726
|
+
* The function will convert the value depending on its format, example input:
|
|
727
|
+
*
|
|
728
|
+
* * `2016-09-15 19:47:21`
|
|
729
|
+
*
|
|
730
|
+
* * `5000000`
|
|
731
|
+
* @default null
|
|
732
|
+
*/
|
|
733
|
+
"to-block"?: string;
|
|
734
|
+
/**
|
|
735
|
+
* A parameter specifying the desired value in operation body,
|
|
736
|
+
* example: `value.creator=alpha`
|
|
737
|
+
* @default null
|
|
738
|
+
*/
|
|
739
|
+
"path-filter"?: string[];
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export interface HafbeEndpointsGetTransactionStatisticsParams {
|
|
743
|
+
/**
|
|
744
|
+
* granularity types:
|
|
745
|
+
*
|
|
746
|
+
* * daily
|
|
747
|
+
*
|
|
748
|
+
* * monthly
|
|
749
|
+
*
|
|
750
|
+
* * yearly
|
|
751
|
+
* @default "yearly"
|
|
752
|
+
*/
|
|
753
|
+
granularity?: HafbeTypesGranularity;
|
|
754
|
+
/**
|
|
755
|
+
* Sort order:
|
|
756
|
+
*
|
|
757
|
+
* * `asc` - Ascending, from oldest to newest
|
|
758
|
+
*
|
|
759
|
+
* * `desc` - Descending, from newest to oldest
|
|
760
|
+
* @default "desc"
|
|
761
|
+
*/
|
|
762
|
+
direction?: HafbeTypesSortDirection;
|
|
763
|
+
/**
|
|
764
|
+
* Lower limit of the block range, can be represented either by a block-number (integer) or a timestamp (in the format YYYY-MM-DD HH:MI:SS).
|
|
765
|
+
*
|
|
766
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
767
|
+
* where the block''s `created_at` is more than or equal to the given `timestamp` (i.e. `block''s created_at >= timestamp`).
|
|
768
|
+
*
|
|
769
|
+
* The function will interpret and convert the input based on its format, example input:
|
|
770
|
+
*
|
|
771
|
+
* * `2016-09-15 19:47:21`
|
|
772
|
+
*
|
|
773
|
+
* * `5000000`
|
|
774
|
+
* @default null
|
|
775
|
+
*/
|
|
776
|
+
"from-block"?: string;
|
|
777
|
+
/**
|
|
778
|
+
* Similar to the from-block parameter, can either be a block-number (integer) or a timestamp (formatted as YYYY-MM-DD HH:MI:SS).
|
|
779
|
+
*
|
|
780
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
781
|
+
* where the block''s `created_at` is less than or equal to the given `timestamp` (i.e. `block''s created_at <= timestamp`).
|
|
782
|
+
*
|
|
783
|
+
* The function will convert the value depending on its format, example input:
|
|
784
|
+
*
|
|
785
|
+
* * `2016-09-15 19:47:21`
|
|
786
|
+
*
|
|
787
|
+
* * `5000000`
|
|
788
|
+
* @default null
|
|
789
|
+
*/
|
|
790
|
+
"to-block"?: string;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
export interface HafbeEndpointsGetLatestBlocksParams {
|
|
794
|
+
/**
|
|
795
|
+
* Given block, can be represented either by a `block-num` (integer) or a `timestamp` (in the format `YYYY-MM-DD HH:MI:SS`),
|
|
796
|
+
*
|
|
797
|
+
* The provided `timestamp` will be converted to a `block-num` by finding the first block
|
|
798
|
+
* where the block''s `created_at` is less than or equal to the given `timestamp` (i.e. `block''s created_at <= timestamp`).
|
|
799
|
+
*
|
|
800
|
+
* The function will interpret and convert the input based on its format, example input:
|
|
801
|
+
*
|
|
802
|
+
* * `2016-09-15 19:47:21`
|
|
803
|
+
*
|
|
804
|
+
* * `5000000`
|
|
805
|
+
* @default null
|
|
806
|
+
*/
|
|
807
|
+
"block-num"?: string;
|
|
808
|
+
/**
|
|
809
|
+
* Specifies number of blocks to return starting with head block, defaults to `20`
|
|
810
|
+
* @default 20
|
|
811
|
+
*/
|
|
812
|
+
"result-limit"?: number;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
type TWaxRestAPiExtended = {
|
|
816
|
+
hafbeApi: {
|
|
817
|
+
witnesses: {
|
|
818
|
+
result: HafbeTypesWitnessesReturn,
|
|
819
|
+
params: HafbeEndpointsGetWitnessesParams & {
|
|
820
|
+
},
|
|
821
|
+
accountName: {
|
|
822
|
+
result: HafbeTypesWitness,
|
|
823
|
+
params: TEmptyReq & {
|
|
824
|
+
/** witness account name */
|
|
825
|
+
accountName: string;
|
|
826
|
+
},
|
|
827
|
+
voters: {
|
|
828
|
+
result: HafbeTypesWitnessVoterHistory,
|
|
829
|
+
params: HafbeEndpointsGetWitnessVotersParams & {
|
|
830
|
+
/** witness account name */
|
|
831
|
+
accountName: string;
|
|
832
|
+
},
|
|
833
|
+
count: {
|
|
834
|
+
result: number,
|
|
835
|
+
params: TEmptyReq & {
|
|
836
|
+
/** The witness account name */
|
|
837
|
+
accountName: string;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
votes: {
|
|
842
|
+
history: {
|
|
843
|
+
result: HafbeTypesWitnessVotesHistory,
|
|
844
|
+
params: HafbeEndpointsGetWitnessVotesHistoryParams & {
|
|
845
|
+
/** witness account name */
|
|
846
|
+
accountName: string;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
accounts: {
|
|
853
|
+
accountName: {
|
|
854
|
+
result: HafbeTypesAccount,
|
|
855
|
+
params: TEmptyReq & {
|
|
856
|
+
/** Name of the account */
|
|
857
|
+
accountName: string;
|
|
858
|
+
},
|
|
859
|
+
authority: {
|
|
860
|
+
result: HafbeTypesAccountAuthority,
|
|
861
|
+
params: TEmptyReq & {
|
|
862
|
+
/** Name of the account */
|
|
863
|
+
accountName: string;
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
proxyPower: {
|
|
867
|
+
result: HafbeTypesArrayOfProxyPower,
|
|
868
|
+
params: HafbeEndpointsGetAccountProxiesPowerParams & {
|
|
869
|
+
/** Name of the proxy account */
|
|
870
|
+
accountName: string;
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
commentPermlinks: {
|
|
874
|
+
result: HafbeTypesPermlinkHistory,
|
|
875
|
+
params: HafbeEndpointsGetCommentPermlinksParams & {
|
|
876
|
+
/** Account to get operations for */
|
|
877
|
+
accountName: string;
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
operations: {
|
|
881
|
+
comments: {
|
|
882
|
+
permlink: {
|
|
883
|
+
result: HafbeTypesOperationHistory,
|
|
884
|
+
params: HafbeEndpointsGetCommentOperationsParams & {
|
|
885
|
+
/** Account to get operations for */
|
|
886
|
+
accountName: string;
|
|
887
|
+
|
|
888
|
+
/** Unique post identifier containing post''s title and generated number
|
|
889
|
+
*/
|
|
890
|
+
permlink: string;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
blockSearch: {
|
|
898
|
+
result: HafbeTypesBlockHistory,
|
|
899
|
+
params: HafbeEndpointsGetBlockByOpParams & {
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
transactionStatistics: {
|
|
903
|
+
result: HafbeTypesArrayOfTransactionStats,
|
|
904
|
+
params: HafbeEndpointsGetTransactionStatisticsParams & {
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
version: {
|
|
908
|
+
result: string,
|
|
909
|
+
params: undefined
|
|
910
|
+
},
|
|
911
|
+
lastSyncedBlock: {
|
|
912
|
+
result: number,
|
|
913
|
+
params: undefined
|
|
914
|
+
},
|
|
915
|
+
inputType: {
|
|
916
|
+
inputValue: {
|
|
917
|
+
result: HafbeTypesInputTypeReturn,
|
|
918
|
+
params: TEmptyReq & {
|
|
919
|
+
/** Object type to be identified. */
|
|
920
|
+
inputValue: string;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
operationTypeCounts: {
|
|
925
|
+
result: HafbeTypesArrayOfLatestBlocks,
|
|
926
|
+
params: HafbeEndpointsGetLatestBlocksParams & {
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
declare var WaxExtendedData: TWaxRestAPiExtended
|
|
932
|
+
export default WaxExtendedData
|
package/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
hafbeApi: {
|
|
3
|
+
witnesses: {
|
|
4
|
+
urlPath: "witnesses",
|
|
5
|
+
method: "GET",
|
|
6
|
+
accountName: {
|
|
7
|
+
urlPath: "{accountName}",
|
|
8
|
+
method: "GET",
|
|
9
|
+
voters: {
|
|
10
|
+
urlPath: "voters",
|
|
11
|
+
method: "GET",
|
|
12
|
+
count: {
|
|
13
|
+
urlPath: "count",
|
|
14
|
+
method: "GET"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
votes: {
|
|
18
|
+
urlPath: "votes",
|
|
19
|
+
history: {
|
|
20
|
+
urlPath: "history",
|
|
21
|
+
method: "GET"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
accounts: {
|
|
27
|
+
urlPath: "accounts",
|
|
28
|
+
accountName: {
|
|
29
|
+
urlPath: "{accountName}",
|
|
30
|
+
method: "GET",
|
|
31
|
+
authority: {
|
|
32
|
+
urlPath: "authority",
|
|
33
|
+
method: "GET"
|
|
34
|
+
},
|
|
35
|
+
proxyPower: {
|
|
36
|
+
urlPath: "proxy-power",
|
|
37
|
+
method: "GET"
|
|
38
|
+
},
|
|
39
|
+
commentPermlinks: {
|
|
40
|
+
urlPath: "comment-permlinks",
|
|
41
|
+
method: "GET"
|
|
42
|
+
},
|
|
43
|
+
operations: {
|
|
44
|
+
urlPath: "operations",
|
|
45
|
+
comments: {
|
|
46
|
+
urlPath: "comments",
|
|
47
|
+
permlink: {
|
|
48
|
+
urlPath: "{permlink}",
|
|
49
|
+
method: "GET"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
blockSearch: {
|
|
56
|
+
urlPath: "block-search",
|
|
57
|
+
method: "GET"
|
|
58
|
+
},
|
|
59
|
+
transactionStatistics: {
|
|
60
|
+
urlPath: "transaction-statistics",
|
|
61
|
+
method: "GET"
|
|
62
|
+
},
|
|
63
|
+
version: {
|
|
64
|
+
urlPath: "version",
|
|
65
|
+
method: "GET"
|
|
66
|
+
},
|
|
67
|
+
lastSyncedBlock: {
|
|
68
|
+
urlPath: "last-synced-block",
|
|
69
|
+
method: "GET"
|
|
70
|
+
},
|
|
71
|
+
inputType: {
|
|
72
|
+
urlPath: "inputType",
|
|
73
|
+
inputValue: {
|
|
74
|
+
urlPath: "{inputValue}",
|
|
75
|
+
method: "GET"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
operationTypeCounts: {
|
|
79
|
+
urlPath: "operation-type-counts",
|
|
80
|
+
method: "GET"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
urlPath: "hafbe-api"
|
|
84
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hiveio/wax-api-hafbe",
|
|
3
|
+
"version": "1.27.12",
|
|
4
|
+
"description": "Wax REST API definitions for hafbe-api",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"private": false,
|
|
8
|
+
"type": "module",
|
|
9
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"default": {
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"default": "./index.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"index.js",
|
|
23
|
+
"index.d.ts"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"registry": "https://registry.npmjs.org/",
|
|
27
|
+
"tag": "latest"
|
|
28
|
+
}
|
|
29
|
+
}
|