hive-stream 3.0.3 → 3.0.5
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/DOCUMENTATION.md +693 -1
- package/README.md +251 -1
- package/dist/adapters/mongodb.adapter.js +21 -30
- package/dist/adapters/mongodb.adapter.js.map +1 -1
- package/dist/adapters/postgresql.adapter.js +16 -16
- package/dist/adapters/postgresql.adapter.js.map +1 -1
- package/dist/adapters/sqlite.adapter.js +17 -17
- package/dist/adapters/sqlite.adapter.js.map +1 -1
- package/dist/api.js +2 -0
- package/dist/api.js.map +1 -1
- package/dist/builders.d.ts +444 -0
- package/dist/builders.js +1609 -0
- package/dist/builders.js.map +1 -0
- package/dist/config.d.ts +10 -1
- package/dist/config.js +90 -4
- package/dist/config.js.map +1 -1
- package/dist/contracts/coinflip.contract.js +18 -21
- package/dist/contracts/coinflip.contract.js.map +1 -1
- package/dist/contracts/dice.contract.js +18 -21
- package/dist/contracts/dice.contract.js.map +1 -1
- package/dist/contracts/helpers.d.ts +2 -0
- package/dist/contracts/helpers.js +18 -11
- package/dist/contracts/helpers.js.map +1 -1
- package/dist/contracts/nft.contract.js +5 -10
- package/dist/contracts/nft.contract.js.map +1 -1
- package/dist/contracts/rps.contract.js +35 -23
- package/dist/contracts/rps.contract.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.ts +13 -0
- package/dist/metadata.js +256 -0
- package/dist/metadata.js.map +1 -1
- package/dist/streamer.d.ts +148 -12
- package/dist/streamer.js +1102 -53
- package/dist/streamer.js.map +1 -1
- package/dist/types/hive-stream.d.ts +623 -0
- package/dist/utils.d.ts +475 -0
- package/dist/utils.js +1618 -8
- package/dist/utils.js.map +1 -1
- package/package.json +4 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ZodSchema } from 'zod';
|
|
2
|
+
import type BigNumber from 'bignumber.js';
|
|
2
3
|
import type { Streamer } from '../streamer';
|
|
3
4
|
import type { AdapterBase } from '../adapters/base.adapter';
|
|
4
5
|
import type { ConfigInterface } from '../config';
|
|
@@ -104,3 +105,625 @@ export interface CustomJsonMetadata extends OperationMetadata {
|
|
|
104
105
|
sender: string;
|
|
105
106
|
isSignedWithActiveKey: boolean;
|
|
106
107
|
}
|
|
108
|
+
export interface ParsedAssetAmount {
|
|
109
|
+
rawAmount: string;
|
|
110
|
+
amount: string;
|
|
111
|
+
asset: string;
|
|
112
|
+
value: BigNumber;
|
|
113
|
+
}
|
|
114
|
+
export interface TransferEvent {
|
|
115
|
+
op: any;
|
|
116
|
+
transfer: {
|
|
117
|
+
from: string;
|
|
118
|
+
to: string;
|
|
119
|
+
rawAmount: string;
|
|
120
|
+
amount: string;
|
|
121
|
+
asset: string;
|
|
122
|
+
memo?: string;
|
|
123
|
+
};
|
|
124
|
+
block: {
|
|
125
|
+
number: number;
|
|
126
|
+
id: string;
|
|
127
|
+
previousId: string;
|
|
128
|
+
time: Date;
|
|
129
|
+
};
|
|
130
|
+
transaction: {
|
|
131
|
+
id: string;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export interface FlowDedupeStore {
|
|
135
|
+
has(key: string): boolean | Promise<boolean>;
|
|
136
|
+
add(key: string): void | Promise<void>;
|
|
137
|
+
}
|
|
138
|
+
export type FlowMemoInput = string | ((event: TransferEvent) => string);
|
|
139
|
+
export type FlowRouteMode = 'base' | 'onTop';
|
|
140
|
+
export type FlowGroupSplitStrategy = 'equal' | 'weighted';
|
|
141
|
+
export type FlowAllocationInput = string | number | {
|
|
142
|
+
percentage?: string | number;
|
|
143
|
+
percent?: string | number;
|
|
144
|
+
basisPoints?: number;
|
|
145
|
+
};
|
|
146
|
+
export interface AutoBurnIncomingTransfersOptions {
|
|
147
|
+
account?: string;
|
|
148
|
+
percentage?: string | number;
|
|
149
|
+
percent?: string | number;
|
|
150
|
+
basisPoints?: number;
|
|
151
|
+
memo?: string | ((event: TransferEvent) => string);
|
|
152
|
+
allowedSymbols?: string[];
|
|
153
|
+
dedupeStore?: FlowDedupeStore;
|
|
154
|
+
onBurned?: (result: any, event: TransferEvent) => void | Promise<void>;
|
|
155
|
+
onError?: (error: unknown, event: TransferEvent) => void | Promise<void>;
|
|
156
|
+
ignoreZeroAmount?: boolean;
|
|
157
|
+
}
|
|
158
|
+
export interface FlowRouteBase {
|
|
159
|
+
percentage?: string | number;
|
|
160
|
+
percent?: string | number;
|
|
161
|
+
basisPoints?: number;
|
|
162
|
+
memo?: string | ((event: TransferEvent) => string);
|
|
163
|
+
mode?: FlowRouteMode;
|
|
164
|
+
}
|
|
165
|
+
export interface FlowBurnRoute extends FlowRouteBase {
|
|
166
|
+
type: 'burn';
|
|
167
|
+
}
|
|
168
|
+
export interface FlowGroupRecipient {
|
|
169
|
+
account: string | ((event: TransferEvent) => string);
|
|
170
|
+
weight?: string | number;
|
|
171
|
+
}
|
|
172
|
+
export interface FlowTransferRoute extends FlowRouteBase {
|
|
173
|
+
type?: 'transfer';
|
|
174
|
+
to: string | ((event: TransferEvent) => string);
|
|
175
|
+
}
|
|
176
|
+
export interface FlowTransferGroupRoute extends FlowRouteBase {
|
|
177
|
+
type?: 'transfer';
|
|
178
|
+
group: FlowGroupRecipient[];
|
|
179
|
+
split?: FlowGroupSplitStrategy;
|
|
180
|
+
}
|
|
181
|
+
export type FlowRoute = FlowBurnRoute | FlowTransferRoute | FlowTransferGroupRoute;
|
|
182
|
+
export interface PlannedFlowRoute {
|
|
183
|
+
type: 'burn' | 'transfer';
|
|
184
|
+
mode: FlowRouteMode;
|
|
185
|
+
amount: string;
|
|
186
|
+
asset: string;
|
|
187
|
+
memo: string;
|
|
188
|
+
to?: string;
|
|
189
|
+
routeIndex: number;
|
|
190
|
+
groupIndex?: number;
|
|
191
|
+
}
|
|
192
|
+
export interface PlannedIncomingTransferRoutes {
|
|
193
|
+
incomingAmount: string;
|
|
194
|
+
asset: string;
|
|
195
|
+
baseAmount: string;
|
|
196
|
+
onTopAmount: string;
|
|
197
|
+
routes: PlannedFlowRoute[];
|
|
198
|
+
}
|
|
199
|
+
export interface AutoRouteIncomingTransfersOptions {
|
|
200
|
+
account?: string;
|
|
201
|
+
routes: FlowRoute[];
|
|
202
|
+
memo?: string | ((event: TransferEvent, route: FlowRoute, index: number) => string);
|
|
203
|
+
allowedSymbols?: string[];
|
|
204
|
+
dedupeStore?: FlowDedupeStore;
|
|
205
|
+
onRouted?: (results: any[], event: TransferEvent, plan: PlannedFlowRoute[]) => void | Promise<void>;
|
|
206
|
+
onError?: (error: unknown, event: TransferEvent) => void | Promise<void>;
|
|
207
|
+
ignoreZeroAmount?: boolean;
|
|
208
|
+
}
|
|
209
|
+
export interface AutoForwardIncomingTransfersOptions {
|
|
210
|
+
account?: string;
|
|
211
|
+
to: string;
|
|
212
|
+
percentage?: string | number;
|
|
213
|
+
percent?: string | number;
|
|
214
|
+
basisPoints?: number;
|
|
215
|
+
memo?: string | ((event: TransferEvent) => string);
|
|
216
|
+
allowedSymbols?: string[];
|
|
217
|
+
dedupeStore?: FlowDedupeStore;
|
|
218
|
+
onForwarded?: (result: any, event: TransferEvent) => void | Promise<void>;
|
|
219
|
+
onError?: (error: unknown, event: TransferEvent) => void | Promise<void>;
|
|
220
|
+
ignoreZeroAmount?: boolean;
|
|
221
|
+
}
|
|
222
|
+
export interface AutoRefundIncomingTransfersOptions {
|
|
223
|
+
account?: string;
|
|
224
|
+
percentage?: string | number;
|
|
225
|
+
percent?: string | number;
|
|
226
|
+
basisPoints?: number;
|
|
227
|
+
memo?: string | ((event: TransferEvent) => string);
|
|
228
|
+
allowedSymbols?: string[];
|
|
229
|
+
dedupeStore?: FlowDedupeStore;
|
|
230
|
+
onRefunded?: (result: any, event: TransferEvent) => void | Promise<void>;
|
|
231
|
+
onError?: (error: unknown, event: TransferEvent) => void | Promise<void>;
|
|
232
|
+
ignoreZeroAmount?: boolean;
|
|
233
|
+
}
|
|
234
|
+
export interface AutoSplitIncomingTransfersOptions {
|
|
235
|
+
account?: string;
|
|
236
|
+
recipients: Array<{
|
|
237
|
+
account: string | ((event: TransferEvent) => string);
|
|
238
|
+
percentage?: string | number;
|
|
239
|
+
percent?: string | number;
|
|
240
|
+
basisPoints?: number;
|
|
241
|
+
memo?: string | ((event: TransferEvent) => string);
|
|
242
|
+
}>;
|
|
243
|
+
memo?: string | ((event: TransferEvent, recipient: {
|
|
244
|
+
account: string | ((event: TransferEvent) => string);
|
|
245
|
+
}, index: number) => string);
|
|
246
|
+
allowedSymbols?: string[];
|
|
247
|
+
dedupeStore?: FlowDedupeStore;
|
|
248
|
+
onSplit?: (results: any[], event: TransferEvent, plan: PlannedFlowRoute[]) => void | Promise<void>;
|
|
249
|
+
onError?: (error: unknown, event: TransferEvent) => void | Promise<void>;
|
|
250
|
+
ignoreZeroAmount?: boolean;
|
|
251
|
+
}
|
|
252
|
+
export interface FlowSubscriptionHandle {
|
|
253
|
+
account: string;
|
|
254
|
+
stop(): void;
|
|
255
|
+
}
|
|
256
|
+
export interface IncomingTransferFlowBuilder {
|
|
257
|
+
forAccount(account: string): this;
|
|
258
|
+
allowSymbols(...symbols: string[]): this;
|
|
259
|
+
memo(memo: FlowMemoInput): this;
|
|
260
|
+
dedupeWith(store: FlowDedupeStore): this;
|
|
261
|
+
ignoreZeroAmount(ignore?: boolean): this;
|
|
262
|
+
onError(handler: (error: unknown, event: TransferEvent) => void | Promise<void>): this;
|
|
263
|
+
burn(allocation: FlowAllocationInput, memo?: FlowMemoInput): this;
|
|
264
|
+
burnOnTop(allocation: FlowAllocationInput, memo?: FlowMemoInput): this;
|
|
265
|
+
forwardTo(to: string, allocation?: FlowAllocationInput, memo?: FlowMemoInput): this;
|
|
266
|
+
forwardOnTop(to: string, allocation: FlowAllocationInput, memo?: FlowMemoInput): this;
|
|
267
|
+
donateOnTop(to: string, allocation: FlowAllocationInput, memo?: FlowMemoInput): this;
|
|
268
|
+
forwardGroup(recipients: FlowGroupRecipient[], allocation: FlowAllocationInput, options?: {
|
|
269
|
+
memo?: FlowMemoInput;
|
|
270
|
+
split?: FlowGroupSplitStrategy;
|
|
271
|
+
}): this;
|
|
272
|
+
forwardGroupOnTop(recipients: FlowGroupRecipient[], allocation: FlowAllocationInput, options?: {
|
|
273
|
+
memo?: FlowMemoInput;
|
|
274
|
+
split?: FlowGroupSplitStrategy;
|
|
275
|
+
}): this;
|
|
276
|
+
remainderTo(to: string, memo?: FlowMemoInput): this;
|
|
277
|
+
remainderToGroup(recipients: FlowGroupRecipient[], options?: {
|
|
278
|
+
memo?: FlowMemoInput;
|
|
279
|
+
split?: FlowGroupSplitStrategy;
|
|
280
|
+
}): this;
|
|
281
|
+
refund(memo?: FlowMemoInput): this;
|
|
282
|
+
refundPortion(allocation: FlowAllocationInput, memo?: FlowMemoInput): this;
|
|
283
|
+
remainderToSender(memo?: FlowMemoInput): this;
|
|
284
|
+
plan(transfer: string | TransferEvent | {
|
|
285
|
+
amount?: string;
|
|
286
|
+
from?: string;
|
|
287
|
+
to?: string;
|
|
288
|
+
memo?: string;
|
|
289
|
+
}): PlannedIncomingTransferRoutes;
|
|
290
|
+
start(): FlowSubscriptionHandle;
|
|
291
|
+
}
|
|
292
|
+
export interface TransferOperationBuilder {
|
|
293
|
+
from(account: string): this;
|
|
294
|
+
to(account: string): this;
|
|
295
|
+
amount(amount: string | number, symbol?: string): this;
|
|
296
|
+
hive(amount: string | number): this;
|
|
297
|
+
hbd(amount: string | number): this;
|
|
298
|
+
memo(memo: string): this;
|
|
299
|
+
send(): any;
|
|
300
|
+
}
|
|
301
|
+
export interface BurnOperationBuilder {
|
|
302
|
+
from(account: string): this;
|
|
303
|
+
amount(amount: string | number, symbol?: string): this;
|
|
304
|
+
hive(amount: string | number): this;
|
|
305
|
+
hbd(amount: string | number): this;
|
|
306
|
+
memo(memo: string): this;
|
|
307
|
+
send(): any;
|
|
308
|
+
}
|
|
309
|
+
export interface EscrowTransferBuilder {
|
|
310
|
+
from(account: string): this;
|
|
311
|
+
to(account: string): this;
|
|
312
|
+
agent(account: string): this;
|
|
313
|
+
id(escrowId: number): this;
|
|
314
|
+
hive(amount: string | number): this;
|
|
315
|
+
hbd(amount: string | number): this;
|
|
316
|
+
fee(amount: string | number, symbol?: string): this;
|
|
317
|
+
ratificationDeadline(value: string | Date): this;
|
|
318
|
+
expiration(value: string | Date): this;
|
|
319
|
+
jsonMeta(meta: string | Record<string, any>): this;
|
|
320
|
+
send(signingKeys?: string | string[]): any;
|
|
321
|
+
}
|
|
322
|
+
export interface RecurrentTransferBuilder {
|
|
323
|
+
from(account: string): this;
|
|
324
|
+
to(account: string): this;
|
|
325
|
+
amount(amount: string | number, symbol?: string): this;
|
|
326
|
+
hive(amount: string | number): this;
|
|
327
|
+
hbd(amount: string | number): this;
|
|
328
|
+
memo(memo: string): this;
|
|
329
|
+
recurrence(value: number): this;
|
|
330
|
+
executions(value: number): this;
|
|
331
|
+
send(signingKeys?: string | string[]): any;
|
|
332
|
+
}
|
|
333
|
+
export interface ProposalBuilder {
|
|
334
|
+
creator(account: string): this;
|
|
335
|
+
receiver(account: string): this;
|
|
336
|
+
startDate(value: string | Date): this;
|
|
337
|
+
endDate(value: string | Date): this;
|
|
338
|
+
dailyPay(amount: string | number, symbol?: string): this;
|
|
339
|
+
dailyHive(amount: string | number): this;
|
|
340
|
+
dailyHbd(amount: string | number): this;
|
|
341
|
+
subject(value: string): this;
|
|
342
|
+
permlink(value: string): this;
|
|
343
|
+
send(signingKeys?: string | string[]): any;
|
|
344
|
+
}
|
|
345
|
+
export interface HiveEngineTransferBuilder {
|
|
346
|
+
from(account: string): this;
|
|
347
|
+
to(account: string): this;
|
|
348
|
+
symbol(symbol: string): this;
|
|
349
|
+
quantity(quantity: string | number): this;
|
|
350
|
+
memo(memo: string): this;
|
|
351
|
+
send(): any;
|
|
352
|
+
}
|
|
353
|
+
export interface HiveEngineBurnBuilder {
|
|
354
|
+
from(account: string): this;
|
|
355
|
+
symbol(symbol: string): this;
|
|
356
|
+
quantity(quantity: string | number): this;
|
|
357
|
+
memo(memo: string): this;
|
|
358
|
+
send(): any;
|
|
359
|
+
}
|
|
360
|
+
export interface HiveEngineIssueBuilder {
|
|
361
|
+
from(account: string): this;
|
|
362
|
+
to(account: string): this;
|
|
363
|
+
symbol(symbol: string): this;
|
|
364
|
+
quantity(quantity: string | number): this;
|
|
365
|
+
memo(memo: string): this;
|
|
366
|
+
send(): any;
|
|
367
|
+
}
|
|
368
|
+
export interface ProposalVotesBuilder {
|
|
369
|
+
voter(account: string): this;
|
|
370
|
+
ids(...proposalIds: number[]): this;
|
|
371
|
+
approve(value?: boolean): this;
|
|
372
|
+
reject(): this;
|
|
373
|
+
send(signingKeys?: string | string[]): any;
|
|
374
|
+
}
|
|
375
|
+
export interface RemoveProposalsBuilder {
|
|
376
|
+
owner(account: string): this;
|
|
377
|
+
ids(...proposalIds: number[]): this;
|
|
378
|
+
send(signingKeys?: string | string[]): any;
|
|
379
|
+
}
|
|
380
|
+
export interface VoteBuilder {
|
|
381
|
+
author(account: string): this;
|
|
382
|
+
permlink(value: string): this;
|
|
383
|
+
weight(value: string | number): this;
|
|
384
|
+
send(): any;
|
|
385
|
+
}
|
|
386
|
+
export interface FollowBuilder {
|
|
387
|
+
follower(account: string): this;
|
|
388
|
+
following(account: string): this;
|
|
389
|
+
send(): any;
|
|
390
|
+
}
|
|
391
|
+
export interface ReblogBuilder {
|
|
392
|
+
account(account: string): this;
|
|
393
|
+
author(account: string): this;
|
|
394
|
+
permlink(value: string): this;
|
|
395
|
+
send(): any;
|
|
396
|
+
}
|
|
397
|
+
export interface PowerUpBuilder {
|
|
398
|
+
from(account: string): this;
|
|
399
|
+
to(account: string): this;
|
|
400
|
+
amount(amount: string | number): this;
|
|
401
|
+
send(): any;
|
|
402
|
+
}
|
|
403
|
+
export interface PowerDownBuilder {
|
|
404
|
+
account(account: string): this;
|
|
405
|
+
vestingShares(amount: string): this;
|
|
406
|
+
send(): any;
|
|
407
|
+
}
|
|
408
|
+
export interface DelegateBuilder {
|
|
409
|
+
delegator(account: string): this;
|
|
410
|
+
delegatee(account: string): this;
|
|
411
|
+
vestingShares(amount: string): this;
|
|
412
|
+
send(): any;
|
|
413
|
+
}
|
|
414
|
+
export interface ClaimRewardsBuilder {
|
|
415
|
+
account(account: string): this;
|
|
416
|
+
rewardHive(amount: string): this;
|
|
417
|
+
rewardHbd(amount: string): this;
|
|
418
|
+
rewardVests(amount: string): this;
|
|
419
|
+
send(): any;
|
|
420
|
+
}
|
|
421
|
+
export interface WitnessVoteBuilder {
|
|
422
|
+
account(account: string): this;
|
|
423
|
+
witness(account: string): this;
|
|
424
|
+
approve(value?: boolean): this;
|
|
425
|
+
unapprove(): this;
|
|
426
|
+
send(): any;
|
|
427
|
+
}
|
|
428
|
+
export interface SetProxyBuilder {
|
|
429
|
+
account(account: string): this;
|
|
430
|
+
proxy(account: string): this;
|
|
431
|
+
send(): any;
|
|
432
|
+
}
|
|
433
|
+
export interface UpdateProfileBuilder {
|
|
434
|
+
account(account: string): this;
|
|
435
|
+
name(value: string): this;
|
|
436
|
+
about(value: string): this;
|
|
437
|
+
location(value: string): this;
|
|
438
|
+
website(value: string): this;
|
|
439
|
+
profileImage(url: string): this;
|
|
440
|
+
coverImage(url: string): this;
|
|
441
|
+
set(key: string, value: any): this;
|
|
442
|
+
send(): any;
|
|
443
|
+
}
|
|
444
|
+
export interface SavingsTransferBuilder {
|
|
445
|
+
from(account: string): this;
|
|
446
|
+
to(account: string): this;
|
|
447
|
+
amount(amount: string | number, symbol?: string): this;
|
|
448
|
+
hive(amount: string | number): this;
|
|
449
|
+
hbd(amount: string | number): this;
|
|
450
|
+
memo(memo: string): this;
|
|
451
|
+
requestId(id: number): this;
|
|
452
|
+
send(): any;
|
|
453
|
+
}
|
|
454
|
+
export interface ConvertBuilder {
|
|
455
|
+
from(account: string): this;
|
|
456
|
+
amount(amount: string | number, symbol?: string): this;
|
|
457
|
+
hbd(amount: string | number): this;
|
|
458
|
+
requestId(id: number): this;
|
|
459
|
+
send(): any;
|
|
460
|
+
}
|
|
461
|
+
export interface CollateralizedConvertBuilder {
|
|
462
|
+
from(account: string): this;
|
|
463
|
+
amount(amount: string | number, symbol?: string): this;
|
|
464
|
+
hive(amount: string | number): this;
|
|
465
|
+
requestId(id: number): this;
|
|
466
|
+
send(): any;
|
|
467
|
+
}
|
|
468
|
+
export interface DeleteCommentBuilder {
|
|
469
|
+
author(account: string): this;
|
|
470
|
+
permlink(value: string): this;
|
|
471
|
+
send(): any;
|
|
472
|
+
}
|
|
473
|
+
export interface LimitOrderBuilder {
|
|
474
|
+
owner(account: string): this;
|
|
475
|
+
orderId(id: number): this;
|
|
476
|
+
amountToSell(amount: string | number, symbol?: string): this;
|
|
477
|
+
minToReceive(amount: string | number, symbol?: string): this;
|
|
478
|
+
fillOrKill(value?: boolean): this;
|
|
479
|
+
expiration(value: string | Date): this;
|
|
480
|
+
send(signingKeys?: string | string[]): any;
|
|
481
|
+
}
|
|
482
|
+
export interface CancelOrderBuilder {
|
|
483
|
+
owner(account: string): this;
|
|
484
|
+
orderId(id: number): this;
|
|
485
|
+
send(signingKeys?: string | string[]): any;
|
|
486
|
+
}
|
|
487
|
+
export interface WithdrawRouteBuilder {
|
|
488
|
+
from(account: string): this;
|
|
489
|
+
to(account: string): this;
|
|
490
|
+
percent(value: number): this;
|
|
491
|
+
autoVest(value?: boolean): this;
|
|
492
|
+
send(signingKeys?: string | string[]): any;
|
|
493
|
+
}
|
|
494
|
+
export interface CommentOptionsBuilder {
|
|
495
|
+
author(account: string): this;
|
|
496
|
+
permlink(value: string): this;
|
|
497
|
+
maxAcceptedPayout(amount: string | number, symbol?: string): this;
|
|
498
|
+
percentHbd(value: number): this;
|
|
499
|
+
allowVotes(value?: boolean): this;
|
|
500
|
+
allowCurationRewards(value?: boolean): this;
|
|
501
|
+
beneficiary(account: string, weight: number): this;
|
|
502
|
+
send(): any;
|
|
503
|
+
}
|
|
504
|
+
export interface QueryNamespace {
|
|
505
|
+
getDynamicGlobalProperties(): Promise<any>;
|
|
506
|
+
getChainProperties(): Promise<any>;
|
|
507
|
+
getCurrentMedianHistoryPrice(): Promise<any>;
|
|
508
|
+
getRewardFund(name?: string): Promise<any>;
|
|
509
|
+
getFollowers(account: string, start?: string, type?: string, limit?: number): Promise<any[]>;
|
|
510
|
+
getFollowing(account: string, start?: string, type?: string, limit?: number): Promise<any[]>;
|
|
511
|
+
getFollowCount(account: string): Promise<any>;
|
|
512
|
+
getContent(author: string, permlink: string): Promise<any>;
|
|
513
|
+
getContentReplies(author: string, permlink: string): Promise<any[]>;
|
|
514
|
+
getDiscussions(by: string, query: Record<string, any>): Promise<any[]>;
|
|
515
|
+
getBlog(account: string, options?: Record<string, any>): Promise<any[]>;
|
|
516
|
+
getFeed(account: string, options?: Record<string, any>): Promise<any[]>;
|
|
517
|
+
getTrending(options?: Record<string, any>): Promise<any[]>;
|
|
518
|
+
getHot(options?: Record<string, any>): Promise<any[]>;
|
|
519
|
+
getCreated(options?: Record<string, any>): Promise<any[]>;
|
|
520
|
+
getActiveVotes(author: string, permlink: string): Promise<any[]>;
|
|
521
|
+
getVestingDelegations(account: string, from?: string, limit?: number): Promise<any[]>;
|
|
522
|
+
getAccountHistory(account: string, from?: number, limit?: number): Promise<any[]>;
|
|
523
|
+
getOrderBook(limit?: number): Promise<any>;
|
|
524
|
+
getOpenOrders(account: string): Promise<any[]>;
|
|
525
|
+
getRCMana(account: string): Promise<any>;
|
|
526
|
+
getVPMana(account: string): Promise<any>;
|
|
527
|
+
findRCAccounts(accounts: string[]): Promise<any[]>;
|
|
528
|
+
getCommunity(name: string): Promise<any>;
|
|
529
|
+
listCommunities(options?: Record<string, any>): Promise<any[]>;
|
|
530
|
+
getAccountNotifications(account: string, options?: Record<string, any>): Promise<any[]>;
|
|
531
|
+
listAllSubscriptions(account: string): Promise<any[]>;
|
|
532
|
+
findTransaction(transactionId: string): Promise<any>;
|
|
533
|
+
getWitnessByAccount(account: string): Promise<any>;
|
|
534
|
+
getWitnesses(ids: number[]): Promise<any[]>;
|
|
535
|
+
getWitnessesByVote(from: string, limit: number): Promise<any[]>;
|
|
536
|
+
getBlock(blockNumber: number): Promise<any>;
|
|
537
|
+
getBlockHeader(blockNumber: number): Promise<any>;
|
|
538
|
+
getOperations(blockNumber: number, onlyVirtual?: boolean): Promise<any[]>;
|
|
539
|
+
getConfig(): Promise<any>;
|
|
540
|
+
lookupAccounts(lowerBound: string, limit: number): Promise<string[]>;
|
|
541
|
+
lookupWitnessAccounts(lowerBound: string, limit: number): Promise<string[]>;
|
|
542
|
+
getConversionRequests(account: string): Promise<any[]>;
|
|
543
|
+
getCollateralizedConversionRequests(account: string): Promise<any[]>;
|
|
544
|
+
getSavingsWithdrawFrom(account: string): Promise<any[]>;
|
|
545
|
+
getProposals(options?: Record<string, any>): Promise<any[]>;
|
|
546
|
+
}
|
|
547
|
+
export interface MoneyNamespace {
|
|
548
|
+
parseAssetAmount(rawAmount: string): ParsedAssetAmount;
|
|
549
|
+
formatAmount(amount: string | number, precision?: number): string;
|
|
550
|
+
formatAssetAmount(amount: string | number, symbol: string, precision?: number): string;
|
|
551
|
+
calculatePercentageAmount(amount: string | number, percentage: string | number, precision?: number): string;
|
|
552
|
+
calculateBasisPointsAmount(amount: string | number, basisPoints: number, precision?: number): string;
|
|
553
|
+
splitAmountByBasisPoints(amount: string | number, basisPoints: number[], precision?: number): string[];
|
|
554
|
+
splitAmountByPercentage(amount: string | number, percentages: Array<string | number>, precision?: number): string[];
|
|
555
|
+
splitAmountByWeights(amount: string | number, weights: Array<string | number>, precision?: number): string[];
|
|
556
|
+
}
|
|
557
|
+
export interface OpsNamespace {
|
|
558
|
+
transfer(): TransferOperationBuilder;
|
|
559
|
+
burn(): BurnOperationBuilder;
|
|
560
|
+
escrowTransfer(): EscrowTransferBuilder;
|
|
561
|
+
recurrentTransfer(): RecurrentTransferBuilder;
|
|
562
|
+
createProposal(): ProposalBuilder;
|
|
563
|
+
transferEngine(): HiveEngineTransferBuilder;
|
|
564
|
+
burnEngine(): HiveEngineBurnBuilder;
|
|
565
|
+
issueEngine(): HiveEngineIssueBuilder;
|
|
566
|
+
voteProposals(): ProposalVotesBuilder;
|
|
567
|
+
removeProposals(): RemoveProposalsBuilder;
|
|
568
|
+
upvote(): VoteBuilder;
|
|
569
|
+
downvote(): VoteBuilder;
|
|
570
|
+
follow(): FollowBuilder;
|
|
571
|
+
unfollow(): FollowBuilder;
|
|
572
|
+
mute(): FollowBuilder;
|
|
573
|
+
reblog(): ReblogBuilder;
|
|
574
|
+
powerUp(): PowerUpBuilder;
|
|
575
|
+
powerDown(): PowerDownBuilder;
|
|
576
|
+
cancelPowerDown(): PowerDownBuilder;
|
|
577
|
+
delegate(): DelegateBuilder;
|
|
578
|
+
undelegate(): DelegateBuilder;
|
|
579
|
+
claimRewards(): ClaimRewardsBuilder;
|
|
580
|
+
witnessVote(): WitnessVoteBuilder;
|
|
581
|
+
setProxy(): SetProxyBuilder;
|
|
582
|
+
clearProxy(): SetProxyBuilder;
|
|
583
|
+
updateProfile(): UpdateProfileBuilder;
|
|
584
|
+
transferToSavings(): SavingsTransferBuilder;
|
|
585
|
+
transferFromSavings(): SavingsTransferBuilder;
|
|
586
|
+
convert(): ConvertBuilder;
|
|
587
|
+
collateralizedConvert(): CollateralizedConvertBuilder;
|
|
588
|
+
deleteComment(): DeleteCommentBuilder;
|
|
589
|
+
limitOrder(): LimitOrderBuilder;
|
|
590
|
+
cancelOrder(): CancelOrderBuilder;
|
|
591
|
+
withdrawRoute(): WithdrawRouteBuilder;
|
|
592
|
+
commentOptions(): CommentOptionsBuilder;
|
|
593
|
+
post(): PostBuilder;
|
|
594
|
+
stakeEngine(): EngineStakeBuilder;
|
|
595
|
+
unstakeEngine(): EngineUnstakeBuilder;
|
|
596
|
+
buyEngine(): EngineMarketOrderBuilder;
|
|
597
|
+
sellEngine(): EngineMarketOrderBuilder;
|
|
598
|
+
cancelEngineOrder(): EngineCancelOrderBuilder;
|
|
599
|
+
delegateEngine(): EngineDelegateBuilder;
|
|
600
|
+
undelegateEngine(): EngineDelegateBuilder;
|
|
601
|
+
subscribeCommunity(): CommunityOperationBuilder;
|
|
602
|
+
unsubscribeCommunity(): CommunityOperationBuilder;
|
|
603
|
+
cancelRecurrentTransfer(): RecurrentTransferBuilder;
|
|
604
|
+
}
|
|
605
|
+
export interface PostBuilder {
|
|
606
|
+
author(account: string): this;
|
|
607
|
+
title(value: string): this;
|
|
608
|
+
body(value: string): this;
|
|
609
|
+
permlink(value: string): this;
|
|
610
|
+
tags(...tags: string[]): this;
|
|
611
|
+
community(name: string): this;
|
|
612
|
+
parentAuthor(account: string): this;
|
|
613
|
+
parentPermlink(value: string): this;
|
|
614
|
+
beneficiary(account: string, weight: number): this;
|
|
615
|
+
maxAcceptedPayout(amount: string | number, symbol?: string): this;
|
|
616
|
+
percentHbd(value: number): this;
|
|
617
|
+
allowVotes(value?: boolean): this;
|
|
618
|
+
allowCurationRewards(value?: boolean): this;
|
|
619
|
+
app(name: string): this;
|
|
620
|
+
format(value: string): this;
|
|
621
|
+
description(value: string): this;
|
|
622
|
+
image(...urls: string[]): this;
|
|
623
|
+
metadata(key: string, value: any): this;
|
|
624
|
+
send(): any;
|
|
625
|
+
}
|
|
626
|
+
export interface BatchBuilder {
|
|
627
|
+
add(operation: [string, any]): this;
|
|
628
|
+
transfer(from: string, to: string, amount: string, memo?: string): this;
|
|
629
|
+
vote(voter: string, author: string, permlink: string, weight: number): this;
|
|
630
|
+
customJson(id: string, json: any, postingAuth?: string, activeAuth?: string): this;
|
|
631
|
+
comment(author: string, permlink: string, parentAuthor: string, parentPermlink: string, title: string, body: string, jsonMetadata?: string): this;
|
|
632
|
+
send(signingKeys?: string | string[]): any;
|
|
633
|
+
}
|
|
634
|
+
export interface PowerDownScheduleEntry {
|
|
635
|
+
week: number;
|
|
636
|
+
date: Date;
|
|
637
|
+
amount: string;
|
|
638
|
+
vestingShares: string;
|
|
639
|
+
}
|
|
640
|
+
export interface AccountValueResult {
|
|
641
|
+
hive: number;
|
|
642
|
+
hbd: number;
|
|
643
|
+
savings_hive: number;
|
|
644
|
+
savings_hbd: number;
|
|
645
|
+
hp: number;
|
|
646
|
+
total_hive: number;
|
|
647
|
+
total_usd: number;
|
|
648
|
+
}
|
|
649
|
+
export interface EngineQueryNamespace {
|
|
650
|
+
getTokenBalances(account: string): Promise<any[]>;
|
|
651
|
+
getTokenBalance(account: string, symbol: string): Promise<any>;
|
|
652
|
+
getToken(symbol: string): Promise<any>;
|
|
653
|
+
getTokens(query?: Record<string, any>, limit?: number, offset?: number): Promise<any[]>;
|
|
654
|
+
getMarketBuyBook(symbol: string, limit?: number, offset?: number): Promise<any[]>;
|
|
655
|
+
getMarketSellBook(symbol: string, limit?: number, offset?: number): Promise<any[]>;
|
|
656
|
+
getMarketHistory(symbol: string, limit?: number, offset?: number): Promise<any[]>;
|
|
657
|
+
getMarketMetrics(query?: Record<string, any>): Promise<any[]>;
|
|
658
|
+
getNFT(symbol: string): Promise<any>;
|
|
659
|
+
getNFTInstances(symbol: string, query?: Record<string, any>, limit?: number, offset?: number): Promise<any[]>;
|
|
660
|
+
getNFTBalance(account: string, symbol: string): Promise<any[]>;
|
|
661
|
+
getNFTSellBook(symbol: string, limit?: number, offset?: number): Promise<any[]>;
|
|
662
|
+
getPendingUnstakes(account: string, symbol?: string): Promise<any[]>;
|
|
663
|
+
getDelegations(from: string, symbol: string): Promise<any[]>;
|
|
664
|
+
getContractInfo(name: string): Promise<any>;
|
|
665
|
+
find(contract: string, table: string, query: Record<string, any>, limit?: number, offset?: number): Promise<any[]>;
|
|
666
|
+
findOne(contract: string, table: string, query: Record<string, any>): Promise<any>;
|
|
667
|
+
}
|
|
668
|
+
export interface EngineStakeBuilder {
|
|
669
|
+
from(account: string): this;
|
|
670
|
+
to(account: string): this;
|
|
671
|
+
symbol(symbol: string): this;
|
|
672
|
+
quantity(quantity: string | number): this;
|
|
673
|
+
send(): any;
|
|
674
|
+
}
|
|
675
|
+
export interface EngineUnstakeBuilder {
|
|
676
|
+
from(account: string): this;
|
|
677
|
+
symbol(symbol: string): this;
|
|
678
|
+
quantity(quantity: string | number): this;
|
|
679
|
+
send(): any;
|
|
680
|
+
}
|
|
681
|
+
export interface EngineMarketOrderBuilder {
|
|
682
|
+
from(account: string): this;
|
|
683
|
+
symbol(symbol: string): this;
|
|
684
|
+
quantity(quantity: string | number): this;
|
|
685
|
+
price(price: string | number): this;
|
|
686
|
+
send(): any;
|
|
687
|
+
}
|
|
688
|
+
export interface EngineCancelOrderBuilder {
|
|
689
|
+
from(account: string): this;
|
|
690
|
+
type(type: 'buy' | 'sell'): this;
|
|
691
|
+
orderId(id: string): this;
|
|
692
|
+
send(): any;
|
|
693
|
+
}
|
|
694
|
+
export interface EngineDelegateBuilder {
|
|
695
|
+
from(account: string): this;
|
|
696
|
+
to(account: string): this;
|
|
697
|
+
symbol(symbol: string): this;
|
|
698
|
+
quantity(quantity: string | number): this;
|
|
699
|
+
send(): any;
|
|
700
|
+
}
|
|
701
|
+
export interface CommunityOperationBuilder {
|
|
702
|
+
account(account: string): this;
|
|
703
|
+
community(name: string): this;
|
|
704
|
+
send(): any;
|
|
705
|
+
}
|
|
706
|
+
export interface DerivedKeys {
|
|
707
|
+
owner: string;
|
|
708
|
+
active: string;
|
|
709
|
+
posting: string;
|
|
710
|
+
memo: string;
|
|
711
|
+
ownerPublic: string;
|
|
712
|
+
activePublic: string;
|
|
713
|
+
postingPublic: string;
|
|
714
|
+
memoPublic: string;
|
|
715
|
+
}
|
|
716
|
+
export interface FlowNamespace {
|
|
717
|
+
incomingTransfers(account?: string): IncomingTransferFlowBuilder;
|
|
718
|
+
autoBurnIncomingTransfers(options?: AutoBurnIncomingTransfersOptions): FlowSubscriptionHandle;
|
|
719
|
+
autoForwardIncomingTransfers(options: AutoForwardIncomingTransfersOptions): FlowSubscriptionHandle;
|
|
720
|
+
autoRefundIncomingTransfers(options?: AutoRefundIncomingTransfersOptions): FlowSubscriptionHandle;
|
|
721
|
+
autoSplitIncomingTransfers(options: AutoSplitIncomingTransfersOptions): FlowSubscriptionHandle;
|
|
722
|
+
autoRouteIncomingTransfers(options: AutoRouteIncomingTransfersOptions): FlowSubscriptionHandle;
|
|
723
|
+
planIncomingTransferRoutes(transfer: string | TransferEvent | {
|
|
724
|
+
amount?: string;
|
|
725
|
+
from?: string;
|
|
726
|
+
to?: string;
|
|
727
|
+
memo?: string;
|
|
728
|
+
}, options: Pick<AutoRouteIncomingTransfersOptions, 'routes' | 'memo' | 'allowedSymbols'>): PlannedIncomingTransferRoutes;
|
|
729
|
+
}
|