wapi-client 0.14.4 → 0.14.11
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/base-client.browser.cjs +15 -0
- package/dist/api/base-client.browser.js +15 -0
- package/dist/api/base-client.cjs +15 -0
- package/dist/api/base-client.js +15 -0
- package/dist/client.browser.cjs +28 -2
- package/dist/client.browser.js +28 -2
- package/dist/client.cjs +28 -2
- package/dist/client.js +28 -2
- package/dist/fns/consts.browser.cjs +1 -1
- package/dist/fns/consts.browser.js +1 -1
- package/dist/fns/consts.cjs +1 -1
- package/dist/fns/consts.js +1 -1
- package/dist/fns/create-contract/create-contract.browser.cjs +4 -5
- package/dist/fns/create-contract/create-contract.browser.js +4 -5
- package/dist/fns/create-contract/create-contract.cjs +4 -5
- package/dist/fns/create-contract/create-contract.js +4 -5
- package/dist/fns/create-deposit/create-deposit.browser.cjs +3 -3
- package/dist/fns/create-deposit/create-deposit.browser.js +3 -5
- package/dist/fns/create-deposit/create-deposit.cjs +3 -3
- package/dist/fns/create-deposit/create-deposit.js +3 -5
- package/dist/fns/create-exchange/create-exchange.browser.cjs +6 -6
- package/dist/fns/create-exchange/create-exchange.browser.js +7 -7
- package/dist/fns/create-exchange/create-exchange.cjs +6 -6
- package/dist/fns/create-exchange/create-exchange.js +7 -7
- package/dist/fns/create-token/create-token.browser.cjs +1 -2
- package/dist/fns/create-token/create-token.browser.js +1 -2
- package/dist/fns/create-token/create-token.cjs +1 -2
- package/dist/fns/create-token/create-token.js +1 -2
- package/dist/fns/create-transfer/create-transfer.browser.cjs +6 -6
- package/dist/fns/create-transfer/create-transfer.browser.js +6 -8
- package/dist/fns/create-transfer/create-transfer.cjs +6 -6
- package/dist/fns/create-transfer/create-transfer.js +6 -8
- package/dist/fns/create-withdrawal/create-withdrawal.browser.cjs +3 -3
- package/dist/fns/create-withdrawal/create-withdrawal.browser.js +3 -5
- package/dist/fns/create-withdrawal/create-withdrawal.cjs +3 -3
- package/dist/fns/create-withdrawal/create-withdrawal.js +3 -5
- package/dist/fns/export-balance-history/export-balance-history.browser.cjs +1 -2
- package/dist/fns/export-balance-history/export-balance-history.browser.js +1 -2
- package/dist/fns/export-balance-history/export-balance-history.cjs +1 -2
- package/dist/fns/export-balance-history/export-balance-history.js +1 -2
- package/dist/fns/export-balances/export-balances.browser.cjs +49 -0
- package/dist/fns/export-balances/export-balances.browser.js +28 -0
- package/dist/fns/export-balances/export-balances.cjs +53 -0
- package/dist/fns/export-balances/export-balances.enums.browser.cjs +18 -0
- package/dist/fns/export-balances/export-balances.enums.browser.js +0 -0
- package/dist/fns/export-balances/export-balances.enums.cjs +18 -0
- package/dist/fns/export-balances/export-balances.enums.js +0 -0
- package/dist/fns/export-balances/export-balances.js +28 -0
- package/dist/fns/export-balances/export-balances.schema.zod.browser.cjs +40 -0
- package/dist/fns/export-balances/export-balances.schema.zod.browser.js +22 -0
- package/dist/fns/export-balances/export-balances.schema.zod.cjs +48 -0
- package/dist/fns/export-balances/export-balances.schema.zod.js +22 -0
- package/dist/fns/find-balances/find-balances.schema.zod.browser.cjs +14 -5
- package/dist/fns/find-balances/find-balances.schema.zod.browser.js +12 -3
- package/dist/fns/find-balances/find-balances.schema.zod.cjs +14 -5
- package/dist/fns/find-balances/find-balances.schema.zod.js +12 -3
- package/dist/fns/fn-types.browser.cjs +1 -0
- package/dist/fns/fn-types.browser.js +1 -0
- package/dist/fns/fn-types.cjs +2 -0
- package/dist/fns/fn-types.js +1 -0
- package/dist/fns/get-balance/get-balance.browser.cjs +2 -2
- package/dist/fns/get-balance/get-balance.browser.js +3 -3
- package/dist/fns/get-balance/get-balance.cjs +2 -2
- package/dist/fns/get-balance/get-balance.js +3 -3
- package/dist/fns/get-balance-history/get-balance-history.browser.cjs +2 -3
- package/dist/fns/get-balance-history/get-balance-history.browser.js +2 -3
- package/dist/fns/get-balance-history/get-balance-history.cjs +2 -3
- package/dist/fns/get-balance-history/get-balance-history.js +2 -3
- package/dist/fns/get-token/get-token.browser.cjs +1 -2
- package/dist/fns/get-token/get-token.browser.js +1 -2
- package/dist/fns/get-token/get-token.cjs +1 -2
- package/dist/fns/get-token/get-token.js +1 -2
- package/dist/fns/get-transfer/get-transfer.browser.cjs +1 -2
- package/dist/fns/get-transfer/get-transfer.browser.js +1 -2
- package/dist/fns/get-transfer/get-transfer.cjs +1 -2
- package/dist/fns/get-transfer/get-transfer.js +1 -2
- package/dist/fns/get-transfer-group/get-transfer-group.browser.cjs +1 -2
- package/dist/fns/get-transfer-group/get-transfer-group.browser.js +1 -2
- package/dist/fns/get-transfer-group/get-transfer-group.cjs +1 -2
- package/dist/fns/get-transfer-group/get-transfer-group.js +1 -2
- package/dist/fns/get-wallet/get-wallet.browser.cjs +1 -2
- package/dist/fns/get-wallet/get-wallet.browser.js +1 -2
- package/dist/fns/get-wallet/get-wallet.cjs +1 -2
- package/dist/fns/get-wallet/get-wallet.js +1 -2
- package/dist/fns/reverse-transfer/reverse-transfer.browser.cjs +1 -2
- package/dist/fns/reverse-transfer/reverse-transfer.browser.js +1 -2
- package/dist/fns/reverse-transfer/reverse-transfer.cjs +1 -2
- package/dist/fns/reverse-transfer/reverse-transfer.js +1 -2
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.browser.cjs +1 -2
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.browser.js +1 -2
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.cjs +1 -2
- package/dist/fns/reverse-transfer-group/reverse-transfer-group.js +1 -2
- package/dist/fns/update-token/update-token.browser.cjs +1 -2
- package/dist/fns/update-token/update-token.browser.js +1 -2
- package/dist/fns/update-token/update-token.cjs +1 -2
- package/dist/fns/update-token/update-token.js +1 -2
- package/dist/fns/update-transfer/update-transfer.browser.cjs +1 -2
- package/dist/fns/update-transfer/update-transfer.browser.js +1 -2
- package/dist/fns/update-transfer/update-transfer.cjs +1 -2
- package/dist/fns/update-transfer/update-transfer.js +1 -2
- package/dist/fns/update-transfer-group/update-transfer-group.browser.cjs +1 -2
- package/dist/fns/update-transfer-group/update-transfer-group.browser.js +1 -2
- package/dist/fns/update-transfer-group/update-transfer-group.cjs +1 -2
- package/dist/fns/update-transfer-group/update-transfer-group.js +1 -2
- package/dist/fns/update-wallet/update-wallet.browser.cjs +1 -2
- package/dist/fns/update-wallet/update-wallet.browser.js +1 -2
- package/dist/fns/update-wallet/update-wallet.cjs +1 -2
- package/dist/fns/update-wallet/update-wallet.js +1 -2
- package/dist/lib/env.browser.cjs +1 -1
- package/dist/lib/env.browser.js +1 -1
- package/dist/lib/env.cjs +1 -1
- package/dist/lib/env.js +1 -1
- package/dist/lib/utils.browser.cjs +0 -27
- package/dist/lib/utils.browser.js +0 -27
- package/dist/lib/utils.cjs +0 -30
- package/dist/lib/utils.js +0 -27
- package/dist/lib/validator.browser.cjs +6 -0
- package/dist/lib/validator.browser.js +12 -0
- package/dist/lib/validator.cjs +6 -0
- package/dist/lib/validator.js +12 -0
- package/dist/txs/consts.browser.cjs +12 -3
- package/dist/txs/consts.browser.js +12 -3
- package/dist/txs/consts.cjs +12 -3
- package/dist/txs/consts.js +12 -3
- package/dist/txs/create-access-token/create-access-token.schema.zod.browser.cjs +34 -1
- package/dist/txs/create-access-token/create-access-token.schema.zod.browser.js +34 -1
- package/dist/txs/create-access-token/create-access-token.schema.zod.cjs +34 -1
- package/dist/txs/create-access-token/create-access-token.schema.zod.js +34 -1
- package/dist/txs/export-balance-many/export-balance-many.enums.browser.cjs +18 -0
- package/dist/txs/export-balance-many/export-balance-many.enums.browser.js +0 -0
- package/dist/txs/export-balance-many/export-balance-many.enums.cjs +18 -0
- package/dist/txs/export-balance-many/export-balance-many.enums.js +0 -0
- package/dist/txs/export-balance-many/export-balance-many.schema.zod.browser.cjs +48 -0
- package/dist/txs/export-balance-many/export-balance-many.schema.zod.browser.js +30 -0
- package/dist/txs/export-balance-many/export-balance-many.schema.zod.cjs +55 -0
- package/dist/txs/export-balance-many/export-balance-many.schema.zod.js +30 -0
- package/dist/txs/find-balance-many/find-balance-many.schema.zod.browser.cjs +4 -1
- package/dist/txs/find-balance-many/find-balance-many.schema.zod.browser.js +4 -1
- package/dist/txs/find-balance-many/find-balance-many.schema.zod.cjs +4 -1
- package/dist/txs/find-balance-many/find-balance-many.schema.zod.js +4 -1
- package/dist/txs/get-balance/get-balance.schema.zod.browser.cjs +2 -0
- package/dist/txs/get-balance/get-balance.schema.zod.browser.js +2 -0
- package/dist/txs/get-balance/get-balance.schema.zod.cjs +2 -0
- package/dist/txs/get-balance/get-balance.schema.zod.js +2 -0
- package/dist/txs/get-export/get-export.schema.zod.browser.cjs +1 -0
- package/dist/txs/get-export/get-export.schema.zod.browser.js +1 -0
- package/dist/txs/get-export/get-export.schema.zod.cjs +1 -0
- package/dist/txs/get-export/get-export.schema.zod.js +1 -0
- package/dist/txs/index.browser.cjs +3 -0
- package/dist/txs/index.browser.js +3 -0
- package/dist/txs/index.cjs +3 -0
- package/dist/txs/index.js +3 -0
- package/dist/txs/tx-types.browser.cjs +1 -0
- package/dist/txs/tx-types.browser.js +1 -0
- package/dist/txs/tx-types.cjs +2 -0
- package/dist/txs/tx-types.js +1 -0
- package/dist/types/wapi-client.d.ts +10190 -4354
- package/dist/wapi-client-web.iife.js +8 -8
- package/dist/wapi-client.iife.js +8 -8
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ var __objRest = (source, exclude) => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
// src/fns/create-exchange/create-exchange.ts
|
|
18
|
-
import {
|
|
18
|
+
import { getTxIdSync } from "../../lib/utils.js";
|
|
19
19
|
import { TransferGroupStatusEnum } from "../../db/transfer-group/transfer-group.schema.zod.js";
|
|
20
20
|
import { TransferTypeEnum } from "../../db/transfer/transfer.schema.zod.js";
|
|
21
21
|
import { getValidator } from "../../lib/validation.js";
|
|
@@ -38,9 +38,9 @@ function createExchange(options, input, fnOptions) {
|
|
|
38
38
|
children: [
|
|
39
39
|
{
|
|
40
40
|
identifier: (_d = inputCopy.from_identifier) != null ? _d : getTxIdSync(),
|
|
41
|
-
from_wallet:
|
|
42
|
-
to_wallet:
|
|
43
|
-
token:
|
|
41
|
+
from_wallet: inputCopy.from_wallet,
|
|
42
|
+
to_wallet: inputCopy.to_wallet,
|
|
43
|
+
token: inputCopy.from_token,
|
|
44
44
|
type: !inputCopy.from_wallet ? TransferTypeEnum.deposit : TransferTypeEnum.transfer,
|
|
45
45
|
amount: inputCopy.from_amount,
|
|
46
46
|
metadata: inputCopy.metadata,
|
|
@@ -48,9 +48,9 @@ function createExchange(options, input, fnOptions) {
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
identifier: (_e = inputCopy.to_identifier) != null ? _e : getTxIdSync(),
|
|
51
|
-
from_wallet:
|
|
52
|
-
to_wallet:
|
|
53
|
-
token:
|
|
51
|
+
from_wallet: inputCopy.to_wallet,
|
|
52
|
+
to_wallet: inputCopy.from_wallet,
|
|
53
|
+
token: inputCopy.to_token,
|
|
54
54
|
type: !inputCopy.to_wallet ? TransferTypeEnum.deposit : TransferTypeEnum.transfer,
|
|
55
55
|
amount: (_f = inputCopy.to_amount) != null ? _f : inputCopy.from_amount,
|
|
56
56
|
metadata: inputCopy.metadata,
|
|
@@ -52,7 +52,6 @@ __export(create_token_exports, {
|
|
|
52
52
|
createToken: () => createToken
|
|
53
53
|
});
|
|
54
54
|
module.exports = __toCommonJS(create_token_exports);
|
|
55
|
-
var import_utils = require("../../lib/utils.browser.cjs");
|
|
56
55
|
var import_validation = require("../../lib/validation.browser.cjs");
|
|
57
56
|
var import_create_token_schema_zod = require("./create-token.schema.zod.browser.cjs");
|
|
58
57
|
var zodValidator = (0, import_validation.getValidator)(import_create_token_schema_zod.createTokenFnInputSchema);
|
|
@@ -62,7 +61,7 @@ function createToken(options, input, fnOptions) {
|
|
|
62
61
|
const _a = inputCopy, { options: clientOptions, belongs_to, metadata } = _a, token = __objRest(_a, ["options", "belongs_to", "metadata"]);
|
|
63
62
|
return client.api.createToken({
|
|
64
63
|
token: __spreadValues(__spreadProps(__spreadValues({}, token), {
|
|
65
|
-
belongs_to
|
|
64
|
+
belongs_to
|
|
66
65
|
}), metadata ? { metadata } : {}),
|
|
67
66
|
options: clientOptions
|
|
68
67
|
});
|
|
@@ -31,7 +31,6 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// src/fns/create-token/create-token.ts
|
|
34
|
-
import { getForeign } from "../../lib/utils.browser.js";
|
|
35
34
|
import { getValidator } from "../../lib/validation.browser.js";
|
|
36
35
|
import { createTokenFnInputSchema } from "./create-token.schema.zod.browser.js";
|
|
37
36
|
var zodValidator = getValidator(createTokenFnInputSchema);
|
|
@@ -41,7 +40,7 @@ function createToken(options, input, fnOptions) {
|
|
|
41
40
|
const _a = inputCopy, { options: clientOptions, belongs_to, metadata } = _a, token = __objRest(_a, ["options", "belongs_to", "metadata"]);
|
|
42
41
|
return client.api.createToken({
|
|
43
42
|
token: __spreadValues(__spreadProps(__spreadValues({}, token), {
|
|
44
|
-
belongs_to
|
|
43
|
+
belongs_to
|
|
45
44
|
}), metadata ? { metadata } : {}),
|
|
46
45
|
options: clientOptions
|
|
47
46
|
});
|
|
@@ -52,7 +52,6 @@ __export(create_token_exports, {
|
|
|
52
52
|
createToken: () => createToken
|
|
53
53
|
});
|
|
54
54
|
module.exports = __toCommonJS(create_token_exports);
|
|
55
|
-
var import_utils = require("../../lib/utils.cjs");
|
|
56
55
|
var import_validation = require("../../lib/validation.cjs");
|
|
57
56
|
var import_create_token_schema_zod = require("./create-token.schema.zod.cjs");
|
|
58
57
|
var zodValidator = (0, import_validation.getValidator)(import_create_token_schema_zod.createTokenFnInputSchema);
|
|
@@ -62,7 +61,7 @@ function createToken(options, input, fnOptions) {
|
|
|
62
61
|
const _a = inputCopy, { options: clientOptions, belongs_to, metadata } = _a, token = __objRest(_a, ["options", "belongs_to", "metadata"]);
|
|
63
62
|
return client.api.createToken({
|
|
64
63
|
token: __spreadValues(__spreadProps(__spreadValues({}, token), {
|
|
65
|
-
belongs_to
|
|
64
|
+
belongs_to
|
|
66
65
|
}), metadata ? { metadata } : {}),
|
|
67
66
|
options: clientOptions
|
|
68
67
|
});
|
|
@@ -31,7 +31,6 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// src/fns/create-token/create-token.ts
|
|
34
|
-
import { getForeign } from "../../lib/utils.js";
|
|
35
34
|
import { getValidator } from "../../lib/validation.js";
|
|
36
35
|
import { createTokenFnInputSchema } from "./create-token.schema.zod.js";
|
|
37
36
|
var zodValidator = getValidator(createTokenFnInputSchema);
|
|
@@ -41,7 +40,7 @@ function createToken(options, input, fnOptions) {
|
|
|
41
40
|
const _a = inputCopy, { options: clientOptions, belongs_to, metadata } = _a, token = __objRest(_a, ["options", "belongs_to", "metadata"]);
|
|
42
41
|
return client.api.createToken({
|
|
43
42
|
token: __spreadValues(__spreadProps(__spreadValues({}, token), {
|
|
44
|
-
belongs_to
|
|
43
|
+
belongs_to
|
|
45
44
|
}), metadata ? { metadata } : {}),
|
|
46
45
|
options: clientOptions
|
|
47
46
|
});
|
|
@@ -74,12 +74,12 @@ function transferFnInputToTransferData(input, token) {
|
|
|
74
74
|
input.type = input.type || "transfer";
|
|
75
75
|
const transfer = {
|
|
76
76
|
identifier: input.identifier,
|
|
77
|
-
token:
|
|
77
|
+
token: input.token || token,
|
|
78
78
|
amount: (0, import_utils.convertToNumber)(input.amount),
|
|
79
79
|
metadata: input.metadata,
|
|
80
80
|
status: input.status,
|
|
81
81
|
type: input.type,
|
|
82
|
-
transfer_group:
|
|
82
|
+
transfer_group: input.transfer_group,
|
|
83
83
|
created_at: input.created_at
|
|
84
84
|
};
|
|
85
85
|
if (input.type === "transfer") {
|
|
@@ -87,8 +87,8 @@ function transferFnInputToTransferData(input, token) {
|
|
|
87
87
|
console.warn("deprecated: latest_control_hash is deprecated");
|
|
88
88
|
}
|
|
89
89
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
90
|
-
from_wallet:
|
|
91
|
-
to_wallet:
|
|
90
|
+
from_wallet: input.from_wallet,
|
|
91
|
+
to_wallet: input.to_wallet
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
if (input.type === "withdrawal") {
|
|
@@ -96,12 +96,12 @@ function transferFnInputToTransferData(input, token) {
|
|
|
96
96
|
console.warn("deprecated: latest_control_hash is deprecated");
|
|
97
97
|
}
|
|
98
98
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
99
|
-
from_wallet:
|
|
99
|
+
from_wallet: input.wallet
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
if (input.type === "deposit") {
|
|
103
103
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
104
|
-
to_wallet:
|
|
104
|
+
to_wallet: input.wallet
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
throw new Error("Should not be here");
|
|
@@ -22,8 +22,6 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
22
22
|
import {
|
|
23
23
|
checkCopyObject,
|
|
24
24
|
convertToNumber,
|
|
25
|
-
getForeign,
|
|
26
|
-
getIdentifierFilter,
|
|
27
25
|
getTxIdSync
|
|
28
26
|
} from "../../lib/utils.browser.js";
|
|
29
27
|
import { getValidator } from "../../lib/validation.browser.js";
|
|
@@ -58,12 +56,12 @@ function transferFnInputToTransferData(input, token) {
|
|
|
58
56
|
input.type = input.type || "transfer";
|
|
59
57
|
const transfer = {
|
|
60
58
|
identifier: input.identifier,
|
|
61
|
-
token:
|
|
59
|
+
token: input.token || token,
|
|
62
60
|
amount: convertToNumber(input.amount),
|
|
63
61
|
metadata: input.metadata,
|
|
64
62
|
status: input.status,
|
|
65
63
|
type: input.type,
|
|
66
|
-
transfer_group:
|
|
64
|
+
transfer_group: input.transfer_group,
|
|
67
65
|
created_at: input.created_at
|
|
68
66
|
};
|
|
69
67
|
if (input.type === "transfer") {
|
|
@@ -71,8 +69,8 @@ function transferFnInputToTransferData(input, token) {
|
|
|
71
69
|
console.warn("deprecated: latest_control_hash is deprecated");
|
|
72
70
|
}
|
|
73
71
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
74
|
-
from_wallet:
|
|
75
|
-
to_wallet:
|
|
72
|
+
from_wallet: input.from_wallet,
|
|
73
|
+
to_wallet: input.to_wallet
|
|
76
74
|
});
|
|
77
75
|
}
|
|
78
76
|
if (input.type === "withdrawal") {
|
|
@@ -80,12 +78,12 @@ function transferFnInputToTransferData(input, token) {
|
|
|
80
78
|
console.warn("deprecated: latest_control_hash is deprecated");
|
|
81
79
|
}
|
|
82
80
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
83
|
-
from_wallet:
|
|
81
|
+
from_wallet: input.wallet
|
|
84
82
|
});
|
|
85
83
|
}
|
|
86
84
|
if (input.type === "deposit") {
|
|
87
85
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
88
|
-
to_wallet:
|
|
86
|
+
to_wallet: input.wallet
|
|
89
87
|
});
|
|
90
88
|
}
|
|
91
89
|
throw new Error("Should not be here");
|
|
@@ -74,12 +74,12 @@ function transferFnInputToTransferData(input, token) {
|
|
|
74
74
|
input.type = input.type || "transfer";
|
|
75
75
|
const transfer = {
|
|
76
76
|
identifier: input.identifier,
|
|
77
|
-
token:
|
|
77
|
+
token: input.token || token,
|
|
78
78
|
amount: (0, import_utils.convertToNumber)(input.amount),
|
|
79
79
|
metadata: input.metadata,
|
|
80
80
|
status: input.status,
|
|
81
81
|
type: input.type,
|
|
82
|
-
transfer_group:
|
|
82
|
+
transfer_group: input.transfer_group,
|
|
83
83
|
created_at: input.created_at
|
|
84
84
|
};
|
|
85
85
|
if (input.type === "transfer") {
|
|
@@ -87,8 +87,8 @@ function transferFnInputToTransferData(input, token) {
|
|
|
87
87
|
console.warn("deprecated: latest_control_hash is deprecated");
|
|
88
88
|
}
|
|
89
89
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
90
|
-
from_wallet:
|
|
91
|
-
to_wallet:
|
|
90
|
+
from_wallet: input.from_wallet,
|
|
91
|
+
to_wallet: input.to_wallet
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
if (input.type === "withdrawal") {
|
|
@@ -96,12 +96,12 @@ function transferFnInputToTransferData(input, token) {
|
|
|
96
96
|
console.warn("deprecated: latest_control_hash is deprecated");
|
|
97
97
|
}
|
|
98
98
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
99
|
-
from_wallet:
|
|
99
|
+
from_wallet: input.wallet
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
if (input.type === "deposit") {
|
|
103
103
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
104
|
-
to_wallet:
|
|
104
|
+
to_wallet: input.wallet
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
throw new Error("Should not be here");
|
|
@@ -22,8 +22,6 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
22
22
|
import {
|
|
23
23
|
checkCopyObject,
|
|
24
24
|
convertToNumber,
|
|
25
|
-
getForeign,
|
|
26
|
-
getIdentifierFilter,
|
|
27
25
|
getTxIdSync
|
|
28
26
|
} from "../../lib/utils.js";
|
|
29
27
|
import { getValidator } from "../../lib/validation.js";
|
|
@@ -58,12 +56,12 @@ function transferFnInputToTransferData(input, token) {
|
|
|
58
56
|
input.type = input.type || "transfer";
|
|
59
57
|
const transfer = {
|
|
60
58
|
identifier: input.identifier,
|
|
61
|
-
token:
|
|
59
|
+
token: input.token || token,
|
|
62
60
|
amount: convertToNumber(input.amount),
|
|
63
61
|
metadata: input.metadata,
|
|
64
62
|
status: input.status,
|
|
65
63
|
type: input.type,
|
|
66
|
-
transfer_group:
|
|
64
|
+
transfer_group: input.transfer_group,
|
|
67
65
|
created_at: input.created_at
|
|
68
66
|
};
|
|
69
67
|
if (input.type === "transfer") {
|
|
@@ -71,8 +69,8 @@ function transferFnInputToTransferData(input, token) {
|
|
|
71
69
|
console.warn("deprecated: latest_control_hash is deprecated");
|
|
72
70
|
}
|
|
73
71
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
74
|
-
from_wallet:
|
|
75
|
-
to_wallet:
|
|
72
|
+
from_wallet: input.from_wallet,
|
|
73
|
+
to_wallet: input.to_wallet
|
|
76
74
|
});
|
|
77
75
|
}
|
|
78
76
|
if (input.type === "withdrawal") {
|
|
@@ -80,12 +78,12 @@ function transferFnInputToTransferData(input, token) {
|
|
|
80
78
|
console.warn("deprecated: latest_control_hash is deprecated");
|
|
81
79
|
}
|
|
82
80
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
83
|
-
from_wallet:
|
|
81
|
+
from_wallet: input.wallet
|
|
84
82
|
});
|
|
85
83
|
}
|
|
86
84
|
if (input.type === "deposit") {
|
|
87
85
|
return __spreadProps(__spreadValues({}, transfer), {
|
|
88
|
-
to_wallet:
|
|
86
|
+
to_wallet: input.wallet
|
|
89
87
|
});
|
|
90
88
|
}
|
|
91
89
|
throw new Error("Should not be here");
|
|
@@ -88,9 +88,9 @@ function createWithdrawal(options, input, fnOptions) {
|
|
|
88
88
|
}
|
|
89
89
|
const withdrawal = __spreadValues(__spreadProps(__spreadValues({}, partialWithdrawal), {
|
|
90
90
|
amount: (0, import_utils.convertToNumber)(partialWithdrawal.amount),
|
|
91
|
-
transfer_group:
|
|
92
|
-
token
|
|
93
|
-
from_wallet:
|
|
91
|
+
transfer_group: inputCopy.transfer_group,
|
|
92
|
+
token,
|
|
93
|
+
from_wallet: wallet,
|
|
94
94
|
type: "withdrawal"
|
|
95
95
|
}), metadata ? { metadata } : {});
|
|
96
96
|
if (!withdrawal.identifier) {
|
|
@@ -35,8 +35,6 @@ import { InputError } from "../../lib/errors.browser.js";
|
|
|
35
35
|
import {
|
|
36
36
|
checkCopyObject,
|
|
37
37
|
convertToNumber,
|
|
38
|
-
getForeign,
|
|
39
|
-
getIdentifierFilter,
|
|
40
38
|
getTxIdSync,
|
|
41
39
|
modifyObject
|
|
42
40
|
} from "../../lib/utils.browser.js";
|
|
@@ -74,9 +72,9 @@ function createWithdrawal(options, input, fnOptions) {
|
|
|
74
72
|
}
|
|
75
73
|
const withdrawal = __spreadValues(__spreadProps(__spreadValues({}, partialWithdrawal), {
|
|
76
74
|
amount: convertToNumber(partialWithdrawal.amount),
|
|
77
|
-
transfer_group:
|
|
78
|
-
token
|
|
79
|
-
from_wallet:
|
|
75
|
+
transfer_group: inputCopy.transfer_group,
|
|
76
|
+
token,
|
|
77
|
+
from_wallet: wallet,
|
|
80
78
|
type: "withdrawal"
|
|
81
79
|
}), metadata ? { metadata } : {});
|
|
82
80
|
if (!withdrawal.identifier) {
|
|
@@ -88,9 +88,9 @@ function createWithdrawal(options, input, fnOptions) {
|
|
|
88
88
|
}
|
|
89
89
|
const withdrawal = __spreadValues(__spreadProps(__spreadValues({}, partialWithdrawal), {
|
|
90
90
|
amount: (0, import_utils.convertToNumber)(partialWithdrawal.amount),
|
|
91
|
-
transfer_group:
|
|
92
|
-
token
|
|
93
|
-
from_wallet:
|
|
91
|
+
transfer_group: inputCopy.transfer_group,
|
|
92
|
+
token,
|
|
93
|
+
from_wallet: wallet,
|
|
94
94
|
type: "withdrawal"
|
|
95
95
|
}), metadata ? { metadata } : {});
|
|
96
96
|
if (!withdrawal.identifier) {
|
|
@@ -35,8 +35,6 @@ import { InputError } from "../../lib/errors.js";
|
|
|
35
35
|
import {
|
|
36
36
|
checkCopyObject,
|
|
37
37
|
convertToNumber,
|
|
38
|
-
getForeign,
|
|
39
|
-
getIdentifierFilter,
|
|
40
38
|
getTxIdSync,
|
|
41
39
|
modifyObject
|
|
42
40
|
} from "../../lib/utils.js";
|
|
@@ -74,9 +72,9 @@ function createWithdrawal(options, input, fnOptions) {
|
|
|
74
72
|
}
|
|
75
73
|
const withdrawal = __spreadValues(__spreadProps(__spreadValues({}, partialWithdrawal), {
|
|
76
74
|
amount: convertToNumber(partialWithdrawal.amount),
|
|
77
|
-
transfer_group:
|
|
78
|
-
token
|
|
79
|
-
from_wallet:
|
|
75
|
+
transfer_group: inputCopy.transfer_group,
|
|
76
|
+
token,
|
|
77
|
+
from_wallet: wallet,
|
|
80
78
|
type: "withdrawal"
|
|
81
79
|
}), metadata ? { metadata } : {});
|
|
82
80
|
if (!withdrawal.identifier) {
|
|
@@ -23,7 +23,6 @@ __export(export_balance_history_exports, {
|
|
|
23
23
|
exportBalanceHistory: () => exportBalanceHistory
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(export_balance_history_exports);
|
|
26
|
-
var import_utils = require("../../lib/utils.browser.cjs");
|
|
27
26
|
var import_errors = require("../../lib/errors.browser.cjs");
|
|
28
27
|
var import_validation = require("../../lib/validation.browser.cjs");
|
|
29
28
|
var import_export_balance_history_schema_zod = require("./export-balance-history.schema.zod.browser.cjs");
|
|
@@ -31,7 +30,7 @@ var zodValidator = (0, import_validation.getValidator)(import_export_balance_his
|
|
|
31
30
|
function exportBalanceHistory(options, input, fnOptions) {
|
|
32
31
|
const { client } = options;
|
|
33
32
|
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
34
|
-
const token = inputCopy.token ||
|
|
33
|
+
const token = inputCopy.token || client.getConfig("token");
|
|
35
34
|
if (token === void 0) {
|
|
36
35
|
throw new import_errors.InputError("INPUT_NEEDS_TOKEN", { input });
|
|
37
36
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// src/fns/export-balance-history/export-balance-history.ts
|
|
2
|
-
import { getForeign } from "../../lib/utils.browser.js";
|
|
3
2
|
import { InputError } from "../../lib/errors.browser.js";
|
|
4
3
|
import { getValidator } from "../../lib/validation.browser.js";
|
|
5
4
|
import { exportBalanceHistoryFnInputSchema } from "./export-balance-history.schema.zod.browser.js";
|
|
@@ -7,7 +6,7 @@ var zodValidator = getValidator(exportBalanceHistoryFnInputSchema);
|
|
|
7
6
|
function exportBalanceHistory(options, input, fnOptions) {
|
|
8
7
|
const { client } = options;
|
|
9
8
|
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
10
|
-
const token = inputCopy.token ||
|
|
9
|
+
const token = inputCopy.token || client.getConfig("token");
|
|
11
10
|
if (token === void 0) {
|
|
12
11
|
throw new InputError("INPUT_NEEDS_TOKEN", { input });
|
|
13
12
|
}
|
|
@@ -23,7 +23,6 @@ __export(export_balance_history_exports, {
|
|
|
23
23
|
exportBalanceHistory: () => exportBalanceHistory
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(export_balance_history_exports);
|
|
26
|
-
var import_utils = require("../../lib/utils.cjs");
|
|
27
26
|
var import_errors = require("../../lib/errors.cjs");
|
|
28
27
|
var import_validation = require("../../lib/validation.cjs");
|
|
29
28
|
var import_export_balance_history_schema_zod = require("./export-balance-history.schema.zod.cjs");
|
|
@@ -31,7 +30,7 @@ var zodValidator = (0, import_validation.getValidator)(import_export_balance_his
|
|
|
31
30
|
function exportBalanceHistory(options, input, fnOptions) {
|
|
32
31
|
const { client } = options;
|
|
33
32
|
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
34
|
-
const token = inputCopy.token ||
|
|
33
|
+
const token = inputCopy.token || client.getConfig("token");
|
|
35
34
|
if (token === void 0) {
|
|
36
35
|
throw new import_errors.InputError("INPUT_NEEDS_TOKEN", { input });
|
|
37
36
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// src/fns/export-balance-history/export-balance-history.ts
|
|
2
|
-
import { getForeign } from "../../lib/utils.js";
|
|
3
2
|
import { InputError } from "../../lib/errors.js";
|
|
4
3
|
import { getValidator } from "../../lib/validation.js";
|
|
5
4
|
import { exportBalanceHistoryFnInputSchema } from "./export-balance-history.schema.zod.js";
|
|
@@ -7,7 +6,7 @@ var zodValidator = getValidator(exportBalanceHistoryFnInputSchema);
|
|
|
7
6
|
function exportBalanceHistory(options, input, fnOptions) {
|
|
8
7
|
const { client } = options;
|
|
9
8
|
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
10
|
-
const token = inputCopy.token ||
|
|
9
|
+
const token = inputCopy.token || client.getConfig("token");
|
|
11
10
|
if (token === void 0) {
|
|
12
11
|
throw new InputError("INPUT_NEEDS_TOKEN", { input });
|
|
13
12
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/fns/export-balances/export-balances.ts
|
|
21
|
+
var export_balances_exports = {};
|
|
22
|
+
__export(export_balances_exports, {
|
|
23
|
+
exportBalances: () => exportBalances
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(export_balances_exports);
|
|
26
|
+
var import_export_balances_schema_zod = require("./export-balances.schema.zod.browser.cjs");
|
|
27
|
+
var import_find_query_builder = require("../../lib/query-builder/find-query-builder.browser.cjs");
|
|
28
|
+
var import_find_balances_schema_zod = require("../find-balances/find-balances.schema.zod.browser.cjs");
|
|
29
|
+
var import_find_balance_many_schema_zod = require("../../txs/find-balance-many/find-balance-many.schema.zod.browser.cjs");
|
|
30
|
+
var import_utils = require("../../lib/utils.browser.cjs");
|
|
31
|
+
function exportBalances(options, input, fnOptions) {
|
|
32
|
+
const { client } = options;
|
|
33
|
+
const $query = new import_find_query_builder.FindQueryBuilder({
|
|
34
|
+
start(query) {
|
|
35
|
+
return client.api.exportBalanceMany({
|
|
36
|
+
balance: query.filter,
|
|
37
|
+
options: query.options
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
schemaBasic: import_find_balances_schema_zod.findBalancesInputSchema,
|
|
41
|
+
schema: import_find_balance_many_schema_zod.balanceFilterFullInputSchema,
|
|
42
|
+
optionsSchema: import_export_balances_schema_zod.exportBalancesFnOptionsSchema
|
|
43
|
+
});
|
|
44
|
+
if (input) {
|
|
45
|
+
const { filter, options: options2 } = (0, import_utils.mergeFnOptions)(input, fnOptions);
|
|
46
|
+
return $query.where(filter).options(options2);
|
|
47
|
+
}
|
|
48
|
+
return $query;
|
|
49
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/fns/export-balances/export-balances.ts
|
|
2
|
+
import { exportBalancesFnOptionsSchema } from "./export-balances.schema.zod.browser.js";
|
|
3
|
+
import { FindQueryBuilder } from "../../lib/query-builder/find-query-builder.browser.js";
|
|
4
|
+
import { findBalancesInputSchema } from "../find-balances/find-balances.schema.zod.browser.js";
|
|
5
|
+
import { balanceFilterFullInputSchema } from "../../txs/find-balance-many/find-balance-many.schema.zod.browser.js";
|
|
6
|
+
import { mergeFnOptions } from "../../lib/utils.browser.js";
|
|
7
|
+
function exportBalances(options, input, fnOptions) {
|
|
8
|
+
const { client } = options;
|
|
9
|
+
const $query = new FindQueryBuilder({
|
|
10
|
+
start(query) {
|
|
11
|
+
return client.api.exportBalanceMany({
|
|
12
|
+
balance: query.filter,
|
|
13
|
+
options: query.options
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
schemaBasic: findBalancesInputSchema,
|
|
17
|
+
schema: balanceFilterFullInputSchema,
|
|
18
|
+
optionsSchema: exportBalancesFnOptionsSchema
|
|
19
|
+
});
|
|
20
|
+
if (input) {
|
|
21
|
+
const { filter, options: options2 } = mergeFnOptions(input, fnOptions);
|
|
22
|
+
return $query.where(filter).options(options2);
|
|
23
|
+
}
|
|
24
|
+
return $query;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
exportBalances
|
|
28
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/fns/export-balances/export-balances.ts
|
|
21
|
+
var export_balances_exports = {};
|
|
22
|
+
__export(export_balances_exports, {
|
|
23
|
+
exportBalances: () => exportBalances
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(export_balances_exports);
|
|
26
|
+
var import_export_balances_schema_zod = require("./export-balances.schema.zod.cjs");
|
|
27
|
+
var import_find_query_builder = require("../../lib/query-builder/find-query-builder.cjs");
|
|
28
|
+
var import_find_balances_schema_zod = require("../find-balances/find-balances.schema.zod.cjs");
|
|
29
|
+
var import_find_balance_many_schema_zod = require("../../txs/find-balance-many/find-balance-many.schema.zod.cjs");
|
|
30
|
+
var import_utils = require("../../lib/utils.cjs");
|
|
31
|
+
function exportBalances(options, input, fnOptions) {
|
|
32
|
+
const { client } = options;
|
|
33
|
+
const $query = new import_find_query_builder.FindQueryBuilder({
|
|
34
|
+
start(query) {
|
|
35
|
+
return client.api.exportBalanceMany({
|
|
36
|
+
balance: query.filter,
|
|
37
|
+
options: query.options
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
schemaBasic: import_find_balances_schema_zod.findBalancesInputSchema,
|
|
41
|
+
schema: import_find_balance_many_schema_zod.balanceFilterFullInputSchema,
|
|
42
|
+
optionsSchema: import_export_balances_schema_zod.exportBalancesFnOptionsSchema
|
|
43
|
+
});
|
|
44
|
+
if (input) {
|
|
45
|
+
const { filter, options: options2 } = (0, import_utils.mergeFnOptions)(input, fnOptions);
|
|
46
|
+
return $query.where(filter).options(options2);
|
|
47
|
+
}
|
|
48
|
+
return $query;
|
|
49
|
+
}
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
exportBalances
|
|
53
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/fns/export-balances/export-balances.enums.ts
|
|
17
|
+
var export_balances_enums_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(export_balances_enums_exports);
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/fns/export-balances/export-balances.enums.ts
|
|
17
|
+
var export_balances_enums_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(export_balances_enums_exports);
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/fns/export-balances/export-balances.ts
|
|
2
|
+
import { exportBalancesFnOptionsSchema } from "./export-balances.schema.zod.js";
|
|
3
|
+
import { FindQueryBuilder } from "../../lib/query-builder/find-query-builder.js";
|
|
4
|
+
import { findBalancesInputSchema } from "../find-balances/find-balances.schema.zod.js";
|
|
5
|
+
import { balanceFilterFullInputSchema } from "../../txs/find-balance-many/find-balance-many.schema.zod.js";
|
|
6
|
+
import { mergeFnOptions } from "../../lib/utils.js";
|
|
7
|
+
function exportBalances(options, input, fnOptions) {
|
|
8
|
+
const { client } = options;
|
|
9
|
+
const $query = new FindQueryBuilder({
|
|
10
|
+
start(query) {
|
|
11
|
+
return client.api.exportBalanceMany({
|
|
12
|
+
balance: query.filter,
|
|
13
|
+
options: query.options
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
schemaBasic: findBalancesInputSchema,
|
|
17
|
+
schema: balanceFilterFullInputSchema,
|
|
18
|
+
optionsSchema: exportBalancesFnOptionsSchema
|
|
19
|
+
});
|
|
20
|
+
if (input) {
|
|
21
|
+
const { filter, options: options2 } = mergeFnOptions(input, fnOptions);
|
|
22
|
+
return $query.where(filter).options(options2);
|
|
23
|
+
}
|
|
24
|
+
return $query;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
exportBalances
|
|
28
|
+
};
|