wapi-client 0.9.1 → 0.9.4

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.
Files changed (53) hide show
  1. package/dist/api/ws-client.cjs +1 -1
  2. package/dist/api/ws-client.d.ts +0 -1
  3. package/dist/api/ws-client.js +1 -1
  4. package/dist/client.cjs +1 -1
  5. package/dist/client.d.ts +4 -4
  6. package/dist/client.js +1 -1
  7. package/dist/fns/aggregate-transfers/aggregate-transfers.d.ts +1 -1
  8. package/dist/fns/find-tokens/find-tokens.enums.d.ts +2 -3
  9. package/dist/fns/find-tokens/find-tokens.schema.input.json +1 -16
  10. package/dist/fns/find-transfer-groups/find-transfer-groups.enums.d.ts +2 -8
  11. package/dist/fns/find-transfer-groups/find-transfer-groups.schema.input.json +3 -34
  12. package/dist/fns/find-wallets/find-wallets.enums.d.ts +1 -1
  13. package/dist/fns/import-data/import-data.cjs +22 -0
  14. package/dist/fns/import-data/import-data.js +22 -0
  15. package/dist/fns/import-data/import-data.node.browser.cjs +22 -0
  16. package/dist/fns/import-data/import-data.node.browser.js +22 -0
  17. package/dist/fns/import-data/import-data.node.cjs +22 -0
  18. package/dist/fns/import-data/import-data.node.js +22 -0
  19. package/dist/fns/reverse-transfers/reverse-transfers.d.ts +1 -1
  20. package/dist/fns/update-transfer-groups/update-transfer-groups.d.ts +1 -1
  21. package/dist/fns/update-transfers/update-transfers.d.ts +1 -1
  22. package/dist/lib/errors.d.ts +1 -1
  23. package/dist/lib/isomorphic/node/fetch.cjs +20 -17
  24. package/dist/lib/isomorphic/node/fetch.js +20 -17
  25. package/dist/lib/isomorphic/node/streams.d.ts +0 -2
  26. package/dist/lib/query-builder.d.ts +6 -8
  27. package/dist/lib/validator.browser.cjs +611 -960
  28. package/dist/lib/validator.browser.js +611 -960
  29. package/dist/lib/validator.cjs +1 -1
  30. package/dist/lib/validator.js +1 -1
  31. package/dist/lib/ws-types.d.ts +0 -1
  32. package/dist/txs/create-distribution/create-distribution.enums.d.ts +1 -1
  33. package/dist/txs/find-balance-many/find-balance-many.enums.d.ts +1 -1
  34. package/dist/txs/find-token-many/find-token-many.enums.d.ts +4 -3
  35. package/dist/txs/find-token-many/find-token-many.schema.input.json +6 -0
  36. package/dist/txs/find-token-many/find-token-many.schema.output.json +8 -1
  37. package/dist/txs/find-transfer-group-many/find-transfer-group-many.enums.d.ts +10 -4
  38. package/dist/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json +4 -3
  39. package/dist/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json +23 -1
  40. package/dist/txs/find-transfer-many/find-transfer-many.enums.d.ts +1 -1
  41. package/dist/txs/get-balance-history/get-balance-history.enums.d.ts +5 -1
  42. package/dist/txs/get-balance-history/get-balance-history.schema.output.json +7 -1
  43. package/dist/txs/get-token/get-token.enums.d.ts +43 -1
  44. package/dist/txs/get-token/get-token.schema.input.json +5 -1
  45. package/dist/txs/get-token/get-token.schema.output.json +63 -2
  46. package/dist/txs/get-token-many/get-token-many.enums.d.ts +6 -2
  47. package/dist/txs/get-token-many/get-token-many.schema.input.json +5 -0
  48. package/dist/txs/get-token-many/get-token-many.schema.output.json +3 -0
  49. package/dist/txs/update-transfer-group/update-transfer-group.enums.d.ts +1 -1
  50. package/dist/types/index.d.ts +92 -47
  51. package/dist/wapi-client-web.iife.js +6 -11
  52. package/dist/wapi-client.iife.js +6 -11
  53. package/package.json +5 -6
@@ -1,6 +1,3 @@
1
-
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
1
  declare module 'wapi-client/lib/ws-types' {
5
2
  import WebSocket from 'modern-isomorphic-ws';
6
3
  export interface ErrorEvent {
@@ -1498,7 +1495,7 @@ declare module 'wapi-client/lib/errors' {
1498
1495
  toJSON(): IJSONRPCError;
1499
1496
  }
1500
1497
  export const ERROR_CODE_TO_TYPE: {
1501
- [key: number]: 'AUTHORIZATION_ERROR' | 'CONNECTION_LOST' | 'INPUT_STREAM_INVALID' | 'INVALID_RESPONSE_STREAM_CHUNK' | 'INVALID_INPUT_STREAM_CHUNK' | 'INPUT_STREAM_TIMEOUT' | 'INPUT_STREAM_ERROR' | 'INPUT_STREAM_NOT_ALLOWED' | 'HTTP_BODY_SIZE' | 'DATABASE_EXPORT_CONFLICT' | 'DATABASE_IMPORT_CONFLICT' | 'DATABASE_EXPORT_PROGRESS_NOT_FOUND' | 'DATABASE_IMPORT_PROGRESS_NOT_FOUND' | 'DATABASE_IMPORT_NOT_FOUND' | 'TR_CANT_UPDATE_TO_PENDING' | 'TR_CANT_UPDATE_TIMESTAMP' | 'TR_CANT_INSERT_TIMESTAMP' | 'TR_EMPTY_UPDATE_REQUEST' | 'TR_MISSING_FILTER' | 'TR_TO_WALLET_WITHDRAWAL' | 'TR_FROM_WALLET_DEPOSIT' | 'TR_FROM_TO_CONFLICT' | 'TR_UNABLE_TO_RESOLVE_INPUT' | 'TRG_MISSING_FILTER' | 'INVALID_FIELD_AGR_COMB' | 'INVALID_FIELD_FOR_MODEL' | 'NO_METADATA_ON_MODEL' | 'INVALID_MODEL' | 'INVALID_COMPLEX_FILTER' | 'UNCLEAR_AGGREGATOR' | 'CONTRACT_OWNER_NOT_FOUND' | 'DISTRIBUTION_MISSING_TARGETS' | 'TOKEN_INVALID_WALLET' | 'BAL_FUTURE_DATETIME' | 'INPUT_NEEDS_IDENTIFIER' | 'RESET_INVALID_CONFIRMATION' | 'INPUT_NEEDS_TOKEN' | 'CONFLICTING_OPTIONS_FOR_BALANCE' | 'CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT' | 'RUNNING_BALANCE_WITHOUT_WALLET' | 'SIGNED_AMOUNT_WITHOUT_WALLET' | 'REQUIRED_INPUT_MISSING' | 'TRX_NOT_ALLOWED' | 'TRANSACTION_NOT_FOUND' | 'ONLY_SELECT_ALLOWED' | 'INVALID_LATEST_HASH' | 'TOKEN_LIMIT_REACHED' | 'TR_INVALID_BALANCE' | 'TR_AMOUNT_NOT_DIVISIBLE' | 'TR_TOKEN_DISABLED' | 'TR_TOKEN_DWONLY' | 'TR_TRG_STATUS_MISMATCH' | 'TR_TRG_CLOSED' | 'TR_TIMESTAMP_IN_PAST' | 'TR_TIMESTAMP_MUST_BE_LATEST' | 'TR_INVALID_CANCELLED' | 'TR_FROM_WALLET_STATUS_CONSTRAINT' | 'TR_TO_WALLET_STATUS_CONSTRAINT' | 'TR_CANCELLED_CANT_RV' | 'TR_DEPOSIT_CANT_RV_WITHOUT_FLAG' | 'TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG' | 'TRG_SINGLE_PENDING_TR_CANT_RV' | 'TRG_CANCELLED_CANT_RV' | 'TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG' | 'TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG' | 'METHOD_DISABLED' | 'FLAG_PRODUCTION_ON' | 'FLAG_PRODUCTION_LOCKED' | 'TRANSACTION_TIMEOUT' | 'AUTHENTICATION_ERROR' | 'PARSE_ERROR' | 'INVALID_REQUEST' | 'METHOD_NOT_FOUND' | 'INVALID_PARAMS' | 'INTERNAL_SERVER_ERROR';
1498
+ [key: number]: ERROR_TYPES;
1502
1499
  };
1503
1500
  export function getError({ code, message, data }: IJSONRPCError): WAPIError;
1504
1501
  export const ERROR_MESSAGES: {
@@ -2567,7 +2564,7 @@ declare module 'wapi-client/lib/query-builder' {
2567
2564
  nulls?: 'first' | 'last';
2568
2565
  };
2569
2566
  export type QueryBuilderOrderingInput = string | QueryBuilderOrderingInputObject;
2570
- export class QueryBuilderInterface<TableFields extends string, StringFields extends string, MetadataFields extends string, Result> extends QueryBuilderInner<TableFields, StringFields, MetadataFields, Result> {
2567
+ export class QueryBuilderInterface<TableFields extends string, StringFields extends string, MetadataFields extends string, Options, Result> extends QueryBuilderInner<TableFields, StringFields, MetadataFields, Result> {
2571
2568
  private execFn;
2572
2569
  protected optionsObject: {
2573
2570
  [k: string]: unknown;
@@ -2582,9 +2579,7 @@ declare module 'wapi-client/lib/query-builder' {
2582
2579
  });
2583
2580
  private start;
2584
2581
  toJSON(): BuiltQuery;
2585
- options(optionsInput: {
2586
- [key: string]: unknown;
2587
- }): this;
2582
+ options(optionsInput: Options): this;
2588
2583
  then<TResult1 = Result, TResult2 = never>(onfulfilled?: (value: Result) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: Error) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
2589
2584
  catch<TResult2 = never>(onerror: (reason: Error) => TResult2 | PromiseLike<TResult2>): Promise<Result | TResult2>;
2590
2585
  stream(): ReadStream;
@@ -2619,7 +2614,7 @@ declare module 'wapi-client/lib/query-builder' {
2619
2614
  *
2620
2615
  * ```
2621
2616
  */
2622
- export class QueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ResultFields extends string, Options extends BaseOptions, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Result> {
2617
+ export class QueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ResultFields extends string, Options extends BaseOptions, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Options, Result> {
2623
2618
  constructor({ start, modifiers, optionsModifiers, }: {
2624
2619
  start: (query: BuiltQuery) => StreamPromise<Result>;
2625
2620
  modifiers?: (field: TableFields | StringFields | MetadataFields, value: Primitive | {
@@ -2662,7 +2657,7 @@ declare module 'wapi-client/lib/query-builder' {
2662
2657
  *
2663
2658
  * ```
2664
2659
  */
2665
- export class AggregateQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, GroupFields extends string, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Result> {
2660
+ export class AggregateQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, GroupFields extends string, Options, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Options, Result> {
2666
2661
  private aggregatorObject;
2667
2662
  private timezoneString;
2668
2663
  constructor({ start, modifiers, optionsModifiers, }: {
@@ -2682,7 +2677,7 @@ declare module 'wapi-client/lib/query-builder' {
2682
2677
  max(input?: string): this;
2683
2678
  sum(input?: string): this;
2684
2679
  }
2685
- export class UpdateQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ResultFields extends string, UpdateFields, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Result> {
2680
+ export class UpdateQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ResultFields extends string, UpdateFields, Options, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Options, Result> {
2686
2681
  private updateObject;
2687
2682
  constructor({ start, modifiers, optionsModifiers, }: {
2688
2683
  start?: (query: BuiltUpdateQuery) => StreamPromise<Result>;
@@ -2694,7 +2689,7 @@ declare module 'wapi-client/lib/query-builder' {
2694
2689
  toJSON(): BuiltUpdateQuery;
2695
2690
  update(updateData: UpdateFields): this;
2696
2691
  }
2697
- export class ReverseQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ReverseModifications, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Result> {
2692
+ export class ReverseQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ReverseModifications, Options, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Options, Result> {
2698
2693
  private reverseModifications;
2699
2694
  constructor({ start, modifiers, optionsModifiers, }: {
2700
2695
  start?: (query: BuiltReverseQuery) => StreamPromise<Result>;
@@ -3225,6 +3220,10 @@ declare module 'wapi-client/txs/get-token/get-token.enums' {
3225
3220
  * If true then the returning object is only guaranteed to have id
3226
3221
  */
3227
3222
  return_only_id?: boolean;
3223
+ /**
3224
+ * Return the total system balance of token
3225
+ */
3226
+ include_balance?: boolean;
3228
3227
  }
3229
3228
  /**
3230
3229
  * ID based filter for token
@@ -3314,6 +3313,44 @@ declare module 'wapi-client/txs/get-token/get-token.enums' {
3314
3313
  */
3315
3314
  belongs_to_foreign?: string | null;
3316
3315
  }
3316
+ export interface TokenWithBalance extends Token {
3317
+ /**
3318
+ * Latest transfer affecting the balance
3319
+ */
3320
+ balance_transfer_id: number | null;
3321
+ /**
3322
+ * Current pending balance
3323
+ */
3324
+ balance_pending_amount: number | null;
3325
+ /**
3326
+ * Sum of incoming pending transfers
3327
+ */
3328
+ balance_pending_amount_to: number | null;
3329
+ /**
3330
+ * Sum of outgoing pending transfers
3331
+ */
3332
+ balance_pending_amount_from: number | null;
3333
+ /**
3334
+ * Current finished balance
3335
+ */
3336
+ balance_finished_amount: number | null;
3337
+ /**
3338
+ * Current finished and pending balance sum
3339
+ */
3340
+ balance_amount: number | null;
3341
+ /**
3342
+ * Available balance that is sum of pending_amount_from and finished_amount
3343
+ */
3344
+ balance_available_balance: number | null;
3345
+ /**
3346
+ * Latest control_hash associated with wallet token combination
3347
+ */
3348
+ balance_latest_control_hash: number | null;
3349
+ /**
3350
+ * Last modification date of balance
3351
+ */
3352
+ balance_updated_at: number | null;
3353
+ }
3317
3354
  /**
3318
3355
  * Output of getToken
3319
3356
  *
@@ -3323,7 +3360,7 @@ declare module 'wapi-client/txs/get-token/get-token.enums' {
3323
3360
  /**
3324
3361
  * requested token
3325
3362
  */
3326
- token?: Token;
3363
+ token?: Token | TokenWithBalance;
3327
3364
  }
3328
3365
  }
3329
3366
  declare module 'wapi-client/txs/get-transfer-group/get-transfer-group.enums' {
@@ -3737,8 +3774,8 @@ declare module 'wapi-client/txs/get-transfer/get-transfer.enums' {
3737
3774
  declare module 'wapi-client/txs/find-transfer-many/find-transfer-many.enums' {
3738
3775
  import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions, ITxOrderingInput, ITxFindMetadata } from 'wapi-client/txs/tx-consts.enums';
3739
3776
  import { UniqueWalletFilter } from 'wapi-client/txs/get-wallet/get-wallet.enums';
3740
- import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWherePrimitiveIdentifier, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from 'wapi-client/db/consts.enums';
3741
3777
  import { TransferTableAccessibleFields } from 'wapi-client/db/transfer/transfer.enums';
3778
+ import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWherePrimitiveIdentifier, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from 'wapi-client/db/consts.enums';
3742
3779
  import { UniqueTokenFilter } from 'wapi-client/txs/get-token/get-token.enums';
3743
3780
  import { UniqueTransferGroupFilter } from 'wapi-client/txs/get-transfer-group/get-transfer-group.enums';
3744
3781
  import { Transfer } from 'wapi-client/txs/get-transfer/get-transfer.enums';
@@ -4052,7 +4089,7 @@ declare module 'wapi-client/fns/aggregate-transfers/aggregate-transfers' {
4052
4089
  * Aggregate Transfers using either a simple filter or queryBuilder
4053
4090
  *
4054
4091
  */
4055
- export function aggregateTransfers(options: ClientFunctionOptions): AggregateQueryBuilder<AggregateTransfersFnFields, AggregateTransfersFnStringFields, AggregateTransfersFnMetadataFields, AggregateTransfersFnGroupFields, AggregateTransfersFnOutput>;
4092
+ export function aggregateTransfers(options: ClientFunctionOptions): AggregateQueryBuilder<AggregateTransfersFnFields, AggregateTransfersFnStringFields, AggregateTransfersFnMetadataFields, AggregateTransfersFnGroupFields, AggregateTransfersFnOptions, AggregateTransfersFnOutput>;
4056
4093
  export function aggregateTransfers(options: ClientFunctionOptions, input: AggregateTransfersFnInput, fnOptions?: AggregateTransfersFnOptions): StreamPromise<AggregateTransfersFnOutput>;
4057
4094
  }
4058
4095
  declare module 'wapi-client/txs/create-access-token/create-access-token.enums' {
@@ -6294,8 +6331,8 @@ declare module 'wapi-client/db/transfer-log/transfer-log.enums' {
6294
6331
  }
6295
6332
  declare module 'wapi-client/txs/find-balance-many/find-balance-many.enums' {
6296
6333
  import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions, ITxOrderingInput, ITxFindMetadata } from 'wapi-client/txs/tx-consts.enums';
6297
- import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataNulls } from 'wapi-client/db/consts.enums';
6298
6334
  import { TransferLogTableFields } from 'wapi-client/db/transfer-log/transfer-log.enums';
6335
+ import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataNulls } from 'wapi-client/db/consts.enums';
6299
6336
  import { UniqueWalletFilter } from 'wapi-client/txs/get-wallet/get-wallet.enums';
6300
6337
  import { UniqueTokenFilter } from 'wapi-client/txs/get-token/get-token.enums';
6301
6338
  import { UniqueTransferFilter } from 'wapi-client/txs/get-transfer/get-transfer.enums';
@@ -6446,14 +6483,15 @@ declare module 'wapi-client/fns/find-balances/find-balances' {
6446
6483
  }
6447
6484
  declare module 'wapi-client/txs/find-token-many/find-token-many.enums' {
6448
6485
  import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions, ITxOrderingInput, ITxFindMetadata } from 'wapi-client/txs/tx-consts.enums';
6449
- import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from 'wapi-client/db/consts.enums';
6450
6486
  import { TokenTableFields } from 'wapi-client/db/token/token.enums';
6487
+ import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from 'wapi-client/db/consts.enums';
6451
6488
  import { UniqueWalletFilter } from 'wapi-client/txs/get-wallet/get-wallet.enums';
6452
- import { Token } from 'wapi-client/txs/get-token/get-token.enums';
6489
+ import { Token, TokenWithBalance } from 'wapi-client/txs/get-token/get-token.enums';
6453
6490
  /**
6454
6491
  * Optional flags for input
6455
6492
  */
6456
6493
  export interface FindTokenManyAdditionalOptions {
6494
+ include_balance?: boolean;
6457
6495
  }
6458
6496
  /**
6459
6497
  * Optional flags for input ordering
@@ -6524,20 +6562,19 @@ declare module 'wapi-client/txs/find-token-many/find-token-many.enums' {
6524
6562
  /**
6525
6563
  * Found tokens
6526
6564
  */
6527
- tokens: Token[];
6565
+ tokens: Token[] | TokenWithBalance[];
6528
6566
  metadata: ITxFindMetadata;
6529
6567
  }
6530
6568
  }
6531
6569
  declare module 'wapi-client/fns/find-tokens/find-tokens.enums' {
6532
6570
  import { DbFilterMetadata } from 'wapi-client/db/consts.enums';
6533
6571
  import { IFnFindOptionsExtra } from 'wapi-client/fns/fn-consts.enums';
6534
- import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions } from 'wapi-client/txs/tx-consts.enums';
6535
- import { FindTokenManyOrderingOptions, FindTokenManyTxOutput } from 'wapi-client/txs/find-token-many/find-token-many.enums';
6572
+ import { FindTokenManyTxOptions, FindTokenManyTxOutput } from 'wapi-client/txs/find-token-many/find-token-many.enums';
6536
6573
  export type FindTokensFnInputStringFields = 'foreign' | 'belongs_to';
6537
6574
  /**
6538
6575
  * findtokens function options
6539
6576
  */
6540
- export type FindTokensFnOptions = IFnFindOptionsExtra & ITxLimitingOptions & FindTokenManyOrderingOptions & ITxGeneralOptions & ITxSelectOptions & ITxDeselectOptions & ITxMetadataOptions;
6577
+ export type FindTokensFnOptions = IFnFindOptionsExtra & FindTokenManyTxOptions;
6541
6578
  /**
6542
6579
  * Input for findTokens
6543
6580
  *
@@ -6592,15 +6629,14 @@ declare module 'wapi-client/fns/find-tokens/find-tokens' {
6592
6629
  }
6593
6630
  declare module 'wapi-client/txs/find-transfer-group-many/find-transfer-group-many.enums' {
6594
6631
  import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions, ITxOrderingInput, ITxFindMetadata } from 'wapi-client/txs/tx-consts.enums';
6595
- import { UniqueWalletFilter } from 'wapi-client/txs/get-wallet/get-wallet.enums';
6632
+ import { TransferGroupTableFields } from 'wapi-client/db/transfer-group/transfer-group.enums';
6596
6633
  import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveIdentifier, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from 'wapi-client/db/consts.enums';
6597
6634
  import { UniqueTransferGroupFilter, TransferGroup } from 'wapi-client/txs/get-transfer-group/get-transfer-group.enums';
6598
- import { TransferGroupTableFields } from 'wapi-client/db/transfer-group/transfer-group.enums';
6599
6635
  export interface FindTransferGroupManyAdditionalOptions {
6600
6636
  /**
6601
6637
  * Return running balance for each transfer_group for wallet in question
6602
6638
  */
6603
- return_transfers?: UniqueWalletFilter;
6639
+ return_transfers_count?: boolean;
6604
6640
  }
6605
6641
  /**
6606
6642
  * Optional flags for input ordering
@@ -6675,29 +6711,30 @@ declare module 'wapi-client/txs/find-transfer-group-many/find-transfer-group-man
6675
6711
  *
6676
6712
  * @category Output
6677
6713
  */
6714
+ export interface TransferGroupTransfersCount {
6715
+ /**
6716
+ * Number of transfers in the transfer_group
6717
+ */
6718
+ transfers_count?: number;
6719
+ }
6720
+ export type TransferGroupWithTransfersCount = TransferGroup & TransferGroupTransfersCount;
6678
6721
  export interface FindTransferGroupManyTxOutput {
6679
6722
  /**
6680
6723
  * Found transfers
6681
6724
  */
6682
- transfer_groups: TransferGroup[];
6725
+ transfer_groups: TransferGroupWithTransfersCount[];
6683
6726
  metadata: ITxFindMetadata;
6684
6727
  }
6685
6728
  }
6686
6729
  declare module 'wapi-client/fns/find-transfer-groups/find-transfer-groups.enums' {
6687
6730
  import { DbFilterMetadata, TransferGroupType } from 'wapi-client/db/consts.enums';
6688
6731
  import { IFnFindOptionsExtra } from 'wapi-client/fns/fn-consts.enums';
6689
- import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions } from 'wapi-client/txs/tx-consts.enums';
6690
- import { FindTransferGroupManyOrderingOptions, FindTransferGroupManyTxOutput } from 'wapi-client/txs/find-transfer-group-many/find-transfer-group-many.enums';
6691
- /**
6692
- * simplified options for findTransferGroups
6693
- */
6694
- export interface FindTransferGroupsFnExtraOptions {
6695
- }
6732
+ import { FindTransferGroupManyTxOptions, FindTransferGroupManyTxOutput } from 'wapi-client/txs/find-transfer-group-many/find-transfer-group-many.enums';
6696
6733
  export type FindTransferGroupsFnInputStringFields = 'identifier' | 'reverses';
6697
6734
  /**
6698
6735
  * findTransferGroups function options
6699
6736
  */
6700
- export type FindTransferGroupsFnOptions = IFnFindOptionsExtra & ITxLimitingOptions & FindTransferGroupManyOrderingOptions & ITxGeneralOptions & FindTransferGroupsFnExtraOptions & ITxSelectOptions & ITxDeselectOptions & ITxMetadataOptions;
6737
+ export type FindTransferGroupsFnOptions = IFnFindOptionsExtra & FindTransferGroupManyTxOptions;
6701
6738
  /**
6702
6739
  * Input for findTransferGroups
6703
6740
  *
@@ -6977,7 +7014,7 @@ declare module 'wapi-client/fns/find-wallets/find-wallets.enums' {
6977
7014
  /**
6978
7015
  * Optional flags for input
6979
7016
  */
6980
- export type FindWalletsFnOptions = IFnFindOptionsExtra & FindWalletManyTxOptions & FindWalletsFnExtraOptions;
7017
+ export type FindWalletsFnOptions = IFnFindOptionsExtra & Omit<FindWalletManyTxOptions, keyof FindWalletsFnExtraOptions> & FindWalletsFnExtraOptions;
6981
7018
  /**
6982
7019
  * Input for findWallets
6983
7020
  *
@@ -7166,6 +7203,10 @@ declare module 'wapi-client/txs/get-balance-history/get-balance-history.enums' {
7166
7203
  * Current finished and pending balance sum
7167
7204
  */
7168
7205
  amount?: number;
7206
+ /**
7207
+ * The status of the change to balance
7208
+ */
7209
+ status?: 'pending' | 'finished';
7169
7210
  /**
7170
7211
  * Latest control_hash associated with wallet token combination
7171
7212
  */
@@ -7253,7 +7294,7 @@ declare module 'wapi-client/txs/get-balance-history/get-balance-history.enums' {
7253
7294
  */
7254
7295
  transfer_status_finalized_at?: string | null;
7255
7296
  }
7256
- export type BalanceHistoryFields = 'transfer_id' | 'transfer_identifier' | 'transfer_control_hash' | 'transfer_from_wallet_id' | 'transfer_from_wallet_foreign' | 'transfer_to_wallet_id' | 'transfer_to_wallet_foreign' | 'transfer_amount' | 'transfer_type' | 'transfer_status' | 'transfer_force' | 'transfer_created_at' | 'transfer_updated_at' | 'transfer_metadata' | 'transfer_transfer_group_id' | 'transfer_transfer_group_identifier' | 'transfer_reverses_id' | 'transfer_reverses_identifier' | 'transfer_status_finalized_at' | 'balance_id' | 'token_id' | 'token_foreign' | 'wallet_id' | 'wallet_foreign' | 'pending_amount' | 'pending_amount_to' | 'pending_amount_from' | 'finished_amount' | 'amount' | 'latest_control_hash' | 'updated_at' | 'status';
7297
+ export type BalanceHistoryFields = 'transfer_id' | 'transfer_identifier' | 'transfer_control_hash' | 'transfer_from_wallet_id' | 'transfer_from_wallet_foreign' | 'transfer_to_wallet_id' | 'transfer_to_wallet_foreign' | 'transfer_amount' | 'transfer_type' | 'transfer_status' | 'transfer_force' | 'transfer_created_at' | 'transfer_updated_at' | 'transfer_metadata' | 'transfer_transfer_group_id' | 'transfer_transfer_group_identifier' | 'transfer_reverses_id' | 'transfer_reverses_identifier' | 'transfer_status_finalized_at' | 'balance_id' | 'token_id' | 'token_foreign' | 'wallet_id' | 'wallet_foreign' | 'pending_amount' | 'pending_amount_to' | 'pending_amount_from' | 'finished_amount' | 'amount' | 'latest_control_hash' | 'updated_at' | 'status' | 'available_balance';
7257
7298
  /**
7258
7299
  * Output of getBalanceHistory
7259
7300
  *
@@ -8626,7 +8667,7 @@ declare module 'wapi-client/fns/reverse-transfers/reverse-transfers' {
8626
8667
  * @internal
8627
8668
  *
8628
8669
  */
8629
- export function reverseTransfers(options: ClientFunctionOptions): ReverseQueryBuilder<ReverseTransfersFnFields, ReverseTransfersFnStringFields, ReverseTransfersFnMetadataFields, ReverseTransfersFnModifications, ReverseTransfersFnOutput>;
8670
+ export function reverseTransfers(options: ClientFunctionOptions): ReverseQueryBuilder<ReverseTransfersFnFields, ReverseTransfersFnStringFields, ReverseTransfersFnMetadataFields, ReverseTransfersFnModifications, ReverseTransfersFnOptions, ReverseTransfersFnOutput>;
8630
8671
  export function reverseTransfers(options: ClientFunctionOptions, input: ReverseTransfersFnInput, fnOptions: ReverseTransfersFnOptions): StreamPromise<ReverseTransfersFnOutput>;
8631
8672
  }
8632
8673
  declare module 'wapi-client/txs/set-flags/set-flags.enums' {
@@ -8846,8 +8887,8 @@ declare module 'wapi-client/fns/update-transfer/update-transfer' {
8846
8887
  declare module 'wapi-client/txs/update-transfer-group/update-transfer-group.enums' {
8847
8888
  import { UniqueTransferGroupFilter } from 'wapi-client/txs/get-transfer-group/get-transfer-group.enums';
8848
8889
  import { ITxGeneralOptionsWithoutTx, ITxMetadataAction } from 'wapi-client/txs/tx-consts.enums';
8849
- import { TransferGroupTable } from 'wapi-client/db/transfer-group/transfer-group.enums';
8850
8890
  import { TransferGroupStatus, TransferStatus } from 'wapi-client/db/consts.enums';
8891
+ import { TransferGroupTable } from 'wapi-client/db/transfer-group/transfer-group.enums';
8851
8892
  import { Transfer } from 'wapi-client/txs/get-transfer/get-transfer.enums';
8852
8893
  /**
8853
8894
  * Optional flags for input
@@ -9157,7 +9198,7 @@ declare module 'wapi-client/fns/update-transfer-groups/update-transfer-groups' {
9157
9198
  * @internal
9158
9199
  *
9159
9200
  */
9160
- export function updateTransferGroups(options: ClientFunctionOptions): UpdateQueryBuilder<UpdateTransferGroupsFnFields, UpdateTransferGroupsFnStringFields, UpdateTransferGroupsFnMetadataFields, UpdateTransferGroupsFnResultFields, UpdateTransferGroupData, UpdateTransferGroupsFnOutput>;
9201
+ export function updateTransferGroups(options: ClientFunctionOptions): UpdateQueryBuilder<UpdateTransferGroupsFnFields, UpdateTransferGroupsFnStringFields, UpdateTransferGroupsFnMetadataFields, UpdateTransferGroupsFnResultFields, UpdateTransferGroupData, UpdateTransferGroupsFnOptions, UpdateTransferGroupsFnOutput>;
9161
9202
  export function updateTransferGroups(options: ClientFunctionOptions, input: UpdateTransferGroupsFnInput, fnOptions?: UpdateTransferGroupsFnOptions): StreamPromise<UpdateTransferGroupsFnOutput>;
9162
9203
  }
9163
9204
  declare module 'wapi-client/txs/update-transfer-many/update-transfer-many.enums' {
@@ -9269,7 +9310,7 @@ declare module 'wapi-client/fns/update-transfers/update-transfers' {
9269
9310
  * @internal
9270
9311
  *
9271
9312
  */
9272
- export function updateTransfers(options: ClientFunctionOptions): UpdateQueryBuilder<UpdateTransfersFnFields, UpdateTransfersFnStringFields, UpdateTransfersFnMetadataFields, UpdateTransfersFnResultFields, UpdateTransfersFnUpdateFields, UpdateTransfersFnOutput>;
9313
+ export function updateTransfers(options: ClientFunctionOptions): UpdateQueryBuilder<UpdateTransfersFnFields, UpdateTransfersFnStringFields, UpdateTransfersFnMetadataFields, UpdateTransfersFnResultFields, UpdateTransfersFnUpdateFields, UpdateTransfersFnOptions, UpdateTransfersFnOutput>;
9273
9314
  export function updateTransfers(options: ClientFunctionOptions, input: UpdateTransfersFnInput, fnOptions?: UpdateTransfersFnOptions): StreamPromise<UpdateTransfersFnOutput>;
9274
9315
  }
9275
9316
  declare module 'wapi-client/txs/update-wallet/update-wallet.enums' {
@@ -10223,8 +10264,8 @@ declare module 'wapi-client/txs/create-distribution/create-distribution.enums' {
10223
10264
  import { UniqueWalletFilter } from 'wapi-client/txs/get-wallet/get-wallet.enums';
10224
10265
  import { UniqueTokenFilter } from 'wapi-client/txs/get-token/get-token.enums';
10225
10266
  import { UniqueTransferGroupFilter } from 'wapi-client/txs/get-transfer-group/get-transfer-group.enums';
10226
- import { TransferTable } from 'wapi-client/db/transfer/transfer.enums';
10227
10267
  import { TransferGroupTable } from 'wapi-client/db/transfer-group/transfer-group.enums';
10268
+ import { TransferTable } from 'wapi-client/db/transfer/transfer.enums';
10228
10269
  /**
10229
10270
  * Optional flags for input
10230
10271
  */
@@ -10461,7 +10502,7 @@ declare module 'wapi-client/txs/get-database-import-progress/get-database-import
10461
10502
  }
10462
10503
  }
10463
10504
  declare module 'wapi-client/txs/get-token-many/get-token-many.enums' {
10464
- import { UniqueTokenFilter } from 'wapi-client/txs/get-token/get-token.enums';
10505
+ import { TokenWithBalance, UniqueTokenFilter } from 'wapi-client/txs/get-token/get-token.enums';
10465
10506
  import { ITxGeneralOptions } from 'wapi-client/txs/tx-consts.enums';
10466
10507
  import { TokenTable, TokenTableOptional } from 'wapi-client/db/token/token.enums';
10467
10508
  /**
@@ -10477,6 +10518,10 @@ declare module 'wapi-client/txs/get-token-many/get-token-many.enums' {
10477
10518
  * If true then the returning object is only guaranteed to have id
10478
10519
  */
10479
10520
  return_only_id?: boolean;
10521
+ /**
10522
+ * Return the total system balance of token
10523
+ */
10524
+ include_balance?: boolean;
10480
10525
  }
10481
10526
  export type GetTokenManyTxOptions = ITxGeneralOptions & GetTokenManyAdditionalOptions;
10482
10527
  /**
@@ -10488,7 +10533,7 @@ declare module 'wapi-client/txs/get-token-many/get-token-many.enums' {
10488
10533
  tokens: UniqueTokenFilter[];
10489
10534
  options?: GetTokenManyTxOptions;
10490
10535
  }
10491
- export type TokenResult = TokenTable | TokenTableOptional | null;
10536
+ export type TokenResult = TokenTable | TokenTableOptional | TokenWithBalance | null;
10492
10537
  /**
10493
10538
  * Output of getTokenMany
10494
10539
  *
@@ -11545,7 +11590,7 @@ declare module 'wapi-client/client' {
11545
11590
  * @returns {StreamPromise<AggregateTransfersFnOutput>}
11546
11591
  *
11547
11592
  */
11548
- aggregateTransfers(): AggregateQueryBuilder<AggregateTransfersFnFields, AggregateTransfersFnStringFields, AggregateTransfersFnMetadataFields, AggregateTransfersFnGroupFields, AggregateTransfersFnOutput>;
11593
+ aggregateTransfers(): AggregateQueryBuilder<AggregateTransfersFnFields, AggregateTransfersFnStringFields, AggregateTransfersFnMetadataFields, AggregateTransfersFnGroupFields, AggregateTransfersFnOptions, AggregateTransfersFnOutput>;
11549
11594
  aggregateTransfers(input: AggregateTransfersFnInput, options?: AggregateTransfersFnOptions): StreamPromise<AggregateTransfersFnOutput>;
11550
11595
  /**
11551
11596
  *
@@ -12845,7 +12890,7 @@ declare module 'wapi-client/client' {
12845
12890
  * @returns {StreamPromise<ReverseTransfersFnOutput>}
12846
12891
  *
12847
12892
  */
12848
- reverseTransfers(): ReverseQueryBuilder<ReverseTransfersFnFields, ReverseTransfersFnStringFields, ReverseTransfersFnMetadataFields, ReverseTransfersFnModifications, ReverseTransfersFnOutput>;
12893
+ reverseTransfers(): ReverseQueryBuilder<ReverseTransfersFnFields, ReverseTransfersFnStringFields, ReverseTransfersFnMetadataFields, ReverseTransfersFnModifications, ReverseTransfersFnOptions, ReverseTransfersFnOutput>;
12849
12894
  reverseTransfers(input: ReverseTransfersFnInput, options?: ReverseTransfersFnOptions): StreamPromise<ReverseTransfersFnOutput>;
12850
12895
  /**
12851
12896
  *
@@ -13059,7 +13104,7 @@ declare module 'wapi-client/client' {
13059
13104
  * @returns {StreamPromise<UpdateTransferGroupsFnOutput>}
13060
13105
  *
13061
13106
  */
13062
- updateTransferGroups(): UpdateQueryBuilder<UpdateTransferGroupsFnFields, UpdateTransferGroupsFnStringFields, UpdateTransferGroupsFnMetadataFields, UpdateTransferGroupsFnResultFields, UpdateTransferGroupsFnUpdateFields, UpdateTransferGroupsFnOutput>;
13107
+ updateTransferGroups(): UpdateQueryBuilder<UpdateTransferGroupsFnFields, UpdateTransferGroupsFnStringFields, UpdateTransferGroupsFnMetadataFields, UpdateTransferGroupsFnResultFields, UpdateTransferGroupsFnUpdateFields, UpdateTransferGroupsFnOptions, UpdateTransferGroupsFnOutput>;
13063
13108
  updateTransferGroups(input: UpdateTransferGroupsFnInput, options?: UpdateTransferGroupsFnOptions): StreamPromise<UpdateTransferGroupsFnOutput>;
13064
13109
  /**
13065
13110
  *
@@ -13088,7 +13133,7 @@ declare module 'wapi-client/client' {
13088
13133
  * @returns {StreamPromise<UpdateTransfersFnOutput>}
13089
13134
  *
13090
13135
  */
13091
- updateTransfers(): UpdateQueryBuilder<UpdateTransfersFnFields, UpdateTransfersFnStringFields, UpdateTransfersFnMetadataFields, UpdateTransfersFnResultFields, UpdateTransfersFnUpdateFields, UpdateTransfersFnOutput>;
13136
+ updateTransfers(): UpdateQueryBuilder<UpdateTransfersFnFields, UpdateTransfersFnStringFields, UpdateTransfersFnMetadataFields, UpdateTransfersFnResultFields, UpdateTransfersFnUpdateFields, UpdateTransfersFnOptions, UpdateTransfersFnOutput>;
13092
13137
  updateTransfers(input: UpdateTransfersFnInput, options?: UpdateTransfersFnOptions): StreamPromise<UpdateTransfersFnOutput>;
13093
13138
  /**
13094
13139
  * Update Wallet