@binance/pay 5.0.0 → 5.0.2
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/chunk.mjs +13 -0
- package/dist/index.d.mts +442 -535
- package/dist/index.d.ts +444 -536
- package/dist/index.js +307 -320
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +222 -305
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,338 +1,325 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var __export = (all) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name$1 in all) __defProp(target, name$1, {
|
|
6
|
+
get: all[name$1],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
return target;
|
|
9
10
|
};
|
|
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
11
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
BadRequestError: () => import_common4.BadRequestError,
|
|
24
|
-
ConnectorClientError: () => import_common4.ConnectorClientError,
|
|
25
|
-
ForbiddenError: () => import_common4.ForbiddenError,
|
|
26
|
-
NetworkError: () => import_common4.NetworkError,
|
|
27
|
-
NotFoundError: () => import_common4.NotFoundError,
|
|
28
|
-
PAY_REST_API_PROD_URL: () => import_common4.PAY_REST_API_PROD_URL,
|
|
29
|
-
Pay: () => Pay,
|
|
30
|
-
PayRestAPI: () => rest_api_exports,
|
|
31
|
-
RateLimitBanError: () => import_common4.RateLimitBanError,
|
|
32
|
-
RequiredError: () => import_common4.RequiredError,
|
|
33
|
-
ServerError: () => import_common4.ServerError,
|
|
34
|
-
TooManyRequestsError: () => import_common4.TooManyRequestsError,
|
|
35
|
-
UnauthorizedError: () => import_common4.UnauthorizedError
|
|
36
|
-
});
|
|
37
|
-
module.exports = __toCommonJS(index_exports);
|
|
12
|
+
//#endregion
|
|
13
|
+
let __binance_common = require("@binance/common");
|
|
38
14
|
|
|
39
|
-
|
|
40
|
-
var import_common3 = require("@binance/common");
|
|
41
|
-
|
|
42
|
-
// package.json
|
|
15
|
+
//#region package.json
|
|
43
16
|
var name = "@binance/pay";
|
|
44
|
-
var version = "5.0.
|
|
45
|
-
|
|
46
|
-
// src/rest-api/index.ts
|
|
47
|
-
var rest_api_exports = {};
|
|
48
|
-
__export(rest_api_exports, {
|
|
49
|
-
PayApi: () => PayApi,
|
|
50
|
-
RestAPI: () => RestAPI
|
|
51
|
-
});
|
|
17
|
+
var version = "5.0.2";
|
|
52
18
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
* payerInfo : name
|
|
87
|
-
* receiverInfo : binanceId
|
|
88
|
-
* Sender's perspective when orderType is PAYOUT
|
|
89
|
-
* payerInfo : binanceId, name
|
|
90
|
-
* receiverInfo : name, accountId
|
|
91
|
-
* Receiver's perspective when orderType is PAYOUT
|
|
92
|
-
* payerInfo : name
|
|
93
|
-
* receiverInfo : binanceId
|
|
94
|
-
* Receiver's perspective when orderType is CRYPTO_BOX_RF
|
|
95
|
-
* payerInfo : name(the value is always "Crypto Box")
|
|
96
|
-
* receiverInfo : binanceId
|
|
97
|
-
* Sender's perspective when orderType is REMITTANCE
|
|
98
|
-
* payerInfo : binanceId
|
|
99
|
-
* receiverInfo : name, institutionName, cardNumber, digitalWalletId
|
|
100
|
-
*
|
|
101
|
-
* Weight: 3000
|
|
102
|
-
*
|
|
103
|
-
* @summary Get Pay Trade History
|
|
104
|
-
* @param {number} [startTime]
|
|
105
|
-
* @param {number} [endTime]
|
|
106
|
-
* @param {number} [limit] default 100, max 100
|
|
107
|
-
* @param {number} [recvWindow]
|
|
108
|
-
*
|
|
109
|
-
* @throws {RequiredError}
|
|
110
|
-
*/
|
|
111
|
-
getPayTradeHistory: async (startTime, endTime, limit, recvWindow) => {
|
|
112
|
-
const localVarQueryParameter = {};
|
|
113
|
-
if (startTime !== void 0 && startTime !== null) {
|
|
114
|
-
localVarQueryParameter["startTime"] = startTime;
|
|
115
|
-
}
|
|
116
|
-
if (endTime !== void 0 && endTime !== null) {
|
|
117
|
-
localVarQueryParameter["endTime"] = endTime;
|
|
118
|
-
}
|
|
119
|
-
if (limit !== void 0 && limit !== null) {
|
|
120
|
-
localVarQueryParameter["limit"] = limit;
|
|
121
|
-
}
|
|
122
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
123
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
124
|
-
}
|
|
125
|
-
let _timeUnit;
|
|
126
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
127
|
-
return {
|
|
128
|
-
endpoint: "/sapi/v1/pay/transactions",
|
|
129
|
-
method: "GET",
|
|
130
|
-
params: localVarQueryParameter,
|
|
131
|
-
timeUnit: _timeUnit
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
};
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/rest-api/modules/pay-api.ts
|
|
21
|
+
/**
|
|
22
|
+
* Binance Pay REST API
|
|
23
|
+
*
|
|
24
|
+
* OpenAPI Specification for the Binance Pay REST API
|
|
25
|
+
*
|
|
26
|
+
* The version of the OpenAPI document: 1.0.0
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
30
|
+
* https://openapi-generator.tech
|
|
31
|
+
* Do not edit the class manually.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* PayApi - axios parameter creator
|
|
35
|
+
*/
|
|
36
|
+
const PayApiAxiosParamCreator = function(configuration) {
|
|
37
|
+
return { getPayTradeHistory: async (startTime, endTime, limit, recvWindow) => {
|
|
38
|
+
const localVarQueryParameter = {};
|
|
39
|
+
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
40
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
41
|
+
if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
|
|
42
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
43
|
+
let _timeUnit;
|
|
44
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
45
|
+
return {
|
|
46
|
+
endpoint: "/sapi/v1/pay/transactions",
|
|
47
|
+
method: "GET",
|
|
48
|
+
params: localVarQueryParameter,
|
|
49
|
+
timeUnit: _timeUnit
|
|
50
|
+
};
|
|
51
|
+
} };
|
|
135
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* PayApi - object-oriented interface
|
|
55
|
+
* @class PayApi
|
|
56
|
+
*/
|
|
136
57
|
var PayApi = class {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
requestParameters?.limit,
|
|
199
|
-
requestParameters?.recvWindow
|
|
200
|
-
);
|
|
201
|
-
return (0, import_common.sendRequest)(
|
|
202
|
-
this.configuration,
|
|
203
|
-
localVarAxiosArgs.endpoint,
|
|
204
|
-
localVarAxiosArgs.method,
|
|
205
|
-
localVarAxiosArgs.params,
|
|
206
|
-
localVarAxiosArgs?.timeUnit,
|
|
207
|
-
{ isSigned: true }
|
|
208
|
-
);
|
|
209
|
-
}
|
|
58
|
+
constructor(configuration) {
|
|
59
|
+
this.configuration = configuration;
|
|
60
|
+
this.localVarAxiosParamCreator = PayApiAxiosParamCreator(configuration);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get Pay Trade History
|
|
64
|
+
*
|
|
65
|
+
* If startTime and endTime are not sent, the recent 90 days' data will be returned.
|
|
66
|
+
* The max interval between startTime and endTime is 90 days.
|
|
67
|
+
* Support for querying orders within the last 18 months.
|
|
68
|
+
* For payerInfo and receiverInfo,there are different return values in different orderTypes.
|
|
69
|
+
* Sender's perspective when orderType is C2C
|
|
70
|
+
* payerInfo : binanceId
|
|
71
|
+
* receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)
|
|
72
|
+
* Receiver's perspective when orderType is C2C
|
|
73
|
+
* payerInfo : name
|
|
74
|
+
* receiverInfo : binanceId
|
|
75
|
+
* Sender's perspective when orderType is CRYPTO_BOX
|
|
76
|
+
* payerInfo : binanceId
|
|
77
|
+
* receiverInfo : name(the value is always "Crypto Box")
|
|
78
|
+
* Receiver's perspective when orderType is CRYPTO_BOX
|
|
79
|
+
* payerInfo : name
|
|
80
|
+
* receiverInfo : binanceId
|
|
81
|
+
* Sender's perspective when orderType is PAY
|
|
82
|
+
* payerInfo : binanceId
|
|
83
|
+
* receiverInfo : name
|
|
84
|
+
* Receiver's perspective when orderType is PAY
|
|
85
|
+
* payerInfo : name
|
|
86
|
+
* receiverInfo : binanceId, name
|
|
87
|
+
* Sender's perspective when orderType is PAY_REFUND
|
|
88
|
+
* payerInfo : binanceId, name
|
|
89
|
+
* receiverInfo : name, accountId
|
|
90
|
+
* Receiver's perspective when orderType is PAY_REFUND
|
|
91
|
+
* payerInfo : name
|
|
92
|
+
* receiverInfo : binanceId
|
|
93
|
+
* Sender's perspective when orderType is PAYOUT
|
|
94
|
+
* payerInfo : binanceId, name
|
|
95
|
+
* receiverInfo : name, accountId
|
|
96
|
+
* Receiver's perspective when orderType is PAYOUT
|
|
97
|
+
* payerInfo : name
|
|
98
|
+
* receiverInfo : binanceId
|
|
99
|
+
* Receiver's perspective when orderType is CRYPTO_BOX_RF
|
|
100
|
+
* payerInfo : name(the value is always "Crypto Box")
|
|
101
|
+
* receiverInfo : binanceId
|
|
102
|
+
* Sender's perspective when orderType is REMITTANCE
|
|
103
|
+
* payerInfo : binanceId
|
|
104
|
+
* receiverInfo : name, institutionName, cardNumber, digitalWalletId
|
|
105
|
+
*
|
|
106
|
+
* Weight: 3000
|
|
107
|
+
*
|
|
108
|
+
* @summary Get Pay Trade History
|
|
109
|
+
* @param {GetPayTradeHistoryRequest} requestParameters Request parameters.
|
|
110
|
+
* @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}
|
|
111
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
112
|
+
* @memberof PayApi
|
|
113
|
+
* @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}
|
|
114
|
+
*/
|
|
115
|
+
async getPayTradeHistory(requestParameters = {}) {
|
|
116
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
117
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
118
|
+
}
|
|
210
119
|
};
|
|
211
120
|
|
|
212
|
-
|
|
213
|
-
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/rest-api/rest-api.ts
|
|
123
|
+
/**
|
|
124
|
+
* Binance Pay REST API
|
|
125
|
+
*
|
|
126
|
+
* OpenAPI Specification for the Binance Pay REST API
|
|
127
|
+
*
|
|
128
|
+
* The version of the OpenAPI document: 1.0.0
|
|
129
|
+
*
|
|
130
|
+
*
|
|
131
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
132
|
+
* https://openapi-generator.tech
|
|
133
|
+
* Do not edit the class manually.
|
|
134
|
+
*/
|
|
214
135
|
var RestAPI = class {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return this.payApi.getPayTradeHistory(requestParameters);
|
|
298
|
-
}
|
|
136
|
+
constructor(configuration) {
|
|
137
|
+
this.configuration = configuration;
|
|
138
|
+
this.payApi = new PayApi(configuration);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Generic function to send a request.
|
|
142
|
+
* @param endpoint - The API endpoint to call.
|
|
143
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
144
|
+
* @param params - Query parameters for the request.
|
|
145
|
+
*
|
|
146
|
+
* @returns A promise resolving to the response data object.
|
|
147
|
+
*/
|
|
148
|
+
sendRequest(endpoint, method, params = {}) {
|
|
149
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Generic function to send a signed request.
|
|
153
|
+
* @param endpoint - The API endpoint to call.
|
|
154
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
155
|
+
* @param params - Query parameters for the request.
|
|
156
|
+
*
|
|
157
|
+
* @returns A promise resolving to the response data object.
|
|
158
|
+
*/
|
|
159
|
+
sendSignedRequest(endpoint, method, params = {}) {
|
|
160
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0, { isSigned: true });
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Get Pay Trade History
|
|
164
|
+
*
|
|
165
|
+
* If startTime and endTime are not sent, the recent 90 days' data will be returned.
|
|
166
|
+
* The max interval between startTime and endTime is 90 days.
|
|
167
|
+
* Support for querying orders within the last 18 months.
|
|
168
|
+
* For payerInfo and receiverInfo,there are different return values in different orderTypes.
|
|
169
|
+
* Sender's perspective when orderType is C2C
|
|
170
|
+
* payerInfo : binanceId
|
|
171
|
+
* receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)
|
|
172
|
+
* Receiver's perspective when orderType is C2C
|
|
173
|
+
* payerInfo : name
|
|
174
|
+
* receiverInfo : binanceId
|
|
175
|
+
* Sender's perspective when orderType is CRYPTO_BOX
|
|
176
|
+
* payerInfo : binanceId
|
|
177
|
+
* receiverInfo : name(the value is always "Crypto Box")
|
|
178
|
+
* Receiver's perspective when orderType is CRYPTO_BOX
|
|
179
|
+
* payerInfo : name
|
|
180
|
+
* receiverInfo : binanceId
|
|
181
|
+
* Sender's perspective when orderType is PAY
|
|
182
|
+
* payerInfo : binanceId
|
|
183
|
+
* receiverInfo : name
|
|
184
|
+
* Receiver's perspective when orderType is PAY
|
|
185
|
+
* payerInfo : name
|
|
186
|
+
* receiverInfo : binanceId, name
|
|
187
|
+
* Sender's perspective when orderType is PAY_REFUND
|
|
188
|
+
* payerInfo : binanceId, name
|
|
189
|
+
* receiverInfo : name, accountId
|
|
190
|
+
* Receiver's perspective when orderType is PAY_REFUND
|
|
191
|
+
* payerInfo : name
|
|
192
|
+
* receiverInfo : binanceId
|
|
193
|
+
* Sender's perspective when orderType is PAYOUT
|
|
194
|
+
* payerInfo : binanceId, name
|
|
195
|
+
* receiverInfo : name, accountId
|
|
196
|
+
* Receiver's perspective when orderType is PAYOUT
|
|
197
|
+
* payerInfo : name
|
|
198
|
+
* receiverInfo : binanceId
|
|
199
|
+
* Receiver's perspective when orderType is CRYPTO_BOX_RF
|
|
200
|
+
* payerInfo : name(the value is always "Crypto Box")
|
|
201
|
+
* receiverInfo : binanceId
|
|
202
|
+
* Sender's perspective when orderType is REMITTANCE
|
|
203
|
+
* payerInfo : binanceId
|
|
204
|
+
* receiverInfo : name, institutionName, cardNumber, digitalWalletId
|
|
205
|
+
*
|
|
206
|
+
* Weight: 3000
|
|
207
|
+
*
|
|
208
|
+
* @summary Get Pay Trade History
|
|
209
|
+
* @param {GetPayTradeHistoryRequest} requestParameters Request parameters.
|
|
210
|
+
*
|
|
211
|
+
* @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}
|
|
212
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
213
|
+
* @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}
|
|
214
|
+
*/
|
|
215
|
+
getPayTradeHistory(requestParameters = {}) {
|
|
216
|
+
return this.payApi.getPayTradeHistory(requestParameters);
|
|
217
|
+
}
|
|
299
218
|
};
|
|
300
219
|
|
|
301
|
-
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/rest-api/index.ts
|
|
222
|
+
var rest_api_exports = /* @__PURE__ */ __export({
|
|
223
|
+
PayApi: () => PayApi,
|
|
224
|
+
RestAPI: () => RestAPI
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/pay.ts
|
|
302
229
|
var Pay = class {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
}
|
|
230
|
+
constructor(config) {
|
|
231
|
+
const userAgent = (0, __binance_common.buildUserAgent)(name, version);
|
|
232
|
+
if (config?.configurationRestAPI) {
|
|
233
|
+
const configRestAPI = new __binance_common.ConfigurationRestAPI(config.configurationRestAPI);
|
|
234
|
+
configRestAPI.basePath = configRestAPI.basePath || __binance_common.PAY_REST_API_PROD_URL;
|
|
235
|
+
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
236
|
+
configRestAPI.baseOptions.headers = {
|
|
237
|
+
...configRestAPI.baseOptions.headers || {},
|
|
238
|
+
"User-Agent": userAgent
|
|
239
|
+
};
|
|
240
|
+
this.restAPI = new RestAPI(configRestAPI);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
318
243
|
};
|
|
319
244
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
245
|
+
//#endregion
|
|
246
|
+
Object.defineProperty(exports, 'BadRequestError', {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () {
|
|
249
|
+
return __binance_common.BadRequestError;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
Object.defineProperty(exports, 'ConfigurationPay', {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function () {
|
|
255
|
+
return ConfigurationPay;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(exports, 'ConnectorClientError', {
|
|
259
|
+
enumerable: true,
|
|
260
|
+
get: function () {
|
|
261
|
+
return __binance_common.ConnectorClientError;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
Object.defineProperty(exports, 'ForbiddenError', {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function () {
|
|
267
|
+
return __binance_common.ForbiddenError;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
Object.defineProperty(exports, 'NetworkError', {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: function () {
|
|
273
|
+
return __binance_common.NetworkError;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
Object.defineProperty(exports, 'NotFoundError', {
|
|
277
|
+
enumerable: true,
|
|
278
|
+
get: function () {
|
|
279
|
+
return __binance_common.NotFoundError;
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
Object.defineProperty(exports, 'PAY_REST_API_PROD_URL', {
|
|
283
|
+
enumerable: true,
|
|
284
|
+
get: function () {
|
|
285
|
+
return __binance_common.PAY_REST_API_PROD_URL;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
exports.Pay = Pay;
|
|
289
|
+
Object.defineProperty(exports, 'PayRestAPI', {
|
|
290
|
+
enumerable: true,
|
|
291
|
+
get: function () {
|
|
292
|
+
return rest_api_exports;
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
Object.defineProperty(exports, 'RateLimitBanError', {
|
|
296
|
+
enumerable: true,
|
|
297
|
+
get: function () {
|
|
298
|
+
return __binance_common.RateLimitBanError;
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
Object.defineProperty(exports, 'RequiredError', {
|
|
302
|
+
enumerable: true,
|
|
303
|
+
get: function () {
|
|
304
|
+
return __binance_common.RequiredError;
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
Object.defineProperty(exports, 'ServerError', {
|
|
308
|
+
enumerable: true,
|
|
309
|
+
get: function () {
|
|
310
|
+
return __binance_common.ServerError;
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
Object.defineProperty(exports, 'TooManyRequestsError', {
|
|
314
|
+
enumerable: true,
|
|
315
|
+
get: function () {
|
|
316
|
+
return __binance_common.TooManyRequestsError;
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
Object.defineProperty(exports, 'UnauthorizedError', {
|
|
320
|
+
enumerable: true,
|
|
321
|
+
get: function () {
|
|
322
|
+
return __binance_common.UnauthorizedError;
|
|
323
|
+
}
|
|
337
324
|
});
|
|
338
325
|
//# sourceMappingURL=index.js.map
|