wapi-client 0.4.3 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/auth/auth.enums.d.ts +4 -4
- package/dist/api/base-client.d.ts +389 -335
- package/dist/api/connection/connection.enums.d.ts +19 -7
- package/dist/api/http-client.d.ts +15 -0
- package/dist/api/index.d.ts +22 -16
- package/dist/api/jsonrpc/jsonrpc.enums.d.ts +53 -25
- package/dist/api/ws-client.d.ts +26 -25
- package/dist/client.d.ts +1740 -1714
- package/dist/db/consts.enums.d.ts +274 -272
- package/dist/db/index.d.ts +31 -31
- package/dist/db/token/token.enums.d.ts +148 -148
- package/dist/db/transfer/transfer.enums.d.ts +236 -236
- package/dist/db/transfer-group/transfer-group.enums.d.ts +160 -160
- package/dist/db/transfer-log/transfer-log.enums.d.ts +193 -193
- package/dist/db/wallet/wallet.enums.d.ts +148 -148
- package/dist/db/wallet-token-setting/wallet-token-setting.enums.d.ts +96 -96
- package/dist/db/wapi-setting/wapi-setting.enums.d.ts +88 -88
- package/dist/fns/aggregate-transfers/aggregate-transfers.d.ts +18 -18
- package/dist/fns/aggregate-transfers/aggregate-transfers.enums.d.ts +52 -52
- package/dist/fns/aggregate-transfers/aggregate-transfers.guards.d.ts +4 -4
- package/dist/fns/create-access-token/create-access-token.d.ts +8 -0
- package/dist/fns/create-access-token/create-access-token.enums.d.ts +21 -0
- package/dist/fns/create-access-token/create-access-token.guards.d.ts +4 -0
- package/dist/fns/create-contract/create-contract.d.ts +8 -8
- package/dist/fns/create-contract/create-contract.enums.d.ts +63 -63
- package/dist/fns/create-contract/create-contract.guards.d.ts +4 -4
- package/dist/fns/create-deposit/create-deposit.d.ts +9 -9
- package/dist/fns/create-deposit/create-deposit.enums.d.ts +63 -63
- package/dist/fns/create-deposit/create-deposit.guards.d.ts +4 -4
- package/dist/fns/create-exchange/create-exchange.d.ts +10 -10
- package/dist/fns/create-exchange/create-exchange.enums.d.ts +133 -133
- package/dist/fns/create-exchange/create-exchange.guards.d.ts +4 -4
- package/dist/fns/create-token/create-token.d.ts +9 -9
- package/dist/fns/create-token/create-token.enums.d.ts +46 -46
- package/dist/fns/create-token/create-token.guards.d.ts +4 -4
- package/dist/fns/create-transfer/create-transfer.d.ts +11 -11
- package/dist/fns/create-transfer/create-transfer.enums.d.ts +145 -145
- package/dist/fns/create-transfer/create-transfer.guards.d.ts +4 -4
- package/dist/fns/create-transfer-group/create-transfer-group.d.ts +12 -12
- package/dist/fns/create-transfer-group/create-transfer-group.enums.d.ts +142 -142
- package/dist/fns/create-transfer-group/create-transfer-group.guards.d.ts +4 -4
- package/dist/fns/create-transfers/create-transfers.d.ts +10 -10
- package/dist/fns/create-transfers/create-transfers.enums.d.ts +19 -19
- package/dist/fns/create-transfers/create-transfers.guards.d.ts +4 -4
- package/dist/fns/create-wallet/create-wallet.d.ts +9 -9
- package/dist/fns/create-wallet/create-wallet.enums.d.ts +41 -41
- package/dist/fns/create-wallet/create-wallet.guards.d.ts +4 -4
- package/dist/fns/create-withdrawal/create-withdrawal.d.ts +10 -10
- package/dist/fns/create-withdrawal/create-withdrawal.enums.d.ts +63 -63
- package/dist/fns/create-withdrawal/create-withdrawal.guards.d.ts +4 -4
- package/dist/fns/find-balances/find-balances.d.ts +17 -17
- package/dist/fns/find-balances/find-balances.enums.d.ts +30 -30
- package/dist/fns/find-balances/find-balances.guards.d.ts +4 -4
- package/dist/fns/find-tokens/find-tokens.d.ts +18 -18
- package/dist/fns/find-tokens/find-tokens.enums.d.ts +39 -39
- package/dist/fns/find-tokens/find-tokens.guards.d.ts +4 -4
- package/dist/fns/find-transfer-groups/find-transfer-groups.d.ts +17 -17
- package/dist/fns/find-transfer-groups/find-transfer-groups.enums.d.ts +52 -52
- package/dist/fns/find-transfer-groups/find-transfer-groups.guards.d.ts +4 -4
- package/dist/fns/find-transfers/find-transfers.d.ts +18 -18
- package/dist/fns/find-transfers/find-transfers.enums.d.ts +72 -72
- package/dist/fns/find-transfers/find-transfers.guards.d.ts +4 -4
- package/dist/fns/find-wallets/find-wallets.d.ts +18 -18
- package/dist/fns/find-wallets/find-wallets.enums.d.ts +48 -48
- package/dist/fns/find-wallets/find-wallets.guards.d.ts +4 -4
- package/dist/fns/fn-consts.enums.d.ts +14 -14
- package/dist/fns/get-balance/get-balance.d.ts +9 -9
- package/dist/fns/get-balance/get-balance.enums.d.ts +30 -30
- package/dist/fns/get-balance/get-balance.guards.d.ts +4 -4
- package/dist/fns/get-balance-history/get-balance-history.d.ts +9 -9
- package/dist/fns/get-balance-history/get-balance-history.enums.d.ts +29 -29
- package/dist/fns/get-balance-history/get-balance-history.guards.d.ts +4 -4
- package/dist/fns/get-flags/get-flags.d.ts +9 -9
- package/dist/fns/get-flags/get-flags.enums.d.ts +17 -17
- package/dist/fns/get-flags/get-flags.guards.d.ts +4 -4
- package/dist/fns/get-statistics/get-statistics.d.ts +9 -9
- package/dist/fns/get-statistics/get-statistics.enums.d.ts +24 -24
- package/dist/fns/get-statistics/get-statistics.guards.d.ts +4 -4
- package/dist/fns/get-token/get-token.d.ts +9 -9
- package/dist/fns/get-token/get-token.enums.d.ts +21 -21
- package/dist/fns/get-token/get-token.guards.d.ts +4 -4
- package/dist/fns/get-transfer/get-transfer.d.ts +9 -9
- package/dist/fns/get-transfer/get-transfer.enums.d.ts +25 -25
- package/dist/fns/get-transfer/get-transfer.guards.d.ts +4 -4
- package/dist/fns/get-transfer-group/get-transfer-group.d.ts +9 -9
- package/dist/fns/get-transfer-group/get-transfer-group.enums.d.ts +25 -25
- package/dist/fns/get-transfer-group/get-transfer-group.guards.d.ts +4 -4
- package/dist/fns/get-wallet/get-wallet.d.ts +9 -9
- package/dist/fns/get-wallet/get-wallet.enums.d.ts +25 -25
- package/dist/fns/get-wallet/get-wallet.guards.d.ts +4 -4
- package/dist/fns/import-data/import-data.d.ts +11 -11
- package/dist/fns/import-data/import-data.enums.d.ts +230 -230
- package/dist/fns/import-data/import-data.guards.d.ts +8 -8
- package/dist/fns/import-data/import-data.node.d.ts +11 -11
- package/dist/fns/index.d.ts +280 -273
- package/dist/fns/reverse-transfer/reverse-transfer.d.ts +10 -10
- package/dist/fns/reverse-transfer/reverse-transfer.enums.d.ts +48 -48
- package/dist/fns/reverse-transfer/reverse-transfer.guards.d.ts +4 -4
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.d.ts +10 -10
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.enums.d.ts +64 -64
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.guards.d.ts +4 -4
- package/dist/fns/reverse-transfers/reverse-transfers.d.ts +16 -16
- package/dist/fns/reverse-transfers/reverse-transfers.enums.d.ts +55 -55
- package/dist/fns/reverse-transfers/reverse-transfers.guards.d.ts +4 -4
- package/dist/fns/set-flags/set-flags.d.ts +10 -10
- package/dist/fns/set-flags/set-flags.enums.d.ts +21 -21
- package/dist/fns/set-flags/set-flags.guards.d.ts +4 -4
- package/dist/fns/update-token/update-token.d.ts +8 -8
- package/dist/fns/update-token/update-token.enums.d.ts +43 -43
- package/dist/fns/update-token/update-token.guards.d.ts +4 -4
- package/dist/fns/update-transfer/update-transfer.d.ts +9 -9
- package/dist/fns/update-transfer/update-transfer.enums.d.ts +32 -32
- package/dist/fns/update-transfer/update-transfer.guards.d.ts +4 -4
- package/dist/fns/update-transfer-group/update-transfer-group.d.ts +9 -9
- package/dist/fns/update-transfer-group/update-transfer-group.enums.d.ts +46 -46
- package/dist/fns/update-transfer-group/update-transfer-group.guards.d.ts +4 -4
- package/dist/fns/update-transfer-groups/update-transfer-groups.d.ts +15 -15
- package/dist/fns/update-transfer-groups/update-transfer-groups.enums.d.ts +44 -44
- package/dist/fns/update-transfer-groups/update-transfer-groups.guards.d.ts +4 -4
- package/dist/fns/update-transfers/update-transfers.d.ts +15 -15
- package/dist/fns/update-transfers/update-transfers.enums.d.ts +52 -52
- package/dist/fns/update-transfers/update-transfers.guards.d.ts +4 -4
- package/dist/fns/update-wallet/update-wallet.d.ts +8 -8
- package/dist/fns/update-wallet/update-wallet.enums.d.ts +43 -43
- package/dist/fns/update-wallet/update-wallet.guards.d.ts +4 -4
- package/dist/index.d.ts +80 -73
- package/dist/lib/debug.d.ts +1 -1
- package/dist/lib/errors.d.ts +349 -310
- package/dist/lib/isomorphic/node/get-random-hex.d.ts +1 -1
- package/dist/lib/isomorphic/node/streams.d.ts +28 -29
- package/dist/lib/isomorphic/node/ws.d.ts +2 -2
- package/dist/lib/query-builder.d.ts +252 -252
- package/dist/lib/stream-promise-input.d.ts +33 -33
- package/dist/lib/stream-promise.d.ts +40 -40
- package/dist/lib/utils.d.ts +48 -48
- package/dist/lib/validator.d.ts +269 -253
- package/dist/txs/aggregate-transfer-many/aggregate-transfer-many.enums.d.ts +64 -64
- package/dist/txs/aggregate-transfer-many/aggregate-transfer-many.guards.d.ts +4 -4
- package/dist/txs/authentication-check/authentication-check.enums.d.ts +22 -0
- package/dist/txs/authentication-check/authentication-check.guards.d.ts +4 -0
- package/dist/txs/create-access-token/create-access-token.enums.d.ts +51 -0
- package/dist/txs/create-access-token/create-access-token.guards.d.ts +4 -0
- package/dist/txs/create-contract/create-contract.enums.d.ts +79 -79
- package/dist/txs/create-contract/create-contract.guards.d.ts +4 -4
- package/dist/txs/create-deposit/create-deposit.enums.d.ts +19 -19
- package/dist/txs/create-deposit/create-deposit.guards.d.ts +4 -4
- package/dist/txs/create-distribution/create-distribution.enums.d.ts +107 -104
- package/dist/txs/create-distribution/create-distribution.guards.d.ts +4 -4
- package/dist/txs/create-token/create-token.enums.d.ts +54 -54
- package/dist/txs/create-token/create-token.guards.d.ts +4 -4
- package/dist/txs/create-transfer/create-transfer.enums.d.ts +209 -209
- package/dist/txs/create-transfer/create-transfer.guards.d.ts +4 -4
- package/dist/txs/create-transfer-group/create-transfer-group.enums.d.ts +200 -200
- package/dist/txs/create-transfer-group/create-transfer-group.guards.d.ts +4 -4
- package/dist/txs/create-transfer-many/create-transfer-many.enums.d.ts +53 -53
- package/dist/txs/create-transfer-many/create-transfer-many.guards.d.ts +4 -4
- package/dist/txs/create-wallet/create-wallet.enums.d.ts +20 -20
- package/dist/txs/create-wallet/create-wallet.guards.d.ts +4 -4
- package/dist/txs/create-withdrawal/create-withdrawal.enums.d.ts +19 -19
- package/dist/txs/create-withdrawal/create-withdrawal.guards.d.ts +4 -4
- package/dist/txs/export-database/export-database.enums.d.ts +20 -0
- package/dist/txs/export-database/export-database.guards.d.ts +4 -0
- package/dist/txs/find-balance-many/find-balance-many.enums.d.ts +97 -97
- package/dist/txs/find-balance-many/find-balance-many.guards.d.ts +4 -4
- package/dist/txs/find-token-many/find-token-many.enums.d.ts +81 -81
- package/dist/txs/find-token-many/find-token-many.guards.d.ts +4 -4
- package/dist/txs/find-transfer-group-many/find-transfer-group-many.enums.d.ts +90 -90
- package/dist/txs/find-transfer-group-many/find-transfer-group-many.guards.d.ts +4 -4
- package/dist/txs/find-transfer-many/find-transfer-many.enums.d.ts +93 -93
- package/dist/txs/find-transfer-many/find-transfer-many.guards.d.ts +4 -4
- package/dist/txs/find-wallet-many/find-wallet-many.enums.d.ts +181 -179
- package/dist/txs/find-wallet-many/find-wallet-many.guards.d.ts +4 -4
- package/dist/txs/finish-transaction/finish-transaction.enums.d.ts +33 -29
- package/dist/txs/finish-transaction/finish-transaction.guards.d.ts +4 -4
- package/dist/txs/get-balance/get-balance.enums.d.ts +107 -107
- package/dist/txs/get-balance/get-balance.guards.d.ts +4 -4
- package/dist/txs/get-balance-history/get-balance-history.enums.d.ts +188 -188
- package/dist/txs/get-balance-history/get-balance-history.guards.d.ts +4 -4
- package/dist/txs/get-database-export-progress/get-database-export-progress.enums.d.ts +26 -0
- package/dist/txs/get-database-export-progress/get-database-export-progress.guards.d.ts +4 -0
- package/dist/txs/get-database-import-progress/get-database-import-progress.enums.d.ts +21 -0
- package/dist/txs/get-database-import-progress/get-database-import-progress.guards.d.ts +4 -0
- package/dist/txs/get-flags/get-flags.enums.d.ts +19 -19
- package/dist/txs/get-flags/get-flags.guards.d.ts +4 -4
- package/dist/txs/get-statistics/get-statistics.enums.d.ts +58 -58
- package/dist/txs/get-statistics/get-statistics.guards.d.ts +4 -4
- package/dist/txs/get-token/get-token.enums.d.ts +114 -114
- package/dist/txs/get-token/get-token.guards.d.ts +4 -4
- package/dist/txs/get-token-many/get-token-many.enums.d.ts +36 -36
- package/dist/txs/get-token-many/get-token-many.guards.d.ts +4 -4
- package/dist/txs/get-transfer/get-transfer.enums.d.ts +283 -283
- package/dist/txs/get-transfer/get-transfer.guards.d.ts +4 -4
- package/dist/txs/get-transfer-group/get-transfer-group.enums.d.ts +121 -121
- package/dist/txs/get-transfer-group/get-transfer-group.guards.d.ts +4 -4
- package/dist/txs/get-wallet/get-wallet.enums.d.ts +67 -67
- package/dist/txs/get-wallet/get-wallet.guards.d.ts +4 -4
- package/dist/txs/get-wallet-many/get-wallet-many.enums.d.ts +36 -36
- package/dist/txs/get-wallet-many/get-wallet-many.guards.d.ts +4 -4
- package/dist/txs/import-actions/import-actions.enums.d.ts +179 -206
- package/dist/txs/import-actions/import-actions.guards.d.ts +8 -8
- package/dist/txs/import-database/import-database.enums.d.ts +17 -0
- package/dist/txs/import-database/import-database.guards.d.ts +4 -0
- package/dist/txs/index.d.ts +301 -259
- package/dist/txs/list-database-backups/list-database-backups.enums.d.ts +15 -0
- package/dist/txs/list-database-backups/list-database-backups.guards.d.ts +4 -0
- package/dist/txs/query/query.enums.d.ts +30 -30
- package/dist/txs/query/query.guards.d.ts +4 -4
- package/dist/txs/query-logs/query-logs.enums.d.ts +54 -54
- package/dist/txs/query-logs/query-logs.guards.d.ts +4 -4
- package/dist/txs/reset-database/reset-database.enums.d.ts +34 -34
- package/dist/txs/reset-database/reset-database.guards.d.ts +4 -4
- package/dist/txs/reverse-transfer/reverse-transfer.enums.d.ts +72 -72
- package/dist/txs/reverse-transfer/reverse-transfer.guards.d.ts +4 -4
- package/dist/txs/reverse-transfer-group/reverse-transfer-group.enums.d.ts +95 -95
- package/dist/txs/reverse-transfer-group/reverse-transfer-group.guards.d.ts +4 -4
- package/dist/txs/reverse-transfer-group-many/reverse-transfer-group-many.enums.d.ts +77 -77
- package/dist/txs/reverse-transfer-group-many/reverse-transfer-group-many.guards.d.ts +4 -4
- package/dist/txs/reverse-transfer-many/reverse-transfer-many.enums.d.ts +58 -58
- package/dist/txs/reverse-transfer-many/reverse-transfer-many.guards.d.ts +4 -4
- package/dist/txs/set-flags/set-flags.enums.d.ts +24 -24
- package/dist/txs/set-flags/set-flags.guards.d.ts +4 -4
- package/dist/txs/start-transaction/start-transaction.enums.d.ts +18 -18
- package/dist/txs/start-transaction/start-transaction.guards.d.ts +4 -4
- package/dist/txs/tx-consts.enums.d.ts +236 -236
- package/dist/txs/update-token/update-token.enums.d.ts +51 -51
- package/dist/txs/update-token/update-token.guards.d.ts +4 -4
- package/dist/txs/update-transfer/update-transfer.enums.d.ts +78 -78
- package/dist/txs/update-transfer/update-transfer.guards.d.ts +4 -4
- package/dist/txs/update-transfer-group/update-transfer-group.enums.d.ts +91 -91
- package/dist/txs/update-transfer-group/update-transfer-group.guards.d.ts +4 -4
- package/dist/txs/update-transfer-group-many/update-transfer-group-many.enums.d.ts +40 -40
- package/dist/txs/update-transfer-group-many/update-transfer-group-many.guards.d.ts +4 -4
- package/dist/txs/update-transfer-many/update-transfer-many.enums.d.ts +36 -36
- package/dist/txs/update-transfer-many/update-transfer-many.guards.d.ts +4 -4
- package/dist/txs/update-wallet/update-wallet.enums.d.ts +54 -54
- package/dist/txs/update-wallet/update-wallet.guards.d.ts +4 -4
- package/dist/wapi-client.cjs.development.js +30536 -21458
- package/dist/wapi-client.cjs.js +17 -7
- package/package.json +9 -5
- package/dist/fns/import-data/import-data.web.d.ts +0 -11
- package/dist/lib/isomorphic/web/get-random-hex.d.ts +0 -1
- package/dist/lib/isomorphic/web/streams.d.ts +0 -26
- package/dist/lib/isomorphic/web/ws.d.ts +0 -18
- package/dist/wapi-client.cjs.development.js.map +0 -1
- package/dist/wapi-client.cjs.production.js +0 -2
- package/dist/wapi-client.cjs.production.js.map +0 -1
- package/dist/wapi-client.esm.js +0 -21336
- package/dist/wapi-client.esm.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("stream"),t=require("ajv"),r=require("uuid"),n=require("crypto");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(t);const i=require("ws");function o(...e){process.env.WAPI_DEBUG&&console.log(...e)}class p extends Error{constructor({code:e,message:t,data:r,description:n}){var a;super(t),this.code=e,this.message=t,this.data=r,this.description=null!==(a=null!=n?n:b[t])&&void 0!==a?a:""}toJSON(){return{code:this.code,message:this.message,description:this.description,data:this.data}}}class d extends p{constructor({message:e,data:t,code:r}){super({message:e,data:t,code:r||exports.Errors.DatabaseError})}}class f extends p{constructor({message:e,data:t,code:r}){super({message:e,data:t,code:r||exports.Errors.SchemaValidationError})}}class l extends p{constructor({message:e,data:t,code:r}){super({message:e,data:t,code:r||exports.Errors.InputError})}}class u extends p{constructor({message:e,data:t,code:r}){super({message:e,data:t,code:r||exports.Errors.ConstraintError})}}class c extends p{constructor({message:e,data:t,code:r}){super({message:e,data:t,code:r||exports.Errors.UnknownError})}}class _ extends p{constructor({message:e,data:t,code:r}){super({message:e,data:t,code:r||exports.Errors.ConnectionError})}}class m extends p{constructor({message:e,data:t,code:r}){super({message:e,data:t,code:r||exports.Errors.StreamError})}}class h extends p{constructor({message:e,data:t,code:r}){super({message:e,data:t,code:r||exports.Errors.AuthenticationError})}}function g({message:e,data:t,code:r}){switch(r){case exports.Errors.SchemaValidationError:return new f({message:e,data:t,code:r});case exports.Errors.DatabaseError:return new d({message:e,data:t,code:r});case exports.Errors.InputError:return new l({message:e,data:t,code:r});case exports.Errors.ConstraintError:return new u({message:e,data:t,code:r});case exports.Errors.ConnectionError:return new _({message:e,data:t,code:r});case exports.Errors.StreamError:return new m({message:e,data:t,code:r});case exports.Errors.AuthenticationError:return new h({message:e,data:t,code:r});default:return new c({message:e,data:t,code:r})}}var y,T;exports.Errors=void 0,(y=exports.Errors||(exports.Errors={})).SchemaValidationError="SchemaValidationError",y.DatabaseError="DatabaseError",y.InputError="InputError",y.UnknownError="UnknownError",y.ConstraintError="ConstraintError",y.ConnectionError="ConnectionError",y.StreamError="StreamError",y.AuthenticationError="AuthenticationError",exports.ErrorMessage=void 0,(T=exports.ErrorMessage||(exports.ErrorMessage={})).AUTHENTICATION_FAILED="AUTHENTICATION_FAILED",T.BAL_FUTURE_DATETIME="BAL_FUTURE_DATETIME",T.CONFLICTING_OPTIONS="CONFLICTING_OPTIONS",T.CONTRACT_OWNER_NOT_FOUND="CONTRACT_OWNER_NOT_FOUND",T.DATABASE_ERROR="DATABASE_ERROR",T.DISTRIBUTION_MISSING_TARGETS="DISTRIBUTION_MISSING_TARGETS",T.EXCHANGE_MISSING_TARGETS="EXCHANGE_MISSING_TARGETS",T.IMPORT_MISSING_CONTRACT_TOKEN="IMPORT_MISSING_CONTRACT_TOKEN",T.IMPORT_MISSING_TOKEN_WALLET="IMPORT_MISSING_TOKEN_WALLET",T.IMPORT_OBJECT_DUPLICATE="IMPORT_OBJECT_DUPLICATE",T.IMPORT_OBJECT_EXISTS="IMPORT_OBJECT_EXISTS",T.IMPORT_PREDATED_TRANSFER="IMPORT_PREDATED_TRANSFER",T.IMPORT_USE_BEFORE_CREATE="IMPORT_USE_BEFORE_CREATE",T.INPUT_NEEDS_IDENTIFIER="INPUT_NEEDS_IDENTIFIER",T.INPUT_NEEDS_TOKEN="INPUT_NEEDS_TOKEN",T.INPUT_STREAM_ERROR="INPUT_STREAM_ERROR",T.INPUT_STREAM_TIMEOUT="INPUT_STREAM_TIMEOUT",T.INPUT_STREAM_INVALID="INPUT_STREAM_INVALID",T.INPUT_STREAM_NOT_ALLOWED="INPUT_STREAM_NOT_ALLOWED",T.INPUT_INVALID="INPUT_INVALID",T.INVALID_COMPLEX_FILTER="INVALID_COMPLEX_FILTER",T.INVALID_FIELD_AGR_COMB="INVALID_FIELD_AGR_COMB",T.INVALID_FIELD_FOR_MODEL="INVALID_FIELD_FOR_MODEL",T.INVALID_LATEST_HASH="INVALID_LATEST_HASH",T.INVALID_MODEL="INVALID_MODEL",T.NO_METADATA_ON_MODEL="NO_METADATA_ON_MODEL",T.RUNNING_BALANCE_WITHOUT_WALLET="RUNNING_BALANCE_WITHOUT_WALLET",T.SIGNED_AMOUNT_WITHOUT_WALLET="SIGNED_AMOUNT_WITHOUT_WALLET",T.TOKEN_INVALID_WALLET="TOKEN_INVALID_WALLET",T.TOKEN_LIMIT_REACHED="TOKEN_LIMIT_REACHED",T.TR_AMOUNT_NOT_DIVISIBLE="TR_AMOUNT_NOT_DIVISIBLE",T.TR_CANCELLED_CANT_RV="TR_CANCELLED_CANT_RV",T.TR_CANT_UPDATE_TO_PENDING="TR_CANT_UPDATE_TO_PENDING",T.TR_DEPOSIT_CANT_RV_WITHOUT_FLAG="TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",T.TR_FROM_WALLET_DEPOSIT="TR_FROM_WALLET_DEPOSIT",T.TR_FROM_WALLET_STATUS_CONSTRAINT="TR_FROM_WALLET_STATUS_CONSTRAINT",T.TR_INVALID_BALANCE="TR_INVALID_BALANCE",T.TR_INVALID_CANCELLED="TR_INVALID_CANCELLED",T.TR_TIMESTAMP_IN_PAST="TR_TIMESTAMP_IN_PAST",T.TR_TO_WALLET_STATUS_CONSTRAINT="TR_TO_WALLET_STATUS_CONSTRAINT",T.TR_TO_WALLET_WITHDRAWAL="TR_TO_WALLET_WITHDRAWAL",T.TR_TOKEN_DISABLED="TR_TOKEN_DISABLED",T.TR_TOKEN_DWONLY="TR_TOKEN_DWONLY",T.TR_TRG_CLOSED="TR_TRG_CLOSED",T.TR_TRG_STATUS_MISMATCH="TR_TRG_STATUS_MISMATCH",T.TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG="TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",T.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",T.TRANSACTION_TIMEOUT="TRANSACTION_TIMEOUT",T.TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK="TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK",T.TRG_CANCELLED_CANT_RV="TRG_CANCELLED_CANT_RV",T.TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG="TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",T.TRG_SINGLE_PENDING_TR_CANT_RV="TRG_SINGLE_PENDING_TR_CANT_RV",T.TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG="TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",T.UNCLEAR_AGGREGATOR="UNCLEAR_AGGREGATOR",T.TR_MISSING_FILTER="TR_MISSING_FILTER",T.TRG_MISSING_FILTER="TRG_MISSING_FILTER",T.METHOD_DISABLED="METHOD_DISABLED";const b={AUTHENTICATION_FAILED:"Provided credentials are invalid",BAL_FUTURE_DATETIME:"Balance datetime can't be in the future",CONFLICTING_OPTIONS:"return_running_balance and return_running_balance_for can't be specified together",CONTRACT_OWNER_NOT_FOUND:"Unable to find Wallet specified as Contract token owner",DATABASE_ERROR:"Something went wrong in the DB layer",DISTRIBUTION_MISSING_TARGETS:"Unable to resolve all targets (Wallets, Tokens) for distribution request",EXCHANGE_MISSING_TARGETS:"Unable to resolve all targets (Wallets, Token) for exchange request",IMPORT_MISSING_CONTRACT_TOKEN:"The import contract specifies Token that does not exist",IMPORT_MISSING_TOKEN_WALLET:"The import results in invalid Token without valid Wallet",IMPORT_OBJECT_DUPLICATE:"The import includes create directives for same object multiple times",IMPORT_OBJECT_EXISTS:"The import includes create directives for already existing objects",IMPORT_PREDATED_TRANSFER:"The oldest Transfer in the import file is older than already existing Transfers in the WAPI instance",IMPORT_USE_BEFORE_CREATE:"The import includes create directive for object that is used in Transfer before create dateTime",INPUT_NEEDS_IDENTIFIER:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier",INPUT_NEEDS_TOKEN:"token must be specified on input or in client config",INPUT_STREAM_ERROR:"Input stream emitted an error",INPUT_STREAM_TIMEOUT:"No data provided to input stream in 30s",INPUT_STREAM_INVALID:"Invalid input stream identifier provided",INPUT_STREAM_NOT_ALLOWED:"Method does not support input stream",INPUT_INVALID:"Invalid input on stream",INVALID_COMPLEX_FILTER:"The provided complex filter does not pass validation",INVALID_FIELD_AGR_COMB:"Provided aggregation field was not found on Model",INVALID_FIELD_FOR_MODEL:"Provided groupBy field was not found on Model",INVALID_LATEST_HASH:"Provided latest_control_hash does not match the latest outgoing Transfer from Wallet",INVALID_MODEL:"Provided Model name is invalid",NO_METADATA_ON_MODEL:"Can't use metadata field for grouping as current Model does not have metadata",RUNNING_BALANCE_WITHOUT_WALLET:"return_running_balance option requires Wallet filter to be specified",SIGNED_AMOUNT_WITHOUT_WALLET:"return_signed_balance option requires Wallet filter to be specified",TOKEN_INVALID_WALLET:"Invalid belongs_to wallet provided",TOKEN_LIMIT_REACHED:"Unable to issue more tokens as Token.limit has been reached",TR_AMOUNT_NOT_DIVISIBLE:"Transfer amount is not divisible by specified Token.divisor",TR_CANCELLED_CANT_RV:"Cancelled Transfer can not be reversed",TR_CANT_UPDATE_TO_PENDING:"Transfer status can only move from 'pending'->'finished'/'cancelled",TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true.",TR_FROM_WALLET_DEPOSIT:"From wallet can't be specified when doing a deposit",TR_FROM_WALLET_STATUS_CONSTRAINT:"From wallet.status doesn't allow this type of transfers",TR_INVALID_BALANCE:"Transfer results in invalid balance for a Wallet",TR_INVALID_CANCELLED:"Cant create cancelled transfer",TR_TIMESTAMP_IN_PAST:"Transfer.created_at must be the latest",TR_TO_WALLET_STATUS_CONSTRAINT:"To wallet.status doesn't allow this type of transfers",TR_TO_WALLET_WITHDRAWAL:"To wallet can't be specified when doing a withdrawal",TR_TOKEN_DISABLED:"Token status is set to 'disabled' - no new transfers allowed",TR_TOKEN_DWONLY:"Token status is set to 'dw-only' - only deposits or withdrawals allowed",TR_TRG_CLOSED:"Cant add Transfer to group. TransferGroup is closed",TR_TRG_STATUS_MISMATCH:"Transfers in transfer_group must match transfer_group.transfer_status",TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true.",TRANSACTION_NOT_FOUND:"No open DB transaction with provided was found",TRANSACTION_TIMEOUT:"Transaction timed out",TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK:"For integrity reasons running balance validations are required if TransferGroup.transfer_status_lock = false",TRG_CANCELLED_CANT_RV:"Cancelled TransferGroup can not be reversed",TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true",TRG_SINGLE_PENDING_TR_CANT_RV:"Transfer is part of TransferGroup and can not be reversed separately",TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true",UNCLEAR_AGGREGATOR:"Invalid aggregator function provided",TR_MISSING_FILTER:"Transactions can't reversed or updated without valid filter",TRG_MISSING_FILTER:"Transaction groups can't reversed or updated without valid filter",METHOD_DISABLED:"Method is disabled"};function x(e=8){return n.randomBytes(e).toString("hex")}const j={timeouts:{},values:{},set(e,t){this.timeouts[e]=setTimeout((()=>this.clear(e)),3e4),this.values[e]=t},get(e){return this.values[e]},getKey(e){const t=JSON.parse(JSON.stringify(e));let r="";return Object.keys(t).sort().forEach((e=>{let n="";n=t[e]&&"object"==typeof t[e]&&!Array.isArray(t[e])?this.getKey(t[e]):JSON.stringify(t[e]),r+=e+":"+n})),r},clear(e){this.timeouts[e]&&clearTimeout(this.timeouts[e]),delete this.timeouts[e],delete this.values[e]},clearAll(){Object.keys(this.timeouts).forEach((e=>{clearTimeout(this.timeouts[e])})),this.timeouts={},this.values={}}};function $(e){if(!e)return r.v4();const t=j.getKey(e);if(j.get(t))throw new l({message:exports.ErrorMessage.INPUT_NEEDS_IDENTIFIER,data:e});const n=r.v4();return j.set(t,n),n}function w(e){return new Promise((t=>setTimeout(t,e)))}function I(e){return JSON.parse(JSON.stringify(e))}function F(e,t,r){if(t in e){if(void 0===e[t])throw new f({message:`undefined provided for ${t}`,data:e});return e}if(!r)throw new f({message:`${t} is required if no default set`,data:e});const n=I(e);return n[t]=r,n}function O(e,t){const r=I(e);return delete r[t],r}function k(e){const t=G(e);if(null!=t)return{foreign:t}}function v(e){const t=G(e);if(null!=t)return{identifier:t}}function S({input:e,options:t,validate:r}){var n,a;const s=I(e);return null!==(n=(a=s).options)&&void 0!==n||(a.options=null!=t?t:{}),r(s)}function G(e){return null==e?e:e+""}function W(e){let t=e.host;return"undefined"!=typeof window&&(t=e.host.replace(/^https:/,"wss:")),t+"?"+(r={apikey:e.apikey,apisecret:e.apisecret,db:e.database,clientVersion:e.clientVersion},Object.keys(r).filter((e=>void 0!==r[e])).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`)).join("&"));var r}function C(e,t){const r={};return Object.keys(e).forEach((n=>{t[n]?"string"==typeof t[n]?r[t[n]]=e[n]:r[n]=t[n](e[n]):r[n]=e[n]})),r}function M(e){return e.split(",").map((e=>e.split(" "))).map((e=>{const[t,r]=e;return{field:t,direction:"desc"===r?"desc":"asc"}}))}const E=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,P=[0,31,28,31,30,31,30,31,31,30,31,30,31];function A(e){const t=E.exec(e);if(!t)return!1;const r=+t[1],n=+t[2],a=+t[3];return n>=1&&n<=12&&a>=1&&a<=(2===n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:P[n])}const D=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;const N=/t|\s/i;var q;!function(e){e.version="2.0",e.acknowledgement="ack",e.ping="ping",e.pong="pong",e.streamChunk="streamChunk",e.streamPause="streamPause",e.streamResume="streamResume"}(q||(q={}));class R extends e.Readable{constructor(e){super(e)}_read(e){}}class L extends e.PassThrough{constructor(){super({objectMode:!0})}write(e,t,r){if(r)throw new TypeError("Stream in objectMode, no encoding supported");return super.write(e,t)}end(e,t,r){if(r)throw new TypeError("Stream in objectMode, no encoding supported");return super.end(e,t)}}class U extends e.Transform{constructor(e){super({...e,writableObjectMode:!0,readableObjectMode:!0}),this.dataTransform=e.dataTransform}_transform(e,t,r){this.dataTransform(e).then((e=>{e?r(null,e):r()})).catch(r)}_flush(e){this.dataTransform().then((t=>{t?e(null,t):e()})).catch(e)}}class B{constructor(e){this.streamObject=new R({objectMode:!0}),this.outStreamObject=new R({objectMode:!0}),this.started=!1,this.makeRequest=e}start(e){if(this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),this.started=!0,this.mode=e,void 0===this.makeRequest)return this.streamObject.push(null),void this.resolve(void 0);this.makeRequest(this.streamObject).catch(this.reject);const t=[];if("stream"!==this.mode){if("promise"===this.mode){const e=new Map;this.streamObject.on("data",(r=>{var n;if(void 0===r)return;if(r.error){const e=g(r.error);return this.streamObject.destroy(e)}if(!r.prop)return void t.push(r);const a=null!==(n=e.get(r.prop))&&void 0!==n?n:[];r.dataArr?a.push(...r.dataArr):a.push(r.data),e.set(r.prop,a)})).on("end",(()=>{const r=t.pop();if(!r)return;const n=r.result;if(!e.size)return this.resolve(n);let a=!1;e.forEach(((e,t)=>{Array.isArray(n[t])?(e.push(...n[t]),n[t]=e):1===e.length?n[t]=e:(this.streamObject.destroy(new m({message:"Received multiple chunks for non-array property "+t,code:exports.Errors.StreamError,data:e})),a=!0)})),a||this.resolve(n)})).on("error",this.reject)}}else this.streamObject.on("data",(e=>{if(e||this.outStreamObject.push(e),e.error){const t=g(e.error);return this.outStreamObject.destroy(t),this.streamObject.destroy(t)}if(e.prop){if(e.dataArr){const t={...e};return delete t.dataArr,void e.dataArr.forEach((e=>{this.outStreamObject.push({...t,data:e})}))}this.outStreamObject.push(e)}else t.push(e)})).on("end",(()=>{const e=t.pop();if(!e)return;const r=e.result;Object.keys(r).forEach((e=>{Array.isArray(r[e])&&(r[e].forEach((t=>{this.outStreamObject.push({type:q.streamChunk,prop:e,data:t})})),r[e]=[])})),this.outStreamObject.push(e),this.outStreamObject.push(null)})).on("error",(e=>{this.outStreamObject.destroy(e)}))}then(e,t){return this.start("promise"),this.promise.then(e,t)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}}class H extends B{constructor(e,t){super(e),this.inputStream=t}input(e){return e?"function"==typeof e?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}}var V={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}},z={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}},K={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{description:"Connection options for api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws"]}}},J={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean"]}}},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array"}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:["object"]}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{type:"array",items:{type:["string","number"]},minItems:1}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{type:"array",items:{type:["string","number"]},minItems:1}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting"]}}},Q={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]},X={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]},Y={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]},Z={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]},ee={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]},te={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]},re={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]},ne={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]},ae={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]},se={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1},ie={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",default:"(pending_amount_from + finished_amount)",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]},oe={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",default:"(pending_amount_from + finished_amount)",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]},pe={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]},de={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},fe={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]},le={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1},ue={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},ce={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]},_e={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]},me={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]},he={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]},ge={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0},ye={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"},Te={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'},be={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"},xe={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'},je={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"},$e={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1},we={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]},Ie={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'},Fe={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"},Oe={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'},ke={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"},ve={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'},Se={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"},Ge={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1},We={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"},Ce={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'},Me={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"},Ee={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'},Pe={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"},Ae={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1},De={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"},Ne={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1},qe={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"},Re={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_groups_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_groups_fn_extra_options:{description:"simplified options for findTransferGroups",type:"object",properties:{},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1},Le={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"},Ue={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1},Be={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"},He={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1},Ve={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"},ze={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}},Ke={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1},Je={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"},Qe={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1},Xe={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"},Ye={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1},Ze={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"},et={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1},tt={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"},rt={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1},nt={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"},at={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1},st={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"},it={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1},ot={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"},pt={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1},dt={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"},ft={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1},lt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"},ut={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'},ct={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"},_t={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'},mt={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"},ht={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1},gt={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"},yt={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'},Tt={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"},bt={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]},xt={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"},jt={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]},$t={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"},wt={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'}}},It={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"},Ft={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1},Ot={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"},kt={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1},vt={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"},St={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]},Gt={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"},Wt={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1},Ct={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1},Mt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1},Et={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1},Pt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]},At={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]},Dt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1},Nt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1},qt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1},Rt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]},Lt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1},Ut={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]},Bt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:[],additionalProperties:!1},Ht={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1},Vt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1},zt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1},Kt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]},Jt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]},Qt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1},Xt={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]},Yt={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1},Zt={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1},er={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1},tr={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1},rr={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers:{description:"Return running balance for each transfer_group for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},required:["transfer_group"],additionalProperties:!1},nr={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfer_groups","metadata"],additionalProperties:!1},ar={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},required:["transfer"],additionalProperties:!1},sr={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1},ir={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1},or={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1},pr={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1},dr={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{value:{}},additionalProperties:!1},fr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1},lr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1},ur={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},additionalProperties:!1},cr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["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"]}},additionalProperties:!1},_r={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1},mr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1},hr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1},gr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1},yr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1},Tr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",$ref:"#/definitions/token"}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],additionalProperties:!1}},additionalProperties:!1},br={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1},xr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{type:"null"}]}},required:["tokens"],additionalProperties:!1},jr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1},$r={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1},wr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1},Ir={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1},Fr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1},Or={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1},kr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1},vr={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1},Sr={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"},{$ref:"#/definitions/import_action_reverse_transfer"},{$ref:"#/definitions/import_action_reverse_transfer_group"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1},import_action_reverse_transfer_data:{type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/transfer_reverse_modifications"},options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer"],$typescript:'{"additionalProperties": false}'},import_action_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_reverse_transfer_data"}]}},required:["target","data"],additionalProperties:!1},import_action_reverse_transfer_group_data:{type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_modifications"},options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'},import_action_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_reverse_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1},Gr={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1},Wr={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxInput",title:"QueryTxInput",description:"Input for query",type:"object",properties:{query:{description:"SELECT query",type:"string"},params:{description:"Parameters for the query",type:"array"},options:{$ref:"#/definitions/query_tx_options"}},definitions:{query_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["query","params"],additionalProperties:!1},Cr={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxOutput",title:"QueryTxOutput",description:"Output of query",type:"object",properties:{results:{description:"The query results",type:"array"}},required:["results"],additionalProperties:!1},Mr={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1},Er={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1},Pr={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1},Ar={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1},Dr={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1},Nr={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]},qr={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},additionalProperties:!1},Rr={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1},Lr={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1},Ur={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1},Br={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1},Hr={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1},Vr={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1},zr={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1},Kr={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1},Jr={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1},Qr={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}},Xr={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token"],additionalProperties:!1},Yr={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1},Zr={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer"],additionalProperties:!1},en={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1},tn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1},rn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1},nn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1},an={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1},sn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1},on={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1},pn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet"],additionalProperties:!1},dn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};const fn=new s.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^[A-Za-z_][A-Za-z0-9_-]+?$/},strict:!1});function ln(e,t){if(void 0!==t)return new f({message:t,data:e})}function un(e){return function(t){if(void 0===e)return{isValid:!1,inputCopy:t,error:ln([new Error("Undefined validator")],"Undefined validator")};try{const r=I(t),n=e(r),a=n?void 0:e.errors,s=n?void 0:fn.errorsText(a);return{isValid:n,inputCopy:r,error:ln(a,s)}}catch(e){return{isValid:!1,inputCopy:t,error:ln([e],e.message)}}}}function cn(e,t){return _n(JSON.parse(JSON.stringify(e)),t)}function _n(e,t){return"object"!=typeof e||Object.keys(e).forEach((r=>{"$ref"===r&&e.$ref.startsWith("#")?e.$ref=t+e.$ref:e[r]=_n(e[r],t)})),e}function mn(e,t){const r=cn(e,t),n=r.properties.options;return{$id:r.$id.replace("Input","Options"),definitions:r.definitions,...n}}function hn(e,t){const r=cn(e,t),n=r.definitions[e.$allowStreamInput];return{$id:r.$id.replace("Input","StreamChunk"),definitions:r.definitions,...n}}fn.addFormat("date-time",{validate:function(e){const t=e.split(N);return 1===t.length?A(t[0]):2===t.length&&A(t[0])&&function(e,t){const r=D.exec(e);if(!r)return!1;const n=+r[1],a=+r[2],s=+r[3],i=r[5];return(n<=23&&a<=59&&s<=59||23===n&&59===a&&60===s)&&(!t||""!==i)}(t[1])}});const gn={};fn.addSchema(cn(V,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json"),gn.JSONRPCRequest=V,fn.addSchema(cn(z,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json"),gn.JSONRPCResponse=z,fn.addSchema(cn(K,"/client-options.schema.json"),"/client-options.schema.json"),gn.ClientOptions=K,fn.addSchema(cn(J,"/db/consts.schema.json"),"/db/consts.schema.json"),gn.Consts=J,fn.addSchema(cn(Q,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json"),gn.TokenTableInput=Q,fn.addSchema(cn(X,"/db/token/token.schema.json"),"/db/token/token.schema.json"),gn.TokenTable=X,fn.addSchema(cn(Y,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json"),gn.TokenTableOptional=Y,fn.addSchema(cn(Z,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json"),gn.TransferTableInput=Z,fn.addSchema(cn(ee,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json"),gn.TransferTable=ee,fn.addSchema(cn(te,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json"),gn.TransferTableOptional=te,fn.addSchema(cn(re,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json"),gn.TransferGroupTableInput=re,fn.addSchema(cn(ne,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json"),gn.TransferGroupTable=ne,fn.addSchema(cn(ae,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json"),gn.TransferGroupTableOptional=ae,fn.addSchema(cn(se,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json"),gn.TransferLogTableInput=se,fn.addSchema(cn(ie,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json"),gn.TransferLogTable=ie,fn.addSchema(cn(oe,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json"),gn.TransferLogTableOptional=oe,fn.addSchema(cn(pe,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json"),gn.WalletTableInput=pe,fn.addSchema(cn(de,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json"),gn.WalletTable=de,fn.addSchema(cn(fe,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json"),gn.WalletTableOptional=fe,fn.addSchema(cn(le,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),gn.WalletTokenSettingTableInput=le,fn.addSchema(cn(ue,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json"),gn.WalletTokenSettingTable=ue,fn.addSchema(cn(ce,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),gn.WalletTokenSettingTableOptional=ce,fn.addSchema(cn(_e,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json"),gn.WapiSettingTableInput=_e,fn.addSchema(cn(me,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json"),gn.WapiSettingTable=me,fn.addSchema(cn(he,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json"),gn.WapiSettingTableOptional=he,fn.addSchema(cn(ge,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),gn.AggregateTransfersFnInput=ge,fn.addSchema(cn(ye,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),gn.AggregateTransfersFnOutput=ye,fn.addSchema(cn(Te,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json"),gn.CreateContractFnInput=Te,fn.addSchema(cn(be,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json"),gn.CreateContractFnOutput=be,fn.addSchema(cn(xe,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json"),gn.CreateDepositFnInput=xe,fn.addSchema(cn(je,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json"),gn.CreateDepositFnOutput=je,fn.addSchema(cn($e,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json"),gn.CreateExchangeFnInput=$e,fn.addSchema(cn(we,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json"),gn.CreateExchangeFnOutput=we,fn.addSchema(cn(Ie,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json"),gn.CreateTokenFnInput=Ie,fn.addSchema(cn(Fe,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json"),gn.CreateTokenFnOutput=Fe,fn.addSchema(cn(Oe,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json"),gn.CreateTransferFnInput=Oe,fn.addSchema(cn(ke,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json"),gn.CreateTransferFnOutput=ke,fn.addSchema(cn(ve,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json"),gn.CreateTransferGroupFnInput=ve,fn.addSchema(cn(Se,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json"),gn.CreateTransferGroupFnOutput=Se,fn.addSchema(cn(Ge,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json"),gn.CreateTransfersFnInput=Ge,fn.addSchema(cn(We,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json"),gn.CreateTransfersFnOutput=We,fn.addSchema(cn(Ce,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json"),gn.CreateWalletFnInput=Ce,fn.addSchema(cn(Me,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json"),gn.CreateWalletFnOutput=Me,fn.addSchema(cn(Ee,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json"),gn.CreateWithdrawalFnInput=Ee,fn.addSchema(cn(Pe,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json"),gn.CreateWithdrawalFnOutput=Pe,fn.addSchema(cn(Ae,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json"),gn.FindBalancesFnInput=Ae,fn.addSchema(cn(De,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json"),gn.FindBalancesFnOutput=De,fn.addSchema(cn(Ne,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json"),gn.FindTokensFnInput=Ne,fn.addSchema(cn(qe,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json"),gn.FindTokensFnOutput=qe,fn.addSchema(cn(Re,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),gn.FindTransferGroupsFnInput=Re,fn.addSchema(cn(Le,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),gn.FindTransferGroupsFnOutput=Le,fn.addSchema(cn(Ue,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json"),gn.FindTransfersFnInput=Ue,fn.addSchema(cn(Be,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json"),gn.FindTransfersFnOutput=Be,fn.addSchema(cn(He,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json"),gn.FindWalletsFnInput=He,fn.addSchema(cn(Ve,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json"),gn.FindWalletsFnOutput=Ve,fn.addSchema(cn(ze,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json"),gn.FnConsts=ze,fn.addSchema(cn(Ke,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json"),gn.GetBalanceFnInput=Ke,fn.addSchema(cn(Je,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json"),gn.GetBalanceFnOutput=Je,fn.addSchema(cn(Qe,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json"),gn.GetBalanceHistoryFnInput=Qe,fn.addSchema(cn(Xe,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json"),gn.GetBalanceHistoryFnOutput=Xe,fn.addSchema(cn(Ye,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json"),gn.GetFlagsFnInput=Ye,fn.addSchema(cn(Ze,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json"),gn.GetFlagsFnOutput=Ze,fn.addSchema(cn(et,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json"),gn.GetStatisticsFnInput=et,fn.addSchema(cn(tt,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json"),gn.GetStatisticsFnOutput=tt,fn.addSchema(cn(rt,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json"),gn.GetTokenFnInput=rt,fn.addSchema(cn(nt,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json"),gn.GetTokenFnOutput=nt,fn.addSchema(cn(at,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json"),gn.GetTransferFnInput=at,fn.addSchema(cn(st,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json"),gn.GetTransferFnOutput=st,fn.addSchema(cn(it,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json"),gn.GetTransferGroupFnInput=it,fn.addSchema(cn(ot,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json"),gn.GetTransferGroupFnOutput=ot,fn.addSchema(cn(pt,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json"),gn.GetWalletFnInput=pt,fn.addSchema(cn(dt,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json"),gn.GetWalletFnOutput=dt,fn.addSchema(cn(ft,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json"),gn.ImportDataFnInput=ft;const yn=mn(ft,"/fns/import-data/import-data.schema.input.json");fn.addSchema(yn,"/fns/import-data/import-data.schema.options.json"),gn.ImportDataFnOptions=yn;const Tn=hn(ft,"/fns/import-data/import-data.schema.input.json");fn.addSchema(Tn,"/fns/import-data/import-data.schema.chunk.json"),gn.ImportDataFnStreamChunk=Tn,fn.addSchema(cn(lt,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json"),gn.ImportDataFnOutput=lt,fn.addSchema(cn(ut,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json"),gn.ReverseTransferFnInput=ut,fn.addSchema(cn(ct,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json"),gn.ReverseTransferFnOutput=ct,fn.addSchema(cn(_t,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),gn.ReverseTransferGroupFnInput=_t,fn.addSchema(cn(mt,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),gn.ReverseTransferGroupFnOutput=mt,fn.addSchema(cn(ht,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json"),gn.ReverseTransfersFnInput=ht,fn.addSchema(cn(gt,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json"),gn.ReverseTransfersFnOutput=gt,fn.addSchema(cn(yt,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json"),gn.SetFlagsFnInput=yt,fn.addSchema(cn(Tt,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json"),gn.SetFlagsFnOutput=Tt,fn.addSchema(cn(bt,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json"),gn.UpdateTokenFnInput=bt,fn.addSchema(cn(xt,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json"),gn.UpdateTokenFnOutput=xt,fn.addSchema(cn(jt,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json"),gn.UpdateTransferFnInput=jt,fn.addSchema(cn($t,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json"),gn.UpdateTransferFnOutput=$t,fn.addSchema(cn(wt,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json"),gn.UpdateTransferGroupFnInput=wt,fn.addSchema(cn(It,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json"),gn.UpdateTransferGroupFnOutput=It,fn.addSchema(cn(Ft,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),gn.UpdateTransferGroupsFnInput=Ft,fn.addSchema(cn(Ot,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),gn.UpdateTransferGroupsFnOutput=Ot,fn.addSchema(cn(kt,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json"),gn.UpdateTransfersFnInput=kt,fn.addSchema(cn(vt,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json"),gn.UpdateTransfersFnOutput=vt,fn.addSchema(cn(St,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json"),gn.UpdateWalletFnInput=St,fn.addSchema(cn(Gt,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json"),gn.UpdateWalletFnOutput=Gt,fn.addSchema(cn(Wt,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),gn.AggregateTransferManyTxInput=Wt,fn.addSchema(cn(Ct,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),gn.AggregateTransferManyTxOutput=Ct,fn.addSchema(cn(Mt,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json"),gn.CreateContractTxInput=Mt,fn.addSchema(cn(Et,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json"),gn.CreateContractTxOutput=Et,fn.addSchema(cn(Pt,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json"),gn.CreateDepositTxInput=Pt,fn.addSchema(cn(At,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json"),gn.CreateDepositTxOutput=At,fn.addSchema(cn(Dt,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json"),gn.CreateDistributionTxInput=Dt,fn.addSchema(cn(Nt,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json"),gn.CreateDistributionTxOutput=Nt,fn.addSchema(cn(qt,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json"),gn.CreateTokenTxInput=qt,fn.addSchema(cn(Rt,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json"),gn.CreateTokenTxOutput=Rt,fn.addSchema(cn(Lt,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json"),gn.CreateTransferTxInput=Lt,fn.addSchema(cn(Ut,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json"),gn.CreateTransferTxOutput=Ut,fn.addSchema(cn(Bt,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json"),gn.CreateTransferGroupTxInput=Bt,fn.addSchema(cn(Ht,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json"),gn.CreateTransferGroupTxOutput=Ht,fn.addSchema(cn(Vt,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json"),gn.CreateTransferManyTxInput=Vt,fn.addSchema(cn(zt,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json"),gn.CreateTransferManyTxOutput=zt,fn.addSchema(cn(Kt,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json"),gn.CreateWalletTxInput=Kt,fn.addSchema(cn(Jt,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json"),gn.CreateWalletTxOutput=Jt,fn.addSchema(cn(Qt,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json"),gn.CreateWithdrawalTxInput=Qt,fn.addSchema(cn(Xt,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json"),gn.CreateWithdrawalTxOutput=Xt,fn.addSchema(cn(Yt,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json"),gn.FindBalanceManyTxInput=Yt,fn.addSchema(cn(Zt,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json"),gn.FindBalanceManyTxOutput=Zt,fn.addSchema(cn(er,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json"),gn.FindTokenManyTxInput=er,fn.addSchema(cn(tr,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json"),gn.FindTokenManyTxOutput=tr,fn.addSchema(cn(rr,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),gn.FindTransferGroupManyTxInput=rr,fn.addSchema(cn(nr,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),gn.FindTransferGroupManyTxOutput=nr,fn.addSchema(cn(ar,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json"),gn.FindTransferManyTxInput=ar,fn.addSchema(cn(sr,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json"),gn.FindTransferManyTxOutput=sr,fn.addSchema(cn(ir,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json"),gn.FindWalletManyTxInput=ir,fn.addSchema(cn(or,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json"),gn.FindWalletManyTxOutput=or,fn.addSchema(cn(pr,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json"),gn.FinishTransactionTxInput=pr,fn.addSchema(cn(dr,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json"),gn.FinishTransactionTxOutput=dr,fn.addSchema(cn(fr,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json"),gn.GetBalanceTxInput=fr,fn.addSchema(cn(lr,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json"),gn.GetBalanceTxOutput=lr,fn.addSchema(cn(ur,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json"),gn.GetBalanceHistoryTxInput=ur,fn.addSchema(cn(cr,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json"),gn.GetBalanceHistoryTxOutput=cr,fn.addSchema(cn(_r,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json"),gn.GetFlagsTxInput=_r,fn.addSchema(cn(mr,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json"),gn.GetFlagsTxOutput=mr,fn.addSchema(cn(hr,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json"),gn.GetStatisticsTxInput=hr,fn.addSchema(cn(gr,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json"),gn.GetStatisticsTxOutput=gr,fn.addSchema(cn(yr,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json"),gn.GetTokenTxInput=yr,fn.addSchema(cn(Tr,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json"),gn.GetTokenTxOutput=Tr,fn.addSchema(cn(br,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json"),gn.GetTokenManyTxInput=br,fn.addSchema(cn(xr,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json"),gn.GetTokenManyTxOutput=xr,fn.addSchema(cn(jr,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json"),gn.GetTransferTxInput=jr,fn.addSchema(cn($r,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json"),gn.GetTransferTxOutput=$r,fn.addSchema(cn(wr,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json"),gn.GetTransferGroupTxInput=wr,fn.addSchema(cn(Ir,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json"),gn.GetTransferGroupTxOutput=Ir,fn.addSchema(cn(Fr,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json"),gn.GetWalletTxInput=Fr,fn.addSchema(cn(Or,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json"),gn.GetWalletTxOutput=Or,fn.addSchema(cn(kr,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json"),gn.GetWalletManyTxInput=kr,fn.addSchema(cn(vr,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json"),gn.GetWalletManyTxOutput=vr,fn.addSchema(cn(Sr,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json"),gn.ImportActionsTxInput=Sr;const bn=mn(Sr,"/txs/import-actions/import-actions.schema.input.json");fn.addSchema(bn,"/txs/import-actions/import-actions.schema.options.json"),gn.ImportActionsTxOptions=bn;const xn=hn(Sr,"/txs/import-actions/import-actions.schema.input.json");var jn;fn.addSchema(xn,"/txs/import-actions/import-actions.schema.chunk.json"),gn.ImportActionsTxStreamChunk=xn,fn.addSchema(cn(Gr,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json"),gn.ImportActionsTxOutput=Gr,fn.addSchema(cn(Wr,"/txs/query/query.schema.input.json"),"/txs/query/query.schema.input.json"),gn.QueryTxInput=Wr,fn.addSchema(cn(Cr,"/txs/query/query.schema.output.json"),"/txs/query/query.schema.output.json"),gn.QueryTxOutput=Cr,fn.addSchema(cn(Mr,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json"),gn.QueryLogsTxInput=Mr,fn.addSchema(cn(Er,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json"),gn.QueryLogsTxOutput=Er,fn.addSchema(cn(Pr,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json"),gn.ResetDatabaseTxInput=Pr,fn.addSchema(cn(Ar,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json"),gn.ResetDatabaseTxOutput=Ar,fn.addSchema(cn(Dr,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json"),gn.ReverseTransferTxInput=Dr,fn.addSchema(cn(Nr,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json"),gn.ReverseTransferTxOutput=Nr,fn.addSchema(cn(qr,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),gn.ReverseTransferGroupTxInput=qr,fn.addSchema(cn(Rr,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),gn.ReverseTransferGroupTxOutput=Rr,fn.addSchema(cn(Lr,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),gn.ReverseTransferGroupManyTxInput=Lr,fn.addSchema(cn(Ur,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),gn.ReverseTransferGroupManyTxOutput=Ur,fn.addSchema(cn(Br,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),gn.ReverseTransferManyTxInput=Br,fn.addSchema(cn(Hr,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),gn.ReverseTransferManyTxOutput=Hr,fn.addSchema(cn(Vr,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json"),gn.SetFlagsTxInput=Vr,fn.addSchema(cn(zr,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json"),gn.SetFlagsTxOutput=zr,fn.addSchema(cn(Kr,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json"),gn.StartTransactionTxInput=Kr,fn.addSchema(cn(Jr,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json"),gn.StartTransactionTxOutput=Jr,fn.addSchema(cn(Qr,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json"),gn.TxConsts=Qr,fn.addSchema(cn(Xr,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json"),gn.UpdateTokenTxInput=Xr,fn.addSchema(cn(Yr,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json"),gn.UpdateTokenTxOutput=Yr,fn.addSchema(cn(Zr,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json"),gn.UpdateTransferTxInput=Zr,fn.addSchema(cn(en,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json"),gn.UpdateTransferTxOutput=en,fn.addSchema(cn(tn,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json"),gn.UpdateTransferGroupTxInput=tn,fn.addSchema(cn(rn,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json"),gn.UpdateTransferGroupTxOutput=rn,fn.addSchema(cn(nn,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),gn.UpdateTransferGroupManyTxInput=nn,fn.addSchema(cn(an,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),gn.UpdateTransferGroupManyTxOutput=an,fn.addSchema(cn(sn,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json"),gn.UpdateTransferManyTxInput=sn,fn.addSchema(cn(on,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json"),gn.UpdateTransferManyTxOutput=on,fn.addSchema(cn(pn,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json"),gn.UpdateWalletTxInput=pn,fn.addSchema(cn(dn,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json"),gn.UpdateWalletTxOutput=dn,function(e){e.JSONRPCRequest="JSONRPCRequest",e.JSONRPCResponse="JSONRPCResponse",e.ClientOptions="ClientOptions",e.Consts="Consts",e.TokenTableInput="TokenTableInput",e.TokenTable="TokenTable",e.TokenTableOptional="TokenTableOptional",e.TransferTableInput="TransferTableInput",e.TransferTable="TransferTable",e.TransferTableOptional="TransferTableOptional",e.TransferGroupTableInput="TransferGroupTableInput",e.TransferGroupTable="TransferGroupTable",e.TransferGroupTableOptional="TransferGroupTableOptional",e.TransferLogTableInput="TransferLogTableInput",e.TransferLogTable="TransferLogTable",e.TransferLogTableOptional="TransferLogTableOptional",e.WalletTableInput="WalletTableInput",e.WalletTable="WalletTable",e.WalletTableOptional="WalletTableOptional",e.WalletTokenSettingTableInput="WalletTokenSettingTableInput",e.WalletTokenSettingTable="WalletTokenSettingTable",e.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",e.WapiSettingTableInput="WapiSettingTableInput",e.WapiSettingTable="WapiSettingTable",e.WapiSettingTableOptional="WapiSettingTableOptional",e.AggregateTransfersFnInput="AggregateTransfersFnInput",e.AggregateTransfersFnOutput="AggregateTransfersFnOutput",e.CreateContractFnInput="CreateContractFnInput",e.CreateContractFnOutput="CreateContractFnOutput",e.CreateDepositFnInput="CreateDepositFnInput",e.CreateDepositFnOutput="CreateDepositFnOutput",e.CreateExchangeFnInput="CreateExchangeFnInput",e.CreateExchangeFnOutput="CreateExchangeFnOutput",e.CreateTokenFnInput="CreateTokenFnInput",e.CreateTokenFnOutput="CreateTokenFnOutput",e.CreateTransferFnInput="CreateTransferFnInput",e.CreateTransferFnOutput="CreateTransferFnOutput",e.CreateTransferGroupFnInput="CreateTransferGroupFnInput",e.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",e.CreateTransfersFnInput="CreateTransfersFnInput",e.CreateTransfersFnOutput="CreateTransfersFnOutput",e.CreateWalletFnInput="CreateWalletFnInput",e.CreateWalletFnOutput="CreateWalletFnOutput",e.CreateWithdrawalFnInput="CreateWithdrawalFnInput",e.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",e.FindBalancesFnInput="FindBalancesFnInput",e.FindBalancesFnOutput="FindBalancesFnOutput",e.FindTokensFnInput="FindTokensFnInput",e.FindTokensFnOutput="FindTokensFnOutput",e.FindTransferGroupsFnInput="FindTransferGroupsFnInput",e.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",e.FindTransfersFnInput="FindTransfersFnInput",e.FindTransfersFnOutput="FindTransfersFnOutput",e.FindWalletsFnInput="FindWalletsFnInput",e.FindWalletsFnOutput="FindWalletsFnOutput",e.FnConsts="FnConsts",e.GetBalanceFnInput="GetBalanceFnInput",e.GetBalanceFnOutput="GetBalanceFnOutput",e.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",e.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",e.GetFlagsFnInput="GetFlagsFnInput",e.GetFlagsFnOutput="GetFlagsFnOutput",e.GetStatisticsFnInput="GetStatisticsFnInput",e.GetStatisticsFnOutput="GetStatisticsFnOutput",e.GetTokenFnInput="GetTokenFnInput",e.GetTokenFnOutput="GetTokenFnOutput",e.GetTransferFnInput="GetTransferFnInput",e.GetTransferFnOutput="GetTransferFnOutput",e.GetTransferGroupFnInput="GetTransferGroupFnInput",e.GetTransferGroupFnOutput="GetTransferGroupFnOutput",e.GetWalletFnInput="GetWalletFnInput",e.GetWalletFnOutput="GetWalletFnOutput",e.ImportDataFnInput="ImportDataFnInput",e.ImportDataFnOptions="ImportDataFnOptions",e.ImportDataFnStreamChunk="ImportDataFnStreamChunk",e.ImportDataFnOutput="ImportDataFnOutput",e.ReverseTransferFnInput="ReverseTransferFnInput",e.ReverseTransferFnOutput="ReverseTransferFnOutput",e.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",e.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",e.ReverseTransfersFnInput="ReverseTransfersFnInput",e.ReverseTransfersFnOutput="ReverseTransfersFnOutput",e.SetFlagsFnInput="SetFlagsFnInput",e.SetFlagsFnOutput="SetFlagsFnOutput",e.UpdateTokenFnInput="UpdateTokenFnInput",e.UpdateTokenFnOutput="UpdateTokenFnOutput",e.UpdateTransferFnInput="UpdateTransferFnInput",e.UpdateTransferFnOutput="UpdateTransferFnOutput",e.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",e.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",e.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",e.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",e.UpdateTransfersFnInput="UpdateTransfersFnInput",e.UpdateTransfersFnOutput="UpdateTransfersFnOutput",e.UpdateWalletFnInput="UpdateWalletFnInput",e.UpdateWalletFnOutput="UpdateWalletFnOutput",e.AggregateTransferManyTxInput="AggregateTransferManyTxInput",e.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",e.CreateContractTxInput="CreateContractTxInput",e.CreateContractTxOutput="CreateContractTxOutput",e.CreateDepositTxInput="CreateDepositTxInput",e.CreateDepositTxOutput="CreateDepositTxOutput",e.CreateDistributionTxInput="CreateDistributionTxInput",e.CreateDistributionTxOutput="CreateDistributionTxOutput",e.CreateTokenTxInput="CreateTokenTxInput",e.CreateTokenTxOutput="CreateTokenTxOutput",e.CreateTransferTxInput="CreateTransferTxInput",e.CreateTransferTxOutput="CreateTransferTxOutput",e.CreateTransferGroupTxInput="CreateTransferGroupTxInput",e.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",e.CreateTransferManyTxInput="CreateTransferManyTxInput",e.CreateTransferManyTxOutput="CreateTransferManyTxOutput",e.CreateWalletTxInput="CreateWalletTxInput",e.CreateWalletTxOutput="CreateWalletTxOutput",e.CreateWithdrawalTxInput="CreateWithdrawalTxInput",e.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",e.FindBalanceManyTxInput="FindBalanceManyTxInput",e.FindBalanceManyTxOutput="FindBalanceManyTxOutput",e.FindTokenManyTxInput="FindTokenManyTxInput",e.FindTokenManyTxOutput="FindTokenManyTxOutput",e.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",e.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",e.FindTransferManyTxInput="FindTransferManyTxInput",e.FindTransferManyTxOutput="FindTransferManyTxOutput",e.FindWalletManyTxInput="FindWalletManyTxInput",e.FindWalletManyTxOutput="FindWalletManyTxOutput",e.FinishTransactionTxInput="FinishTransactionTxInput",e.FinishTransactionTxOutput="FinishTransactionTxOutput",e.GetBalanceTxInput="GetBalanceTxInput",e.GetBalanceTxOutput="GetBalanceTxOutput",e.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",e.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",e.GetFlagsTxInput="GetFlagsTxInput",e.GetFlagsTxOutput="GetFlagsTxOutput",e.GetStatisticsTxInput="GetStatisticsTxInput",e.GetStatisticsTxOutput="GetStatisticsTxOutput",e.GetTokenTxInput="GetTokenTxInput",e.GetTokenTxOutput="GetTokenTxOutput",e.GetTokenManyTxInput="GetTokenManyTxInput",e.GetTokenManyTxOutput="GetTokenManyTxOutput",e.GetTransferTxInput="GetTransferTxInput",e.GetTransferTxOutput="GetTransferTxOutput",e.GetTransferGroupTxInput="GetTransferGroupTxInput",e.GetTransferGroupTxOutput="GetTransferGroupTxOutput",e.GetWalletTxInput="GetWalletTxInput",e.GetWalletTxOutput="GetWalletTxOutput",e.GetWalletManyTxInput="GetWalletManyTxInput",e.GetWalletManyTxOutput="GetWalletManyTxOutput",e.ImportActionsTxInput="ImportActionsTxInput",e.ImportActionsTxOptions="ImportActionsTxOptions",e.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",e.ImportActionsTxOutput="ImportActionsTxOutput",e.QueryTxInput="QueryTxInput",e.QueryTxOutput="QueryTxOutput",e.QueryLogsTxInput="QueryLogsTxInput",e.QueryLogsTxOutput="QueryLogsTxOutput",e.ResetDatabaseTxInput="ResetDatabaseTxInput",e.ResetDatabaseTxOutput="ResetDatabaseTxOutput",e.ReverseTransferTxInput="ReverseTransferTxInput",e.ReverseTransferTxOutput="ReverseTransferTxOutput",e.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",e.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",e.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",e.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",e.ReverseTransferManyTxInput="ReverseTransferManyTxInput",e.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",e.SetFlagsTxInput="SetFlagsTxInput",e.SetFlagsTxOutput="SetFlagsTxOutput",e.StartTransactionTxInput="StartTransactionTxInput",e.StartTransactionTxOutput="StartTransactionTxOutput",e.TxConsts="TxConsts",e.UpdateTokenTxInput="UpdateTokenTxInput",e.UpdateTokenTxOutput="UpdateTokenTxOutput",e.UpdateTransferTxInput="UpdateTransferTxInput",e.UpdateTransferTxOutput="UpdateTransferTxOutput",e.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",e.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",e.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",e.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",e.UpdateTransferManyTxInput="UpdateTransferManyTxInput",e.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",e.UpdateWalletTxInput="UpdateWalletTxInput",e.UpdateWalletTxOutput="UpdateWalletTxOutput"}(jn||(jn={}));const $n={ajv:fn,createValidator:e=>un(fn.compile(e)),getValidator:e=>un(fn.getSchema(e)),getSchema:e=>gn[e],Schemas:gn,SchemaNames:jn},wn=$n.getValidator;var In,Fn,On,kn,vn;exports.ITxPeriodSimpleEnum=void 0,(In=exports.ITxPeriodSimpleEnum||(exports.ITxPeriodSimpleEnum={})).year="year",In.month="month",In.week="week",In.day="day",In.hour="hour",In.minute="minute",exports.ITxAggregatorSimpleEnum=void 0,(Fn=exports.ITxAggregatorSimpleEnum||(exports.ITxAggregatorSimpleEnum={})).count="count",Fn.countDistinct="countDistinct",Fn.sum="sum",Fn.average="average",Fn.min="min",Fn.max="max",exports.ITxDistributorLeftoverRuleEnum=void 0,(On=exports.ITxDistributorLeftoverRuleEnum||(exports.ITxDistributorLeftoverRuleEnum={})).keep="keep",On.random="random",On.largest="largest",On.target="target",exports.ITxMetadataActionEnum=void 0,(kn=exports.ITxMetadataActionEnum||(exports.ITxMetadataActionEnum={})).replace="replace",kn.extend="extend",exports.ITxMetadataActionForReverseEnum=void 0,(vn=exports.ITxMetadataActionForReverseEnum||(exports.ITxMetadataActionForReverseEnum={})).replace="replace",vn.replace_create_only="replace_create_only",vn.replace_cancel_only="replace_cancel_only",vn.extend="extend",vn.extend_create_only="extend_create_only",vn.extend_cancel_only="extend_cancel_only";const Sn={aggregateTransferMany:wn(jn.AggregateTransferManyTxInput),createContract:wn(jn.CreateContractTxInput),createDeposit:wn(jn.CreateDepositTxInput),createDistribution:wn(jn.CreateDistributionTxInput),createToken:wn(jn.CreateTokenTxInput),createTransfer:wn(jn.CreateTransferTxInput),createTransferGroup:wn(jn.CreateTransferGroupTxInput),createTransferMany:wn(jn.CreateTransferManyTxInput),createWallet:wn(jn.CreateWalletTxInput),createWithdrawal:wn(jn.CreateWithdrawalTxInput),findBalanceMany:wn(jn.FindBalanceManyTxInput),findTokenMany:wn(jn.FindTokenManyTxInput),findTransferGroupMany:wn(jn.FindTransferGroupManyTxInput),findTransferMany:wn(jn.FindTransferManyTxInput),findWalletMany:wn(jn.FindWalletManyTxInput),finishTransaction:wn(jn.FinishTransactionTxInput),getBalance:wn(jn.GetBalanceTxInput),getBalanceHistory:wn(jn.GetBalanceHistoryTxInput),getFlags:wn(jn.GetFlagsTxInput),getStatistics:wn(jn.GetStatisticsTxInput),getToken:wn(jn.GetTokenTxInput),getTokenMany:wn(jn.GetTokenManyTxInput),getTransfer:wn(jn.GetTransferTxInput),getTransferGroup:wn(jn.GetTransferGroupTxInput),getWallet:wn(jn.GetWalletTxInput),getWalletMany:wn(jn.GetWalletManyTxInput),importActions:wn(jn.ImportActionsTxInput),query:wn(jn.QueryTxInput),queryLogs:wn(jn.QueryLogsTxInput),resetDatabase:wn(jn.ResetDatabaseTxInput),reverseTransfer:wn(jn.ReverseTransferTxInput),reverseTransferGroup:wn(jn.ReverseTransferGroupTxInput),reverseTransferGroupMany:wn(jn.ReverseTransferGroupManyTxInput),reverseTransferMany:wn(jn.ReverseTransferManyTxInput),setFlags:wn(jn.SetFlagsTxInput),startTransaction:wn(jn.StartTransactionTxInput),updateToken:wn(jn.UpdateTokenTxInput),updateTransfer:wn(jn.UpdateTransferTxInput),updateTransferGroup:wn(jn.UpdateTransferGroupTxInput),updateTransferGroupMany:wn(jn.UpdateTransferGroupManyTxInput),updateTransferMany:wn(jn.UpdateTransferManyTxInput),updateWallet:wn(jn.UpdateWalletTxInput)};var Gn;exports.APIFunctions=void 0,(Gn=exports.APIFunctions||(exports.APIFunctions={})).aggregateTransferMany="aggregateTransferMany",Gn.createContract="createContract",Gn.createDeposit="createDeposit",Gn.createDistribution="createDistribution",Gn.createToken="createToken",Gn.createTransfer="createTransfer",Gn.createTransferGroup="createTransferGroup",Gn.createTransferMany="createTransferMany",Gn.createWallet="createWallet",Gn.createWithdrawal="createWithdrawal",Gn.findBalanceMany="findBalanceMany",Gn.findTokenMany="findTokenMany",Gn.findTransferGroupMany="findTransferGroupMany",Gn.findTransferMany="findTransferMany",Gn.findWalletMany="findWalletMany",Gn.finishTransaction="finishTransaction",Gn.getBalance="getBalance",Gn.getBalanceHistory="getBalanceHistory",Gn.getFlags="getFlags",Gn.getStatistics="getStatistics",Gn.getToken="getToken",Gn.getTokenMany="getTokenMany",Gn.getTransfer="getTransfer",Gn.getTransferGroup="getTransferGroup",Gn.getWallet="getWallet",Gn.getWalletMany="getWalletMany",Gn.importActions="importActions",Gn.query="query",Gn.queryLogs="queryLogs",Gn.resetDatabase="resetDatabase",Gn.reverseTransfer="reverseTransfer",Gn.reverseTransferGroup="reverseTransferGroup",Gn.reverseTransferGroupMany="reverseTransferGroupMany",Gn.reverseTransferMany="reverseTransferMany",Gn.setFlags="setFlags",Gn.startTransaction="startTransaction",Gn.updateToken="updateToken",Gn.updateTransfer="updateTransfer",Gn.updateTransferGroup="updateTransferGroup",Gn.updateTransferGroupMany="updateTransferGroupMany",Gn.updateTransferMany="updateTransferMany",Gn.updateWallet="updateWallet";const Wn=wn(jn.ImportActionsTxInput);function Cn(e){const{error:t}=Wn(e);return void 0===t}wn(jn.ImportActionsTxOutput),wn(jn.ImportActionsTxStreamChunk);const Mn=wn(jn.ImportActionsTxOptions);var En,Pn;!function(e){e.ready="ready"}(En||(En={})),function(e){e[e.authError=4030]="authError",e[e.genericError=4500]="genericError"}(Pn||(Pn={}));function An(e){const t=function(e){return"undefined"==typeof window?[W(e),{rejectUnauthorized:e.rejectUnauthorized}]:[W(e)]}(Object.assign({rejectUnauthorized:!0,clientVersion:"0.4.3"},e)),r=new i(...t);let n,a,s,p=!1;function d(e){p||(delete r.onmessage,delete r.onerror,delete r.onclose,e?(a(e),r.close()):n(s),p=!0)}r.onclose=function(e){if(o(`createConnection>close(reason:${e.reason},code:${e.code},wasClean:${e.wasClean})`),e.code===Pn.authError)return d(new h({message:exports.ErrorMessage.AUTHENTICATION_FAILED,code:exports.Errors.AuthenticationError}));d(new Error("WS closed"))},r.onerror=function(e){o(`createConnection>error(message:${e.message},error:${e.error},type:${e.type})`),d(e.error)},r.onmessage=function(e){o(`createConnection>message(type:${e.type},data:${e.data})`);const{data:t}=e;let r;try{r=JSON.parse(t.toString())}catch(e){return o("Invalid JSON response",e),d(new Error("Invalid JSON response"))}if(r.result!==En.ready)return o("Invalid first message"),d(new Error("Invalid first message - "+JSON.stringify(r)));s=r.result.id||void 0,d()};const f=new Promise(((e,t)=>{n=e,a=t}));return{ws:r,$connect:f}}class Dn extends class{constructor(e,t){this.isConnected=!1,this.hooks=new Proxy({},{set(e,t,r){if("function"!=typeof r)throw new TypeError("Hooks can only be functions");return e[t]=r,!0}}),this._requests=new Map,this._error=!1,this._sending=new Set,this._connection=e,this.$connect=t}_setConnected(e){this.isConnected=e,this.isConnected&&!1!==this._error&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}async close(){throw new Error("This method must be implemented by child class")}_connectionLost(){this._requests.forEach(((e,t)=>{"stream"in e&&e.stream.destroy(new _({message:"connection lost"})),this._requests.delete(t)})),this.socId=void 0}_handleMessage(e){var t,r,n;if(this.hooks.message&&this.hooks.message(e),"method"in e){const t=e;return t.method===q.ping?void this._send({jsonrpc:q.version,result:q.pong,id:t.id}):void o("Unexpected JSONRPCRequest",e)}const a=e;if(this.hooks.message&&this.hooks.message(a),null===a.id)return void o("Unexpected JSONRPCResponse",e);if(a.result===q.acknowledgement)return void this._sending.delete(a.id);const s=this._requests.get(a.id);if(!s)return void o("No Request found for incoming",e);if("handle"in s)return s.handle(a),void delete s.handle;if(a.error&&"error"in s&&s.error(a.error),(null===(t=a.result)||void 0===t?void 0:t.type)===q.streamPause&&"pause"in s)return void s.pause();if((null===(r=a.result)||void 0===r?void 0:r.type)===q.streamResume&&"resume"in s)return void s.resume();const{stream:i,start:p}=s;(null===(n=a.result)||void 0===n?void 0:n.type)!==q.streamChunk?(i.push(a),i.push(null),this._requests.delete(a.id),this._send({jsonrpc:q.version,method:q.acknowledgement,params:Date.now()-p,id:a.id})):i.push(a.result)}_sendTransaction(e,t){const{isValid:r,inputCopy:n,error:a}=Sn[e](t);if(!r)throw a;const s={jsonrpc:q.version,method:e,params:n,id:x()};return this.hooks.preflight&&!this.hooks.preflight(s)?new B:new B((async e=>{this._error&&this._reconnect(),this.isConnected||await this.$connect,this._requests.set(s.id,{stream:e,start:Date.now()}),this._sending.add(s.id),this._send(s)}))}_streamTransaction(e,t,r,n){const a=Date.now(),s=x();let i;const p=({method:e,params:t})=>{if(i)return;const r={jsonrpc:q.version,method:e,params:{streamId:s,...t},id:x()};this._sending.add(r.id),this._send(r)},d=new L,u=n?d.pipe(n):d,c={jsonrpc:q.version,method:"streamStart",params:{method:e,options:r},id:s};return this.hooks.preflight&&!this.hooks.preflight(c)?new H:new H((async e=>{this._error&&this._reconnect(),this.isConnected||await this.$connect;let r=setTimeout((()=>{e.push({error:new l({message:exports.ErrorMessage.INPUT_STREAM_TIMEOUT})})}),3e4);this._requests.set(c.id,{stream:e,start:a,error(e){i=e,o("stream:error()>",e)},pause(){d.pause()},resume(){d.resume()},handle(n){n.error?e.push(n):u.on("data",(n=>{i||(r&&(clearTimeout(r),r=null),t(n)?p({method:"streamData",params:{data:n}}):((e,t)=>{i||(p({method:"streamError",params:{error:t}}),i=t,e.push({error:t}))})(e,new f({message:exports.ErrorMessage.INPUT_INVALID,data:n})))})).on("error",(t=>{i||(r&&(clearTimeout(r),r=null),p({method:"streamError",params:{error:t}}),e.push({error:new l({message:exports.ErrorMessage.INPUT_STREAM_ERROR,data:t})}))})).on("end",(()=>{r&&(clearTimeout(r),r=null),p({method:"streamEnd",params:{}})}))}}),this._sending.add(c.id),this._send(c)}),d)}aggregateTransferMany(e){return this._sendTransaction(exports.APIFunctions.aggregateTransferMany,e)}createContract(e){return this._sendTransaction(exports.APIFunctions.createContract,e)}createDeposit(e){return this._sendTransaction(exports.APIFunctions.createDeposit,e)}createDistribution(e){return this._sendTransaction(exports.APIFunctions.createDistribution,e)}createToken(e){return this._sendTransaction(exports.APIFunctions.createToken,e)}createTransfer(e){return this._sendTransaction(exports.APIFunctions.createTransfer,e)}createTransferGroup(e){return this._sendTransaction(exports.APIFunctions.createTransferGroup,e)}createTransferMany(e){return this._sendTransaction(exports.APIFunctions.createTransferMany,e)}createWallet(e){return this._sendTransaction(exports.APIFunctions.createWallet,e)}createWithdrawal(e){return this._sendTransaction(exports.APIFunctions.createWithdrawal,e)}findBalanceMany(e){return this._sendTransaction(exports.APIFunctions.findBalanceMany,e)}findTokenMany(e){return this._sendTransaction(exports.APIFunctions.findTokenMany,e)}findTransferGroupMany(e){return this._sendTransaction(exports.APIFunctions.findTransferGroupMany,e)}findTransferMany(e){return this._sendTransaction(exports.APIFunctions.findTransferMany,e)}findWalletMany(e){return this._sendTransaction(exports.APIFunctions.findWalletMany,e)}finishTransaction(e){return this._sendTransaction(exports.APIFunctions.finishTransaction,e)}getBalance(e){return this._sendTransaction(exports.APIFunctions.getBalance,e)}getBalanceHistory(e){return this._sendTransaction(exports.APIFunctions.getBalanceHistory,e)}getFlags(e){return this._sendTransaction(exports.APIFunctions.getFlags,e)}getStatistics(e){return this._sendTransaction(exports.APIFunctions.getStatistics,e)}getToken(e){return this._sendTransaction(exports.APIFunctions.getToken,e)}getTokenMany(e){return this._sendTransaction(exports.APIFunctions.getTokenMany,e)}getTransfer(e){return this._sendTransaction(exports.APIFunctions.getTransfer,e)}getTransferGroup(e){return this._sendTransaction(exports.APIFunctions.getTransferGroup,e)}getWallet(e){return this._sendTransaction(exports.APIFunctions.getWallet,e)}getWalletMany(e){return this._sendTransaction(exports.APIFunctions.getWalletMany,e)}importActions(e){return this._sendTransaction(exports.APIFunctions.importActions,e)}importActionsStream(e,t){if(void 0!==e&&!function(e){const{error:t}=Mn(e);return void 0===t}(e))throw new f({message:exports.ErrorMessage.INPUT_INVALID,data:e});return this._streamTransaction(exports.APIFunctions.importActions,Cn,e,t)}query(e){return this._sendTransaction(exports.APIFunctions.query,e)}queryLogs(e){return this._sendTransaction(exports.APIFunctions.queryLogs,e)}resetDatabase(e){return this._sendTransaction(exports.APIFunctions.resetDatabase,e)}reverseTransfer(e){return this._sendTransaction(exports.APIFunctions.reverseTransfer,e)}reverseTransferGroup(e){return this._sendTransaction(exports.APIFunctions.reverseTransferGroup,e)}reverseTransferGroupMany(e){return this._sendTransaction(exports.APIFunctions.reverseTransferGroupMany,e)}reverseTransferMany(e){return this._sendTransaction(exports.APIFunctions.reverseTransferMany,e)}setFlags(e){return this._sendTransaction(exports.APIFunctions.setFlags,e)}startTransaction(e){return this._sendTransaction(exports.APIFunctions.startTransaction,e)}updateToken(e){return this._sendTransaction(exports.APIFunctions.updateToken,e)}updateTransfer(e){return this._sendTransaction(exports.APIFunctions.updateTransfer,e)}updateTransferGroup(e){return this._sendTransaction(exports.APIFunctions.updateTransferGroup,e)}updateTransferGroupMany(e){return this._sendTransaction(exports.APIFunctions.updateTransferGroupMany,e)}updateTransferMany(e){return this._sendTransaction(exports.APIFunctions.updateTransferMany,e)}updateWallet(e){return this._sendTransaction(exports.APIFunctions.updateWallet,e)}}{constructor(e,t){super(e.ws,e.$connect),this._tryToReconnect=!0,this._config=t,this.$connect.then((e=>(this.socId=e,this._ready()))).catch((e=>{this.socId||this._setErrored(e)}))}_setErrored(e){super._setErrored(e),e.hasOwnProperty("code")&&e.code===exports.Errors.AuthenticationError&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>{const{data:t,type:r}=e;if(o(`message(type:${r},data:${t})`),"message"===r){const e=JSON.parse(t.toString());this._handleMessage(e),this._heartbeat()}},this._connection.onerror=e=>{const{message:t,error:r,type:n}=e;o(`error(message:${t},error:${r},type:${n})`)},this._connection.onclose=e=>{const{reason:t,code:r,wasClean:n}=e;o(`close(reason:${t},code:${r},wasClean:${n})`),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(o("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect())return void o("reconnect hook returned false");const e=process.env.WAPI_RECONNECT_ATTEMPTS&&parseInt(process.env.WAPI_RECONNECT_ATTEMPTS)||10,t=process.env.WAPI_MAX_RECONNECT_WAIT&&parseInt(process.env.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=(async()=>{let r;for(let n=0;n<e+1;n++)try{o("Trying to connect, attempt:",n);const{ws:e,$connect:t}=An(this._config);r=await t,this.socId=r,this._connection=e,this._ready();break}catch(r){if(r.code===exports.Errors.AuthenticationError)throw r;if(n>e-1)throw r;await w(Math.min(1e3*Math.pow(1.5,n),t))}return r})()}_heartbeat(){o("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout((()=>{if(this._sending.size)return o("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();o("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()}),31e3)}_send(e){o("send()",e),this._connection.send(JSON.stringify(e))}async close(){return o("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()}}class Nn{constructor(e){this.filter=[],this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,t,r,n){if("object"==typeof t){const r={};for(const[e,n]of Object.entries(t))r[e]=this.modifierFn?this.modifierFn(e,n):n;return this.add({function:e,value:r})}if("function"==typeof t){const r=new Nn(this.modifierFn);return t.call(r,r),this.add({function:e,inner:r.toJSON().filter})}if(void 0!==n)return this.add({function:e,field:t,operator:r,value:n});if("object"==typeof r)return this.add({function:e,value:{[t]:r}});if(void 0!==r){const n=this.modifierFn?this.modifierFn(t,r):r;return this.add({function:e,field:t,value:n})}throw TypeError("Invalid input")}where(e,t,r){return this.addWhere("where",e,t,r)}orWhere(e,t,r){return this.addWhere("orWhere",e,t,r)}whereIn(e,t){return this.add({function:"whereIn",field:e,value:t})}orWhereIn(e,t){return this.add({function:"orWhereIn",field:e,value:t})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,t,r){return void 0===r?this.add({function:"whereMetadata",field:e,operator:"=",value:t}):this.add({function:"whereMetadata",field:e,operator:t,value:r})}orWhereMetadata(e,t,r){return void 0===r?this.add({function:"orWhereMetadata",field:e,operator:"=",value:t}):this.add({function:"orWhereMetadata",field:e,operator:t,value:r})}whereMetadataIn(e,t){return this.add({function:"whereMetadataIn",field:e,value:t})}orWhereMetadataIn(e,t){return this.add({function:"orWhereMetadataIn",field:e,value:t})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}}function qn(e){return e.map((e=>{if("string"==typeof e){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}}))}class Rn extends Nn{constructor({start:e,modifiers:t,optionsModifiers:r}){super(t),this.optionsObject={},this.execFn=e,this.optionsModifiers=r}start(){return this.execFn(this.toJSON())}toJSON(){return{...super.toJSON(),options:{...this.optionsObject}}}options(e){if(void 0===this.optionsModifiers)return this.optionsObject={...this.optionsObject,...e},this;this.optionsObject={...this.optionsObject};for(const[t,r]of Object.entries(e))this.optionsObject[t]=this.optionsModifiers(t,r);return this}then(e,t){return this.start().then(e,t)}catch(e){return this.start().catch(e)}stream(){return this.start().stream()}}class Ln extends Rn{constructor({start:e,modifiers:t,optionsModifiers:r}){super({start:t=>e(t),modifiers:t,optionsModifiers:r})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,t,r){if(!Array.isArray(e)&&"string"!=typeof e)throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=qn(e),this;if(!e.includes(" "))return this.optionsObject.order=qn([{column:e,order:t||"asc",nulls:r}]),this;const[n,a,s,i]=e.split(" ");if("asc"!==a&&"desc"!==a)throw new TypeError("invalid order");if("nulls"===s&&!["first","last"].includes(i))throw new TypeError("invalid nulls order");return this.optionsObject.order=qn([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}}function Un(e,t){if(!t)return{function:e,alias:e};if(!t.includes(" "))return{function:e,field:t,alias:e};if(!t.includes(" as "))throw new l({message:"Invalid Aggregator"});const[r,n]=t.split(" as ");return{function:e,field:r,alias:n||r}}class Bn extends Rn{constructor({start:e,modifiers:t,optionsModifiers:r}){super({start:t=>e(t),modifiers:t,optionsModifiers:r}),this.aggregatorObject={aggregators:[]},this.timezoneString=""}toJSON(){return{...super.toJSON(),aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))}}timezone(e){return this.timezoneString=e,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach((t=>{"period"===t.type&&(t.field={period:t.field,timezone:e})})),this}groupBy(e,...t){const r={};if("string"!=typeof e)throw new TypeError("expected string as input, got"+typeof e);const[n,a]=e.split(" as ");if(exports.ITxPeriodSimpleEnum.hasOwnProperty(n))r.type="period",r.alias=a||n,this.timezoneString?r.field={period:n,timezone:this.timezoneString}:r.field=n;else if(n.startsWith("metadata.")){const[,e]=n.split(".");r.type="metadata_field",r.field=e,r.alias=a||e}else r.type="field",r.field=n,r.alias=a||n;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(r):this.aggregatorObject.groups=[r],t.length&&t.forEach((e=>this.groupBy(e))),this}count(e){return this.aggregatorObject.aggregators.push(Un("count",e)),this}distinct(e){return this.aggregatorObject.aggregators.push(Un("countDistinct",e)),this}avg(e){return this.aggregatorObject.aggregators.push(Un("average",e)),this}min(e){return this.aggregatorObject.aggregators.push(Un("min",e)),this}max(e){return this.aggregatorObject.aggregators.push(Un("max",e)),this}sum(e){return this.aggregatorObject.aggregators.push(Un("sum",e)),this}}class Hn extends Rn{constructor({start:e,modifiers:t,optionsModifiers:r}){super({start:e,modifiers:t,optionsModifiers:r}),this.updateObject={}}toJSON(){return{...super.toJSON(),update:JSON.parse(JSON.stringify(this.updateObject))}}update(e){return this.updateObject=Object.assign(this.updateObject,e),this}}class Vn extends Rn{constructor({start:e,modifiers:t,optionsModifiers:r}){super({start:e,modifiers:t,optionsModifiers:r}),this.reverseModifications={}}toJSON(){return{...super.toJSON(),reverse:JSON.parse(JSON.stringify(this.reverseModifications))}}reverse(e){return this.reverseModifications=Object.assign(this.reverseModifications,e),this}}const zn=wn(jn.AggregateTransfersFnInput);function Kn(e,t,r){const{client:n}=e;if(void 0===t)return new Bn({start:e=>n.api.aggregateTransferMany({transfer:e.filter,options:e.options,groups:e.groups,aggregators:e.aggregators}),modifiers:(e,t)=>["token","wallet","from_wallet","to_wallet"].includes(e)?k(t):"transfer_group"===e?v(t):t});const{inputCopy:a,error:s}=S({input:t,options:r,validate:zn});if(s)throw s;const{token:i,wallet:o,from_wallet:p,to_wallet:d,transfer_group:f,status:l,metadata:u}=a,c={token:k(i),wallet:k(o),from_wallet:k(p),to_wallet:k(d),transfer_group:v(f),status:l,metadata:u};return n.api.aggregateTransferMany({transfer:c,groups:a.groups,aggregators:a.aggregators})}const Jn=wn(jn.CreateContractFnInput);function Qn(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Jn});if(s)throw s;const i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:k(a.owner),deposits:[{token:k(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:k(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:k(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}const Xn=wn(jn.CreateDepositFnInput);function Yn(e,t,r){const{client:n}=e,a=F(t,"token",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:r,validate:Xn});if(i)throw i;const o=s.token||n.getConfig("token");if(void 0===o)throw new l({message:exports.ErrorMessage.INPUT_NEEDS_TOKEN,data:t});const p=s.options;delete s.options;const d={...s,identifier:s.identifier,transfer_group:v(s.transfer_group),token:k(o),to_wallet:k(s.wallet),type:"deposit"};return d.identifier||(d.identifier=$(d)),n.api.createTransfer({transfer:d,options:C(p,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}const Zn=wn(jn.CreateExchangeFnInput);function ea(e,t,r){var n,a,s,i,o;const{client:p}=e,{inputCopy:d,error:f}=S({input:t,options:r,validate:Zn});if(f)throw f;const l=d.options;return delete d.options,null!==(n=d.identifier)&&void 0!==n||(d.identifier=$(d)),p.api.createTransferGroup({transfer_group:{identifier:d.identifier,status:exports.TransferGroupStatusEnum.closed,transfer_status:null!==(a=d.status)&&void 0!==a?a:"pending",metadata:d.metadata,children:[{identifier:null!==(s=d.from_identifier)&&void 0!==s?s:$(),from_wallet:k(d.from_wallet),to_wallet:k(d.to_wallet),token:k(d.from_token),type:d.from_wallet?exports.TransferTypeEnum.transfer:exports.TransferTypeEnum.deposit,amount:d.from_amount,metadata:d.metadata,force:d.force},{identifier:null!==(i=d.to_identifier)&&void 0!==i?i:$(),from_wallet:k(d.to_wallet),to_wallet:k(d.from_wallet),token:k(d.to_token),type:d.to_wallet?exports.TransferTypeEnum.transfer:exports.TransferTypeEnum.deposit,amount:null!==(o=d.to_amount)&&void 0!==o?o:d.from_amount,metadata:d.metadata,force:d.force}]},options:l})}const ta=wn(jn.CreateTokenFnInput);function ra(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:ta});if(s)throw s;const i=a.options;return delete a.options,n.api.createToken({token:{...a,belongs_to:k(a.belongs_to)},options:i})}const na=wn(jn.CreateTransferFnInput);function aa(e,t,r){const{client:n}=e,a=F(t,"token",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:r,validate:na});if(i)throw i;const o=sa(s,n.getConfig("token"));return o.identifier||(o.identifier=$(o)),n.api.createTransfer({transfer:o,options:s.options})}function sa(e,t){e.type=e.type||"transfer";const r={identifier:e.identifier,token:k(e.token||t),amount:e.amount,metadata:e.metadata,status:e.status,type:e.type,transfer_group:v(e.transfer_group),created_at:e.created_at};return"transfer"===e.type?(e.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),{...r,from_wallet:k(e.from_wallet),to_wallet:k(e.to_wallet)}):"withdrawal"===e.type?(e.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),{...r,from_wallet:k(e.wallet)}):"deposit"===e.type?{...r,to_wallet:k(e.wallet)}:void 0}const ia=wn(jn.CreateTransferGroupFnInput);function oa(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:ia});if(s)throw s;const i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map((e=>sa(e,n.getConfig("token"))))),i.identifier||(i.identifier=$(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}const pa=wn(jn.CreateTransfersFnInput);function da(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:pa});if(s)throw s;const i=a.transfers.map((e=>sa(e,n.getConfig("token"))));for(const e of i)e.identifier||(e.identifier=$(e));return n.api.createTransferMany({transfers:i,options:a.options})}const fa=wn(jn.CreateWalletFnInput);function la(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:fa});if(s)throw s;const i=a.options;return delete a.options,n.api.createWallet({wallet:{...a},options:i})}const ua=wn(jn.CreateWithdrawalFnInput);function ca(e,t,r){const{client:n}=e,a=F(t,"token",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:r,validate:ua});if(i)throw i;const o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);const p=s.token||n.getConfig("token");if(void 0===p)throw new l({message:exports.ErrorMessage.INPUT_NEEDS_TOKEN,data:t});const d={...s,identifier:s.identifier,transfer_group:v(s.transfer_group),token:k(p),from_wallet:k(s.wallet),type:"withdrawal"};return d.identifier||(d.identifier=$(d)),n.api.createTransfer({transfer:d,options:C(o,{return_balance:"return_from_balance"})})}const _a=wn(jn.FindBalancesFnInput);function ma(e,t,r){var n,a;const{client:s}=e;if(void 0===t)return new Ln({start:e=>s.api.findBalanceMany({balance:e.filter,options:e.options}),modifiers:(e,t)=>["wallet","token"].includes(e)?k(t):t});const{inputCopy:i,error:o}=S({input:t,options:r,validate:_a});if(o)throw o;const p={};i.wallet&&(p.wallet=k(i.wallet)),i.token&&(p.token=k(i.token));const d=null===(n=i.options)||void 0===n?void 0:n.order_by;null===(a=i.options)||void 0===a||delete a.order_by;const f={...i.options};return!f.order&&d&&(f.order=M(d)),s.api.findBalanceMany({balance:p,options:f})}const ha=wn(jn.FindTokensFnInput);function ga(e,t,r){var n,a;const{client:s}=e;if(void 0===t)return new Ln({start:e=>s.api.findTokenMany({token:e.filter,options:e.options}),modifiers:(e,t)=>["belongs_to"].includes(e)?k(t):t});const{inputCopy:i,error:o}=S({input:t,options:r,validate:ha});if(o)throw o;const p={foreign:i.foreign?i.foreign+"":void 0,type:i.type,metadata:i.metadata};i.belongs_to&&(p.belongs_to=k(i.belongs_to));const d=null===(n=i.options)||void 0===n?void 0:n.order_by;null===(a=i.options)||void 0===a||delete a.order_by;const f={...i.options};return!f.order&&d&&(f.order=M(d)),s.api.findTokenMany({token:p,options:f})}const ya=wn(jn.FindTransferGroupsFnInput);function Ta(e,t,r){var n,a;const{client:s}=e;if(void 0===t)return new Ln({start:e=>s.api.findTransferGroupMany({transfer_group:e.filter,options:e.options}),modifiers:(e,t)=>["transfer_group","reverses"].includes(e)?v(t):t});const{inputCopy:i,error:o}=S({input:t,options:r,validate:ya});if(o)throw o;const{identifier:p,transfer_status:d,status:f,metadata:l,type:u}=i,c={identifier:p,transfer_status:d,status:f,metadata:l,type:u};i.reverses&&(c.reverses=v(i.reverses));const _=null===(n=i.options)||void 0===n?void 0:n.order_by;null===(a=i.options)||void 0===a||delete a.order_by;const m={...i.options};return!m.order&&_&&(m.order=M(_)),s.api.findTransferGroupMany({transfer_group:c,options:m})}const ba=wn(jn.FindTransfersFnInput);function xa(e,t,r){var n;const{client:a}=e;if(void 0===t)return new Ln({start:e=>a.api.findTransferMany({transfer:e.filter,options:e.options}),modifiers:(e,t)=>["token","wallet","from_wallet","to_wallet"].includes(e)?k(t):"transfer_group"===e?v(t):t});const{inputCopy:s,error:i}=S({input:t,options:r,validate:ba});if(i)throw i;const{token:o,wallet:p,from_wallet:d,to_wallet:f}=s,u={token:k(o),wallet:k(p),from_wallet:k(d),to_wallet:k(f)};s.transfer_group&&(u.transfer_group=v(s.transfer_group)),s.status&&(u.status=s.status),s.metadata&&(u.metadata=s.metadata),null!==(n=s.options)&&void 0!==n||(s.options={});const c=s.options.order_by;if(delete s.options.order_by,s.options.return_running_balance){if(s.options.return_running_balance_for_wallet)throw new l({message:exports.ErrorMessage.CONFLICTING_OPTIONS,data:{options:s.options}});if(!u.wallet)throw new l({message:exports.ErrorMessage.RUNNING_BALANCE_WITHOUT_WALLET,data:{input:s}});s.options.return_running_balance_for_wallet=s.wallet}const _=s.options.return_running_balance_for_wallet;if(delete s.options.return_running_balance_for_wallet,s.options.return_signed_amount){if(s.options.return_signed_amount_for_wallet)throw new l({message:exports.ErrorMessage.CONFLICTING_OPTIONS,data:{options:s.options}});if(!u.wallet)throw new l({message:exports.ErrorMessage.SIGNED_AMOUNT_WITHOUT_WALLET,data:{input:s}});s.options.return_signed_amount_for_wallet=s.wallet}const m=s.options.return_signed_amount_for_wallet;delete s.options.return_signed_amount_for_wallet;const h={...s.options};return!h.order&&c&&(h.order=M(c)),_&&(h.return_running_balance_for_wallet=k(_)),m&&(h.return_signed_amount_for_wallet=k(m)),a.api.findTransferMany({transfer:u,options:h})}const ja=wn(jn.FindWalletsFnInput);function $a(e,t,r){var n;const{client:a}=e;if(void 0===t)return new Ln({start:e=>a.api.findWalletMany({wallet:e.filter,options:e.options}),optionsModifiers:(e,t)=>"include_balance_for_token"===e&&"object"!=typeof t?k(t):t});const{inputCopy:s,error:i}=S({input:t,options:r,validate:ja});if(i)throw i;const o=null!==(n=s.options)&&void 0!==n?n:{};delete s.options;const p={...s},d=o.order_by;delete o.order_by;const f={...o};return!f.order&&d&&(f.order=M(d)),a.api.findWalletMany({wallet:p,options:f})}const wa=wn(jn.GetBalanceFnInput);function Ia(e,t,r){const{client:n}=e,a=F(t,"token",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:r,validate:wa});if(i)throw i;if(s.datetime&&(o=s.datetime,new Date(o).setHours(0,0,0,0)>(new Date).setHours(0,0,0,0)))throw new l({message:exports.ErrorMessage.BAL_FUTURE_DATETIME,data:s});var o;const p=s.token||n.getConfig("token");if(void 0===p)throw new l({message:exports.ErrorMessage.INPUT_NEEDS_TOKEN,data:t});return n.api.getBalance({balance:{wallet:k(s.wallet),token:k(p),datetime:s.datetime},options:s.options})}const Fa=wn(jn.GetBalanceHistoryFnInput);function Oa(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Fa});if(s)throw s;const i=a.token||n.getConfig("token");if(void 0===i)throw new l({message:exports.ErrorMessage.INPUT_NEEDS_TOKEN,data:t});return n.api.getBalanceHistory({balance:{wallet:k(a.wallet),token:k(i)},options:a.options})}const ka=wn(jn.GetFlagsFnInput);function va(e,t,r){const{client:n}=e,{error:a,inputCopy:s}=S({input:t||{},options:r,validate:ka});if(a)throw a;return n.api.getFlags({options:s.options})}const Sa=wn(jn.GetStatisticsFnInput);function Ga(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t||{},options:r,validate:Sa});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}const Wa=wn(jn.GetTokenFnInput);function Ca(e,t={},r){const{client:n}=e,a=F(t,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=S({input:a,options:r,validate:Wa});if(i)throw i;const o=s.foreign||n.getConfig("token");if(void 0===o)throw new l({message:exports.ErrorMessage.INPUT_NEEDS_TOKEN,data:t});return n.api.getToken({token:k(o),options:s.options})}const Ma=wn(jn.GetTransferFnInput);function Ea(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Ma});if(s)throw s;return n.api.getTransfer({transfer:v(a.transfer),options:a.options})}const Pa=wn(jn.GetTransferGroupFnInput);function Aa(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Pa});if(s)throw s;return n.api.getTransferGroup({transfer_group:v(a.transfer_group),options:a.options})}const Da=wn(jn.GetWalletFnInput);function Na(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Da});if(s)throw s;return n.api.getWallet({wallet:k(a.wallet),options:a.options})}const qa=wn(jn.ImportDataFnInput);function Ra(e){const{error:t}=qa(e);return void 0===t}wn(jn.ImportDataFnOutput);const La=wn(jn.ImportDataFnStreamChunk);const Ua=wn(jn.ImportDataFnOptions);function Ba(e){const{error:t}=Ua(e);return void 0===t}const Ha=wn(jn.ImportDataFnInput);function Va(e,t,r){const{client:n}=e;if(void 0===t&&void 0===r)return n.api.importActionsStream(void 0,Ka());if(void 0===r&&Ba(t))return n.api.importActionsStream(t,Ka());const{inputCopy:a,error:s}=S({input:t,options:r,validate:Ha});if(s)throw s;return n.api.importActions(a)}const za=wn(jn.ImportDataFnStreamChunk);function Ka(){let e=[];return new U({async dataTransform(t){if(void 0===t)return{actions:e};if(!function(e){const{error:t}=La(e);return void 0===t}(t)){const{error:e}=za(t);throw new f({message:exports.ErrorMessage.INPUT_INVALID,data:{data:t,error:e}})}if(e.push(function(e){switch(e.target){case"reverse_transfer":return{target:"reverse_transfer",data:{transfer:v(e.data.transfer),reverse:{status:"finished",...O(e.data,"transfer")}}};case"reverse_transfer_group":return{target:"reverse_transfer_group",data:{transfer_group:v(e.data.transfer_group),reverse:{transfer_status:"finished",...O(e.data,"transfer_group")}}};case"wallet":return e;case"token":return{target:"token",data:{...e.data,belongs_to:k(e.data.belongs_to)}};case"transfer":return{target:"transfer",data:{...sa({...e.data,status:"pending"}),status:e.data.status,status_finalized_at:e.data.status_finalized_at}};case"transfer_group":return{target:"transfer_group",data:{...e.data,children:e.data.children.map((e=>sa(e)))}}}}(t)),e.length>=50){const t=e;return e=[],{actions:t}}}})}const Ja=wn(jn.ReverseTransferFnInput);function Qa(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Ja});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:v(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}const Xa=wn(jn.ReverseTransferGroupFnInput);function Ya(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Xa});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:v(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}const Za=wn(jn.ReverseTransfersFnInput);function es(e,t,r){const{client:n}=e;if(void 0===t)return new Vn({start:e=>n.api.reverseTransferMany({transfer:e.filter,reverse:e.reverse,options:e.options}),modifiers:(e,t)=>["token","wallet","from_wallet","to_wallet"].includes(e)?k(t):"transfer_group"===e?v(t):t});const{inputCopy:a,error:s}=S({input:t,options:r,validate:Za});if(s)throw s;const{token:i,wallet:o,from_wallet:p,to_wallet:d}=a,f={token:k(i),wallet:k(o),from_wallet:k(p),to_wallet:k(d)};return a.transfer_group&&(f.transfer_group=v(a.transfer_group)),a.status&&(f.status=a.status),a.metadata&&(f.metadata=a.metadata),n.api.reverseTransferMany({transfer:f,reverse:a.reverse,options:a.options})}var ts,rs,ns,as,ss,is,os,ps,ds,fs,ls,us,cs,_s,ms,hs,gs,ys,Ts,bs;exports.DbFilterFunctionMetadataBasicEnum=void 0,(ts=exports.DbFilterFunctionMetadataBasicEnum||(exports.DbFilterFunctionMetadataBasicEnum={})).whereMetadata="whereMetadata",ts.orWhereMetadata="orWhereMetadata",exports.DbFilterFunctionBasicEnum=void 0,(rs=exports.DbFilterFunctionBasicEnum||(exports.DbFilterFunctionBasicEnum={})).where="where",rs.orWhere="orWhere",exports.DbFilterFunctionInEnum=void 0,(ns=exports.DbFilterFunctionInEnum||(exports.DbFilterFunctionInEnum={})).whereIn="whereIn",ns.orWhereIn="orWhereIn",exports.DbFilterFunctionMetadataInEnum=void 0,(as=exports.DbFilterFunctionMetadataInEnum||(exports.DbFilterFunctionMetadataInEnum={})).whereMetadataIn="whereMetadataIn",as.orWhereMetadataIn="orWhereMetadataIn",exports.DbFilterFunctionMetadataNullEnum=void 0,(ss=exports.DbFilterFunctionMetadataNullEnum||(exports.DbFilterFunctionMetadataNullEnum={})).whereMetadataNull="whereMetadataNull",ss.orWhereMetadataNull="orWhereMetadataNull",ss.whereMetadataNotNull="whereMetadataNotNull",ss.orWhereMetadataNotNull="orWhereMetadataNotNull",exports.DbFilterFunctionNullEnum=void 0,(is=exports.DbFilterFunctionNullEnum||(exports.DbFilterFunctionNullEnum={})).whereNull="whereNull",is.orWhereNull="orWhereNull",is.whereNotNull="whereNotNull",is.orWhereNotNull="orWhereNotNull",exports.DbFilterOperatorEnum=void 0,(os=exports.DbFilterOperatorEnum||(exports.DbFilterOperatorEnum={}))["="]="=",os[">="]=">=",os["<="]="<=",os["<"]="<",os[">"]=">",exports.DbFilterOperatorStringEnum=void 0,(ps=exports.DbFilterOperatorStringEnum||(exports.DbFilterOperatorStringEnum={})).like="like",ps.ilike="ilike",exports.DbFilterOperatorExtendedEnum=void 0,(ds=exports.DbFilterOperatorExtendedEnum||(exports.DbFilterOperatorExtendedEnum={}))["="]="=",ds[">="]=">=",ds["<="]="<=",ds["<"]="<",ds[">"]=">",ds.like="like",ds.ilike="ilike",exports.TokenTypeEnum=void 0,(fs=exports.TokenTypeEnum||(exports.TokenTypeEnum={})).value="value",fs.share="share",fs.group="group",fs.contract="contract",exports.TokenStatusEnum=void 0,(ls=exports.TokenStatusEnum||(exports.TokenStatusEnum={})).active="active",ls["dw-only"]="dw-only",ls.disabled="disabled",exports.TransferGroupStatusEnum=void 0,(us=exports.TransferGroupStatusEnum||(exports.TransferGroupStatusEnum={})).open="open",us.closed="closed",exports.TransferStatusEnum=void 0,(cs=exports.TransferStatusEnum||(exports.TransferStatusEnum={})).pending="pending",cs.finished="finished",cs.cancelled="cancelled",exports.TransferStatusInputEnum=void 0,(_s=exports.TransferStatusInputEnum||(exports.TransferStatusInputEnum={})).pending="pending",_s.finished="finished",exports.TransferGroupTypeEnum=void 0,(ms=exports.TransferGroupTypeEnum||(exports.TransferGroupTypeEnum={})).regular="regular",ms.exchange="exchange",ms.distribution="distribution",exports.TransferTypeEnum=void 0,(hs=exports.TransferTypeEnum||(exports.TransferTypeEnum={})).transfer="transfer",hs.deposit="deposit",hs.withdrawal="withdrawal",exports.WalletTypeEnum=void 0,(gs=exports.WalletTypeEnum||(exports.WalletTypeEnum={})).token="token",gs.house="house",gs.regular="regular",exports.WalletStatusEnum=void 0,(ys=exports.WalletStatusEnum||(exports.WalletStatusEnum={})).active="active",ys.disabled="disabled",exports.WapiSettingTypeEnum=void 0,(Ts=exports.WapiSettingTypeEnum||(exports.WapiSettingTypeEnum={})).flag="flag",Ts.setting="setting",exports.DbModelNameEnum=void 0,(bs=exports.DbModelNameEnum||(exports.DbModelNameEnum={})).Token="Token",bs.TransferGroup="TransferGroup",bs.TransferLog="TransferLog",bs.Transfer="Transfer",bs.WalletTokenSetting="WalletTokenSetting",bs.Wallet="Wallet",bs.WapiSetting="WapiSetting";const xs=wn(jn.SetFlagsFnInput);function js(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:xs});if(s)throw s;const i=Object.keys(J.definitions.Flags.properties),o={};if(i.forEach((e=>{e in a&&(o[e]=a[e])})),Object.keys(o).length<1)throw new l({message:`One of [${i.join()}] is required`,data:t});return n.api.setFlags({flags:o,options:a.options})}const $s=wn(jn.UpdateTokenFnInput);function ws(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:$s});if(s)throw s;return n.api.updateToken({token:k(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}const Is=wn(jn.UpdateTransferFnInput);function Fs(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Is});if(s)throw s;return n.api.updateTransfer({transfer:v(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}const Os=wn(jn.UpdateTransferGroupFnInput);function ks(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Os});if(s)throw s;return n.api.updateTransferGroup({transfer_group:v(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status},options:a.options})}const vs=wn(jn.UpdateTransferGroupsFnInput);function Ss(e,t,r){const{client:n}=e;if(void 0===t)return new Hn({start:e=>n.api.updateTransferGroupMany({transfer_group:e.filter,update:e.update,options:e.options}),modifiers:(e,t)=>["transfer_group","reverses"].includes(e)?v(t):t});const{inputCopy:a,error:s}=S({input:t,options:r,validate:vs});if(s)throw s;const{transfer_status:i,status:o,metadata:p,type:d,update:f}=a,l={transfer_status:i,status:o,metadata:p,type:d};return a.reverses&&(l.reverses=v(a.reverses)),n.api.updateTransferGroupMany({transfer_group:l,update:f,options:a.options})}const Gs=wn(jn.UpdateTransfersFnInput);function Ws(e,t,r){const{client:n}=e;if(void 0===t)return new Hn({start:e=>n.api.updateTransferMany({transfer:e.filter,update:e.update,options:e.options}),modifiers:(e,t)=>["token","wallet","from_wallet","to_wallet"].includes(e)?k(t):"transfer_group"===e?v(t):t});const{inputCopy:a,error:s}=S({input:t,options:r,validate:Gs});if(s)throw s;const{token:i,wallet:o,from_wallet:p,to_wallet:d}=a,f={token:k(i),wallet:k(o),from_wallet:k(p),to_wallet:k(d)};return a.transfer_group&&(f.transfer_group=v(a.transfer_group)),a.status&&(f.status=a.status),a.metadata&&(f.metadata=a.metadata),n.api.updateTransferMany({transfer:f,update:a.update,options:a.options})}const Cs=wn(jn.UpdateWalletFnInput);function Ms(e,t,r){const{client:n}=e,{inputCopy:a,error:s}=S({input:t,options:r,validate:Cs});if(s)throw s;return n.api.updateWallet({wallet:k(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}const Es={aggregateTransfers:wn(jn.AggregateTransfersFnInput),createContract:wn(jn.CreateContractFnInput),createDeposit:wn(jn.CreateDepositFnInput),createExchange:wn(jn.CreateExchangeFnInput),createToken:wn(jn.CreateTokenFnInput),createTransfer:wn(jn.CreateTransferFnInput),createTransferGroup:wn(jn.CreateTransferGroupFnInput),createTransfers:wn(jn.CreateTransfersFnInput),createWallet:wn(jn.CreateWalletFnInput),createWithdrawal:wn(jn.CreateWithdrawalFnInput),findBalances:wn(jn.FindBalancesFnInput),findTokens:wn(jn.FindTokensFnInput),findTransferGroups:wn(jn.FindTransferGroupsFnInput),findTransfers:wn(jn.FindTransfersFnInput),findWallets:wn(jn.FindWalletsFnInput),getBalance:wn(jn.GetBalanceFnInput),getBalanceHistory:wn(jn.GetBalanceHistoryFnInput),getFlags:wn(jn.GetFlagsFnInput),getStatistics:wn(jn.GetStatisticsFnInput),getToken:wn(jn.GetTokenFnInput),getTransfer:wn(jn.GetTransferFnInput),getTransferGroup:wn(jn.GetTransferGroupFnInput),getWallet:wn(jn.GetWalletFnInput),importData:wn(jn.ImportDataFnInput),reverseTransfer:wn(jn.ReverseTransferFnInput),reverseTransferGroup:wn(jn.ReverseTransferGroupFnInput),reverseTransfers:wn(jn.ReverseTransfersFnInput),setFlags:wn(jn.SetFlagsFnInput),updateToken:wn(jn.UpdateTokenFnInput),updateTransfer:wn(jn.UpdateTransferFnInput),updateTransferGroup:wn(jn.UpdateTransferGroupFnInput),updateTransferGroups:wn(jn.UpdateTransferGroupsFnInput),updateTransfers:wn(jn.UpdateTransfersFnInput),updateWallet:wn(jn.UpdateWalletFnInput)},Ps={aggregateTransfers:Kn,createContract:Qn,createDeposit:Yn,createExchange:ea,createToken:ra,createTransfer:aa,createTransferGroup:oa,createTransfers:da,createWallet:la,createWithdrawal:ca,findBalances:ma,findTokens:ga,findTransferGroups:Ta,findTransfers:xa,findWallets:$a,getBalance:Ia,getBalanceHistory:Oa,getFlags:va,getStatistics:Ga,getToken:Ca,getTransfer:Ea,getTransferGroup:Aa,getWallet:Na,importData:Va,reverseTransfer:Qa,reverseTransferGroup:Ya,reverseTransfers:es,setFlags:js,updateToken:ws,updateTransfer:Fs,updateTransferGroup:ks,updateTransferGroups:Ss,updateTransfers:Ws,updateWallet:Ms};var As,Ds;exports.ClientFunctionsEnum=void 0,(As=exports.ClientFunctionsEnum||(exports.ClientFunctionsEnum={})).aggregateTransfers="aggregateTransfers",As.createContract="createContract",As.createDeposit="createDeposit",As.createExchange="createExchange",As.createToken="createToken",As.createTransfer="createTransfer",As.createTransferGroup="createTransferGroup",As.createTransfers="createTransfers",As.createWallet="createWallet",As.createWithdrawal="createWithdrawal",As.findBalances="findBalances",As.findTokens="findTokens",As.findTransferGroups="findTransferGroups",As.findTransfers="findTransfers",As.findWallets="findWallets",As.getBalance="getBalance",As.getBalanceHistory="getBalanceHistory",As.getFlags="getFlags",As.getStatistics="getStatistics",As.getToken="getToken",As.getTransfer="getTransfer",As.getTransferGroup="getTransferGroup",As.getWallet="getWallet",As.importData="importData",As.reverseTransfer="reverseTransfer",As.reverseTransferGroup="reverseTransferGroup",As.reverseTransfers="reverseTransfers",As.setFlags="setFlags",As.updateToken="updateToken",As.updateTransfer="updateTransfer",As.updateTransferGroup="updateTransferGroup",As.updateTransferGroups="updateTransferGroups",As.updateTransfers="updateTransfers",As.updateWallet="updateWallet",exports.ClientQueryBuilderFunctionsEnum=void 0,(Ds=exports.ClientQueryBuilderFunctionsEnum||(exports.ClientQueryBuilderFunctionsEnum={})).findTransfers="findTransfers",Ds.findWallets="findWallets";class Ns{constructor(e,t){if(this.config={},this.api=e,this.$connect=e.$connect,t&&(t.token&&(this.config={...this.config,token:t.token}),t.hooks))for(const[e,r]of Object.entries(t.hooks))this.setHook(e,r)}async close(){return this.api.close()}version(){return"0.4.3"}setHook(e,t){if("function"!=typeof t)throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=t,this}configure(e){return this.config={...this.config,...e},this}getConfig(e){return this.config[e]}aggregateTransfers(e,t){return void 0===e?Ps.aggregateTransfers({client:this}):Ps.aggregateTransfers({client:this},e,t)}createContract(e,t){return Ps.createContract({client:this},e,t)}createDeposit(e,t){return Ps.createDeposit({client:this},e,t)}createExchange(e,t){return Ps.createExchange({client:this},e,t)}createToken(e,t){return Ps.createToken({client:this},e,t)}createTransfer(e,t){return Ps.createTransfer({client:this},e,t)}createTransferGroup(e,t){return Ps.createTransferGroup({client:this},e,t)}createTransfers(e,t){return Ps.createTransfers({client:this},e,t)}createWallet(e,t){return Ps.createWallet({client:this},e,t)}createWithdrawal(e,t){return Ps.createWithdrawal({client:this},e,t)}findBalances(e,t){return void 0===e?Ps.findBalances({client:this}):Ps.findBalances({client:this},e,t)}findTokens(e,t){return void 0===e?Ps.findTokens({client:this}):Ps.findTokens({client:this},e,t)}findTransferGroups(e,t){return void 0===e?Ps.findTransferGroups({client:this}):Ps.findTransferGroups({client:this},e,t)}findTransfers(e,t){return void 0===e?Ps.findTransfers({client:this}):Ps.findTransfers({client:this},e,t)}findWallets(e,t){return void 0===e?Ps.findWallets({client:this}):Ps.findWallets({client:this},e,t)}getBalance(e,t){return Ps.getBalance({client:this},e,t)}getBalanceHistory(e,t){return Ps.getBalanceHistory({client:this},e,t)}getFlags(e,t){return Ps.getFlags({client:this},e,t)}getStatistics(e,t){return Ps.getStatistics({client:this},e,t)}getToken(e,t){return Ps.getToken({client:this},e,t)}getTransfer(e,t){return Ps.getTransfer({client:this},e,t)}getTransferGroup(e,t){return Ps.getTransferGroup({client:this},e,t)}getWallet(e,t){return Ps.getWallet({client:this},e,t)}importData(e,t){if(void 0===e&&void 0===t)return Ps.importData({client:this});if(void 0===t&&Ba(e))return Ps.importData({client:this},e);if(Ra(e))return Ps.importData({client:this},e,t);throw new f({message:exports.ErrorMessage.INPUT_INVALID,data:{input:e,options:t}})}reverseTransfer(e,t){return Ps.reverseTransfer({client:this},e,t)}reverseTransferGroup(e,t){return Ps.reverseTransferGroup({client:this},e,t)}reverseTransfers(e,t){return void 0===e?Ps.reverseTransfers({client:this}):Ps.reverseTransfers({client:this},e,t)}setFlags(e,t){return Ps.setFlags({client:this},e,t)}updateToken(e,t){return Ps.updateToken({client:this},e,t)}updateTransfer(e,t){return Ps.updateTransfer({client:this},e,t)}updateTransferGroup(e,t){return Ps.updateTransferGroup({client:this},e,t)}updateTransferGroups(e,t){return void 0===e?Ps.updateTransferGroups({client:this}):Ps.updateTransferGroups({client:this},e,t)}updateTransfers(e,t){return void 0===e?Ps.updateTransfers({client:this}):Ps.updateTransfers({client:this},e,t)}updateWallet(e,t){return Ps.updateWallet({client:this},e,t)}}function qs(e,t){const r=function(e){const t=An(e);return new Dn(t,e)}(e);return new Ns(r,t)}const Rs=$n.getValidator(jn.ClientOptions);exports.WapiClientType=void 0,(exports.WapiClientType||(exports.WapiClientType={})).ws="ws";const Ls={getIdentifier:function(){return $()}};exports.APIValidators=Sn,exports.AggregateTransferManyTxInputSchema=Wt,exports.AggregateTransferManyTxOutputSchema=Ct,exports.AggregateTransfersFnInputSchema=ge,exports.AggregateTransfersFnOutputSchema=ye,exports.Client=Ns,exports.ClientFunctions=Ps,exports.ClientValidators=Es,exports.ConstsSchema=J,exports.CreateContractFnInputSchema=Te,exports.CreateContractFnOutputSchema=be,exports.CreateContractTxInputSchema=Mt,exports.CreateContractTxOutputSchema=Et,exports.CreateDepositFnInputSchema=xe,exports.CreateDepositFnOutputSchema=je,exports.CreateDepositTxInputSchema=Pt,exports.CreateDepositTxOutputSchema=At,exports.CreateDistributionTxInputSchema=Dt,exports.CreateDistributionTxOutputSchema=Nt,exports.CreateExchangeFnInputSchema=$e,exports.CreateExchangeFnOutputSchema=we,exports.CreateTokenFnInputSchema=Ie,exports.CreateTokenFnOutputSchema=Fe,exports.CreateTokenTxInputSchema=qt,exports.CreateTokenTxOutputSchema=Rt,exports.CreateTransferFnInputSchema=Oe,exports.CreateTransferFnOutputSchema=ke,exports.CreateTransferGroupFnInputSchema=ve,exports.CreateTransferGroupFnOutputSchema=Se,exports.CreateTransferGroupTxInputSchema=Bt,exports.CreateTransferGroupTxOutputSchema=Ht,exports.CreateTransferManyTxInputSchema=Vt,exports.CreateTransferManyTxOutputSchema=zt,exports.CreateTransferTxInputSchema=Lt,exports.CreateTransferTxOutputSchema=Ut,exports.CreateTransfersFnInputSchema=Ge,exports.CreateTransfersFnOutputSchema=We,exports.CreateWalletFnInputSchema=Ce,exports.CreateWalletFnOutputSchema=Me,exports.CreateWalletTxInputSchema=Kt,exports.CreateWalletTxOutputSchema=Jt,exports.CreateWithdrawalFnInputSchema=Ee,exports.CreateWithdrawalFnOutputSchema=Pe,exports.CreateWithdrawalTxInputSchema=Qt,exports.CreateWithdrawalTxOutputSchema=Xt,exports.FindBalanceManyTxInputSchema=Yt,exports.FindBalanceManyTxOutputSchema=Zt,exports.FindBalancesFnInputSchema=Ae,exports.FindBalancesFnOutputSchema=De,exports.FindTokenManyTxInputSchema=er,exports.FindTokenManyTxOutputSchema=tr,exports.FindTokensFnInputSchema=Ne,exports.FindTokensFnOutputSchema=qe,exports.FindTransferGroupManyTxInputSchema=rr,exports.FindTransferGroupManyTxOutputSchema=nr,exports.FindTransferGroupsFnInputSchema=Re,exports.FindTransferGroupsFnOutputSchema=Le,exports.FindTransferManyTxInputSchema=ar,exports.FindTransferManyTxOutputSchema=sr,exports.FindTransfersFnInputSchema=Ue,exports.FindTransfersFnOutputSchema=Be,exports.FindWalletManyTxInputSchema=ir,exports.FindWalletManyTxOutputSchema=or,exports.FindWalletsFnInputSchema=He,exports.FindWalletsFnOutputSchema=Ve,exports.FinishTransactionTxInputSchema=pr,exports.FinishTransactionTxOutputSchema=dr,exports.FnConstsSchema=ze,exports.GetBalanceFnInputSchema=Ke,exports.GetBalanceFnOutputSchema=Je,exports.GetBalanceHistoryFnInputSchema=Qe,exports.GetBalanceHistoryFnOutputSchema=Xe,exports.GetBalanceHistoryTxInputSchema=ur,exports.GetBalanceHistoryTxOutputSchema=cr,exports.GetBalanceTxInputSchema=fr,exports.GetBalanceTxOutputSchema=lr,exports.GetFlagsFnInputSchema=Ye,exports.GetFlagsFnOutputSchema=Ze,exports.GetFlagsTxInputSchema=_r,exports.GetFlagsTxOutputSchema=mr,exports.GetStatisticsFnInputSchema=et,exports.GetStatisticsFnOutputSchema=tt,exports.GetStatisticsTxInputSchema=hr,exports.GetStatisticsTxOutputSchema=gr,exports.GetTokenFnInputSchema=rt,exports.GetTokenFnOutputSchema=nt,exports.GetTokenManyTxInputSchema=br,exports.GetTokenManyTxOutputSchema=xr,exports.GetTokenTxInputSchema=yr,exports.GetTokenTxOutputSchema=Tr,exports.GetTransferFnInputSchema=at,exports.GetTransferFnOutputSchema=st,exports.GetTransferGroupFnInputSchema=it,exports.GetTransferGroupFnOutputSchema=ot,exports.GetTransferGroupTxInputSchema=wr,exports.GetTransferGroupTxOutputSchema=Ir,exports.GetTransferTxInputSchema=jr,exports.GetTransferTxOutputSchema=$r,exports.GetWalletFnInputSchema=pt,exports.GetWalletFnOutputSchema=dt,exports.GetWalletManyTxInputSchema=kr,exports.GetWalletManyTxOutputSchema=vr,exports.GetWalletTxInputSchema=Fr,exports.GetWalletTxOutputSchema=Or,exports.ImportActionsTxInputSchema=Sr,exports.ImportActionsTxOutputSchema=Gr,exports.ImportDataFnInputSchema=ft,exports.ImportDataFnOutputSchema=lt,exports.QueryBuilder=Ln,exports.QueryLogsTxInputSchema=Mr,exports.QueryLogsTxOutputSchema=Er,exports.QueryTxInputSchema=Wr,exports.QueryTxOutputSchema=Cr,exports.ResetDatabaseTxInputSchema=Pr,exports.ResetDatabaseTxOutputSchema=Ar,exports.ReverseTransferFnInputSchema=ut,exports.ReverseTransferFnOutputSchema=ct,exports.ReverseTransferGroupFnInputSchema=_t,exports.ReverseTransferGroupFnOutputSchema=mt,exports.ReverseTransferGroupManyTxInputSchema=Lr,exports.ReverseTransferGroupManyTxOutputSchema=Ur,exports.ReverseTransferGroupTxInputSchema=qr,exports.ReverseTransferGroupTxOutputSchema=Rr,exports.ReverseTransferManyTxInputSchema=Br,exports.ReverseTransferManyTxOutputSchema=Hr,exports.ReverseTransferTxInputSchema=Dr,exports.ReverseTransferTxOutputSchema=Nr,exports.ReverseTransfersFnInputSchema=ht,exports.ReverseTransfersFnOutputSchema=gt,exports.SetFlagsFnInputSchema=yt,exports.SetFlagsFnOutputSchema=Tt,exports.SetFlagsTxInputSchema=Vr,exports.SetFlagsTxOutputSchema=zr,exports.StartTransactionTxInputSchema=Kr,exports.StartTransactionTxOutputSchema=Jr,exports.StreamPromise=B,exports.TokenTableInputSchema=Q,exports.TokenTableSchema=X,exports.TransferGroupTableInputSchema=re,exports.TransferGroupTableSchema=ne,exports.TransferLogTableInputSchema=se,exports.TransferLogTableSchema=ie,exports.TransferTableInputSchema=Z,exports.TransferTableSchema=ee,exports.TxConstsSchema=Qr,exports.UpdateTokenFnInputSchema=bt,exports.UpdateTokenFnOutputSchema=xt,exports.UpdateTokenTxInputSchema=Xr,exports.UpdateTokenTxOutputSchema=Yr,exports.UpdateTransferFnInputSchema=jt,exports.UpdateTransferFnOutputSchema=$t,exports.UpdateTransferGroupFnInputSchema=wt,exports.UpdateTransferGroupFnOutputSchema=It,exports.UpdateTransferGroupManyTxInputSchema=nn,exports.UpdateTransferGroupManyTxOutputSchema=an,exports.UpdateTransferGroupTxInputSchema=tn,exports.UpdateTransferGroupTxOutputSchema=rn,exports.UpdateTransferGroupsFnInputSchema=Ft,exports.UpdateTransferGroupsFnOutputSchema=Ot,exports.UpdateTransferManyTxInputSchema=sn,exports.UpdateTransferManyTxOutputSchema=on,exports.UpdateTransferTxInputSchema=Zr,exports.UpdateTransferTxOutputSchema=en,exports.UpdateTransfersFnInputSchema=kt,exports.UpdateTransfersFnOutputSchema=vt,exports.UpdateWalletFnInputSchema=St,exports.UpdateWalletFnOutputSchema=Gt,exports.UpdateWalletTxInputSchema=pn,exports.UpdateWalletTxOutputSchema=dn,exports.Validator=$n,exports.WalletTableInputSchema=pe,exports.WalletTableSchema=de,exports.WalletTokenSettingTableInputSchema=le,exports.WalletTokenSettingTableSchema=ue,exports.WapiSettingTableInputSchema=_e,exports.WapiSettingTableSchema=me,exports.aggregateTransfers=Kn,exports.create=function(e){const t=e.config,{inputCopy:r,error:n}=Rs(e);if(n)throw n;if("ws"===r.client)return qs(r.connection,t);throw new TypeError("Invalid client type")},exports.createContract=Qn,exports.createDeposit=Yn,exports.createExchange=ea,exports.createToken=ra,exports.createTransfer=aa,exports.createTransferGroup=oa,exports.createTransfers=da,exports.createWallet=la,exports.createWithdrawal=ca,exports.findBalances=ma,exports.findTokens=ga,exports.findTransferGroups=Ta,exports.findTransfers=xa,exports.findWallets=$a,exports.getBalance=Ia,exports.getBalanceHistory=Oa,exports.getFlags=va,exports.getStatistics=Ga,exports.getToken=Ca,exports.getTransfer=Ea,exports.getTransferGroup=Aa,exports.getWallet=Na,exports.importData=Va,exports.isImportDataFnInput=Ra,exports.isImportDataFnOptions=Ba,exports.reverseTransfer=Qa,exports.reverseTransferGroup=Ya,exports.reverseTransfers=es,exports.setFlags=js,exports.updateToken=ws,exports.updateTransfer=Fs,exports.updateTransferGroup=ks,exports.updateTransferGroups=Ss,exports.updateTransfers=Ws,exports.updateWallet=Ms,exports.utils=Ls;
|
|
2
|
-
//# sourceMappingURL=wapi-client.cjs.production.js.map
|