@calm-xyz/core 0.12.0 → 0.13.0
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/index.d.ts +986 -2113
- package/dist/index.js +341 -719
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,7 +21,6 @@ async function request(config) {
|
|
|
21
21
|
if (config.params) targetUrl += `?${searchParams}`;
|
|
22
22
|
const hasBody = config.data !== void 0;
|
|
23
23
|
const response = await fetch(targetUrl, {
|
|
24
|
-
credentials: config.credentials ?? "include",
|
|
25
24
|
method: config.method,
|
|
26
25
|
body: hasBody ? JSON.stringify(config.data) : void 0,
|
|
27
26
|
signal: config.signal,
|
|
@@ -53,23 +52,23 @@ const client = request;
|
|
|
53
52
|
* Generated by Kubb (https://kubb.dev/).
|
|
54
53
|
* Do not edit manually.
|
|
55
54
|
*/
|
|
56
|
-
function getCheckoutCardUrl(
|
|
55
|
+
function getCheckoutCardUrl() {
|
|
57
56
|
return {
|
|
58
57
|
method: "POST",
|
|
59
|
-
url: `/v1/
|
|
58
|
+
url: `/v1/card/checkout`
|
|
60
59
|
};
|
|
61
60
|
}
|
|
62
61
|
/**
|
|
63
|
-
* @description
|
|
64
|
-
* @summary
|
|
65
|
-
* {@link /v1/
|
|
62
|
+
* @description Starts a card purchase for the `wallet` in the body. Returns the order to poll and the hosted card URL to render, with the amount, currency, payment method and country already applied and locked so the widget opens on the payment step.
|
|
63
|
+
* @summary Start a card checkout
|
|
64
|
+
* {@link /v1/card/checkout}
|
|
66
65
|
*/
|
|
67
|
-
async function checkoutCard(
|
|
66
|
+
async function checkoutCard(data, config = {}) {
|
|
68
67
|
const { client: request = client, ...requestConfig } = config;
|
|
69
68
|
const requestData = data;
|
|
70
69
|
return (await request({
|
|
71
70
|
method: "POST",
|
|
72
|
-
url: getCheckoutCardUrl(
|
|
71
|
+
url: getCheckoutCardUrl().url.toString(),
|
|
73
72
|
data: requestData,
|
|
74
73
|
...requestConfig
|
|
75
74
|
})).data;
|
|
@@ -78,45 +77,24 @@ async function checkoutCard(address, data, config = {}) {
|
|
|
78
77
|
* Generated by Kubb (https://kubb.dev/).
|
|
79
78
|
* Do not edit manually.
|
|
80
79
|
*/
|
|
81
|
-
function getCheckoutStripeSessionUrl(
|
|
80
|
+
function getCheckoutStripeSessionUrl(sessionId) {
|
|
82
81
|
return {
|
|
83
82
|
method: "POST",
|
|
84
|
-
url: `/v1/
|
|
83
|
+
url: `/v1/stripe/session/${sessionId}/checkout`
|
|
85
84
|
};
|
|
86
85
|
}
|
|
87
86
|
/**
|
|
88
87
|
* @description Checks out a session and returns its `client_secret`. Driven by the client SDK's `performCheckout` callback — never called standalone; the SDK handles required next actions (3DS) between calls.
|
|
89
88
|
* @summary Check out a Stripe onramp session
|
|
90
|
-
* {@link /v1/
|
|
89
|
+
* {@link /v1/stripe/session/:sessionId/checkout}
|
|
91
90
|
*/
|
|
92
|
-
async function checkoutStripeSession(
|
|
93
|
-
const { client: request = client, ...requestConfig } = config;
|
|
94
|
-
return (await request({
|
|
95
|
-
method: "POST",
|
|
96
|
-
url: getCheckoutStripeSessionUrl(address, sessionId).url.toString(),
|
|
97
|
-
...requestConfig
|
|
98
|
-
})).data;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
102
|
-
* Do not edit manually.
|
|
103
|
-
*/
|
|
104
|
-
function getClearSessionUrl() {
|
|
105
|
-
return {
|
|
106
|
-
method: "POST",
|
|
107
|
-
url: `/v1/session/clear`
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* @description Ends the session: clears both cookies and invalidates the refresh credential. No auth required; idempotent.
|
|
112
|
-
* @summary Clear a session
|
|
113
|
-
* {@link /v1/session/clear}
|
|
114
|
-
*/
|
|
115
|
-
async function clearSession(config = {}) {
|
|
91
|
+
async function checkoutStripeSession(sessionId, data, config = {}) {
|
|
116
92
|
const { client: request = client, ...requestConfig } = config;
|
|
93
|
+
const requestData = data;
|
|
117
94
|
return (await request({
|
|
118
95
|
method: "POST",
|
|
119
|
-
url:
|
|
96
|
+
url: getCheckoutStripeSessionUrl(sessionId).url.toString(),
|
|
97
|
+
data: requestData,
|
|
120
98
|
...requestConfig
|
|
121
99
|
})).data;
|
|
122
100
|
}
|
|
@@ -124,22 +102,24 @@ async function clearSession(config = {}) {
|
|
|
124
102
|
* Generated by Kubb (https://kubb.dev/).
|
|
125
103
|
* Do not edit manually.
|
|
126
104
|
*/
|
|
127
|
-
function getConnectExchangeUrl(
|
|
105
|
+
function getConnectExchangeUrl(exchange) {
|
|
128
106
|
return {
|
|
129
107
|
method: "POST",
|
|
130
|
-
url: `/v1/
|
|
108
|
+
url: `/v1/exchange/${exchange}`
|
|
131
109
|
};
|
|
132
110
|
}
|
|
133
111
|
/**
|
|
134
|
-
* @description Starts an exchange connection and returns the URL the user authorizes at. On success, the connection turns live and can be read via `GET
|
|
112
|
+
* @description Starts an exchange connection for the `wallet` in the body and returns the URL the user authorizes at. On success, the connection turns live and can be read via `GET /v1/exchange/{exchange}`.
|
|
135
113
|
* @summary Connect an exchange
|
|
136
|
-
* {@link /v1/
|
|
114
|
+
* {@link /v1/exchange/:exchange}
|
|
137
115
|
*/
|
|
138
|
-
async function connectExchange(
|
|
116
|
+
async function connectExchange(exchange, data, config = {}) {
|
|
139
117
|
const { client: request = client, ...requestConfig } = config;
|
|
118
|
+
const requestData = data;
|
|
140
119
|
return (await request({
|
|
141
120
|
method: "POST",
|
|
142
|
-
url: getConnectExchangeUrl(
|
|
121
|
+
url: getConnectExchangeUrl(exchange).url.toString(),
|
|
122
|
+
data: requestData,
|
|
143
123
|
...requestConfig
|
|
144
124
|
})).data;
|
|
145
125
|
}
|
|
@@ -147,23 +127,23 @@ async function connectExchange(address, exchange, config = {}) {
|
|
|
147
127
|
* Generated by Kubb (https://kubb.dev/).
|
|
148
128
|
* Do not edit manually.
|
|
149
129
|
*/
|
|
150
|
-
function getCreateBlinkSignatureUrl(
|
|
130
|
+
function getCreateBlinkSignatureUrl() {
|
|
151
131
|
return {
|
|
152
132
|
method: "POST",
|
|
153
|
-
url: `/v1/
|
|
133
|
+
url: `/v1/blink/signature`
|
|
154
134
|
};
|
|
155
135
|
}
|
|
156
136
|
/**
|
|
157
|
-
* @description Returns the signed authorization the hosted deposit flow requires before it will accept a deposit. The destination is the
|
|
137
|
+
* @description Returns the signed authorization the hosted deposit flow requires before it will accept a deposit. The destination is the `wallet` in the body and the destination chain's payout token — USDC on most chains, USDm on MegaETH (`4326`). The authorization is short-lived.
|
|
158
138
|
* @summary Authorize a deposit
|
|
159
|
-
* {@link /v1/
|
|
139
|
+
* {@link /v1/blink/signature}
|
|
160
140
|
*/
|
|
161
|
-
async function createBlinkSignature(
|
|
141
|
+
async function createBlinkSignature(data, config = {}) {
|
|
162
142
|
const { client: request = client, ...requestConfig } = config;
|
|
163
143
|
const requestData = data;
|
|
164
144
|
return (await request({
|
|
165
145
|
method: "POST",
|
|
166
|
-
url: getCreateBlinkSignatureUrl(
|
|
146
|
+
url: getCreateBlinkSignatureUrl().url.toString(),
|
|
167
147
|
data: requestData,
|
|
168
148
|
...requestConfig
|
|
169
149
|
})).data;
|
|
@@ -172,23 +152,23 @@ async function createBlinkSignature(address, data, config = {}) {
|
|
|
172
152
|
* Generated by Kubb (https://kubb.dev/).
|
|
173
153
|
* Do not edit manually.
|
|
174
154
|
*/
|
|
175
|
-
function
|
|
155
|
+
function getCreateCardQuoteUrl() {
|
|
176
156
|
return {
|
|
177
157
|
method: "POST",
|
|
178
|
-
url: `/v1/
|
|
158
|
+
url: `/v1/card/quote`
|
|
179
159
|
};
|
|
180
160
|
}
|
|
181
161
|
/**
|
|
182
|
-
* @description Returns
|
|
183
|
-
* @summary
|
|
184
|
-
* {@link /v1/
|
|
162
|
+
* @description Returns a price estimate for a card spend: the crypto the buyer receives and the all-in fiat charged.
|
|
163
|
+
* @summary Quote a card amount
|
|
164
|
+
* {@link /v1/card/quote}
|
|
185
165
|
*/
|
|
186
|
-
async function
|
|
166
|
+
async function createCardQuote(data, config = {}) {
|
|
187
167
|
const { client: request = client, ...requestConfig } = config;
|
|
188
168
|
const requestData = data;
|
|
189
169
|
return (await request({
|
|
190
170
|
method: "POST",
|
|
191
|
-
url:
|
|
171
|
+
url: getCreateCardQuoteUrl().url.toString(),
|
|
192
172
|
data: requestData,
|
|
193
173
|
...requestConfig
|
|
194
174
|
})).data;
|
|
@@ -197,23 +177,23 @@ async function createCardLink(address, data, config = {}) {
|
|
|
197
177
|
* Generated by Kubb (https://kubb.dev/).
|
|
198
178
|
* Do not edit manually.
|
|
199
179
|
*/
|
|
200
|
-
function getCreateCashAppOrderUrl(
|
|
180
|
+
function getCreateCashAppOrderUrl() {
|
|
201
181
|
return {
|
|
202
182
|
method: "POST",
|
|
203
|
-
url: `/v1/
|
|
183
|
+
url: `/v1/cashapp`
|
|
204
184
|
};
|
|
205
185
|
}
|
|
206
186
|
/**
|
|
207
|
-
* @description Opens a Cash App onramp order and returns it, including the Cash App payment
|
|
187
|
+
* @description Opens a Cash App onramp order and returns it, including the Cash App payment url. Poll `GET /v1/cashapp/{id}` for status. The order delivers to the `wallet` in the body.
|
|
208
188
|
* @summary Create a Cash App order
|
|
209
|
-
* {@link /v1/
|
|
189
|
+
* {@link /v1/cashapp}
|
|
210
190
|
*/
|
|
211
|
-
async function createCashAppOrder(
|
|
191
|
+
async function createCashAppOrder(data, config = {}) {
|
|
212
192
|
const { client: request = client, ...requestConfig } = config;
|
|
213
193
|
const requestData = data;
|
|
214
194
|
return (await request({
|
|
215
195
|
method: "POST",
|
|
216
|
-
url: getCreateCashAppOrderUrl(
|
|
196
|
+
url: getCreateCashAppOrderUrl().url.toString(),
|
|
217
197
|
data: requestData,
|
|
218
198
|
...requestConfig
|
|
219
199
|
})).data;
|
|
@@ -222,23 +202,23 @@ async function createCashAppOrder(address, data, config = {}) {
|
|
|
222
202
|
* Generated by Kubb (https://kubb.dev/).
|
|
223
203
|
* Do not edit manually.
|
|
224
204
|
*/
|
|
225
|
-
function getCreateCashAppQuoteUrl(
|
|
205
|
+
function getCreateCashAppQuoteUrl() {
|
|
226
206
|
return {
|
|
227
207
|
method: "POST",
|
|
228
|
-
url: `/v1/
|
|
208
|
+
url: `/v1/cashapp/quote`
|
|
229
209
|
};
|
|
230
210
|
}
|
|
231
211
|
/**
|
|
232
|
-
* @description Returns a pricing preview for a Cash App order — the destination amount, the fee, and the fee in basis points. Every chain is a valid `
|
|
212
|
+
* @description Returns a pricing preview for a Cash App order — the destination amount, the fee, and the fee in basis points. Every chain is a valid `destination_chain`. Read the amount against `destination.token` and `destination.decimals` rather than the payout you configured.
|
|
233
213
|
* @summary Quote a Cash App order
|
|
234
|
-
* {@link /v1/
|
|
214
|
+
* {@link /v1/cashapp/quote}
|
|
235
215
|
*/
|
|
236
|
-
async function createCashAppQuote(
|
|
216
|
+
async function createCashAppQuote(data, config = {}) {
|
|
237
217
|
const { client: request = client, ...requestConfig } = config;
|
|
238
218
|
const requestData = data;
|
|
239
219
|
return (await request({
|
|
240
220
|
method: "POST",
|
|
241
|
-
url: getCreateCashAppQuoteUrl(
|
|
221
|
+
url: getCreateCashAppQuoteUrl().url.toString(),
|
|
242
222
|
data: requestData,
|
|
243
223
|
...requestConfig
|
|
244
224
|
})).data;
|
|
@@ -247,48 +227,23 @@ async function createCashAppQuote(address, data, config = {}) {
|
|
|
247
227
|
* Generated by Kubb (https://kubb.dev/).
|
|
248
228
|
* Do not edit manually.
|
|
249
229
|
*/
|
|
250
|
-
function
|
|
230
|
+
function getCreateExchangeWithdrawQuoteUrl(exchange) {
|
|
251
231
|
return {
|
|
252
232
|
method: "POST",
|
|
253
|
-
url: `/v1/
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* @description Returns an intake address for a `(source chain, source token) → destination` route. Funding it delivers the destination chain's payout token — USDC on most chains, USDm on MegaETH (`4326`) — at that token's own decimals; the same route reuses one address. Pass `destination_token` to pick among a chain's payout tokens where it offers more than one.
|
|
258
|
-
* @summary Create a crypto deposit address
|
|
259
|
-
* {@link /v1/wallets/:address/deposit-address}
|
|
260
|
-
*/
|
|
261
|
-
async function createDepositAddress(address, data, config = {}) {
|
|
262
|
-
const { client: request = client, ...requestConfig } = config;
|
|
263
|
-
const requestData = data;
|
|
264
|
-
return (await request({
|
|
265
|
-
method: "POST",
|
|
266
|
-
url: getCreateDepositAddressUrl(address).url.toString(),
|
|
267
|
-
data: requestData,
|
|
268
|
-
...requestConfig
|
|
269
|
-
})).data;
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
273
|
-
* Do not edit manually.
|
|
274
|
-
*/
|
|
275
|
-
function getCreateExchangeWithdrawQuoteUrl(address, exchange) {
|
|
276
|
-
return {
|
|
277
|
-
method: "POST",
|
|
278
|
-
url: `/v1/wallets/${address}/exchange/${exchange}/withdraw/quote`
|
|
233
|
+
url: `/v1/exchange/${exchange}/withdraw/quote`
|
|
279
234
|
};
|
|
280
235
|
}
|
|
281
236
|
/**
|
|
282
237
|
* @description Quotes a USDC withdrawal from the connected exchange to a deposit address that settles to the chosen destination. The returned `id` is the handle the withdraw call executes.
|
|
283
238
|
* @summary Quote an exchange withdrawal
|
|
284
|
-
* {@link /v1/
|
|
239
|
+
* {@link /v1/exchange/:exchange/withdraw/quote}
|
|
285
240
|
*/
|
|
286
|
-
async function createExchangeWithdrawQuote(
|
|
241
|
+
async function createExchangeWithdrawQuote(exchange, data, config = {}) {
|
|
287
242
|
const { client: request = client, ...requestConfig } = config;
|
|
288
243
|
const requestData = data;
|
|
289
244
|
return (await request({
|
|
290
245
|
method: "POST",
|
|
291
|
-
url: getCreateExchangeWithdrawQuoteUrl(
|
|
246
|
+
url: getCreateExchangeWithdrawQuoteUrl(exchange).url.toString(),
|
|
292
247
|
data: requestData,
|
|
293
248
|
...requestConfig
|
|
294
249
|
})).data;
|
|
@@ -297,117 +252,23 @@ async function createExchangeWithdrawQuote(address, exchange, data, config = {})
|
|
|
297
252
|
* Generated by Kubb (https://kubb.dev/).
|
|
298
253
|
* Do not edit manually.
|
|
299
254
|
*/
|
|
300
|
-
function
|
|
301
|
-
return {
|
|
302
|
-
method: "POST",
|
|
303
|
-
url: `/v1/session/${address}/dynamic`
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* @description Creates a session from a Dynamic identity token. The wallet must be linked to the token's user. Requires an `Authorization: Bearer <token>` header and the publishable key.
|
|
308
|
-
* @summary Create a session (Dynamic)
|
|
309
|
-
* {@link /v1/session/:address/dynamic}
|
|
310
|
-
*/
|
|
311
|
-
async function createSessionDynamic(address, config = {}) {
|
|
312
|
-
const { client: request = client, ...requestConfig } = config;
|
|
313
|
-
return (await request({
|
|
314
|
-
method: "POST",
|
|
315
|
-
url: getCreateSessionDynamicUrl(address).url.toString(),
|
|
316
|
-
...requestConfig
|
|
317
|
-
})).data;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
321
|
-
* Do not edit manually.
|
|
322
|
-
*/
|
|
323
|
-
function getCreateSessionPrivyUrl(address) {
|
|
255
|
+
function getCreateStripeAuthIntentUrl() {
|
|
324
256
|
return {
|
|
325
257
|
method: "POST",
|
|
326
|
-
url: `/v1/
|
|
258
|
+
url: `/v1/stripe/auth-intent`
|
|
327
259
|
};
|
|
328
260
|
}
|
|
329
261
|
/**
|
|
330
|
-
* @description
|
|
331
|
-
* @summary Create a session (Privy)
|
|
332
|
-
* {@link /v1/session/:address/privy}
|
|
333
|
-
*/
|
|
334
|
-
async function createSessionPrivy(address, config = {}) {
|
|
335
|
-
const { client: request = client, ...requestConfig } = config;
|
|
336
|
-
return (await request({
|
|
337
|
-
method: "POST",
|
|
338
|
-
url: getCreateSessionPrivyUrl(address).url.toString(),
|
|
339
|
-
...requestConfig
|
|
340
|
-
})).data;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
344
|
-
* Do not edit manually.
|
|
345
|
-
*/
|
|
346
|
-
function getCreateSessionSiweUrl(address) {
|
|
347
|
-
return {
|
|
348
|
-
method: "POST",
|
|
349
|
-
url: `/v1/session/${address}/siwe`
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* @description Verifies a signed EIP-4361 message and its nonce binding, then mints the session cookie pair. The message is standard EIP-4361 with no Calm-specific fields — the publishable key comes from the binding issued by `/siwe/nonce`, which welds it to the nonce the wallet signed over.
|
|
354
|
-
* @summary Create a session (SIWE)
|
|
355
|
-
* {@link /v1/session/:address/siwe}
|
|
356
|
-
*/
|
|
357
|
-
async function createSessionSiwe(address, data, config = {}) {
|
|
358
|
-
const { client: request = client, ...requestConfig } = config;
|
|
359
|
-
const requestData = data;
|
|
360
|
-
return (await request({
|
|
361
|
-
method: "POST",
|
|
362
|
-
url: getCreateSessionSiweUrl(address).url.toString(),
|
|
363
|
-
data: requestData,
|
|
364
|
-
...requestConfig
|
|
365
|
-
})).data;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
369
|
-
* Do not edit manually.
|
|
370
|
-
*/
|
|
371
|
-
function getCreateSiweNonceUrl(address) {
|
|
372
|
-
return {
|
|
373
|
-
method: "POST",
|
|
374
|
-
url: `/v1/session/${address}/siwe/nonce`
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* @description Returns a nonce to embed in an EIP-4361 message and a short-lived binding to echo back on the SIWE create. Send the publishable key as `X-Calm-Publishable-Key`: it is welded into the binding, so the message itself stays standard EIP-4361 with no Calm-specific fields. Each call issues a fresh nonce; the binding expires after a few minutes.
|
|
379
|
-
* @summary Issue a SIWE nonce binding
|
|
380
|
-
* {@link /v1/session/:address/siwe/nonce}
|
|
381
|
-
*/
|
|
382
|
-
async function createSiweNonce(address, config = {}) {
|
|
383
|
-
const { client: request = client, ...requestConfig } = config;
|
|
384
|
-
return (await request({
|
|
385
|
-
method: "POST",
|
|
386
|
-
url: getCreateSiweNonceUrl(address).url.toString(),
|
|
387
|
-
...requestConfig
|
|
388
|
-
})).data;
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
392
|
-
* Do not edit manually.
|
|
393
|
-
*/
|
|
394
|
-
function getCreateStripeAuthIntentUrl(address) {
|
|
395
|
-
return {
|
|
396
|
-
method: "POST",
|
|
397
|
-
url: `/v1/wallets/${address}/stripe/auth-intent`
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* @description Opens a Link OAuth intent for the buyer's email and returns its id (handed to the client SDK's `authenticate(...)`) plus its expiry. Read-passthrough — nothing is persisted here.
|
|
262
|
+
* @description Opens a Link OAuth intent for the buyer's email and returns its id (handed to the client SDK's `authenticate(...)`) plus its expiry.
|
|
402
263
|
* @summary Open a Stripe Link auth intent
|
|
403
|
-
* {@link /v1/
|
|
264
|
+
* {@link /v1/stripe/auth-intent}
|
|
404
265
|
*/
|
|
405
|
-
async function createStripeAuthIntent(
|
|
266
|
+
async function createStripeAuthIntent(data, config = {}) {
|
|
406
267
|
const { client: request = client, ...requestConfig } = config;
|
|
407
268
|
const requestData = data;
|
|
408
269
|
return (await request({
|
|
409
270
|
method: "POST",
|
|
410
|
-
url: getCreateStripeAuthIntentUrl(
|
|
271
|
+
url: getCreateStripeAuthIntentUrl().url.toString(),
|
|
411
272
|
data: requestData,
|
|
412
273
|
...requestConfig
|
|
413
274
|
})).data;
|
|
@@ -416,22 +277,24 @@ async function createStripeAuthIntent(address, data, config = {}) {
|
|
|
416
277
|
* Generated by Kubb (https://kubb.dev/).
|
|
417
278
|
* Do not edit manually.
|
|
418
279
|
*/
|
|
419
|
-
function getCreateStripeCustomerUrl(
|
|
280
|
+
function getCreateStripeCustomerUrl(crypto_customer_id) {
|
|
420
281
|
return {
|
|
421
282
|
method: "POST",
|
|
422
|
-
url: `/v1/
|
|
283
|
+
url: `/v1/stripe/customer/${crypto_customer_id}`
|
|
423
284
|
};
|
|
424
285
|
}
|
|
425
286
|
/**
|
|
426
287
|
* @description Validates the crypto customer exists and persists the customer id onto the session so `/status` can re-derive it after a reopen.
|
|
427
288
|
* @summary Persist a Stripe crypto customer
|
|
428
|
-
* {@link /v1/
|
|
289
|
+
* {@link /v1/stripe/customer/:crypto_customer_id}
|
|
429
290
|
*/
|
|
430
|
-
async function createStripeCustomer(
|
|
291
|
+
async function createStripeCustomer(crypto_customer_id, data, config = {}) {
|
|
431
292
|
const { client: request = client, ...requestConfig } = config;
|
|
293
|
+
const requestData = data;
|
|
432
294
|
return (await request({
|
|
433
295
|
method: "POST",
|
|
434
|
-
url: getCreateStripeCustomerUrl(
|
|
296
|
+
url: getCreateStripeCustomerUrl(crypto_customer_id).url.toString(),
|
|
297
|
+
data: requestData,
|
|
435
298
|
...requestConfig
|
|
436
299
|
})).data;
|
|
437
300
|
}
|
|
@@ -439,23 +302,23 @@ async function createStripeCustomer(address, crypto_customer_id, config = {}) {
|
|
|
439
302
|
* Generated by Kubb (https://kubb.dev/).
|
|
440
303
|
* Do not edit manually.
|
|
441
304
|
*/
|
|
442
|
-
function getCreateStripeSessionUrl(
|
|
305
|
+
function getCreateStripeSessionUrl() {
|
|
443
306
|
return {
|
|
444
307
|
method: "POST",
|
|
445
|
-
url: `/v1/
|
|
308
|
+
url: `/v1/stripe/session`
|
|
446
309
|
};
|
|
447
310
|
}
|
|
448
311
|
/**
|
|
449
|
-
* @description Opens a headless onramp session
|
|
312
|
+
* @description Opens a headless onramp session. Returns Stripe's `session_id` (fed to the client SDK's `performCheckout`) alongside a Calm `order_id` to poll via `GET .../stripe/order/:id`. Every chain is a valid `destination_chain`. Pass exactly one of `source_amount` / `destination_amount`.
|
|
450
313
|
* @summary Open a Stripe onramp session
|
|
451
|
-
* {@link /v1/
|
|
314
|
+
* {@link /v1/stripe/session}
|
|
452
315
|
*/
|
|
453
|
-
async function createStripeSession(
|
|
316
|
+
async function createStripeSession(data, config = {}) {
|
|
454
317
|
const { client: request = client, ...requestConfig } = config;
|
|
455
318
|
const requestData = data;
|
|
456
319
|
return (await request({
|
|
457
320
|
method: "POST",
|
|
458
|
-
url: getCreateStripeSessionUrl(
|
|
321
|
+
url: getCreateStripeSessionUrl().url.toString(),
|
|
459
322
|
data: requestData,
|
|
460
323
|
...requestConfig
|
|
461
324
|
})).data;
|
|
@@ -464,23 +327,23 @@ async function createStripeSession(address, data, config = {}) {
|
|
|
464
327
|
* Generated by Kubb (https://kubb.dev/).
|
|
465
328
|
* Do not edit manually.
|
|
466
329
|
*/
|
|
467
|
-
function getCreateStripeTokensUrl(
|
|
330
|
+
function getCreateStripeTokensUrl() {
|
|
468
331
|
return {
|
|
469
332
|
method: "POST",
|
|
470
|
-
url: `/v1/
|
|
333
|
+
url: `/v1/stripe/tokens`
|
|
471
334
|
};
|
|
472
335
|
}
|
|
473
336
|
/**
|
|
474
337
|
* @description Exchanges a consented auth intent for the per-user OAuth tokens and stores them server-side. Returns 204; the access token never reaches the browser. The bound intent must match this session.
|
|
475
338
|
* @summary Exchange an auth intent for tokens
|
|
476
|
-
* {@link /v1/
|
|
339
|
+
* {@link /v1/stripe/tokens}
|
|
477
340
|
*/
|
|
478
|
-
async function createStripeTokens(
|
|
341
|
+
async function createStripeTokens(data, config = {}) {
|
|
479
342
|
const { client: request = client, ...requestConfig } = config;
|
|
480
343
|
const requestData = data;
|
|
481
344
|
return (await request({
|
|
482
345
|
method: "POST",
|
|
483
|
-
url: getCreateStripeTokensUrl(
|
|
346
|
+
url: getCreateStripeTokensUrl().url.toString(),
|
|
484
347
|
data: requestData,
|
|
485
348
|
...requestConfig
|
|
486
349
|
})).data;
|
|
@@ -489,48 +352,23 @@ async function createStripeTokens(address, data, config = {}) {
|
|
|
489
352
|
* Generated by Kubb (https://kubb.dev/).
|
|
490
353
|
* Do not edit manually.
|
|
491
354
|
*/
|
|
492
|
-
function
|
|
355
|
+
function getCreateVirtualAccountUrl() {
|
|
493
356
|
return {
|
|
494
357
|
method: "POST",
|
|
495
|
-
url: `/v1/
|
|
358
|
+
url: `/v1/virtual-accounts`
|
|
496
359
|
};
|
|
497
360
|
}
|
|
498
361
|
/**
|
|
499
|
-
* @description
|
|
500
|
-
* @summary Quote a swap
|
|
501
|
-
* {@link /v1/wallets/:address/swap/quote}
|
|
502
|
-
*/
|
|
503
|
-
async function createSwapQuote(address, data, config = {}) {
|
|
504
|
-
const { client: request = client, ...requestConfig } = config;
|
|
505
|
-
const requestData = data;
|
|
506
|
-
return (await request({
|
|
507
|
-
method: "POST",
|
|
508
|
-
url: getCreateSwapQuoteUrl(address).url.toString(),
|
|
509
|
-
data: requestData,
|
|
510
|
-
...requestConfig
|
|
511
|
-
})).data;
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
515
|
-
* Do not edit manually.
|
|
516
|
-
*/
|
|
517
|
-
function getCreateVirtualAccountUrl(address) {
|
|
518
|
-
return {
|
|
519
|
-
method: "POST",
|
|
520
|
-
url: `/v1/wallets/${address}/virtual-accounts`
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* @description Provisions a virtual account for a `(currency, destination chain, payout token)` triple. Repeating a triple returns the account that already exists. Changing `destination_token` on the same currency and chain provisions a separate account with its own bank details. Every chain is accepted: the ones the banking rail settles to directly are delivered by it, and the rest are routed on arrival. Requires an approved identity verification. Returns 204; refetch the list to see the new account.
|
|
362
|
+
* @description Provisions a virtual account for a `(currency, destination chain, payout token)` triple. Repeating a triple returns the account that already exists. Changing `destination_token` on the same currency and chain provisions a separate account with its own bank details. Every chain is accepted. Requires an approved identity verification. Returns 204; refetch the list to see the new account.
|
|
525
363
|
* @summary Create a virtual account
|
|
526
|
-
* {@link /v1/
|
|
364
|
+
* {@link /v1/virtual-accounts}
|
|
527
365
|
*/
|
|
528
|
-
async function createVirtualAccount(
|
|
366
|
+
async function createVirtualAccount(data, config = {}) {
|
|
529
367
|
const { client: request = client, ...requestConfig } = config;
|
|
530
368
|
const requestData = data;
|
|
531
369
|
return (await request({
|
|
532
370
|
method: "POST",
|
|
533
|
-
url: getCreateVirtualAccountUrl(
|
|
371
|
+
url: getCreateVirtualAccountUrl().url.toString(),
|
|
534
372
|
data: requestData,
|
|
535
373
|
...requestConfig
|
|
536
374
|
})).data;
|
|
@@ -539,22 +377,23 @@ async function createVirtualAccount(address, data, config = {}) {
|
|
|
539
377
|
* Generated by Kubb (https://kubb.dev/).
|
|
540
378
|
* Do not edit manually.
|
|
541
379
|
*/
|
|
542
|
-
function getDisconnectExchangeUrl(
|
|
380
|
+
function getDisconnectExchangeUrl(exchange) {
|
|
543
381
|
return {
|
|
544
382
|
method: "DELETE",
|
|
545
|
-
url: `/v1/
|
|
383
|
+
url: `/v1/exchange/${exchange}`
|
|
546
384
|
};
|
|
547
385
|
}
|
|
548
386
|
/**
|
|
549
387
|
* @description Disconnects an exchange and returns 204. Idempotent: disconnecting an already-disconnected exchange still returns 204.
|
|
550
388
|
* @summary Disconnect an exchange
|
|
551
|
-
* {@link /v1/
|
|
389
|
+
* {@link /v1/exchange/:exchange}
|
|
552
390
|
*/
|
|
553
|
-
async function disconnectExchange(
|
|
391
|
+
async function disconnectExchange(exchange, params, config = {}) {
|
|
554
392
|
const { client: request = client, ...requestConfig } = config;
|
|
555
393
|
return (await request({
|
|
556
394
|
method: "DELETE",
|
|
557
|
-
url: getDisconnectExchangeUrl(
|
|
395
|
+
url: getDisconnectExchangeUrl(exchange).url.toString(),
|
|
396
|
+
params,
|
|
558
397
|
...requestConfig
|
|
559
398
|
})).data;
|
|
560
399
|
}
|
|
@@ -562,23 +401,23 @@ async function disconnectExchange(address, exchange, config = {}) {
|
|
|
562
401
|
* Generated by Kubb (https://kubb.dev/).
|
|
563
402
|
* Do not edit manually.
|
|
564
403
|
*/
|
|
565
|
-
function getExecuteExchangeWithdrawalUrl(
|
|
404
|
+
function getExecuteExchangeWithdrawalUrl(exchange) {
|
|
566
405
|
return {
|
|
567
406
|
method: "POST",
|
|
568
|
-
url: `/v1/
|
|
407
|
+
url: `/v1/exchange/${exchange}/withdraw`
|
|
569
408
|
};
|
|
570
409
|
}
|
|
571
410
|
/**
|
|
572
411
|
* @description Executes a quoted withdrawal. Returns the withdrawal (now `pending`), or `{ requires_2fa: true }` when the exchange demands a 2FA code — re-submit with `twofa`.
|
|
573
412
|
* @summary Execute an exchange withdrawal
|
|
574
|
-
* {@link /v1/
|
|
413
|
+
* {@link /v1/exchange/:exchange/withdraw}
|
|
575
414
|
*/
|
|
576
|
-
async function executeExchangeWithdrawal(
|
|
415
|
+
async function executeExchangeWithdrawal(exchange, data, config = {}) {
|
|
577
416
|
const { client: request = client, ...requestConfig } = config;
|
|
578
417
|
const requestData = data;
|
|
579
418
|
return (await request({
|
|
580
419
|
method: "POST",
|
|
581
|
-
url: getExecuteExchangeWithdrawalUrl(
|
|
420
|
+
url: getExecuteExchangeWithdrawalUrl(exchange).url.toString(),
|
|
582
421
|
data: requestData,
|
|
583
422
|
...requestConfig
|
|
584
423
|
})).data;
|
|
@@ -587,45 +426,22 @@ async function executeExchangeWithdrawal(address, exchange, data, config = {}) {
|
|
|
587
426
|
* Generated by Kubb (https://kubb.dev/).
|
|
588
427
|
* Do not edit manually.
|
|
589
428
|
*/
|
|
590
|
-
function
|
|
591
|
-
return {
|
|
592
|
-
method: "GET",
|
|
593
|
-
url: `/v1/wallets/${address}/balances/${chain}/${token}`
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
/**
|
|
597
|
-
* @description Returns a single token's balance on one chain. `token` is a catalog symbol (`eth`, `hype`, `mon`, `usdc`, `usdm`, `usdt`).
|
|
598
|
-
* @summary Get one token balance
|
|
599
|
-
* {@link /v1/wallets/:address/balances/:chain/:token}
|
|
600
|
-
*/
|
|
601
|
-
async function getBalance(address, chain, token, config = {}) {
|
|
602
|
-
const { client: request = client, ...requestConfig } = config;
|
|
603
|
-
return (await request({
|
|
604
|
-
method: "GET",
|
|
605
|
-
url: getGetBalanceUrl(address, chain, token).url.toString(),
|
|
606
|
-
...requestConfig
|
|
607
|
-
})).data;
|
|
608
|
-
}
|
|
609
|
-
/**
|
|
610
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
611
|
-
* Do not edit manually.
|
|
612
|
-
*/
|
|
613
|
-
function getGetBalancesUrl(address) {
|
|
429
|
+
function getGetBalancesUrl() {
|
|
614
430
|
return {
|
|
615
431
|
method: "GET",
|
|
616
|
-
url: `/v1/
|
|
432
|
+
url: `/v1/balances`
|
|
617
433
|
};
|
|
618
434
|
}
|
|
619
435
|
/**
|
|
620
|
-
* @description Returns the wallet's token balances
|
|
436
|
+
* @description Returns the wallet's token balances on every supported chain (1, 8453, 999, 1337, 4326, 143, 137, 42161), each with its USD value.
|
|
621
437
|
* @summary List wallet balances
|
|
622
|
-
* {@link /v1/
|
|
438
|
+
* {@link /v1/balances}
|
|
623
439
|
*/
|
|
624
|
-
async function getBalances(
|
|
440
|
+
async function getBalances(params, config = {}) {
|
|
625
441
|
const { client: request = client, ...requestConfig } = config;
|
|
626
442
|
return (await request({
|
|
627
443
|
method: "GET",
|
|
628
|
-
url: getGetBalancesUrl(
|
|
444
|
+
url: getGetBalancesUrl().url.toString(),
|
|
629
445
|
params,
|
|
630
446
|
...requestConfig
|
|
631
447
|
})).data;
|
|
@@ -634,68 +450,22 @@ async function getBalances(address, params, config = {}) {
|
|
|
634
450
|
* Generated by Kubb (https://kubb.dev/).
|
|
635
451
|
* Do not edit manually.
|
|
636
452
|
*/
|
|
637
|
-
function getGetBlinkConfigUrl(
|
|
453
|
+
function getGetBlinkConfigUrl() {
|
|
638
454
|
return {
|
|
639
455
|
method: "GET",
|
|
640
|
-
url: `/v1/
|
|
456
|
+
url: `/v1/blink/config`
|
|
641
457
|
};
|
|
642
458
|
}
|
|
643
459
|
/**
|
|
644
|
-
* @description Returns the environment-specific settings the SDK needs to open the hosted deposit flow. A null
|
|
460
|
+
* @description Returns the environment-specific settings the SDK needs to open the hosted deposit flow. A null host means the SDK should use its bundled default; the merchant identifier is a warm-up hint and carries no authority.
|
|
645
461
|
* @summary Get the deposit-rail runtime config
|
|
646
|
-
* {@link /v1/
|
|
647
|
-
*/
|
|
648
|
-
async function getBlinkConfig(address, config = {}) {
|
|
649
|
-
const { client: request = client, ...requestConfig } = config;
|
|
650
|
-
return (await request({
|
|
651
|
-
method: "GET",
|
|
652
|
-
url: getGetBlinkConfigUrl(address).url.toString(),
|
|
653
|
-
...requestConfig
|
|
654
|
-
})).data;
|
|
655
|
-
}
|
|
656
|
-
/**
|
|
657
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
658
|
-
* Do not edit manually.
|
|
659
|
-
*/
|
|
660
|
-
function getGetCardConfigUrl(address) {
|
|
661
|
-
return {
|
|
662
|
-
method: "GET",
|
|
663
|
-
url: `/v1/wallets/${address}/card/config`
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
/**
|
|
667
|
-
* @description Returns the public client identifiers the card form must be initialized with. Every value is publishable — safe to embed in a browser, like a publishable key; no secret is on this surface.
|
|
668
|
-
* @summary Get card flow config
|
|
669
|
-
* {@link /v1/wallets/:address/card/config}
|
|
670
|
-
*/
|
|
671
|
-
async function getCardConfig(address, config = {}) {
|
|
672
|
-
const { client: request = client, ...requestConfig } = config;
|
|
673
|
-
return (await request({
|
|
674
|
-
method: "GET",
|
|
675
|
-
url: getGetCardConfigUrl(address).url.toString(),
|
|
676
|
-
...requestConfig
|
|
677
|
-
})).data;
|
|
678
|
-
}
|
|
679
|
-
/**
|
|
680
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
681
|
-
* Do not edit manually.
|
|
682
|
-
*/
|
|
683
|
-
function getGetCardCustomerUrl(address) {
|
|
684
|
-
return {
|
|
685
|
-
method: "GET",
|
|
686
|
-
url: `/v1/wallets/${address}/card/customer`
|
|
687
|
-
};
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
* @description Returns the saved registration and billing profile for the session wallet.
|
|
691
|
-
* @summary Get card registration + billing
|
|
692
|
-
* {@link /v1/wallets/:address/card/customer}
|
|
462
|
+
* {@link /v1/blink/config}
|
|
693
463
|
*/
|
|
694
|
-
async function
|
|
464
|
+
async function getBlinkConfig(config = {}) {
|
|
695
465
|
const { client: request = client, ...requestConfig } = config;
|
|
696
466
|
return (await request({
|
|
697
467
|
method: "GET",
|
|
698
|
-
url:
|
|
468
|
+
url: getGetBlinkConfigUrl().url.toString(),
|
|
699
469
|
...requestConfig
|
|
700
470
|
})).data;
|
|
701
471
|
}
|
|
@@ -703,45 +473,22 @@ async function getCardCustomer(address, config = {}) {
|
|
|
703
473
|
* Generated by Kubb (https://kubb.dev/).
|
|
704
474
|
* Do not edit manually.
|
|
705
475
|
*/
|
|
706
|
-
function getGetCardOrderUrl(
|
|
476
|
+
function getGetCardOrderUrl(id) {
|
|
707
477
|
return {
|
|
708
478
|
method: "GET",
|
|
709
|
-
url: `/v1/
|
|
479
|
+
url: `/v1/card/orders/${id}`
|
|
710
480
|
};
|
|
711
481
|
}
|
|
712
482
|
/**
|
|
713
|
-
* @description Returns the status of one card order, scoped to the
|
|
483
|
+
* @description Returns the status of one card order, scoped to the `wallet` in the query.
|
|
714
484
|
* @summary Get card order
|
|
715
|
-
* {@link /v1/
|
|
485
|
+
* {@link /v1/card/orders/:id}
|
|
716
486
|
*/
|
|
717
|
-
async function getCardOrder(
|
|
487
|
+
async function getCardOrder(id, params, config = {}) {
|
|
718
488
|
const { client: request = client, ...requestConfig } = config;
|
|
719
489
|
return (await request({
|
|
720
490
|
method: "GET",
|
|
721
|
-
url: getGetCardOrderUrl(
|
|
722
|
-
...requestConfig
|
|
723
|
-
})).data;
|
|
724
|
-
}
|
|
725
|
-
/**
|
|
726
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
727
|
-
* Do not edit manually.
|
|
728
|
-
*/
|
|
729
|
-
function getGetCardQuoteUrl(address) {
|
|
730
|
-
return {
|
|
731
|
-
method: "GET",
|
|
732
|
-
url: `/v1/wallets/${address}/card/quote`
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
/**
|
|
736
|
-
* @description Returns an informational price estimate for a fiat card spend: the net USDC the buyer receives, the all-in fiat charged, the fee, and the exchange rate.
|
|
737
|
-
* @summary Quote a card amount
|
|
738
|
-
* {@link /v1/wallets/:address/card/quote}
|
|
739
|
-
*/
|
|
740
|
-
async function getCardQuote(address, params, config = {}) {
|
|
741
|
-
const { client: request = client, ...requestConfig } = config;
|
|
742
|
-
return (await request({
|
|
743
|
-
method: "GET",
|
|
744
|
-
url: getGetCardQuoteUrl(address).url.toString(),
|
|
491
|
+
url: getGetCardOrderUrl(id).url.toString(),
|
|
745
492
|
params,
|
|
746
493
|
...requestConfig
|
|
747
494
|
})).data;
|
|
@@ -750,22 +497,23 @@ async function getCardQuote(address, params, config = {}) {
|
|
|
750
497
|
* Generated by Kubb (https://kubb.dev/).
|
|
751
498
|
* Do not edit manually.
|
|
752
499
|
*/
|
|
753
|
-
function getGetCashAppOrderUrl(
|
|
500
|
+
function getGetCashAppOrderUrl(id) {
|
|
754
501
|
return {
|
|
755
502
|
method: "GET",
|
|
756
|
-
url: `/v1/
|
|
503
|
+
url: `/v1/cashapp/${id}`
|
|
757
504
|
};
|
|
758
505
|
}
|
|
759
506
|
/**
|
|
760
|
-
* @description Returns a Cash App order by id, including its current status and payment
|
|
507
|
+
* @description Returns a Cash App order by id, including its current status and payment url.
|
|
761
508
|
* @summary Get a Cash App order
|
|
762
|
-
* {@link /v1/
|
|
509
|
+
* {@link /v1/cashapp/:id}
|
|
763
510
|
*/
|
|
764
|
-
async function getCashAppOrder(
|
|
511
|
+
async function getCashAppOrder(id, params, config = {}) {
|
|
765
512
|
const { client: request = client, ...requestConfig } = config;
|
|
766
513
|
return (await request({
|
|
767
514
|
method: "GET",
|
|
768
|
-
url: getGetCashAppOrderUrl(
|
|
515
|
+
url: getGetCashAppOrderUrl(id).url.toString(),
|
|
516
|
+
params,
|
|
769
517
|
...requestConfig
|
|
770
518
|
})).data;
|
|
771
519
|
}
|
|
@@ -773,22 +521,23 @@ async function getCashAppOrder(address, id, config = {}) {
|
|
|
773
521
|
* Generated by Kubb (https://kubb.dev/).
|
|
774
522
|
* Do not edit manually.
|
|
775
523
|
*/
|
|
776
|
-
function getGetExchangeUrl(
|
|
524
|
+
function getGetExchangeUrl(exchange) {
|
|
777
525
|
return {
|
|
778
526
|
method: "GET",
|
|
779
|
-
url: `/v1/
|
|
527
|
+
url: `/v1/exchange/${exchange}`
|
|
780
528
|
};
|
|
781
529
|
}
|
|
782
530
|
/**
|
|
783
531
|
* @description Returns the connection status for an exchange. Not-connected is a 200 with `connected: false` — poll this to drive the connect UI.
|
|
784
532
|
* @summary Get exchange connection status
|
|
785
|
-
* {@link /v1/
|
|
533
|
+
* {@link /v1/exchange/:exchange}
|
|
786
534
|
*/
|
|
787
|
-
async function getExchange(
|
|
535
|
+
async function getExchange(exchange, params, config = {}) {
|
|
788
536
|
const { client: request = client, ...requestConfig } = config;
|
|
789
537
|
return (await request({
|
|
790
538
|
method: "GET",
|
|
791
|
-
url: getGetExchangeUrl(
|
|
539
|
+
url: getGetExchangeUrl(exchange).url.toString(),
|
|
540
|
+
params,
|
|
792
541
|
...requestConfig
|
|
793
542
|
})).data;
|
|
794
543
|
}
|
|
@@ -796,22 +545,23 @@ async function getExchange(address, exchange, config = {}) {
|
|
|
796
545
|
* Generated by Kubb (https://kubb.dev/).
|
|
797
546
|
* Do not edit manually.
|
|
798
547
|
*/
|
|
799
|
-
function getGetExchangeAssetsUrl(
|
|
548
|
+
function getGetExchangeAssetsUrl(exchange) {
|
|
800
549
|
return {
|
|
801
550
|
method: "GET",
|
|
802
|
-
url: `/v1/
|
|
551
|
+
url: `/v1/exchange/${exchange}/assets`
|
|
803
552
|
};
|
|
804
553
|
}
|
|
805
554
|
/**
|
|
806
555
|
* @description Returns the assets the connected exchange can pay out and, per asset, the networks it withdraws to with their live per-network limits.
|
|
807
556
|
* @summary List exchange withdrawable assets
|
|
808
|
-
* {@link /v1/
|
|
557
|
+
* {@link /v1/exchange/:exchange/assets}
|
|
809
558
|
*/
|
|
810
|
-
async function getExchangeAssets(
|
|
559
|
+
async function getExchangeAssets(exchange, params, config = {}) {
|
|
811
560
|
const { client: request = client, ...requestConfig } = config;
|
|
812
561
|
return (await request({
|
|
813
562
|
method: "GET",
|
|
814
|
-
url: getGetExchangeAssetsUrl(
|
|
563
|
+
url: getGetExchangeAssetsUrl(exchange).url.toString(),
|
|
564
|
+
params,
|
|
815
565
|
...requestConfig
|
|
816
566
|
})).data;
|
|
817
567
|
}
|
|
@@ -819,22 +569,23 @@ async function getExchangeAssets(address, exchange, config = {}) {
|
|
|
819
569
|
* Generated by Kubb (https://kubb.dev/).
|
|
820
570
|
* Do not edit manually.
|
|
821
571
|
*/
|
|
822
|
-
function getGetExchangeWithdrawalUrl(
|
|
572
|
+
function getGetExchangeWithdrawalUrl(exchange, id) {
|
|
823
573
|
return {
|
|
824
574
|
method: "GET",
|
|
825
|
-
url: `/v1/
|
|
575
|
+
url: `/v1/exchange/${exchange}/withdraw/${id}`
|
|
826
576
|
};
|
|
827
577
|
}
|
|
828
578
|
/**
|
|
829
579
|
* @description Returns a withdrawal by id, including its status and — once broadcast — its transaction hash.
|
|
830
580
|
* @summary Get an exchange withdrawal
|
|
831
|
-
* {@link /v1/
|
|
581
|
+
* {@link /v1/exchange/:exchange/withdraw/:id}
|
|
832
582
|
*/
|
|
833
|
-
async function getExchangeWithdrawal(
|
|
583
|
+
async function getExchangeWithdrawal(exchange, id, params, config = {}) {
|
|
834
584
|
const { client: request = client, ...requestConfig } = config;
|
|
835
585
|
return (await request({
|
|
836
586
|
method: "GET",
|
|
837
|
-
url: getGetExchangeWithdrawalUrl(
|
|
587
|
+
url: getGetExchangeWithdrawalUrl(exchange, id).url.toString(),
|
|
588
|
+
params,
|
|
838
589
|
...requestConfig
|
|
839
590
|
})).data;
|
|
840
591
|
}
|
|
@@ -849,7 +600,7 @@ function getGetFxRatesUrl() {
|
|
|
849
600
|
};
|
|
850
601
|
}
|
|
851
602
|
/**
|
|
852
|
-
* @description Returns USD→currency rates for showing amounts in the app's display currency.
|
|
603
|
+
* @description Returns USD→currency rates for showing amounts in the app's display currency. It is the only operation that takes no publishable key.
|
|
853
604
|
* @summary Get display-currency exchange rates
|
|
854
605
|
* {@link /v1/fx}
|
|
855
606
|
*/
|
|
@@ -865,22 +616,24 @@ async function getFxRates(config = {}) {
|
|
|
865
616
|
* Generated by Kubb (https://kubb.dev/).
|
|
866
617
|
* Do not edit manually.
|
|
867
618
|
*/
|
|
868
|
-
function
|
|
619
|
+
function getGetIdentityVerificationUrlUrl() {
|
|
869
620
|
return {
|
|
870
621
|
method: "POST",
|
|
871
|
-
url: `/v1/
|
|
622
|
+
url: `/v1/virtual-accounts/identity-verification`
|
|
872
623
|
};
|
|
873
624
|
}
|
|
874
625
|
/**
|
|
875
|
-
* @description Returns the hosted identity-verification URL for the wallet. Present it to the user, then poll `GET /v1/
|
|
876
|
-
* @summary Get the identity-verification
|
|
877
|
-
* {@link /v1/
|
|
626
|
+
* @description Returns the hosted identity-verification URL for the wallet. Present it to the user, then poll `GET /v1/virtual-accounts/status` for the outcome.
|
|
627
|
+
* @summary Get the identity-verification URL
|
|
628
|
+
* {@link /v1/virtual-accounts/identity-verification}
|
|
878
629
|
*/
|
|
879
|
-
async function
|
|
630
|
+
async function getIdentityVerificationUrl(data, config = {}) {
|
|
880
631
|
const { client: request = client, ...requestConfig } = config;
|
|
632
|
+
const requestData = data;
|
|
881
633
|
return (await request({
|
|
882
634
|
method: "POST",
|
|
883
|
-
url:
|
|
635
|
+
url: getGetIdentityVerificationUrlUrl().url.toString(),
|
|
636
|
+
data: requestData,
|
|
884
637
|
...requestConfig
|
|
885
638
|
})).data;
|
|
886
639
|
}
|
|
@@ -888,22 +641,22 @@ async function getIdentityVerificationLink(address, config = {}) {
|
|
|
888
641
|
* Generated by Kubb (https://kubb.dev/).
|
|
889
642
|
* Do not edit manually.
|
|
890
643
|
*/
|
|
891
|
-
function getGetStripeConfigUrl(
|
|
644
|
+
function getGetStripeConfigUrl() {
|
|
892
645
|
return {
|
|
893
646
|
method: "GET",
|
|
894
|
-
url: `/v1/
|
|
647
|
+
url: `/v1/stripe/config`
|
|
895
648
|
};
|
|
896
649
|
}
|
|
897
650
|
/**
|
|
898
|
-
* @description Returns the environment's Stripe publishable key, which the SDK feeds to `loadCryptoOnrampAndInitialize(pk)` on init.
|
|
899
|
-
* @summary Get the Stripe
|
|
900
|
-
* {@link /v1/
|
|
651
|
+
* @description Returns the environment's Stripe publishable key, which the SDK feeds to `loadCryptoOnrampAndInitialize(pk)` on init.
|
|
652
|
+
* @summary Get the Stripe config
|
|
653
|
+
* {@link /v1/stripe/config}
|
|
901
654
|
*/
|
|
902
|
-
async function getStripeConfig(
|
|
655
|
+
async function getStripeConfig(config = {}) {
|
|
903
656
|
const { client: request = client, ...requestConfig } = config;
|
|
904
657
|
return (await request({
|
|
905
658
|
method: "GET",
|
|
906
|
-
url: getGetStripeConfigUrl(
|
|
659
|
+
url: getGetStripeConfigUrl().url.toString(),
|
|
907
660
|
...requestConfig
|
|
908
661
|
})).data;
|
|
909
662
|
}
|
|
@@ -911,22 +664,23 @@ async function getStripeConfig(address, config = {}) {
|
|
|
911
664
|
* Generated by Kubb (https://kubb.dev/).
|
|
912
665
|
* Do not edit manually.
|
|
913
666
|
*/
|
|
914
|
-
function getGetStripeCustomerStatusUrl(
|
|
667
|
+
function getGetStripeCustomerStatusUrl(crypto_customer_id) {
|
|
915
668
|
return {
|
|
916
669
|
method: "GET",
|
|
917
|
-
url: `/v1/
|
|
670
|
+
url: `/v1/stripe/customer/${crypto_customer_id}`
|
|
918
671
|
};
|
|
919
672
|
}
|
|
920
673
|
/**
|
|
921
674
|
* @description Reads the crypto customer's KYC and document-verification statuses (the two the SDK branches on) plus its provided fields — the same projection as the customer POST, but a pure read with no persistence. The SDK polls it while the verifying step is on screen.
|
|
922
675
|
* @summary Poll a Stripe crypto customer's status
|
|
923
|
-
* {@link /v1/
|
|
676
|
+
* {@link /v1/stripe/customer/:crypto_customer_id}
|
|
924
677
|
*/
|
|
925
|
-
async function getStripeCustomerStatus(
|
|
678
|
+
async function getStripeCustomerStatus(crypto_customer_id, params, config = {}) {
|
|
926
679
|
const { client: request = client, ...requestConfig } = config;
|
|
927
680
|
return (await request({
|
|
928
681
|
method: "GET",
|
|
929
|
-
url: getGetStripeCustomerStatusUrl(
|
|
682
|
+
url: getGetStripeCustomerStatusUrl(crypto_customer_id).url.toString(),
|
|
683
|
+
params,
|
|
930
684
|
...requestConfig
|
|
931
685
|
})).data;
|
|
932
686
|
}
|
|
@@ -934,22 +688,23 @@ async function getStripeCustomerStatus(address, crypto_customer_id, config = {})
|
|
|
934
688
|
* Generated by Kubb (https://kubb.dev/).
|
|
935
689
|
* Do not edit manually.
|
|
936
690
|
*/
|
|
937
|
-
function getGetStripeOrderUrl(
|
|
691
|
+
function getGetStripeOrderUrl(id) {
|
|
938
692
|
return {
|
|
939
693
|
method: "GET",
|
|
940
|
-
url: `/v1/
|
|
694
|
+
url: `/v1/stripe/order/${id}`
|
|
941
695
|
};
|
|
942
696
|
}
|
|
943
697
|
/**
|
|
944
|
-
* @description Returns the settlement status of one onramp order
|
|
698
|
+
* @description Returns the settlement status of one onramp order, scoped to the wallet in the path. Poll it after checkout until the order reaches a terminal state — `fulfillment_complete`, `rejected`, or `error`.
|
|
945
699
|
* @summary Get a Stripe onramp order
|
|
946
|
-
* {@link /v1/
|
|
700
|
+
* {@link /v1/stripe/order/:id}
|
|
947
701
|
*/
|
|
948
|
-
async function getStripeOrder(
|
|
702
|
+
async function getStripeOrder(id, params, config = {}) {
|
|
949
703
|
const { client: request = client, ...requestConfig } = config;
|
|
950
704
|
return (await request({
|
|
951
705
|
method: "GET",
|
|
952
|
-
url: getGetStripeOrderUrl(
|
|
706
|
+
url: getGetStripeOrderUrl(id).url.toString(),
|
|
707
|
+
params,
|
|
953
708
|
...requestConfig
|
|
954
709
|
})).data;
|
|
955
710
|
}
|
|
@@ -957,22 +712,22 @@ async function getStripeOrder(address, id, config = {}) {
|
|
|
957
712
|
* Generated by Kubb (https://kubb.dev/).
|
|
958
713
|
* Do not edit manually.
|
|
959
714
|
*/
|
|
960
|
-
function getGetStripeQuoteUrl(
|
|
715
|
+
function getGetStripeQuoteUrl() {
|
|
961
716
|
return {
|
|
962
717
|
method: "GET",
|
|
963
|
-
url: `/v1/
|
|
718
|
+
url: `/v1/stripe/quote`
|
|
964
719
|
};
|
|
965
720
|
}
|
|
966
721
|
/**
|
|
967
|
-
* @description Returns an informational price estimate for a source amount (fiat spend) or destination amount (target USDC) — the destination amount, the buyer's all-in source total, the fee components, and when the rate was fetched. Pin exactly one. No
|
|
722
|
+
* @description Returns an informational price estimate for a source amount (fiat spend) or destination amount (target USDC) — the destination amount, the buyer's all-in source total, the fee components, and when the rate was fetched. Pin exactly one. No authenticated buyer is needed. Display-only: the final amounts are set at session creation.
|
|
968
723
|
* @summary Quote a Stripe onramp amount
|
|
969
|
-
* {@link /v1/
|
|
724
|
+
* {@link /v1/stripe/quote}
|
|
970
725
|
*/
|
|
971
|
-
async function getStripeQuote(
|
|
726
|
+
async function getStripeQuote(params, config = {}) {
|
|
972
727
|
const { client: request = client, ...requestConfig } = config;
|
|
973
728
|
return (await request({
|
|
974
729
|
method: "GET",
|
|
975
|
-
url: getGetStripeQuoteUrl(
|
|
730
|
+
url: getGetStripeQuoteUrl().url.toString(),
|
|
976
731
|
params,
|
|
977
732
|
...requestConfig
|
|
978
733
|
})).data;
|
|
@@ -981,22 +736,23 @@ async function getStripeQuote(address, params, config = {}) {
|
|
|
981
736
|
* Generated by Kubb (https://kubb.dev/).
|
|
982
737
|
* Do not edit manually.
|
|
983
738
|
*/
|
|
984
|
-
function getGetStripeStatusUrl(
|
|
739
|
+
function getGetStripeStatusUrl() {
|
|
985
740
|
return {
|
|
986
741
|
method: "GET",
|
|
987
|
-
url: `/v1/
|
|
742
|
+
url: `/v1/stripe/status`
|
|
988
743
|
};
|
|
989
744
|
}
|
|
990
745
|
/**
|
|
991
|
-
* @description Reports whether this
|
|
992
|
-
* @summary Get the
|
|
993
|
-
* {@link /v1/
|
|
746
|
+
* @description Reports whether this wallet is still Link-authenticated and, once the customer POST has run, the persisted crypto customer id and the Link account email. An un-authenticated wallet is a 200 with `authenticated: false`, not a 401 — poll it to re-derive the Stripe session on a cold open.
|
|
747
|
+
* @summary Get the wallet's Stripe login state
|
|
748
|
+
* {@link /v1/stripe/status}
|
|
994
749
|
*/
|
|
995
|
-
async function getStripeStatus(
|
|
750
|
+
async function getStripeStatus(params, config = {}) {
|
|
996
751
|
const { client: request = client, ...requestConfig } = config;
|
|
997
752
|
return (await request({
|
|
998
753
|
method: "GET",
|
|
999
|
-
url: getGetStripeStatusUrl(
|
|
754
|
+
url: getGetStripeStatusUrl().url.toString(),
|
|
755
|
+
params,
|
|
1000
756
|
...requestConfig
|
|
1001
757
|
})).data;
|
|
1002
758
|
}
|
|
@@ -1004,22 +760,24 @@ async function getStripeStatus(address, config = {}) {
|
|
|
1004
760
|
* Generated by Kubb (https://kubb.dev/).
|
|
1005
761
|
* Do not edit manually.
|
|
1006
762
|
*/
|
|
1007
|
-
function
|
|
763
|
+
function getGetTermsOfServiceUrlUrl() {
|
|
1008
764
|
return {
|
|
1009
765
|
method: "POST",
|
|
1010
|
-
url: `/v1/
|
|
766
|
+
url: `/v1/virtual-accounts/terms-of-service`
|
|
1011
767
|
};
|
|
1012
768
|
}
|
|
1013
769
|
/**
|
|
1014
|
-
* @description Returns the hosted terms-of-service URL for the wallet. Present it to the user, then poll `GET /v1/
|
|
1015
|
-
* @summary Get the terms-of-service
|
|
1016
|
-
* {@link /v1/
|
|
770
|
+
* @description Returns the hosted terms-of-service URL for the wallet. Present it to the user, then poll `GET /v1/virtual-accounts/status` for acceptance.
|
|
771
|
+
* @summary Get the terms-of-service URL
|
|
772
|
+
* {@link /v1/virtual-accounts/terms-of-service}
|
|
1017
773
|
*/
|
|
1018
|
-
async function
|
|
774
|
+
async function getTermsOfServiceUrl(data, config = {}) {
|
|
1019
775
|
const { client: request = client, ...requestConfig } = config;
|
|
776
|
+
const requestData = data;
|
|
1020
777
|
return (await request({
|
|
1021
778
|
method: "POST",
|
|
1022
|
-
url:
|
|
779
|
+
url: getGetTermsOfServiceUrlUrl().url.toString(),
|
|
780
|
+
data: requestData,
|
|
1023
781
|
...requestConfig
|
|
1024
782
|
})).data;
|
|
1025
783
|
}
|
|
@@ -1027,22 +785,23 @@ async function getTermsOfServiceLink(address, config = {}) {
|
|
|
1027
785
|
* Generated by Kubb (https://kubb.dev/).
|
|
1028
786
|
* Do not edit manually.
|
|
1029
787
|
*/
|
|
1030
|
-
function
|
|
788
|
+
function getGetVirtualAccountStatusUrl() {
|
|
1031
789
|
return {
|
|
1032
790
|
method: "GET",
|
|
1033
|
-
url: `/v1/
|
|
791
|
+
url: `/v1/virtual-accounts/status`
|
|
1034
792
|
};
|
|
1035
793
|
}
|
|
1036
794
|
/**
|
|
1037
|
-
* @description Returns the
|
|
1038
|
-
* @summary Get
|
|
1039
|
-
* {@link /v1/
|
|
795
|
+
* @description Returns the bank-onboarding facts for a wallet: verification status, terms acceptance, and event timestamps. 404 until the wallet has been through `POST /v1/virtual-accounts/register`.
|
|
796
|
+
* @summary Get onboarding status
|
|
797
|
+
* {@link /v1/virtual-accounts/status}
|
|
1040
798
|
*/
|
|
1041
|
-
async function
|
|
799
|
+
async function getVirtualAccountStatus(params, config = {}) {
|
|
1042
800
|
const { client: request = client, ...requestConfig } = config;
|
|
1043
801
|
return (await request({
|
|
1044
802
|
method: "GET",
|
|
1045
|
-
url:
|
|
803
|
+
url: getGetVirtualAccountStatusUrl().url.toString(),
|
|
804
|
+
params,
|
|
1046
805
|
...requestConfig
|
|
1047
806
|
})).data;
|
|
1048
807
|
}
|
|
@@ -1050,22 +809,23 @@ async function getWallet(address, config = {}) {
|
|
|
1050
809
|
* Generated by Kubb (https://kubb.dev/).
|
|
1051
810
|
* Do not edit manually.
|
|
1052
811
|
*/
|
|
1053
|
-
function
|
|
812
|
+
function getListBlinkDepositsUrl() {
|
|
1054
813
|
return {
|
|
1055
814
|
method: "GET",
|
|
1056
|
-
url: `/v1/
|
|
815
|
+
url: `/v1/blink/deposits`
|
|
1057
816
|
};
|
|
1058
817
|
}
|
|
1059
818
|
/**
|
|
1060
|
-
* @description Returns the wallet's
|
|
1061
|
-
* @summary List
|
|
1062
|
-
* {@link /v1/
|
|
819
|
+
* @description Returns the wallet's deposit history, newest first: every detected deposit with its current status, amounts and transaction hashes. An authorization that was never funded is not listed.
|
|
820
|
+
* @summary List deposits
|
|
821
|
+
* {@link /v1/blink/deposits}
|
|
1063
822
|
*/
|
|
1064
|
-
async function
|
|
823
|
+
async function listBlinkDeposits(params, config = {}) {
|
|
1065
824
|
const { client: request = client, ...requestConfig } = config;
|
|
1066
825
|
return (await request({
|
|
1067
826
|
method: "GET",
|
|
1068
|
-
url:
|
|
827
|
+
url: getListBlinkDepositsUrl().url.toString(),
|
|
828
|
+
params,
|
|
1069
829
|
...requestConfig
|
|
1070
830
|
})).data;
|
|
1071
831
|
}
|
|
@@ -1073,23 +833,24 @@ async function listCryptoDeposits(address, config = {}) {
|
|
|
1073
833
|
* Generated by Kubb (https://kubb.dev/).
|
|
1074
834
|
* Do not edit manually.
|
|
1075
835
|
*/
|
|
1076
|
-
function
|
|
836
|
+
function getListCardPaymentMethodsUrl() {
|
|
1077
837
|
return {
|
|
1078
|
-
method: "
|
|
1079
|
-
url: `/v1/
|
|
838
|
+
method: "POST",
|
|
839
|
+
url: `/v1/card/payment-methods`
|
|
1080
840
|
};
|
|
1081
841
|
}
|
|
1082
842
|
/**
|
|
1083
|
-
* @description
|
|
1084
|
-
* @summary List
|
|
1085
|
-
* {@link /v1/
|
|
843
|
+
* @description Lists the payment methods available to a buyer, one row per method. `country` and `currency` are both required; a country that is not served returns an empty list. `min_amount` and `max_amount` are EUR-denominated whatever `currency` is.
|
|
844
|
+
* @summary List card payment methods
|
|
845
|
+
* {@link /v1/card/payment-methods}
|
|
1086
846
|
*/
|
|
1087
|
-
async function
|
|
847
|
+
async function listCardPaymentMethods(data, config = {}) {
|
|
1088
848
|
const { client: request = client, ...requestConfig } = config;
|
|
849
|
+
const requestData = data;
|
|
1089
850
|
return (await request({
|
|
1090
|
-
method: "
|
|
1091
|
-
url:
|
|
1092
|
-
|
|
851
|
+
method: "POST",
|
|
852
|
+
url: getListCardPaymentMethodsUrl().url.toString(),
|
|
853
|
+
data: requestData,
|
|
1093
854
|
...requestConfig
|
|
1094
855
|
})).data;
|
|
1095
856
|
}
|
|
@@ -1097,22 +858,22 @@ async function listStripePaymentTokens(address, params, config = {}) {
|
|
|
1097
858
|
* Generated by Kubb (https://kubb.dev/).
|
|
1098
859
|
* Do not edit manually.
|
|
1099
860
|
*/
|
|
1100
|
-
function
|
|
861
|
+
function getListStripePaymentTokensUrl() {
|
|
1101
862
|
return {
|
|
1102
863
|
method: "GET",
|
|
1103
|
-
url: `/v1/
|
|
864
|
+
url: `/v1/stripe/payment-tokens`
|
|
1104
865
|
};
|
|
1105
866
|
}
|
|
1106
867
|
/**
|
|
1107
|
-
* @description Returns the
|
|
1108
|
-
* @summary List the customer's
|
|
1109
|
-
* {@link /v1/
|
|
868
|
+
* @description Returns the payment methods the customer has on file. Read it before `collectPaymentMethod` to offer a saved method instead of collecting a new one.
|
|
869
|
+
* @summary List the customer's payment methods
|
|
870
|
+
* {@link /v1/stripe/payment-tokens}
|
|
1110
871
|
*/
|
|
1111
|
-
async function
|
|
872
|
+
async function listStripePaymentTokens(params, config = {}) {
|
|
1112
873
|
const { client: request = client, ...requestConfig } = config;
|
|
1113
874
|
return (await request({
|
|
1114
875
|
method: "GET",
|
|
1115
|
-
url:
|
|
876
|
+
url: getListStripePaymentTokensUrl().url.toString(),
|
|
1116
877
|
params,
|
|
1117
878
|
...requestConfig
|
|
1118
879
|
})).data;
|
|
@@ -1121,22 +882,23 @@ async function listStripeWallets(address, params, config = {}) {
|
|
|
1121
882
|
* Generated by Kubb (https://kubb.dev/).
|
|
1122
883
|
* Do not edit manually.
|
|
1123
884
|
*/
|
|
1124
|
-
function
|
|
885
|
+
function getListStripeWalletsUrl() {
|
|
1125
886
|
return {
|
|
1126
887
|
method: "GET",
|
|
1127
|
-
url: `/v1/wallets
|
|
888
|
+
url: `/v1/stripe/wallets`
|
|
1128
889
|
};
|
|
1129
890
|
}
|
|
1130
891
|
/**
|
|
1131
|
-
* @description Returns the
|
|
1132
|
-
* @summary List
|
|
1133
|
-
* {@link /v1/wallets
|
|
892
|
+
* @description Returns the crypto wallets registered to the customer's Link account. Read it before `registerWalletAddress` to avoid re-registering a known address.
|
|
893
|
+
* @summary List the customer's crypto wallets
|
|
894
|
+
* {@link /v1/stripe/wallets}
|
|
1134
895
|
*/
|
|
1135
|
-
async function
|
|
896
|
+
async function listStripeWallets(params, config = {}) {
|
|
1136
897
|
const { client: request = client, ...requestConfig } = config;
|
|
1137
898
|
return (await request({
|
|
1138
899
|
method: "GET",
|
|
1139
|
-
url:
|
|
900
|
+
url: getListStripeWalletsUrl().url.toString(),
|
|
901
|
+
params,
|
|
1140
902
|
...requestConfig
|
|
1141
903
|
})).data;
|
|
1142
904
|
}
|
|
@@ -1144,22 +906,23 @@ async function listVirtualAccounts(address, config = {}) {
|
|
|
1144
906
|
* Generated by Kubb (https://kubb.dev/).
|
|
1145
907
|
* Do not edit manually.
|
|
1146
908
|
*/
|
|
1147
|
-
function
|
|
909
|
+
function getListVirtualAccountsUrl() {
|
|
1148
910
|
return {
|
|
1149
|
-
method: "
|
|
1150
|
-
url: `/v1/
|
|
911
|
+
method: "GET",
|
|
912
|
+
url: `/v1/virtual-accounts`
|
|
1151
913
|
};
|
|
1152
914
|
}
|
|
1153
915
|
/**
|
|
1154
|
-
* @description
|
|
1155
|
-
* @summary
|
|
1156
|
-
* {@link /v1/
|
|
916
|
+
* @description Returns the wallet's virtual accounts, each with the bank-side deposit instructions the user needs to send fiat. A wallet can hold more than one account per `(currency, chain)` when the payout token differs; `destination_token` is what tells them apart, and the bank details are not interchangeable between them.
|
|
917
|
+
* @summary List virtual accounts
|
|
918
|
+
* {@link /v1/virtual-accounts}
|
|
1157
919
|
*/
|
|
1158
|
-
async function
|
|
920
|
+
async function listVirtualAccounts(params, config = {}) {
|
|
1159
921
|
const { client: request = client, ...requestConfig } = config;
|
|
1160
922
|
return (await request({
|
|
1161
|
-
method: "
|
|
1162
|
-
url:
|
|
923
|
+
method: "GET",
|
|
924
|
+
url: getListVirtualAccountsUrl().url.toString(),
|
|
925
|
+
params,
|
|
1163
926
|
...requestConfig
|
|
1164
927
|
})).data;
|
|
1165
928
|
}
|
|
@@ -1167,112 +930,51 @@ async function refreshSession(address, config = {}) {
|
|
|
1167
930
|
* Generated by Kubb (https://kubb.dev/).
|
|
1168
931
|
* Do not edit manually.
|
|
1169
932
|
*/
|
|
1170
|
-
function getRegisterWalletUrl(
|
|
933
|
+
function getRegisterWalletUrl() {
|
|
1171
934
|
return {
|
|
1172
935
|
method: "POST",
|
|
1173
|
-
url: `/v1/
|
|
936
|
+
url: `/v1/virtual-accounts/register`
|
|
1174
937
|
};
|
|
1175
938
|
}
|
|
1176
939
|
/**
|
|
1177
|
-
* @description Submits the registration form (name + email) for the wallet. Returns 204; re-read `GET /v1/
|
|
940
|
+
* @description Submits the registration form (name + email) for the wallet. Returns 204; re-read `GET /v1/virtual-accounts/status` to pick up the new facts.
|
|
1178
941
|
* @summary Register a wallet
|
|
1179
|
-
* {@link /v1/
|
|
942
|
+
* {@link /v1/virtual-accounts/register}
|
|
1180
943
|
*/
|
|
1181
|
-
async function registerWallet(
|
|
944
|
+
async function registerWallet(data, config = {}) {
|
|
1182
945
|
const { client: request = client, ...requestConfig } = config;
|
|
1183
946
|
const requestData = data;
|
|
1184
947
|
return (await request({
|
|
1185
948
|
method: "POST",
|
|
1186
|
-
url: getRegisterWalletUrl(
|
|
949
|
+
url: getRegisterWalletUrl().url.toString(),
|
|
1187
950
|
data: requestData,
|
|
1188
951
|
...requestConfig
|
|
1189
952
|
})).data;
|
|
1190
953
|
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
method: "POST",
|
|
1198
|
-
url: `/v1/wallets/${address}/virtual-accounts/identity-verification/submit`
|
|
1199
|
-
};
|
|
1200
|
-
}
|
|
1201
|
-
/**
|
|
1202
|
-
* @description Records that the user finished the identity-verification flow and returns 204. Internal to the SDK's instant-submit UX — partners should create the link, then poll `GET /v1/wallets/:address` for the resulting status instead.
|
|
1203
|
-
* @summary Record identity-verification completion
|
|
1204
|
-
* {@link /v1/wallets/:address/virtual-accounts/identity-verification/submit}
|
|
1205
|
-
*/
|
|
1206
|
-
async function submitIdentityVerification(address, config = {}) {
|
|
1207
|
-
const { client: request = client, ...requestConfig } = config;
|
|
1208
|
-
return (await request({
|
|
1209
|
-
method: "POST",
|
|
1210
|
-
url: getSubmitIdentityVerificationUrl(address).url.toString(),
|
|
1211
|
-
...requestConfig
|
|
1212
|
-
})).data;
|
|
1213
|
-
}
|
|
1214
|
-
/**
|
|
1215
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
1216
|
-
* Do not edit manually.
|
|
1217
|
-
*/
|
|
1218
|
-
function getSubmitTermsOfServiceUrl(address) {
|
|
1219
|
-
return {
|
|
1220
|
-
method: "POST",
|
|
1221
|
-
url: `/v1/wallets/${address}/virtual-accounts/terms-of-service/submit`
|
|
1222
|
-
};
|
|
1223
|
-
}
|
|
1224
|
-
/**
|
|
1225
|
-
* @description Records that the user finished the terms-of-service flow and returns 204. Internal to the SDK's instant-submit UX — partners should create the link, then poll `GET /v1/wallets/:address` for acceptance instead.
|
|
1226
|
-
* @summary Record terms-of-service completion
|
|
1227
|
-
* {@link /v1/wallets/:address/virtual-accounts/terms-of-service/submit}
|
|
1228
|
-
*/
|
|
1229
|
-
async function submitTermsOfService(address, config = {}) {
|
|
1230
|
-
const { client: request = client, ...requestConfig } = config;
|
|
1231
|
-
return (await request({
|
|
1232
|
-
method: "POST",
|
|
1233
|
-
url: getSubmitTermsOfServiceUrl(address).url.toString(),
|
|
1234
|
-
...requestConfig
|
|
1235
|
-
})).data;
|
|
1236
|
-
}
|
|
1237
|
-
/**
|
|
1238
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
1239
|
-
* Do not edit manually.
|
|
1240
|
-
*/
|
|
1241
|
-
function getUpdateVirtualAccountUrl(address, virtualAccountId) {
|
|
1242
|
-
return {
|
|
1243
|
-
method: "PATCH",
|
|
1244
|
-
url: `/v1/wallets/${address}/virtual-accounts/${virtualAccountId}`
|
|
1245
|
-
};
|
|
1246
|
-
}
|
|
1247
|
-
/**
|
|
1248
|
-
* @description Updates a virtual account's destination chain. Every chain is accepted: the ones the banking rail settles to directly are delivered by it, and the rest are routed on arrival. `destination_token` picks the payout token for the new destination. Omitting it with the chain unchanged leaves the account untouched; omitting it on a chain change takes the new chain's default rather than carrying the current token over. Send `destination_token` explicitly whenever the account should keep a non-default payout. Returns 204; refetch the list to see the change.
|
|
1249
|
-
* @summary Update a virtual account
|
|
1250
|
-
* {@link /v1/wallets/:address/virtual-accounts/:virtual-account-id}
|
|
1251
|
-
*/
|
|
1252
|
-
async function updateVirtualAccount(address, virtualAccountId, data, config = {}) {
|
|
1253
|
-
const { client: request = client, ...requestConfig } = config;
|
|
1254
|
-
const requestData = data;
|
|
1255
|
-
return (await request({
|
|
1256
|
-
method: "PATCH",
|
|
1257
|
-
url: getUpdateVirtualAccountUrl(address, virtualAccountId).url.toString(),
|
|
1258
|
-
data: requestData,
|
|
1259
|
-
...requestConfig
|
|
1260
|
-
})).data;
|
|
1261
|
-
}
|
|
1262
|
-
const checkoutCardMutationRequestChainEnum = {
|
|
954
|
+
const checkoutCardMutationRequestCurrencyEnum = {
|
|
955
|
+
USD: "USD",
|
|
956
|
+
GBP: "GBP",
|
|
957
|
+
EUR: "EUR"
|
|
958
|
+
};
|
|
959
|
+
const checkoutCardMutationRequestDestinationChainEnum = {
|
|
1263
960
|
"1": 1,
|
|
1264
961
|
"8453": 8453,
|
|
1265
962
|
"999": 999,
|
|
1266
963
|
"1337": 1337,
|
|
1267
964
|
"4326": 4326,
|
|
1268
965
|
"143": 143,
|
|
1269
|
-
"137": 137
|
|
966
|
+
"137": 137,
|
|
967
|
+
"42161": 42161
|
|
1270
968
|
};
|
|
1271
969
|
const checkoutCardMutationRequestDestinationTokenEnum = {
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
"
|
|
970
|
+
USDC: "USDC",
|
|
971
|
+
USDm: "USDm",
|
|
972
|
+
AUSD: "AUSD",
|
|
973
|
+
"USDC.e": "USDC.e"
|
|
974
|
+
};
|
|
975
|
+
const checkoutCardMutationRequestTradeTypeEnum = {
|
|
976
|
+
EXACT_INPUT: "EXACT_INPUT",
|
|
977
|
+
EXACT_OUTPUT: "EXACT_OUTPUT"
|
|
1276
978
|
};
|
|
1277
979
|
const connectExchangePathParamsExchangeEnum = { coinbase: "coinbase" };
|
|
1278
980
|
const createBlinkSignatureMutationRequestDestinationChainEnum = {
|
|
@@ -1282,33 +984,39 @@ const createBlinkSignatureMutationRequestDestinationChainEnum = {
|
|
|
1282
984
|
"1337": 1337,
|
|
1283
985
|
"4326": 4326,
|
|
1284
986
|
"143": 143,
|
|
1285
|
-
"137": 137
|
|
987
|
+
"137": 137,
|
|
988
|
+
"42161": 42161
|
|
1286
989
|
};
|
|
1287
990
|
const createBlinkSignatureMutationRequestDestinationTokenEnum = {
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
"
|
|
991
|
+
USDC: "USDC",
|
|
992
|
+
USDm: "USDm",
|
|
993
|
+
AUSD: "AUSD",
|
|
994
|
+
"USDC.e": "USDC.e"
|
|
1292
995
|
};
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
996
|
+
const createCardQuoteMutationRequestCurrencyEnum = {
|
|
997
|
+
USD: "USD",
|
|
998
|
+
GBP: "GBP",
|
|
999
|
+
EUR: "EUR"
|
|
1297
1000
|
};
|
|
1298
|
-
const
|
|
1001
|
+
const createCardQuoteMutationRequestDestinationChainEnum = {
|
|
1299
1002
|
"1": 1,
|
|
1300
1003
|
"8453": 8453,
|
|
1301
1004
|
"999": 999,
|
|
1302
1005
|
"1337": 1337,
|
|
1303
1006
|
"4326": 4326,
|
|
1304
1007
|
"143": 143,
|
|
1305
|
-
"137": 137
|
|
1008
|
+
"137": 137,
|
|
1009
|
+
"42161": 42161
|
|
1306
1010
|
};
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
"
|
|
1011
|
+
const createCardQuoteMutationRequestDestinationTokenEnum = {
|
|
1012
|
+
USDC: "USDC",
|
|
1013
|
+
USDm: "USDm",
|
|
1014
|
+
AUSD: "AUSD",
|
|
1015
|
+
"USDC.e": "USDC.e"
|
|
1016
|
+
};
|
|
1017
|
+
const createCardQuoteMutationRequestTradeTypeEnum = {
|
|
1018
|
+
EXACT_INPUT: "EXACT_INPUT",
|
|
1019
|
+
EXACT_OUTPUT: "EXACT_OUTPUT"
|
|
1312
1020
|
};
|
|
1313
1021
|
const createCashAppOrder200StatusEnum = {
|
|
1314
1022
|
pending: "pending",
|
|
@@ -1325,67 +1033,37 @@ const createCashAppOrder200StatusEnum = {
|
|
|
1325
1033
|
unfulfilled: "unfulfilled",
|
|
1326
1034
|
expired: "expired"
|
|
1327
1035
|
};
|
|
1328
|
-
const
|
|
1036
|
+
const createCashAppOrderMutationRequestDestinationChainEnum = {
|
|
1329
1037
|
"1": 1,
|
|
1330
1038
|
"8453": 8453,
|
|
1331
1039
|
"999": 999,
|
|
1332
1040
|
"1337": 1337,
|
|
1333
1041
|
"4326": 4326,
|
|
1334
1042
|
"143": 143,
|
|
1335
|
-
"137": 137
|
|
1043
|
+
"137": 137,
|
|
1044
|
+
"42161": 42161
|
|
1336
1045
|
};
|
|
1337
1046
|
const createCashAppOrderMutationRequestDestinationTokenEnum = {
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
"
|
|
1047
|
+
USDC: "USDC",
|
|
1048
|
+
USDm: "USDm",
|
|
1049
|
+
AUSD: "AUSD",
|
|
1050
|
+
"USDC.e": "USDC.e"
|
|
1342
1051
|
};
|
|
1343
|
-
const
|
|
1052
|
+
const createCashAppQuoteMutationRequestDestinationChainEnum = {
|
|
1344
1053
|
"1": 1,
|
|
1345
1054
|
"8453": 8453,
|
|
1346
1055
|
"999": 999,
|
|
1347
1056
|
"1337": 1337,
|
|
1348
1057
|
"4326": 4326,
|
|
1349
1058
|
"143": 143,
|
|
1350
|
-
"137": 137
|
|
1059
|
+
"137": 137,
|
|
1060
|
+
"42161": 42161
|
|
1351
1061
|
};
|
|
1352
1062
|
const createCashAppQuoteMutationRequestDestinationTokenEnum = {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
"
|
|
1357
|
-
};
|
|
1358
|
-
const createDepositAddressMutationRequestDestinationChainEnum = {
|
|
1359
|
-
"1": 1,
|
|
1360
|
-
"8453": 8453,
|
|
1361
|
-
"999": 999,
|
|
1362
|
-
"1337": 1337,
|
|
1363
|
-
"4326": 4326,
|
|
1364
|
-
"143": 143,
|
|
1365
|
-
"137": 137
|
|
1366
|
-
};
|
|
1367
|
-
const createDepositAddressMutationRequestDestinationTokenEnum = {
|
|
1368
|
-
usdc: "usdc",
|
|
1369
|
-
usdm: "usdm",
|
|
1370
|
-
ausd: "ausd",
|
|
1371
|
-
"usdc.e": "usdc.e"
|
|
1372
|
-
};
|
|
1373
|
-
const createDepositAddressMutationRequestSourceChainEnum = {
|
|
1374
|
-
"1": 1,
|
|
1375
|
-
"8453": 8453,
|
|
1376
|
-
"999": 999,
|
|
1377
|
-
"4326": 4326,
|
|
1378
|
-
"143": 143,
|
|
1379
|
-
"137": 137
|
|
1380
|
-
};
|
|
1381
|
-
const createDepositAddressMutationRequestSourceTokenEnum = {
|
|
1382
|
-
eth: "eth",
|
|
1383
|
-
hype: "hype",
|
|
1384
|
-
mon: "mon",
|
|
1385
|
-
pol: "pol",
|
|
1386
|
-
usdc: "usdc",
|
|
1387
|
-
usdm: "usdm",
|
|
1388
|
-
usdt: "usdt"
|
|
1063
|
+
USDC: "USDC",
|
|
1064
|
+
USDm: "USDm",
|
|
1065
|
+
AUSD: "AUSD",
|
|
1066
|
+
"USDC.e": "USDC.e"
|
|
1389
1067
|
};
|
|
1390
1068
|
const createExchangeWithdrawQuotePathParamsExchangeEnum = { coinbase: "coinbase" };
|
|
1391
1069
|
const createExchangeWithdrawQuoteMutationRequestDestinationChainEnum = {
|
|
@@ -1395,13 +1073,14 @@ const createExchangeWithdrawQuoteMutationRequestDestinationChainEnum = {
|
|
|
1395
1073
|
"1337": 1337,
|
|
1396
1074
|
"4326": 4326,
|
|
1397
1075
|
"143": 143,
|
|
1398
|
-
"137": 137
|
|
1076
|
+
"137": 137,
|
|
1077
|
+
"42161": 42161
|
|
1399
1078
|
};
|
|
1400
1079
|
const createExchangeWithdrawQuoteMutationRequestDestinationTokenEnum = {
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
"
|
|
1080
|
+
USDC: "USDC",
|
|
1081
|
+
USDm: "USDm",
|
|
1082
|
+
AUSD: "AUSD",
|
|
1083
|
+
"USDC.e": "USDC.e"
|
|
1405
1084
|
};
|
|
1406
1085
|
const createExchangeWithdrawQuoteMutationRequestOriginChainEnum = {
|
|
1407
1086
|
"1": 1,
|
|
@@ -1410,7 +1089,8 @@ const createExchangeWithdrawQuoteMutationRequestOriginChainEnum = {
|
|
|
1410
1089
|
"1337": 1337,
|
|
1411
1090
|
"4326": 4326,
|
|
1412
1091
|
"143": 143,
|
|
1413
|
-
"137": 137
|
|
1092
|
+
"137": 137,
|
|
1093
|
+
"42161": 42161
|
|
1414
1094
|
};
|
|
1415
1095
|
const createStripeSessionMutationRequestDestinationChainEnum = {
|
|
1416
1096
|
"1": 1,
|
|
@@ -1419,70 +1099,35 @@ const createStripeSessionMutationRequestDestinationChainEnum = {
|
|
|
1419
1099
|
"1337": 1337,
|
|
1420
1100
|
"4326": 4326,
|
|
1421
1101
|
"143": 143,
|
|
1422
|
-
"137": 137
|
|
1102
|
+
"137": 137,
|
|
1103
|
+
"42161": 42161
|
|
1423
1104
|
};
|
|
1424
1105
|
const createStripeSessionMutationRequestDestinationTokenEnum = {
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
"
|
|
1429
|
-
};
|
|
1430
|
-
const createSwapQuoteMutationRequestDestinationChainEnum = {
|
|
1431
|
-
"1": 1,
|
|
1432
|
-
"8453": 8453,
|
|
1433
|
-
"999": 999,
|
|
1434
|
-
"1337": 1337,
|
|
1435
|
-
"4326": 4326,
|
|
1436
|
-
"143": 143,
|
|
1437
|
-
"137": 137
|
|
1438
|
-
};
|
|
1439
|
-
const createSwapQuoteMutationRequestDestinationTokenEnum = {
|
|
1440
|
-
usdc: "usdc",
|
|
1441
|
-
usdm: "usdm",
|
|
1442
|
-
ausd: "ausd",
|
|
1443
|
-
"usdc.e": "usdc.e"
|
|
1444
|
-
};
|
|
1445
|
-
const createSwapQuoteMutationRequestSourceChainEnum = {
|
|
1446
|
-
"1": 1,
|
|
1447
|
-
"8453": 8453,
|
|
1448
|
-
"999": 999,
|
|
1449
|
-
"4326": 4326,
|
|
1450
|
-
"143": 143,
|
|
1451
|
-
"137": 137
|
|
1452
|
-
};
|
|
1453
|
-
const createSwapQuoteMutationRequestSourceTokenEnum = {
|
|
1454
|
-
eth: "eth",
|
|
1455
|
-
hype: "hype",
|
|
1456
|
-
mon: "mon",
|
|
1457
|
-
pol: "pol",
|
|
1458
|
-
usdc: "usdc",
|
|
1459
|
-
usdm: "usdm",
|
|
1460
|
-
usdt: "usdt"
|
|
1106
|
+
USDC: "USDC",
|
|
1107
|
+
USDm: "USDm",
|
|
1108
|
+
AUSD: "AUSD",
|
|
1109
|
+
"USDC.e": "USDC.e"
|
|
1461
1110
|
};
|
|
1462
|
-
const
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1111
|
+
const createVirtualAccountMutationRequestCurrencyEnum = {
|
|
1112
|
+
USD: "USD",
|
|
1113
|
+
GBP: "GBP",
|
|
1114
|
+
EUR: "EUR"
|
|
1466
1115
|
};
|
|
1467
|
-
const
|
|
1116
|
+
const createVirtualAccountMutationRequestDestinationChainEnum = {
|
|
1468
1117
|
"1": 1,
|
|
1469
1118
|
"8453": 8453,
|
|
1470
1119
|
"999": 999,
|
|
1471
1120
|
"1337": 1337,
|
|
1472
1121
|
"4326": 4326,
|
|
1473
1122
|
"143": 143,
|
|
1474
|
-
"137": 137
|
|
1475
|
-
|
|
1476
|
-
const createVirtualAccountMutationRequestCurrencyEnum = {
|
|
1477
|
-
usd: "usd",
|
|
1478
|
-
gbp: "gbp",
|
|
1479
|
-
eur: "eur"
|
|
1123
|
+
"137": 137,
|
|
1124
|
+
"42161": 42161
|
|
1480
1125
|
};
|
|
1481
1126
|
const createVirtualAccountMutationRequestDestinationTokenEnum = {
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
"
|
|
1127
|
+
USDC: "USDC",
|
|
1128
|
+
USDm: "USDm",
|
|
1129
|
+
AUSD: "AUSD",
|
|
1130
|
+
"USDC.e": "USDC.e"
|
|
1486
1131
|
};
|
|
1487
1132
|
const disconnectExchangePathParamsExchangeEnum = { coinbase: "coinbase" };
|
|
1488
1133
|
const executeExchangeWithdrawalPathParamsExchangeEnum = { coinbase: "coinbase" };
|
|
@@ -1493,34 +1138,21 @@ const executeExchangeWithdrawal200StatusEnum = {
|
|
|
1493
1138
|
failed: "failed",
|
|
1494
1139
|
delayed: "delayed"
|
|
1495
1140
|
};
|
|
1496
|
-
const
|
|
1497
|
-
eth: "eth",
|
|
1498
|
-
hype: "hype",
|
|
1499
|
-
mon: "mon",
|
|
1500
|
-
pol: "pol",
|
|
1501
|
-
usdc: "usdc",
|
|
1502
|
-
usdm: "usdm",
|
|
1503
|
-
usdt: "usdt"
|
|
1504
|
-
};
|
|
1505
|
-
const processorEnvEnum = {
|
|
1506
|
-
sandbox: "sandbox",
|
|
1507
|
-
prod: "prod"
|
|
1508
|
-
};
|
|
1509
|
-
const getCardOrder200ChainEnum = {
|
|
1141
|
+
const destinationChainEnum = {
|
|
1510
1142
|
"1": 1,
|
|
1511
1143
|
"8453": 8453,
|
|
1512
1144
|
"999": 999,
|
|
1513
1145
|
"1337": 1337,
|
|
1514
1146
|
"4326": 4326,
|
|
1515
1147
|
"143": 143,
|
|
1516
|
-
"137": 137
|
|
1148
|
+
"137": 137,
|
|
1149
|
+
"42161": 42161
|
|
1517
1150
|
};
|
|
1518
1151
|
const getCardOrder200StatusEnum = {
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
requires_3ds: "requires_3ds"
|
|
1152
|
+
payment_pending: "payment_pending",
|
|
1153
|
+
order_completed: "order_completed",
|
|
1154
|
+
order_broadcasted: "order_broadcasted",
|
|
1155
|
+
order_cancelled: "order_cancelled"
|
|
1524
1156
|
};
|
|
1525
1157
|
const getCashAppOrder200StatusEnum = {
|
|
1526
1158
|
pending: "pending",
|
|
@@ -1555,7 +1187,7 @@ const getStripeOrder200StatusEnum = {
|
|
|
1555
1187
|
rejected: "rejected",
|
|
1556
1188
|
error: "error"
|
|
1557
1189
|
};
|
|
1558
|
-
const
|
|
1190
|
+
const getVirtualAccountStatus200IdentityVerificationStatusEnum = {
|
|
1559
1191
|
not_started: "not_started",
|
|
1560
1192
|
incomplete: "incomplete",
|
|
1561
1193
|
awaiting_questionnaire: "awaiting_questionnaire",
|
|
@@ -1572,24 +1204,14 @@ const dataStatusEnum = {
|
|
|
1572
1204
|
failed: "failed",
|
|
1573
1205
|
refunded: "refunded"
|
|
1574
1206
|
};
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
};
|
|
1580
|
-
const updateVirtualAccountMutationRequestChainEnum = {
|
|
1581
|
-
"1": 1,
|
|
1582
|
-
"8453": 8453,
|
|
1583
|
-
"999": 999,
|
|
1584
|
-
"1337": 1337,
|
|
1585
|
-
"4326": 4326,
|
|
1586
|
-
"143": 143,
|
|
1587
|
-
"137": 137
|
|
1207
|
+
const listCardPaymentMethodsMutationRequestCurrencyEnum = {
|
|
1208
|
+
USD: "USD",
|
|
1209
|
+
GBP: "GBP",
|
|
1210
|
+
EUR: "EUR"
|
|
1588
1211
|
};
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
"usdc.e": "usdc.e"
|
|
1212
|
+
const dataCurrencyEnum = {
|
|
1213
|
+
USD: "USD",
|
|
1214
|
+
GBP: "GBP",
|
|
1215
|
+
EUR: "EUR"
|
|
1594
1216
|
};
|
|
1595
|
-
export { ApiError, checkoutCard,
|
|
1217
|
+
export { ApiError, checkoutCard, checkoutCardMutationRequestCurrencyEnum, checkoutCardMutationRequestDestinationChainEnum, checkoutCardMutationRequestDestinationTokenEnum, checkoutCardMutationRequestTradeTypeEnum, checkoutStripeSession, client, client as default, connectExchange, connectExchangePathParamsExchangeEnum, createBlinkSignature, createBlinkSignatureMutationRequestDestinationChainEnum, createBlinkSignatureMutationRequestDestinationTokenEnum, createCardQuote, createCardQuoteMutationRequestCurrencyEnum, createCardQuoteMutationRequestDestinationChainEnum, createCardQuoteMutationRequestDestinationTokenEnum, createCardQuoteMutationRequestTradeTypeEnum, createCashAppOrder, createCashAppOrder200StatusEnum, createCashAppOrderMutationRequestDestinationChainEnum, createCashAppOrderMutationRequestDestinationTokenEnum, createCashAppQuote, createCashAppQuoteMutationRequestDestinationChainEnum, createCashAppQuoteMutationRequestDestinationTokenEnum, createExchangeWithdrawQuote, createExchangeWithdrawQuoteMutationRequestDestinationChainEnum, createExchangeWithdrawQuoteMutationRequestDestinationTokenEnum, createExchangeWithdrawQuoteMutationRequestOriginChainEnum, createExchangeWithdrawQuotePathParamsExchangeEnum, createStripeAuthIntent, createStripeCustomer, createStripeSession, createStripeSessionMutationRequestDestinationChainEnum, createStripeSessionMutationRequestDestinationTokenEnum, createStripeTokens, createVirtualAccount, createVirtualAccountMutationRequestCurrencyEnum, createVirtualAccountMutationRequestDestinationChainEnum, createVirtualAccountMutationRequestDestinationTokenEnum, dataCurrencyEnum, dataStatusEnum, destinationChainEnum, disconnectExchange, disconnectExchangePathParamsExchangeEnum, executeExchangeWithdrawal, executeExchangeWithdrawal200StatusEnum, executeExchangeWithdrawalPathParamsExchangeEnum, getBalances, getBlinkConfig, getCardOrder, getCardOrder200StatusEnum, getCashAppOrder, getCashAppOrder200StatusEnum, getExchange, getExchangeAssets, getExchangeAssetsPathParamsExchangeEnum, getExchangePathParamsExchangeEnum, getExchangeWithdrawal, getExchangeWithdrawal200StatusEnum, getExchangeWithdrawalPathParamsExchangeEnum, getFxRates, getIdentityVerificationUrl, getStripeConfig, getStripeCustomerStatus, getStripeOrder, getStripeOrder200StatusEnum, getStripeQuote, getStripeStatus, getTermsOfServiceUrl, getVirtualAccountStatus, getVirtualAccountStatus200IdentityVerificationStatusEnum, listBlinkDeposits, listCardPaymentMethods, listCardPaymentMethodsMutationRequestCurrencyEnum, listStripePaymentTokens, listStripeWallets, listVirtualAccounts, registerWallet };
|