@calm-xyz/core 0.11.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 +987 -2121
- package/dist/index.js +343 -738
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -14,26 +14,13 @@ var ApiError = class extends Error {
|
|
|
14
14
|
this.status = args.status;
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
function getConfig() {
|
|
19
|
-
return baseConfig;
|
|
20
|
-
}
|
|
21
|
-
function setConfig(config) {
|
|
22
|
-
baseConfig = config;
|
|
23
|
-
return baseConfig;
|
|
24
|
-
}
|
|
25
|
-
async function request(paramsConfig) {
|
|
26
|
-
const config = {
|
|
27
|
-
...baseConfig,
|
|
28
|
-
...paramsConfig
|
|
29
|
-
};
|
|
17
|
+
async function request(config) {
|
|
30
18
|
const searchParams = new URLSearchParams();
|
|
31
19
|
for (const [key, value] of Object.entries(config.params ?? {})) if (value != null) searchParams.append(key, String(value));
|
|
32
20
|
let targetUrl = [config.apiUrl, config.url].filter(Boolean).join("");
|
|
33
21
|
if (config.params) targetUrl += `?${searchParams}`;
|
|
34
22
|
const hasBody = config.data !== void 0;
|
|
35
23
|
const response = await fetch(targetUrl, {
|
|
36
|
-
credentials: config.credentials ?? "include",
|
|
37
24
|
method: config.method,
|
|
38
25
|
body: hasBody ? JSON.stringify(config.data) : void 0,
|
|
39
26
|
signal: config.signal,
|
|
@@ -53,9 +40,7 @@ async function request(paramsConfig) {
|
|
|
53
40
|
}
|
|
54
41
|
return {
|
|
55
42
|
data,
|
|
56
|
-
status: response.status
|
|
57
|
-
statusText: response.statusText,
|
|
58
|
-
headers: response.headers
|
|
43
|
+
status: response.status
|
|
59
44
|
};
|
|
60
45
|
}
|
|
61
46
|
function normalizeHeaders(headers) {
|
|
@@ -67,23 +52,23 @@ const client = request;
|
|
|
67
52
|
* Generated by Kubb (https://kubb.dev/).
|
|
68
53
|
* Do not edit manually.
|
|
69
54
|
*/
|
|
70
|
-
function getCheckoutCardUrl(
|
|
55
|
+
function getCheckoutCardUrl() {
|
|
71
56
|
return {
|
|
72
57
|
method: "POST",
|
|
73
|
-
url: `/v1/
|
|
58
|
+
url: `/v1/card/checkout`
|
|
74
59
|
};
|
|
75
60
|
}
|
|
76
61
|
/**
|
|
77
|
-
* @description
|
|
78
|
-
* @summary
|
|
79
|
-
* {@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}
|
|
80
65
|
*/
|
|
81
|
-
async function checkoutCard(
|
|
66
|
+
async function checkoutCard(data, config = {}) {
|
|
82
67
|
const { client: request = client, ...requestConfig } = config;
|
|
83
68
|
const requestData = data;
|
|
84
69
|
return (await request({
|
|
85
70
|
method: "POST",
|
|
86
|
-
url: getCheckoutCardUrl(
|
|
71
|
+
url: getCheckoutCardUrl().url.toString(),
|
|
87
72
|
data: requestData,
|
|
88
73
|
...requestConfig
|
|
89
74
|
})).data;
|
|
@@ -92,45 +77,24 @@ async function checkoutCard(address, data, config = {}) {
|
|
|
92
77
|
* Generated by Kubb (https://kubb.dev/).
|
|
93
78
|
* Do not edit manually.
|
|
94
79
|
*/
|
|
95
|
-
function getCheckoutStripeSessionUrl(
|
|
80
|
+
function getCheckoutStripeSessionUrl(sessionId) {
|
|
96
81
|
return {
|
|
97
82
|
method: "POST",
|
|
98
|
-
url: `/v1/
|
|
83
|
+
url: `/v1/stripe/session/${sessionId}/checkout`
|
|
99
84
|
};
|
|
100
85
|
}
|
|
101
86
|
/**
|
|
102
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.
|
|
103
88
|
* @summary Check out a Stripe onramp session
|
|
104
|
-
* {@link /v1/
|
|
89
|
+
* {@link /v1/stripe/session/:sessionId/checkout}
|
|
105
90
|
*/
|
|
106
|
-
async function checkoutStripeSession(
|
|
107
|
-
const { client: request = client, ...requestConfig } = config;
|
|
108
|
-
return (await request({
|
|
109
|
-
method: "POST",
|
|
110
|
-
url: getCheckoutStripeSessionUrl(address, sessionId).url.toString(),
|
|
111
|
-
...requestConfig
|
|
112
|
-
})).data;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
116
|
-
* Do not edit manually.
|
|
117
|
-
*/
|
|
118
|
-
function getClearSessionUrl() {
|
|
119
|
-
return {
|
|
120
|
-
method: "POST",
|
|
121
|
-
url: `/v1/session/clear`
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* @description Ends the session: clears both cookies and invalidates the refresh credential. No auth required; idempotent.
|
|
126
|
-
* @summary Clear a session
|
|
127
|
-
* {@link /v1/session/clear}
|
|
128
|
-
*/
|
|
129
|
-
async function clearSession(config = {}) {
|
|
91
|
+
async function checkoutStripeSession(sessionId, data, config = {}) {
|
|
130
92
|
const { client: request = client, ...requestConfig } = config;
|
|
93
|
+
const requestData = data;
|
|
131
94
|
return (await request({
|
|
132
95
|
method: "POST",
|
|
133
|
-
url:
|
|
96
|
+
url: getCheckoutStripeSessionUrl(sessionId).url.toString(),
|
|
97
|
+
data: requestData,
|
|
134
98
|
...requestConfig
|
|
135
99
|
})).data;
|
|
136
100
|
}
|
|
@@ -138,22 +102,24 @@ async function clearSession(config = {}) {
|
|
|
138
102
|
* Generated by Kubb (https://kubb.dev/).
|
|
139
103
|
* Do not edit manually.
|
|
140
104
|
*/
|
|
141
|
-
function getConnectExchangeUrl(
|
|
105
|
+
function getConnectExchangeUrl(exchange) {
|
|
142
106
|
return {
|
|
143
107
|
method: "POST",
|
|
144
|
-
url: `/v1/
|
|
108
|
+
url: `/v1/exchange/${exchange}`
|
|
145
109
|
};
|
|
146
110
|
}
|
|
147
111
|
/**
|
|
148
|
-
* @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}`.
|
|
149
113
|
* @summary Connect an exchange
|
|
150
|
-
* {@link /v1/
|
|
114
|
+
* {@link /v1/exchange/:exchange}
|
|
151
115
|
*/
|
|
152
|
-
async function connectExchange(
|
|
116
|
+
async function connectExchange(exchange, data, config = {}) {
|
|
153
117
|
const { client: request = client, ...requestConfig } = config;
|
|
118
|
+
const requestData = data;
|
|
154
119
|
return (await request({
|
|
155
120
|
method: "POST",
|
|
156
|
-
url: getConnectExchangeUrl(
|
|
121
|
+
url: getConnectExchangeUrl(exchange).url.toString(),
|
|
122
|
+
data: requestData,
|
|
157
123
|
...requestConfig
|
|
158
124
|
})).data;
|
|
159
125
|
}
|
|
@@ -161,23 +127,23 @@ async function connectExchange(address, exchange, config = {}) {
|
|
|
161
127
|
* Generated by Kubb (https://kubb.dev/).
|
|
162
128
|
* Do not edit manually.
|
|
163
129
|
*/
|
|
164
|
-
function getCreateBlinkSignatureUrl(
|
|
130
|
+
function getCreateBlinkSignatureUrl() {
|
|
165
131
|
return {
|
|
166
132
|
method: "POST",
|
|
167
|
-
url: `/v1/
|
|
133
|
+
url: `/v1/blink/signature`
|
|
168
134
|
};
|
|
169
135
|
}
|
|
170
136
|
/**
|
|
171
|
-
* @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.
|
|
172
138
|
* @summary Authorize a deposit
|
|
173
|
-
* {@link /v1/
|
|
139
|
+
* {@link /v1/blink/signature}
|
|
174
140
|
*/
|
|
175
|
-
async function createBlinkSignature(
|
|
141
|
+
async function createBlinkSignature(data, config = {}) {
|
|
176
142
|
const { client: request = client, ...requestConfig } = config;
|
|
177
143
|
const requestData = data;
|
|
178
144
|
return (await request({
|
|
179
145
|
method: "POST",
|
|
180
|
-
url: getCreateBlinkSignatureUrl(
|
|
146
|
+
url: getCreateBlinkSignatureUrl().url.toString(),
|
|
181
147
|
data: requestData,
|
|
182
148
|
...requestConfig
|
|
183
149
|
})).data;
|
|
@@ -186,23 +152,23 @@ async function createBlinkSignature(address, data, config = {}) {
|
|
|
186
152
|
* Generated by Kubb (https://kubb.dev/).
|
|
187
153
|
* Do not edit manually.
|
|
188
154
|
*/
|
|
189
|
-
function
|
|
155
|
+
function getCreateCardQuoteUrl() {
|
|
190
156
|
return {
|
|
191
157
|
method: "POST",
|
|
192
|
-
url: `/v1/
|
|
158
|
+
url: `/v1/card/quote`
|
|
193
159
|
};
|
|
194
160
|
}
|
|
195
161
|
/**
|
|
196
|
-
* @description Returns
|
|
197
|
-
* @summary
|
|
198
|
-
* {@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}
|
|
199
165
|
*/
|
|
200
|
-
async function
|
|
166
|
+
async function createCardQuote(data, config = {}) {
|
|
201
167
|
const { client: request = client, ...requestConfig } = config;
|
|
202
168
|
const requestData = data;
|
|
203
169
|
return (await request({
|
|
204
170
|
method: "POST",
|
|
205
|
-
url:
|
|
171
|
+
url: getCreateCardQuoteUrl().url.toString(),
|
|
206
172
|
data: requestData,
|
|
207
173
|
...requestConfig
|
|
208
174
|
})).data;
|
|
@@ -211,23 +177,23 @@ async function createCardLink(address, data, config = {}) {
|
|
|
211
177
|
* Generated by Kubb (https://kubb.dev/).
|
|
212
178
|
* Do not edit manually.
|
|
213
179
|
*/
|
|
214
|
-
function getCreateCashAppOrderUrl(
|
|
180
|
+
function getCreateCashAppOrderUrl() {
|
|
215
181
|
return {
|
|
216
182
|
method: "POST",
|
|
217
|
-
url: `/v1/
|
|
183
|
+
url: `/v1/cashapp`
|
|
218
184
|
};
|
|
219
185
|
}
|
|
220
186
|
/**
|
|
221
|
-
* @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.
|
|
222
188
|
* @summary Create a Cash App order
|
|
223
|
-
* {@link /v1/
|
|
189
|
+
* {@link /v1/cashapp}
|
|
224
190
|
*/
|
|
225
|
-
async function createCashAppOrder(
|
|
191
|
+
async function createCashAppOrder(data, config = {}) {
|
|
226
192
|
const { client: request = client, ...requestConfig } = config;
|
|
227
193
|
const requestData = data;
|
|
228
194
|
return (await request({
|
|
229
195
|
method: "POST",
|
|
230
|
-
url: getCreateCashAppOrderUrl(
|
|
196
|
+
url: getCreateCashAppOrderUrl().url.toString(),
|
|
231
197
|
data: requestData,
|
|
232
198
|
...requestConfig
|
|
233
199
|
})).data;
|
|
@@ -236,48 +202,23 @@ async function createCashAppOrder(address, data, config = {}) {
|
|
|
236
202
|
* Generated by Kubb (https://kubb.dev/).
|
|
237
203
|
* Do not edit manually.
|
|
238
204
|
*/
|
|
239
|
-
function getCreateCashAppQuoteUrl(
|
|
205
|
+
function getCreateCashAppQuoteUrl() {
|
|
240
206
|
return {
|
|
241
207
|
method: "POST",
|
|
242
|
-
url: `/v1/
|
|
208
|
+
url: `/v1/cashapp/quote`
|
|
243
209
|
};
|
|
244
210
|
}
|
|
245
211
|
/**
|
|
246
|
-
* @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.
|
|
247
213
|
* @summary Quote a Cash App order
|
|
248
|
-
* {@link /v1/
|
|
249
|
-
*/
|
|
250
|
-
async function createCashAppQuote(address, data, config = {}) {
|
|
251
|
-
const { client: request = client, ...requestConfig } = config;
|
|
252
|
-
const requestData = data;
|
|
253
|
-
return (await request({
|
|
254
|
-
method: "POST",
|
|
255
|
-
url: getCreateCashAppQuoteUrl(address).url.toString(),
|
|
256
|
-
data: requestData,
|
|
257
|
-
...requestConfig
|
|
258
|
-
})).data;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
262
|
-
* Do not edit manually.
|
|
263
|
-
*/
|
|
264
|
-
function getCreateDepositAddressUrl(address) {
|
|
265
|
-
return {
|
|
266
|
-
method: "POST",
|
|
267
|
-
url: `/v1/wallets/${address}/deposit-address`
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* @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.
|
|
272
|
-
* @summary Create a crypto deposit address
|
|
273
|
-
* {@link /v1/wallets/:address/deposit-address}
|
|
214
|
+
* {@link /v1/cashapp/quote}
|
|
274
215
|
*/
|
|
275
|
-
async function
|
|
216
|
+
async function createCashAppQuote(data, config = {}) {
|
|
276
217
|
const { client: request = client, ...requestConfig } = config;
|
|
277
218
|
const requestData = data;
|
|
278
219
|
return (await request({
|
|
279
220
|
method: "POST",
|
|
280
|
-
url:
|
|
221
|
+
url: getCreateCashAppQuoteUrl().url.toString(),
|
|
281
222
|
data: requestData,
|
|
282
223
|
...requestConfig
|
|
283
224
|
})).data;
|
|
@@ -286,94 +227,23 @@ async function createDepositAddress(address, data, config = {}) {
|
|
|
286
227
|
* Generated by Kubb (https://kubb.dev/).
|
|
287
228
|
* Do not edit manually.
|
|
288
229
|
*/
|
|
289
|
-
function getCreateExchangeWithdrawQuoteUrl(
|
|
230
|
+
function getCreateExchangeWithdrawQuoteUrl(exchange) {
|
|
290
231
|
return {
|
|
291
232
|
method: "POST",
|
|
292
|
-
url: `/v1/
|
|
233
|
+
url: `/v1/exchange/${exchange}/withdraw/quote`
|
|
293
234
|
};
|
|
294
235
|
}
|
|
295
236
|
/**
|
|
296
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.
|
|
297
238
|
* @summary Quote an exchange withdrawal
|
|
298
|
-
* {@link /v1/
|
|
299
|
-
*/
|
|
300
|
-
async function createExchangeWithdrawQuote(address, exchange, data, config = {}) {
|
|
301
|
-
const { client: request = client, ...requestConfig } = config;
|
|
302
|
-
const requestData = data;
|
|
303
|
-
return (await request({
|
|
304
|
-
method: "POST",
|
|
305
|
-
url: getCreateExchangeWithdrawQuoteUrl(address, exchange).url.toString(),
|
|
306
|
-
data: requestData,
|
|
307
|
-
...requestConfig
|
|
308
|
-
})).data;
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
312
|
-
* Do not edit manually.
|
|
313
|
-
*/
|
|
314
|
-
function getCreateSessionDynamicUrl(address) {
|
|
315
|
-
return {
|
|
316
|
-
method: "POST",
|
|
317
|
-
url: `/v1/session/${address}/dynamic`
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* @description Verifies a Dynamic identity-token bearer, checks the wallet is linked to the user, resolves the tenant from the publishable key, and mints the session cookie pair. Requires an `Authorization: Bearer <token>` header.
|
|
322
|
-
* @summary Create a session (Dynamic)
|
|
323
|
-
* {@link /v1/session/:address/dynamic}
|
|
324
|
-
*/
|
|
325
|
-
async function createSessionDynamic(address, config = {}) {
|
|
326
|
-
const { client: request = client, ...requestConfig } = config;
|
|
327
|
-
return (await request({
|
|
328
|
-
method: "POST",
|
|
329
|
-
url: getCreateSessionDynamicUrl(address).url.toString(),
|
|
330
|
-
...requestConfig
|
|
331
|
-
})).data;
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
335
|
-
* Do not edit manually.
|
|
336
|
-
*/
|
|
337
|
-
function getCreateSessionPrivyUrl(address) {
|
|
338
|
-
return {
|
|
339
|
-
method: "POST",
|
|
340
|
-
url: `/v1/session/${address}/privy`
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* @description Verifies a Privy identity-token bearer, checks the wallet is linked to the user, resolves the tenant from the publishable key, and mints the session cookie pair. Requires an `Authorization: Bearer <token>` header.
|
|
345
|
-
* @summary Create a session (Privy)
|
|
346
|
-
* {@link /v1/session/:address/privy}
|
|
347
|
-
*/
|
|
348
|
-
async function createSessionPrivy(address, config = {}) {
|
|
349
|
-
const { client: request = client, ...requestConfig } = config;
|
|
350
|
-
return (await request({
|
|
351
|
-
method: "POST",
|
|
352
|
-
url: getCreateSessionPrivyUrl(address).url.toString(),
|
|
353
|
-
...requestConfig
|
|
354
|
-
})).data;
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
358
|
-
* Do not edit manually.
|
|
239
|
+
* {@link /v1/exchange/:exchange/withdraw/quote}
|
|
359
240
|
*/
|
|
360
|
-
function
|
|
361
|
-
return {
|
|
362
|
-
method: "POST",
|
|
363
|
-
url: `/v1/session/${address}/siwe`
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* @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.
|
|
368
|
-
* @summary Create a session (SIWE)
|
|
369
|
-
* {@link /v1/session/:address/siwe}
|
|
370
|
-
*/
|
|
371
|
-
async function createSessionSiwe(address, data, config = {}) {
|
|
241
|
+
async function createExchangeWithdrawQuote(exchange, data, config = {}) {
|
|
372
242
|
const { client: request = client, ...requestConfig } = config;
|
|
373
243
|
const requestData = data;
|
|
374
244
|
return (await request({
|
|
375
245
|
method: "POST",
|
|
376
|
-
url:
|
|
246
|
+
url: getCreateExchangeWithdrawQuoteUrl(exchange).url.toString(),
|
|
377
247
|
data: requestData,
|
|
378
248
|
...requestConfig
|
|
379
249
|
})).data;
|
|
@@ -382,46 +252,23 @@ async function createSessionSiwe(address, data, config = {}) {
|
|
|
382
252
|
* Generated by Kubb (https://kubb.dev/).
|
|
383
253
|
* Do not edit manually.
|
|
384
254
|
*/
|
|
385
|
-
function
|
|
255
|
+
function getCreateStripeAuthIntentUrl() {
|
|
386
256
|
return {
|
|
387
257
|
method: "POST",
|
|
388
|
-
url: `/v1/
|
|
258
|
+
url: `/v1/stripe/auth-intent`
|
|
389
259
|
};
|
|
390
260
|
}
|
|
391
261
|
/**
|
|
392
|
-
* @description
|
|
393
|
-
* @summary Issue a SIWE nonce binding
|
|
394
|
-
* {@link /v1/session/:address/siwe/nonce}
|
|
395
|
-
*/
|
|
396
|
-
async function createSiweNonce(address, config = {}) {
|
|
397
|
-
const { client: request = client, ...requestConfig } = config;
|
|
398
|
-
return (await request({
|
|
399
|
-
method: "POST",
|
|
400
|
-
url: getCreateSiweNonceUrl(address).url.toString(),
|
|
401
|
-
...requestConfig
|
|
402
|
-
})).data;
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
406
|
-
* Do not edit manually.
|
|
407
|
-
*/
|
|
408
|
-
function getCreateStripeAuthIntentUrl(address) {
|
|
409
|
-
return {
|
|
410
|
-
method: "POST",
|
|
411
|
-
url: `/v1/wallets/${address}/stripe/auth-intent`
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* @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.
|
|
416
263
|
* @summary Open a Stripe Link auth intent
|
|
417
|
-
* {@link /v1/
|
|
264
|
+
* {@link /v1/stripe/auth-intent}
|
|
418
265
|
*/
|
|
419
|
-
async function createStripeAuthIntent(
|
|
266
|
+
async function createStripeAuthIntent(data, config = {}) {
|
|
420
267
|
const { client: request = client, ...requestConfig } = config;
|
|
421
268
|
const requestData = data;
|
|
422
269
|
return (await request({
|
|
423
270
|
method: "POST",
|
|
424
|
-
url: getCreateStripeAuthIntentUrl(
|
|
271
|
+
url: getCreateStripeAuthIntentUrl().url.toString(),
|
|
425
272
|
data: requestData,
|
|
426
273
|
...requestConfig
|
|
427
274
|
})).data;
|
|
@@ -430,22 +277,24 @@ async function createStripeAuthIntent(address, data, config = {}) {
|
|
|
430
277
|
* Generated by Kubb (https://kubb.dev/).
|
|
431
278
|
* Do not edit manually.
|
|
432
279
|
*/
|
|
433
|
-
function getCreateStripeCustomerUrl(
|
|
280
|
+
function getCreateStripeCustomerUrl(crypto_customer_id) {
|
|
434
281
|
return {
|
|
435
282
|
method: "POST",
|
|
436
|
-
url: `/v1/
|
|
283
|
+
url: `/v1/stripe/customer/${crypto_customer_id}`
|
|
437
284
|
};
|
|
438
285
|
}
|
|
439
286
|
/**
|
|
440
287
|
* @description Validates the crypto customer exists and persists the customer id onto the session so `/status` can re-derive it after a reopen.
|
|
441
288
|
* @summary Persist a Stripe crypto customer
|
|
442
|
-
* {@link /v1/
|
|
289
|
+
* {@link /v1/stripe/customer/:crypto_customer_id}
|
|
443
290
|
*/
|
|
444
|
-
async function createStripeCustomer(
|
|
291
|
+
async function createStripeCustomer(crypto_customer_id, data, config = {}) {
|
|
445
292
|
const { client: request = client, ...requestConfig } = config;
|
|
293
|
+
const requestData = data;
|
|
446
294
|
return (await request({
|
|
447
295
|
method: "POST",
|
|
448
|
-
url: getCreateStripeCustomerUrl(
|
|
296
|
+
url: getCreateStripeCustomerUrl(crypto_customer_id).url.toString(),
|
|
297
|
+
data: requestData,
|
|
449
298
|
...requestConfig
|
|
450
299
|
})).data;
|
|
451
300
|
}
|
|
@@ -453,23 +302,23 @@ async function createStripeCustomer(address, crypto_customer_id, config = {}) {
|
|
|
453
302
|
* Generated by Kubb (https://kubb.dev/).
|
|
454
303
|
* Do not edit manually.
|
|
455
304
|
*/
|
|
456
|
-
function getCreateStripeSessionUrl(
|
|
305
|
+
function getCreateStripeSessionUrl() {
|
|
457
306
|
return {
|
|
458
307
|
method: "POST",
|
|
459
|
-
url: `/v1/
|
|
308
|
+
url: `/v1/stripe/session`
|
|
460
309
|
};
|
|
461
310
|
}
|
|
462
311
|
/**
|
|
463
|
-
* @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`.
|
|
464
313
|
* @summary Open a Stripe onramp session
|
|
465
|
-
* {@link /v1/
|
|
314
|
+
* {@link /v1/stripe/session}
|
|
466
315
|
*/
|
|
467
|
-
async function createStripeSession(
|
|
316
|
+
async function createStripeSession(data, config = {}) {
|
|
468
317
|
const { client: request = client, ...requestConfig } = config;
|
|
469
318
|
const requestData = data;
|
|
470
319
|
return (await request({
|
|
471
320
|
method: "POST",
|
|
472
|
-
url: getCreateStripeSessionUrl(
|
|
321
|
+
url: getCreateStripeSessionUrl().url.toString(),
|
|
473
322
|
data: requestData,
|
|
474
323
|
...requestConfig
|
|
475
324
|
})).data;
|
|
@@ -478,48 +327,23 @@ async function createStripeSession(address, data, config = {}) {
|
|
|
478
327
|
* Generated by Kubb (https://kubb.dev/).
|
|
479
328
|
* Do not edit manually.
|
|
480
329
|
*/
|
|
481
|
-
function getCreateStripeTokensUrl(
|
|
330
|
+
function getCreateStripeTokensUrl() {
|
|
482
331
|
return {
|
|
483
332
|
method: "POST",
|
|
484
|
-
url: `/v1/
|
|
333
|
+
url: `/v1/stripe/tokens`
|
|
485
334
|
};
|
|
486
335
|
}
|
|
487
336
|
/**
|
|
488
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.
|
|
489
338
|
* @summary Exchange an auth intent for tokens
|
|
490
|
-
* {@link /v1/
|
|
491
|
-
*/
|
|
492
|
-
async function createStripeTokens(address, data, config = {}) {
|
|
493
|
-
const { client: request = client, ...requestConfig } = config;
|
|
494
|
-
const requestData = data;
|
|
495
|
-
return (await request({
|
|
496
|
-
method: "POST",
|
|
497
|
-
url: getCreateStripeTokensUrl(address).url.toString(),
|
|
498
|
-
data: requestData,
|
|
499
|
-
...requestConfig
|
|
500
|
-
})).data;
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
504
|
-
* Do not edit manually.
|
|
505
|
-
*/
|
|
506
|
-
function getCreateSwapQuoteUrl(address) {
|
|
507
|
-
return {
|
|
508
|
-
method: "POST",
|
|
509
|
-
url: `/v1/wallets/${address}/swap/quote`
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* @description Returns an executable quote for swapping a source token into the destination chain's payout token — USDC on most chains, USDm on MegaETH (`4326`) — at that token's own decimals. Pass `destination_token` to pick among a chain's payout tokens where it offers more than one; omitted, the chain's default applies. The response carries the steps the client executes on-chain; source and destination chains may differ.
|
|
514
|
-
* @summary Quote a swap
|
|
515
|
-
* {@link /v1/wallets/:address/swap/quote}
|
|
339
|
+
* {@link /v1/stripe/tokens}
|
|
516
340
|
*/
|
|
517
|
-
async function
|
|
341
|
+
async function createStripeTokens(data, config = {}) {
|
|
518
342
|
const { client: request = client, ...requestConfig } = config;
|
|
519
343
|
const requestData = data;
|
|
520
344
|
return (await request({
|
|
521
345
|
method: "POST",
|
|
522
|
-
url:
|
|
346
|
+
url: getCreateStripeTokensUrl().url.toString(),
|
|
523
347
|
data: requestData,
|
|
524
348
|
...requestConfig
|
|
525
349
|
})).data;
|
|
@@ -528,23 +352,23 @@ async function createSwapQuote(address, data, config = {}) {
|
|
|
528
352
|
* Generated by Kubb (https://kubb.dev/).
|
|
529
353
|
* Do not edit manually.
|
|
530
354
|
*/
|
|
531
|
-
function getCreateVirtualAccountUrl(
|
|
355
|
+
function getCreateVirtualAccountUrl() {
|
|
532
356
|
return {
|
|
533
357
|
method: "POST",
|
|
534
|
-
url: `/v1/
|
|
358
|
+
url: `/v1/virtual-accounts`
|
|
535
359
|
};
|
|
536
360
|
}
|
|
537
361
|
/**
|
|
538
|
-
* @description Provisions a
|
|
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.
|
|
539
363
|
* @summary Create a virtual account
|
|
540
|
-
* {@link /v1/
|
|
364
|
+
* {@link /v1/virtual-accounts}
|
|
541
365
|
*/
|
|
542
|
-
async function createVirtualAccount(
|
|
366
|
+
async function createVirtualAccount(data, config = {}) {
|
|
543
367
|
const { client: request = client, ...requestConfig } = config;
|
|
544
368
|
const requestData = data;
|
|
545
369
|
return (await request({
|
|
546
370
|
method: "POST",
|
|
547
|
-
url: getCreateVirtualAccountUrl(
|
|
371
|
+
url: getCreateVirtualAccountUrl().url.toString(),
|
|
548
372
|
data: requestData,
|
|
549
373
|
...requestConfig
|
|
550
374
|
})).data;
|
|
@@ -553,22 +377,23 @@ async function createVirtualAccount(address, data, config = {}) {
|
|
|
553
377
|
* Generated by Kubb (https://kubb.dev/).
|
|
554
378
|
* Do not edit manually.
|
|
555
379
|
*/
|
|
556
|
-
function getDisconnectExchangeUrl(
|
|
380
|
+
function getDisconnectExchangeUrl(exchange) {
|
|
557
381
|
return {
|
|
558
382
|
method: "DELETE",
|
|
559
|
-
url: `/v1/
|
|
383
|
+
url: `/v1/exchange/${exchange}`
|
|
560
384
|
};
|
|
561
385
|
}
|
|
562
386
|
/**
|
|
563
387
|
* @description Disconnects an exchange and returns 204. Idempotent: disconnecting an already-disconnected exchange still returns 204.
|
|
564
388
|
* @summary Disconnect an exchange
|
|
565
|
-
* {@link /v1/
|
|
389
|
+
* {@link /v1/exchange/:exchange}
|
|
566
390
|
*/
|
|
567
|
-
async function disconnectExchange(
|
|
391
|
+
async function disconnectExchange(exchange, params, config = {}) {
|
|
568
392
|
const { client: request = client, ...requestConfig } = config;
|
|
569
393
|
return (await request({
|
|
570
394
|
method: "DELETE",
|
|
571
|
-
url: getDisconnectExchangeUrl(
|
|
395
|
+
url: getDisconnectExchangeUrl(exchange).url.toString(),
|
|
396
|
+
params,
|
|
572
397
|
...requestConfig
|
|
573
398
|
})).data;
|
|
574
399
|
}
|
|
@@ -576,23 +401,23 @@ async function disconnectExchange(address, exchange, config = {}) {
|
|
|
576
401
|
* Generated by Kubb (https://kubb.dev/).
|
|
577
402
|
* Do not edit manually.
|
|
578
403
|
*/
|
|
579
|
-
function getExecuteExchangeWithdrawalUrl(
|
|
404
|
+
function getExecuteExchangeWithdrawalUrl(exchange) {
|
|
580
405
|
return {
|
|
581
406
|
method: "POST",
|
|
582
|
-
url: `/v1/
|
|
407
|
+
url: `/v1/exchange/${exchange}/withdraw`
|
|
583
408
|
};
|
|
584
409
|
}
|
|
585
410
|
/**
|
|
586
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`.
|
|
587
412
|
* @summary Execute an exchange withdrawal
|
|
588
|
-
* {@link /v1/
|
|
413
|
+
* {@link /v1/exchange/:exchange/withdraw}
|
|
589
414
|
*/
|
|
590
|
-
async function executeExchangeWithdrawal(
|
|
415
|
+
async function executeExchangeWithdrawal(exchange, data, config = {}) {
|
|
591
416
|
const { client: request = client, ...requestConfig } = config;
|
|
592
417
|
const requestData = data;
|
|
593
418
|
return (await request({
|
|
594
419
|
method: "POST",
|
|
595
|
-
url: getExecuteExchangeWithdrawalUrl(
|
|
420
|
+
url: getExecuteExchangeWithdrawalUrl(exchange).url.toString(),
|
|
596
421
|
data: requestData,
|
|
597
422
|
...requestConfig
|
|
598
423
|
})).data;
|
|
@@ -601,45 +426,22 @@ async function executeExchangeWithdrawal(address, exchange, data, config = {}) {
|
|
|
601
426
|
* Generated by Kubb (https://kubb.dev/).
|
|
602
427
|
* Do not edit manually.
|
|
603
428
|
*/
|
|
604
|
-
function
|
|
429
|
+
function getGetBalancesUrl() {
|
|
605
430
|
return {
|
|
606
431
|
method: "GET",
|
|
607
|
-
url: `/v1/
|
|
432
|
+
url: `/v1/balances`
|
|
608
433
|
};
|
|
609
434
|
}
|
|
610
435
|
/**
|
|
611
|
-
* @description Returns
|
|
612
|
-
* @summary Get one token balance
|
|
613
|
-
* {@link /v1/wallets/:address/balances/:chain/:token}
|
|
614
|
-
*/
|
|
615
|
-
async function getBalance(address, chain, token, config = {}) {
|
|
616
|
-
const { client: request = client, ...requestConfig } = config;
|
|
617
|
-
return (await request({
|
|
618
|
-
method: "GET",
|
|
619
|
-
url: getGetBalanceUrl(address, chain, token).url.toString(),
|
|
620
|
-
...requestConfig
|
|
621
|
-
})).data;
|
|
622
|
-
}
|
|
623
|
-
/**
|
|
624
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
625
|
-
* Do not edit manually.
|
|
626
|
-
*/
|
|
627
|
-
function getGetBalancesUrl(address) {
|
|
628
|
-
return {
|
|
629
|
-
method: "GET",
|
|
630
|
-
url: `/v1/wallets/${address}/balances`
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* @description Returns the wallet's token balances across the supported source chains, each with its USD value. Filter with `?chains=1,8453`; the default covers the source chains.
|
|
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.
|
|
635
437
|
* @summary List wallet balances
|
|
636
|
-
* {@link /v1/
|
|
438
|
+
* {@link /v1/balances}
|
|
637
439
|
*/
|
|
638
|
-
async function getBalances(
|
|
440
|
+
async function getBalances(params, config = {}) {
|
|
639
441
|
const { client: request = client, ...requestConfig } = config;
|
|
640
442
|
return (await request({
|
|
641
443
|
method: "GET",
|
|
642
|
-
url: getGetBalancesUrl(
|
|
444
|
+
url: getGetBalancesUrl().url.toString(),
|
|
643
445
|
params,
|
|
644
446
|
...requestConfig
|
|
645
447
|
})).data;
|
|
@@ -648,68 +450,22 @@ async function getBalances(address, params, config = {}) {
|
|
|
648
450
|
* Generated by Kubb (https://kubb.dev/).
|
|
649
451
|
* Do not edit manually.
|
|
650
452
|
*/
|
|
651
|
-
function getGetBlinkConfigUrl(
|
|
453
|
+
function getGetBlinkConfigUrl() {
|
|
652
454
|
return {
|
|
653
455
|
method: "GET",
|
|
654
|
-
url: `/v1/
|
|
456
|
+
url: `/v1/blink/config`
|
|
655
457
|
};
|
|
656
458
|
}
|
|
657
459
|
/**
|
|
658
|
-
* @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.
|
|
659
461
|
* @summary Get the deposit-rail runtime config
|
|
660
|
-
* {@link /v1/
|
|
661
|
-
*/
|
|
662
|
-
async function getBlinkConfig(address, config = {}) {
|
|
663
|
-
const { client: request = client, ...requestConfig } = config;
|
|
664
|
-
return (await request({
|
|
665
|
-
method: "GET",
|
|
666
|
-
url: getGetBlinkConfigUrl(address).url.toString(),
|
|
667
|
-
...requestConfig
|
|
668
|
-
})).data;
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
672
|
-
* Do not edit manually.
|
|
673
|
-
*/
|
|
674
|
-
function getGetCardConfigUrl(address) {
|
|
675
|
-
return {
|
|
676
|
-
method: "GET",
|
|
677
|
-
url: `/v1/wallets/${address}/card/config`
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
/**
|
|
681
|
-
* @description Returns public configuration used by the SDK to render secure card collection and risk checks.
|
|
682
|
-
* @summary Get card flow config
|
|
683
|
-
* {@link /v1/wallets/:address/card/config}
|
|
684
|
-
*/
|
|
685
|
-
async function getCardConfig(address, config = {}) {
|
|
686
|
-
const { client: request = client, ...requestConfig } = config;
|
|
687
|
-
return (await request({
|
|
688
|
-
method: "GET",
|
|
689
|
-
url: getGetCardConfigUrl(address).url.toString(),
|
|
690
|
-
...requestConfig
|
|
691
|
-
})).data;
|
|
692
|
-
}
|
|
693
|
-
/**
|
|
694
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
695
|
-
* Do not edit manually.
|
|
696
|
-
*/
|
|
697
|
-
function getGetCardCustomerUrl(address) {
|
|
698
|
-
return {
|
|
699
|
-
method: "GET",
|
|
700
|
-
url: `/v1/wallets/${address}/card/customer`
|
|
701
|
-
};
|
|
702
|
-
}
|
|
703
|
-
/**
|
|
704
|
-
* @description Returns the saved registration and billing profile for the session wallet so the card flow can prefill its forms.
|
|
705
|
-
* @summary Get card registration + billing
|
|
706
|
-
* {@link /v1/wallets/:address/card/customer}
|
|
462
|
+
* {@link /v1/blink/config}
|
|
707
463
|
*/
|
|
708
|
-
async function
|
|
464
|
+
async function getBlinkConfig(config = {}) {
|
|
709
465
|
const { client: request = client, ...requestConfig } = config;
|
|
710
466
|
return (await request({
|
|
711
467
|
method: "GET",
|
|
712
|
-
url:
|
|
468
|
+
url: getGetBlinkConfigUrl().url.toString(),
|
|
713
469
|
...requestConfig
|
|
714
470
|
})).data;
|
|
715
471
|
}
|
|
@@ -717,45 +473,22 @@ async function getCardCustomer(address, config = {}) {
|
|
|
717
473
|
* Generated by Kubb (https://kubb.dev/).
|
|
718
474
|
* Do not edit manually.
|
|
719
475
|
*/
|
|
720
|
-
function getGetCardOrderUrl(
|
|
476
|
+
function getGetCardOrderUrl(id) {
|
|
721
477
|
return {
|
|
722
478
|
method: "GET",
|
|
723
|
-
url: `/v1/
|
|
479
|
+
url: `/v1/card/orders/${id}`
|
|
724
480
|
};
|
|
725
481
|
}
|
|
726
482
|
/**
|
|
727
|
-
* @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.
|
|
728
484
|
* @summary Get card order
|
|
729
|
-
* {@link /v1/
|
|
485
|
+
* {@link /v1/card/orders/:id}
|
|
730
486
|
*/
|
|
731
|
-
async function getCardOrder(
|
|
487
|
+
async function getCardOrder(id, params, config = {}) {
|
|
732
488
|
const { client: request = client, ...requestConfig } = config;
|
|
733
489
|
return (await request({
|
|
734
490
|
method: "GET",
|
|
735
|
-
url: getGetCardOrderUrl(
|
|
736
|
-
...requestConfig
|
|
737
|
-
})).data;
|
|
738
|
-
}
|
|
739
|
-
/**
|
|
740
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
741
|
-
* Do not edit manually.
|
|
742
|
-
*/
|
|
743
|
-
function getGetCardQuoteUrl(address) {
|
|
744
|
-
return {
|
|
745
|
-
method: "GET",
|
|
746
|
-
url: `/v1/wallets/${address}/card/quote`
|
|
747
|
-
};
|
|
748
|
-
}
|
|
749
|
-
/**
|
|
750
|
-
* @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.
|
|
751
|
-
* @summary Quote a card amount
|
|
752
|
-
* {@link /v1/wallets/:address/card/quote}
|
|
753
|
-
*/
|
|
754
|
-
async function getCardQuote(address, params, config = {}) {
|
|
755
|
-
const { client: request = client, ...requestConfig } = config;
|
|
756
|
-
return (await request({
|
|
757
|
-
method: "GET",
|
|
758
|
-
url: getGetCardQuoteUrl(address).url.toString(),
|
|
491
|
+
url: getGetCardOrderUrl(id).url.toString(),
|
|
759
492
|
params,
|
|
760
493
|
...requestConfig
|
|
761
494
|
})).data;
|
|
@@ -764,22 +497,23 @@ async function getCardQuote(address, params, config = {}) {
|
|
|
764
497
|
* Generated by Kubb (https://kubb.dev/).
|
|
765
498
|
* Do not edit manually.
|
|
766
499
|
*/
|
|
767
|
-
function getGetCashAppOrderUrl(
|
|
500
|
+
function getGetCashAppOrderUrl(id) {
|
|
768
501
|
return {
|
|
769
502
|
method: "GET",
|
|
770
|
-
url: `/v1/
|
|
503
|
+
url: `/v1/cashapp/${id}`
|
|
771
504
|
};
|
|
772
505
|
}
|
|
773
506
|
/**
|
|
774
|
-
* @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.
|
|
775
508
|
* @summary Get a Cash App order
|
|
776
|
-
* {@link /v1/
|
|
509
|
+
* {@link /v1/cashapp/:id}
|
|
777
510
|
*/
|
|
778
|
-
async function getCashAppOrder(
|
|
511
|
+
async function getCashAppOrder(id, params, config = {}) {
|
|
779
512
|
const { client: request = client, ...requestConfig } = config;
|
|
780
513
|
return (await request({
|
|
781
514
|
method: "GET",
|
|
782
|
-
url: getGetCashAppOrderUrl(
|
|
515
|
+
url: getGetCashAppOrderUrl(id).url.toString(),
|
|
516
|
+
params,
|
|
783
517
|
...requestConfig
|
|
784
518
|
})).data;
|
|
785
519
|
}
|
|
@@ -787,22 +521,23 @@ async function getCashAppOrder(address, id, config = {}) {
|
|
|
787
521
|
* Generated by Kubb (https://kubb.dev/).
|
|
788
522
|
* Do not edit manually.
|
|
789
523
|
*/
|
|
790
|
-
function getGetExchangeUrl(
|
|
524
|
+
function getGetExchangeUrl(exchange) {
|
|
791
525
|
return {
|
|
792
526
|
method: "GET",
|
|
793
|
-
url: `/v1/
|
|
527
|
+
url: `/v1/exchange/${exchange}`
|
|
794
528
|
};
|
|
795
529
|
}
|
|
796
530
|
/**
|
|
797
531
|
* @description Returns the connection status for an exchange. Not-connected is a 200 with `connected: false` — poll this to drive the connect UI.
|
|
798
532
|
* @summary Get exchange connection status
|
|
799
|
-
* {@link /v1/
|
|
533
|
+
* {@link /v1/exchange/:exchange}
|
|
800
534
|
*/
|
|
801
|
-
async function getExchange(
|
|
535
|
+
async function getExchange(exchange, params, config = {}) {
|
|
802
536
|
const { client: request = client, ...requestConfig } = config;
|
|
803
537
|
return (await request({
|
|
804
538
|
method: "GET",
|
|
805
|
-
url: getGetExchangeUrl(
|
|
539
|
+
url: getGetExchangeUrl(exchange).url.toString(),
|
|
540
|
+
params,
|
|
806
541
|
...requestConfig
|
|
807
542
|
})).data;
|
|
808
543
|
}
|
|
@@ -810,22 +545,23 @@ async function getExchange(address, exchange, config = {}) {
|
|
|
810
545
|
* Generated by Kubb (https://kubb.dev/).
|
|
811
546
|
* Do not edit manually.
|
|
812
547
|
*/
|
|
813
|
-
function getGetExchangeAssetsUrl(
|
|
548
|
+
function getGetExchangeAssetsUrl(exchange) {
|
|
814
549
|
return {
|
|
815
550
|
method: "GET",
|
|
816
|
-
url: `/v1/
|
|
551
|
+
url: `/v1/exchange/${exchange}/assets`
|
|
817
552
|
};
|
|
818
553
|
}
|
|
819
554
|
/**
|
|
820
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.
|
|
821
556
|
* @summary List exchange withdrawable assets
|
|
822
|
-
* {@link /v1/
|
|
557
|
+
* {@link /v1/exchange/:exchange/assets}
|
|
823
558
|
*/
|
|
824
|
-
async function getExchangeAssets(
|
|
559
|
+
async function getExchangeAssets(exchange, params, config = {}) {
|
|
825
560
|
const { client: request = client, ...requestConfig } = config;
|
|
826
561
|
return (await request({
|
|
827
562
|
method: "GET",
|
|
828
|
-
url: getGetExchangeAssetsUrl(
|
|
563
|
+
url: getGetExchangeAssetsUrl(exchange).url.toString(),
|
|
564
|
+
params,
|
|
829
565
|
...requestConfig
|
|
830
566
|
})).data;
|
|
831
567
|
}
|
|
@@ -833,22 +569,23 @@ async function getExchangeAssets(address, exchange, config = {}) {
|
|
|
833
569
|
* Generated by Kubb (https://kubb.dev/).
|
|
834
570
|
* Do not edit manually.
|
|
835
571
|
*/
|
|
836
|
-
function getGetExchangeWithdrawalUrl(
|
|
572
|
+
function getGetExchangeWithdrawalUrl(exchange, id) {
|
|
837
573
|
return {
|
|
838
574
|
method: "GET",
|
|
839
|
-
url: `/v1/
|
|
575
|
+
url: `/v1/exchange/${exchange}/withdraw/${id}`
|
|
840
576
|
};
|
|
841
577
|
}
|
|
842
578
|
/**
|
|
843
579
|
* @description Returns a withdrawal by id, including its status and — once broadcast — its transaction hash.
|
|
844
580
|
* @summary Get an exchange withdrawal
|
|
845
|
-
* {@link /v1/
|
|
581
|
+
* {@link /v1/exchange/:exchange/withdraw/:id}
|
|
846
582
|
*/
|
|
847
|
-
async function getExchangeWithdrawal(
|
|
583
|
+
async function getExchangeWithdrawal(exchange, id, params, config = {}) {
|
|
848
584
|
const { client: request = client, ...requestConfig } = config;
|
|
849
585
|
return (await request({
|
|
850
586
|
method: "GET",
|
|
851
|
-
url: getGetExchangeWithdrawalUrl(
|
|
587
|
+
url: getGetExchangeWithdrawalUrl(exchange, id).url.toString(),
|
|
588
|
+
params,
|
|
852
589
|
...requestConfig
|
|
853
590
|
})).data;
|
|
854
591
|
}
|
|
@@ -863,7 +600,7 @@ function getGetFxRatesUrl() {
|
|
|
863
600
|
};
|
|
864
601
|
}
|
|
865
602
|
/**
|
|
866
|
-
* @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.
|
|
867
604
|
* @summary Get display-currency exchange rates
|
|
868
605
|
* {@link /v1/fx}
|
|
869
606
|
*/
|
|
@@ -879,22 +616,24 @@ async function getFxRates(config = {}) {
|
|
|
879
616
|
* Generated by Kubb (https://kubb.dev/).
|
|
880
617
|
* Do not edit manually.
|
|
881
618
|
*/
|
|
882
|
-
function
|
|
619
|
+
function getGetIdentityVerificationUrlUrl() {
|
|
883
620
|
return {
|
|
884
621
|
method: "POST",
|
|
885
|
-
url: `/v1/
|
|
622
|
+
url: `/v1/virtual-accounts/identity-verification`
|
|
886
623
|
};
|
|
887
624
|
}
|
|
888
625
|
/**
|
|
889
|
-
* @description Returns the hosted identity-verification URL for the wallet. Present it to the user, then poll `GET /v1/
|
|
890
|
-
* @summary Get the identity-verification
|
|
891
|
-
* {@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}
|
|
892
629
|
*/
|
|
893
|
-
async function
|
|
630
|
+
async function getIdentityVerificationUrl(data, config = {}) {
|
|
894
631
|
const { client: request = client, ...requestConfig } = config;
|
|
632
|
+
const requestData = data;
|
|
895
633
|
return (await request({
|
|
896
634
|
method: "POST",
|
|
897
|
-
url:
|
|
635
|
+
url: getGetIdentityVerificationUrlUrl().url.toString(),
|
|
636
|
+
data: requestData,
|
|
898
637
|
...requestConfig
|
|
899
638
|
})).data;
|
|
900
639
|
}
|
|
@@ -902,22 +641,22 @@ async function getIdentityVerificationLink(address, config = {}) {
|
|
|
902
641
|
* Generated by Kubb (https://kubb.dev/).
|
|
903
642
|
* Do not edit manually.
|
|
904
643
|
*/
|
|
905
|
-
function getGetStripeConfigUrl(
|
|
644
|
+
function getGetStripeConfigUrl() {
|
|
906
645
|
return {
|
|
907
646
|
method: "GET",
|
|
908
|
-
url: `/v1/
|
|
647
|
+
url: `/v1/stripe/config`
|
|
909
648
|
};
|
|
910
649
|
}
|
|
911
650
|
/**
|
|
912
|
-
* @description Returns the environment's Stripe publishable key, which the SDK feeds to `loadCryptoOnrampAndInitialize(pk)` on init.
|
|
913
|
-
* @summary Get the Stripe
|
|
914
|
-
* {@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}
|
|
915
654
|
*/
|
|
916
|
-
async function getStripeConfig(
|
|
655
|
+
async function getStripeConfig(config = {}) {
|
|
917
656
|
const { client: request = client, ...requestConfig } = config;
|
|
918
657
|
return (await request({
|
|
919
658
|
method: "GET",
|
|
920
|
-
url: getGetStripeConfigUrl(
|
|
659
|
+
url: getGetStripeConfigUrl().url.toString(),
|
|
921
660
|
...requestConfig
|
|
922
661
|
})).data;
|
|
923
662
|
}
|
|
@@ -925,22 +664,23 @@ async function getStripeConfig(address, config = {}) {
|
|
|
925
664
|
* Generated by Kubb (https://kubb.dev/).
|
|
926
665
|
* Do not edit manually.
|
|
927
666
|
*/
|
|
928
|
-
function getGetStripeCustomerStatusUrl(
|
|
667
|
+
function getGetStripeCustomerStatusUrl(crypto_customer_id) {
|
|
929
668
|
return {
|
|
930
669
|
method: "GET",
|
|
931
|
-
url: `/v1/
|
|
670
|
+
url: `/v1/stripe/customer/${crypto_customer_id}`
|
|
932
671
|
};
|
|
933
672
|
}
|
|
934
673
|
/**
|
|
935
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.
|
|
936
675
|
* @summary Poll a Stripe crypto customer's status
|
|
937
|
-
* {@link /v1/
|
|
676
|
+
* {@link /v1/stripe/customer/:crypto_customer_id}
|
|
938
677
|
*/
|
|
939
|
-
async function getStripeCustomerStatus(
|
|
678
|
+
async function getStripeCustomerStatus(crypto_customer_id, params, config = {}) {
|
|
940
679
|
const { client: request = client, ...requestConfig } = config;
|
|
941
680
|
return (await request({
|
|
942
681
|
method: "GET",
|
|
943
|
-
url: getGetStripeCustomerStatusUrl(
|
|
682
|
+
url: getGetStripeCustomerStatusUrl(crypto_customer_id).url.toString(),
|
|
683
|
+
params,
|
|
944
684
|
...requestConfig
|
|
945
685
|
})).data;
|
|
946
686
|
}
|
|
@@ -948,22 +688,23 @@ async function getStripeCustomerStatus(address, crypto_customer_id, config = {})
|
|
|
948
688
|
* Generated by Kubb (https://kubb.dev/).
|
|
949
689
|
* Do not edit manually.
|
|
950
690
|
*/
|
|
951
|
-
function getGetStripeOrderUrl(
|
|
691
|
+
function getGetStripeOrderUrl(id) {
|
|
952
692
|
return {
|
|
953
693
|
method: "GET",
|
|
954
|
-
url: `/v1/
|
|
694
|
+
url: `/v1/stripe/order/${id}`
|
|
955
695
|
};
|
|
956
696
|
}
|
|
957
697
|
/**
|
|
958
|
-
* @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`.
|
|
959
699
|
* @summary Get a Stripe onramp order
|
|
960
|
-
* {@link /v1/
|
|
700
|
+
* {@link /v1/stripe/order/:id}
|
|
961
701
|
*/
|
|
962
|
-
async function getStripeOrder(
|
|
702
|
+
async function getStripeOrder(id, params, config = {}) {
|
|
963
703
|
const { client: request = client, ...requestConfig } = config;
|
|
964
704
|
return (await request({
|
|
965
705
|
method: "GET",
|
|
966
|
-
url: getGetStripeOrderUrl(
|
|
706
|
+
url: getGetStripeOrderUrl(id).url.toString(),
|
|
707
|
+
params,
|
|
967
708
|
...requestConfig
|
|
968
709
|
})).data;
|
|
969
710
|
}
|
|
@@ -971,22 +712,22 @@ async function getStripeOrder(address, id, config = {}) {
|
|
|
971
712
|
* Generated by Kubb (https://kubb.dev/).
|
|
972
713
|
* Do not edit manually.
|
|
973
714
|
*/
|
|
974
|
-
function getGetStripeQuoteUrl(
|
|
715
|
+
function getGetStripeQuoteUrl() {
|
|
975
716
|
return {
|
|
976
717
|
method: "GET",
|
|
977
|
-
url: `/v1/
|
|
718
|
+
url: `/v1/stripe/quote`
|
|
978
719
|
};
|
|
979
720
|
}
|
|
980
721
|
/**
|
|
981
|
-
* @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.
|
|
982
723
|
* @summary Quote a Stripe onramp amount
|
|
983
|
-
* {@link /v1/
|
|
724
|
+
* {@link /v1/stripe/quote}
|
|
984
725
|
*/
|
|
985
|
-
async function getStripeQuote(
|
|
726
|
+
async function getStripeQuote(params, config = {}) {
|
|
986
727
|
const { client: request = client, ...requestConfig } = config;
|
|
987
728
|
return (await request({
|
|
988
729
|
method: "GET",
|
|
989
|
-
url: getGetStripeQuoteUrl(
|
|
730
|
+
url: getGetStripeQuoteUrl().url.toString(),
|
|
990
731
|
params,
|
|
991
732
|
...requestConfig
|
|
992
733
|
})).data;
|
|
@@ -995,22 +736,23 @@ async function getStripeQuote(address, params, config = {}) {
|
|
|
995
736
|
* Generated by Kubb (https://kubb.dev/).
|
|
996
737
|
* Do not edit manually.
|
|
997
738
|
*/
|
|
998
|
-
function getGetStripeStatusUrl(
|
|
739
|
+
function getGetStripeStatusUrl() {
|
|
999
740
|
return {
|
|
1000
741
|
method: "GET",
|
|
1001
|
-
url: `/v1/
|
|
742
|
+
url: `/v1/stripe/status`
|
|
1002
743
|
};
|
|
1003
744
|
}
|
|
1004
745
|
/**
|
|
1005
|
-
* @description Reports whether this
|
|
1006
|
-
* @summary Get the
|
|
1007
|
-
* {@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}
|
|
1008
749
|
*/
|
|
1009
|
-
async function getStripeStatus(
|
|
750
|
+
async function getStripeStatus(params, config = {}) {
|
|
1010
751
|
const { client: request = client, ...requestConfig } = config;
|
|
1011
752
|
return (await request({
|
|
1012
753
|
method: "GET",
|
|
1013
|
-
url: getGetStripeStatusUrl(
|
|
754
|
+
url: getGetStripeStatusUrl().url.toString(),
|
|
755
|
+
params,
|
|
1014
756
|
...requestConfig
|
|
1015
757
|
})).data;
|
|
1016
758
|
}
|
|
@@ -1018,22 +760,24 @@ async function getStripeStatus(address, config = {}) {
|
|
|
1018
760
|
* Generated by Kubb (https://kubb.dev/).
|
|
1019
761
|
* Do not edit manually.
|
|
1020
762
|
*/
|
|
1021
|
-
function
|
|
763
|
+
function getGetTermsOfServiceUrlUrl() {
|
|
1022
764
|
return {
|
|
1023
765
|
method: "POST",
|
|
1024
|
-
url: `/v1/
|
|
766
|
+
url: `/v1/virtual-accounts/terms-of-service`
|
|
1025
767
|
};
|
|
1026
768
|
}
|
|
1027
769
|
/**
|
|
1028
|
-
* @description Returns the hosted terms-of-service URL for the wallet. Present it to the user, then poll `GET /v1/
|
|
1029
|
-
* @summary Get the terms-of-service
|
|
1030
|
-
* {@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}
|
|
1031
773
|
*/
|
|
1032
|
-
async function
|
|
774
|
+
async function getTermsOfServiceUrl(data, config = {}) {
|
|
1033
775
|
const { client: request = client, ...requestConfig } = config;
|
|
776
|
+
const requestData = data;
|
|
1034
777
|
return (await request({
|
|
1035
778
|
method: "POST",
|
|
1036
|
-
url:
|
|
779
|
+
url: getGetTermsOfServiceUrlUrl().url.toString(),
|
|
780
|
+
data: requestData,
|
|
1037
781
|
...requestConfig
|
|
1038
782
|
})).data;
|
|
1039
783
|
}
|
|
@@ -1041,22 +785,23 @@ async function getTermsOfServiceLink(address, config = {}) {
|
|
|
1041
785
|
* Generated by Kubb (https://kubb.dev/).
|
|
1042
786
|
* Do not edit manually.
|
|
1043
787
|
*/
|
|
1044
|
-
function
|
|
788
|
+
function getGetVirtualAccountStatusUrl() {
|
|
1045
789
|
return {
|
|
1046
790
|
method: "GET",
|
|
1047
|
-
url: `/v1/
|
|
791
|
+
url: `/v1/virtual-accounts/status`
|
|
1048
792
|
};
|
|
1049
793
|
}
|
|
1050
794
|
/**
|
|
1051
|
-
* @description Returns the
|
|
1052
|
-
* @summary Get
|
|
1053
|
-
* {@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}
|
|
1054
798
|
*/
|
|
1055
|
-
async function
|
|
799
|
+
async function getVirtualAccountStatus(params, config = {}) {
|
|
1056
800
|
const { client: request = client, ...requestConfig } = config;
|
|
1057
801
|
return (await request({
|
|
1058
802
|
method: "GET",
|
|
1059
|
-
url:
|
|
803
|
+
url: getGetVirtualAccountStatusUrl().url.toString(),
|
|
804
|
+
params,
|
|
1060
805
|
...requestConfig
|
|
1061
806
|
})).data;
|
|
1062
807
|
}
|
|
@@ -1064,22 +809,23 @@ async function getWallet(address, config = {}) {
|
|
|
1064
809
|
* Generated by Kubb (https://kubb.dev/).
|
|
1065
810
|
* Do not edit manually.
|
|
1066
811
|
*/
|
|
1067
|
-
function
|
|
812
|
+
function getListBlinkDepositsUrl() {
|
|
1068
813
|
return {
|
|
1069
814
|
method: "GET",
|
|
1070
|
-
url: `/v1/
|
|
815
|
+
url: `/v1/blink/deposits`
|
|
1071
816
|
};
|
|
1072
817
|
}
|
|
1073
818
|
/**
|
|
1074
|
-
* @description Returns the wallet's
|
|
1075
|
-
* @summary List
|
|
1076
|
-
* {@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}
|
|
1077
822
|
*/
|
|
1078
|
-
async function
|
|
823
|
+
async function listBlinkDeposits(params, config = {}) {
|
|
1079
824
|
const { client: request = client, ...requestConfig } = config;
|
|
1080
825
|
return (await request({
|
|
1081
826
|
method: "GET",
|
|
1082
|
-
url:
|
|
827
|
+
url: getListBlinkDepositsUrl().url.toString(),
|
|
828
|
+
params,
|
|
1083
829
|
...requestConfig
|
|
1084
830
|
})).data;
|
|
1085
831
|
}
|
|
@@ -1087,23 +833,24 @@ async function listCryptoDeposits(address, config = {}) {
|
|
|
1087
833
|
* Generated by Kubb (https://kubb.dev/).
|
|
1088
834
|
* Do not edit manually.
|
|
1089
835
|
*/
|
|
1090
|
-
function
|
|
836
|
+
function getListCardPaymentMethodsUrl() {
|
|
1091
837
|
return {
|
|
1092
|
-
method: "
|
|
1093
|
-
url: `/v1/
|
|
838
|
+
method: "POST",
|
|
839
|
+
url: `/v1/card/payment-methods`
|
|
1094
840
|
};
|
|
1095
841
|
}
|
|
1096
842
|
/**
|
|
1097
|
-
* @description
|
|
1098
|
-
* @summary List
|
|
1099
|
-
* {@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}
|
|
1100
846
|
*/
|
|
1101
|
-
async function
|
|
847
|
+
async function listCardPaymentMethods(data, config = {}) {
|
|
1102
848
|
const { client: request = client, ...requestConfig } = config;
|
|
849
|
+
const requestData = data;
|
|
1103
850
|
return (await request({
|
|
1104
|
-
method: "
|
|
1105
|
-
url:
|
|
1106
|
-
|
|
851
|
+
method: "POST",
|
|
852
|
+
url: getListCardPaymentMethodsUrl().url.toString(),
|
|
853
|
+
data: requestData,
|
|
1107
854
|
...requestConfig
|
|
1108
855
|
})).data;
|
|
1109
856
|
}
|
|
@@ -1111,22 +858,22 @@ async function listStripePaymentTokens(address, params, config = {}) {
|
|
|
1111
858
|
* Generated by Kubb (https://kubb.dev/).
|
|
1112
859
|
* Do not edit manually.
|
|
1113
860
|
*/
|
|
1114
|
-
function
|
|
861
|
+
function getListStripePaymentTokensUrl() {
|
|
1115
862
|
return {
|
|
1116
863
|
method: "GET",
|
|
1117
|
-
url: `/v1/
|
|
864
|
+
url: `/v1/stripe/payment-tokens`
|
|
1118
865
|
};
|
|
1119
866
|
}
|
|
1120
867
|
/**
|
|
1121
|
-
* @description Returns the
|
|
1122
|
-
* @summary List the customer's
|
|
1123
|
-
* {@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}
|
|
1124
871
|
*/
|
|
1125
|
-
async function
|
|
872
|
+
async function listStripePaymentTokens(params, config = {}) {
|
|
1126
873
|
const { client: request = client, ...requestConfig } = config;
|
|
1127
874
|
return (await request({
|
|
1128
875
|
method: "GET",
|
|
1129
|
-
url:
|
|
876
|
+
url: getListStripePaymentTokensUrl().url.toString(),
|
|
1130
877
|
params,
|
|
1131
878
|
...requestConfig
|
|
1132
879
|
})).data;
|
|
@@ -1135,22 +882,23 @@ async function listStripeWallets(address, params, config = {}) {
|
|
|
1135
882
|
* Generated by Kubb (https://kubb.dev/).
|
|
1136
883
|
* Do not edit manually.
|
|
1137
884
|
*/
|
|
1138
|
-
function
|
|
885
|
+
function getListStripeWalletsUrl() {
|
|
1139
886
|
return {
|
|
1140
887
|
method: "GET",
|
|
1141
|
-
url: `/v1/wallets
|
|
888
|
+
url: `/v1/stripe/wallets`
|
|
1142
889
|
};
|
|
1143
890
|
}
|
|
1144
891
|
/**
|
|
1145
|
-
* @description Returns the
|
|
1146
|
-
* @summary List
|
|
1147
|
-
* {@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}
|
|
1148
895
|
*/
|
|
1149
|
-
async function
|
|
896
|
+
async function listStripeWallets(params, config = {}) {
|
|
1150
897
|
const { client: request = client, ...requestConfig } = config;
|
|
1151
898
|
return (await request({
|
|
1152
899
|
method: "GET",
|
|
1153
|
-
url:
|
|
900
|
+
url: getListStripeWalletsUrl().url.toString(),
|
|
901
|
+
params,
|
|
1154
902
|
...requestConfig
|
|
1155
903
|
})).data;
|
|
1156
904
|
}
|
|
@@ -1158,22 +906,23 @@ async function listVirtualAccounts(address, config = {}) {
|
|
|
1158
906
|
* Generated by Kubb (https://kubb.dev/).
|
|
1159
907
|
* Do not edit manually.
|
|
1160
908
|
*/
|
|
1161
|
-
function
|
|
909
|
+
function getListVirtualAccountsUrl() {
|
|
1162
910
|
return {
|
|
1163
|
-
method: "
|
|
1164
|
-
url: `/v1/
|
|
911
|
+
method: "GET",
|
|
912
|
+
url: `/v1/virtual-accounts`
|
|
1165
913
|
};
|
|
1166
914
|
}
|
|
1167
915
|
/**
|
|
1168
|
-
* @description
|
|
1169
|
-
* @summary
|
|
1170
|
-
* {@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}
|
|
1171
919
|
*/
|
|
1172
|
-
async function
|
|
920
|
+
async function listVirtualAccounts(params, config = {}) {
|
|
1173
921
|
const { client: request = client, ...requestConfig } = config;
|
|
1174
922
|
return (await request({
|
|
1175
|
-
method: "
|
|
1176
|
-
url:
|
|
923
|
+
method: "GET",
|
|
924
|
+
url: getListVirtualAccountsUrl().url.toString(),
|
|
925
|
+
params,
|
|
1177
926
|
...requestConfig
|
|
1178
927
|
})).data;
|
|
1179
928
|
}
|
|
@@ -1181,112 +930,51 @@ async function refreshSession(address, config = {}) {
|
|
|
1181
930
|
* Generated by Kubb (https://kubb.dev/).
|
|
1182
931
|
* Do not edit manually.
|
|
1183
932
|
*/
|
|
1184
|
-
function getRegisterWalletUrl(
|
|
933
|
+
function getRegisterWalletUrl() {
|
|
1185
934
|
return {
|
|
1186
935
|
method: "POST",
|
|
1187
|
-
url: `/v1/
|
|
936
|
+
url: `/v1/virtual-accounts/register`
|
|
1188
937
|
};
|
|
1189
938
|
}
|
|
1190
939
|
/**
|
|
1191
|
-
* @description Submits the registration form (name + email) for the wallet. Returns 204;
|
|
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.
|
|
1192
941
|
* @summary Register a wallet
|
|
1193
|
-
* {@link /v1/
|
|
942
|
+
* {@link /v1/virtual-accounts/register}
|
|
1194
943
|
*/
|
|
1195
|
-
async function registerWallet(
|
|
944
|
+
async function registerWallet(data, config = {}) {
|
|
1196
945
|
const { client: request = client, ...requestConfig } = config;
|
|
1197
946
|
const requestData = data;
|
|
1198
947
|
return (await request({
|
|
1199
948
|
method: "POST",
|
|
1200
|
-
url: getRegisterWalletUrl(
|
|
1201
|
-
data: requestData,
|
|
1202
|
-
...requestConfig
|
|
1203
|
-
})).data;
|
|
1204
|
-
}
|
|
1205
|
-
/**
|
|
1206
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
1207
|
-
* Do not edit manually.
|
|
1208
|
-
*/
|
|
1209
|
-
function getSubmitIdentityVerificationUrl(address) {
|
|
1210
|
-
return {
|
|
1211
|
-
method: "POST",
|
|
1212
|
-
url: `/v1/wallets/${address}/virtual-accounts/identity-verification/submit`
|
|
1213
|
-
};
|
|
1214
|
-
}
|
|
1215
|
-
/**
|
|
1216
|
-
* @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.
|
|
1217
|
-
* @summary Record identity-verification completion
|
|
1218
|
-
* {@link /v1/wallets/:address/virtual-accounts/identity-verification/submit}
|
|
1219
|
-
*/
|
|
1220
|
-
async function submitIdentityVerification(address, config = {}) {
|
|
1221
|
-
const { client: request = client, ...requestConfig } = config;
|
|
1222
|
-
return (await request({
|
|
1223
|
-
method: "POST",
|
|
1224
|
-
url: getSubmitIdentityVerificationUrl(address).url.toString(),
|
|
1225
|
-
...requestConfig
|
|
1226
|
-
})).data;
|
|
1227
|
-
}
|
|
1228
|
-
/**
|
|
1229
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
1230
|
-
* Do not edit manually.
|
|
1231
|
-
*/
|
|
1232
|
-
function getSubmitTermsOfServiceUrl(address) {
|
|
1233
|
-
return {
|
|
1234
|
-
method: "POST",
|
|
1235
|
-
url: `/v1/wallets/${address}/virtual-accounts/terms-of-service/submit`
|
|
1236
|
-
};
|
|
1237
|
-
}
|
|
1238
|
-
/**
|
|
1239
|
-
* @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.
|
|
1240
|
-
* @summary Record terms-of-service completion
|
|
1241
|
-
* {@link /v1/wallets/:address/virtual-accounts/terms-of-service/submit}
|
|
1242
|
-
*/
|
|
1243
|
-
async function submitTermsOfService(address, config = {}) {
|
|
1244
|
-
const { client: request = client, ...requestConfig } = config;
|
|
1245
|
-
return (await request({
|
|
1246
|
-
method: "POST",
|
|
1247
|
-
url: getSubmitTermsOfServiceUrl(address).url.toString(),
|
|
1248
|
-
...requestConfig
|
|
1249
|
-
})).data;
|
|
1250
|
-
}
|
|
1251
|
-
/**
|
|
1252
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
1253
|
-
* Do not edit manually.
|
|
1254
|
-
*/
|
|
1255
|
-
function getUpdateVirtualAccountUrl(address, virtualAccountId) {
|
|
1256
|
-
return {
|
|
1257
|
-
method: "PATCH",
|
|
1258
|
-
url: `/v1/wallets/${address}/virtual-accounts/${virtualAccountId}`
|
|
1259
|
-
};
|
|
1260
|
-
}
|
|
1261
|
-
/**
|
|
1262
|
-
* @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 account's new destination; omitting it with the chain unchanged leaves the account untouched, while 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.
|
|
1263
|
-
* @summary Update a virtual account
|
|
1264
|
-
* {@link /v1/wallets/:address/virtual-accounts/:virtual-account-id}
|
|
1265
|
-
*/
|
|
1266
|
-
async function updateVirtualAccount(address, virtualAccountId, data, config = {}) {
|
|
1267
|
-
const { client: request = client, ...requestConfig } = config;
|
|
1268
|
-
const requestData = data;
|
|
1269
|
-
return (await request({
|
|
1270
|
-
method: "PATCH",
|
|
1271
|
-
url: getUpdateVirtualAccountUrl(address, virtualAccountId).url.toString(),
|
|
949
|
+
url: getRegisterWalletUrl().url.toString(),
|
|
1272
950
|
data: requestData,
|
|
1273
951
|
...requestConfig
|
|
1274
952
|
})).data;
|
|
1275
953
|
}
|
|
1276
|
-
const
|
|
954
|
+
const checkoutCardMutationRequestCurrencyEnum = {
|
|
955
|
+
USD: "USD",
|
|
956
|
+
GBP: "GBP",
|
|
957
|
+
EUR: "EUR"
|
|
958
|
+
};
|
|
959
|
+
const checkoutCardMutationRequestDestinationChainEnum = {
|
|
1277
960
|
"1": 1,
|
|
1278
961
|
"8453": 8453,
|
|
1279
962
|
"999": 999,
|
|
1280
963
|
"1337": 1337,
|
|
1281
964
|
"4326": 4326,
|
|
1282
965
|
"143": 143,
|
|
1283
|
-
"137": 137
|
|
966
|
+
"137": 137,
|
|
967
|
+
"42161": 42161
|
|
1284
968
|
};
|
|
1285
969
|
const checkoutCardMutationRequestDestinationTokenEnum = {
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
"
|
|
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"
|
|
1290
978
|
};
|
|
1291
979
|
const connectExchangePathParamsExchangeEnum = { coinbase: "coinbase" };
|
|
1292
980
|
const createBlinkSignatureMutationRequestDestinationChainEnum = {
|
|
@@ -1296,33 +984,39 @@ const createBlinkSignatureMutationRequestDestinationChainEnum = {
|
|
|
1296
984
|
"1337": 1337,
|
|
1297
985
|
"4326": 4326,
|
|
1298
986
|
"143": 143,
|
|
1299
|
-
"137": 137
|
|
987
|
+
"137": 137,
|
|
988
|
+
"42161": 42161
|
|
1300
989
|
};
|
|
1301
990
|
const createBlinkSignatureMutationRequestDestinationTokenEnum = {
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
"
|
|
991
|
+
USDC: "USDC",
|
|
992
|
+
USDm: "USDm",
|
|
993
|
+
AUSD: "AUSD",
|
|
994
|
+
"USDC.e": "USDC.e"
|
|
1306
995
|
};
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
996
|
+
const createCardQuoteMutationRequestCurrencyEnum = {
|
|
997
|
+
USD: "USD",
|
|
998
|
+
GBP: "GBP",
|
|
999
|
+
EUR: "EUR"
|
|
1311
1000
|
};
|
|
1312
|
-
const
|
|
1001
|
+
const createCardQuoteMutationRequestDestinationChainEnum = {
|
|
1313
1002
|
"1": 1,
|
|
1314
1003
|
"8453": 8453,
|
|
1315
1004
|
"999": 999,
|
|
1316
1005
|
"1337": 1337,
|
|
1317
1006
|
"4326": 4326,
|
|
1318
1007
|
"143": 143,
|
|
1319
|
-
"137": 137
|
|
1008
|
+
"137": 137,
|
|
1009
|
+
"42161": 42161
|
|
1320
1010
|
};
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
"
|
|
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"
|
|
1326
1020
|
};
|
|
1327
1021
|
const createCashAppOrder200StatusEnum = {
|
|
1328
1022
|
pending: "pending",
|
|
@@ -1339,67 +1033,37 @@ const createCashAppOrder200StatusEnum = {
|
|
|
1339
1033
|
unfulfilled: "unfulfilled",
|
|
1340
1034
|
expired: "expired"
|
|
1341
1035
|
};
|
|
1342
|
-
const
|
|
1036
|
+
const createCashAppOrderMutationRequestDestinationChainEnum = {
|
|
1343
1037
|
"1": 1,
|
|
1344
1038
|
"8453": 8453,
|
|
1345
1039
|
"999": 999,
|
|
1346
1040
|
"1337": 1337,
|
|
1347
1041
|
"4326": 4326,
|
|
1348
1042
|
"143": 143,
|
|
1349
|
-
"137": 137
|
|
1043
|
+
"137": 137,
|
|
1044
|
+
"42161": 42161
|
|
1350
1045
|
};
|
|
1351
1046
|
const createCashAppOrderMutationRequestDestinationTokenEnum = {
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
"
|
|
1047
|
+
USDC: "USDC",
|
|
1048
|
+
USDm: "USDm",
|
|
1049
|
+
AUSD: "AUSD",
|
|
1050
|
+
"USDC.e": "USDC.e"
|
|
1356
1051
|
};
|
|
1357
|
-
const
|
|
1052
|
+
const createCashAppQuoteMutationRequestDestinationChainEnum = {
|
|
1358
1053
|
"1": 1,
|
|
1359
1054
|
"8453": 8453,
|
|
1360
1055
|
"999": 999,
|
|
1361
1056
|
"1337": 1337,
|
|
1362
1057
|
"4326": 4326,
|
|
1363
1058
|
"143": 143,
|
|
1364
|
-
"137": 137
|
|
1059
|
+
"137": 137,
|
|
1060
|
+
"42161": 42161
|
|
1365
1061
|
};
|
|
1366
1062
|
const createCashAppQuoteMutationRequestDestinationTokenEnum = {
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
"
|
|
1371
|
-
};
|
|
1372
|
-
const createDepositAddressMutationRequestDestinationChainEnum = {
|
|
1373
|
-
"1": 1,
|
|
1374
|
-
"8453": 8453,
|
|
1375
|
-
"999": 999,
|
|
1376
|
-
"1337": 1337,
|
|
1377
|
-
"4326": 4326,
|
|
1378
|
-
"143": 143,
|
|
1379
|
-
"137": 137
|
|
1380
|
-
};
|
|
1381
|
-
const createDepositAddressMutationRequestDestinationTokenEnum = {
|
|
1382
|
-
usdc: "usdc",
|
|
1383
|
-
usdm: "usdm",
|
|
1384
|
-
ausd: "ausd",
|
|
1385
|
-
"usdc.e": "usdc.e"
|
|
1386
|
-
};
|
|
1387
|
-
const createDepositAddressMutationRequestSourceChainEnum = {
|
|
1388
|
-
"1": 1,
|
|
1389
|
-
"8453": 8453,
|
|
1390
|
-
"999": 999,
|
|
1391
|
-
"4326": 4326,
|
|
1392
|
-
"143": 143,
|
|
1393
|
-
"137": 137
|
|
1394
|
-
};
|
|
1395
|
-
const createDepositAddressMutationRequestSourceTokenEnum = {
|
|
1396
|
-
eth: "eth",
|
|
1397
|
-
hype: "hype",
|
|
1398
|
-
mon: "mon",
|
|
1399
|
-
pol: "pol",
|
|
1400
|
-
usdc: "usdc",
|
|
1401
|
-
usdm: "usdm",
|
|
1402
|
-
usdt: "usdt"
|
|
1063
|
+
USDC: "USDC",
|
|
1064
|
+
USDm: "USDm",
|
|
1065
|
+
AUSD: "AUSD",
|
|
1066
|
+
"USDC.e": "USDC.e"
|
|
1403
1067
|
};
|
|
1404
1068
|
const createExchangeWithdrawQuotePathParamsExchangeEnum = { coinbase: "coinbase" };
|
|
1405
1069
|
const createExchangeWithdrawQuoteMutationRequestDestinationChainEnum = {
|
|
@@ -1409,13 +1073,14 @@ const createExchangeWithdrawQuoteMutationRequestDestinationChainEnum = {
|
|
|
1409
1073
|
"1337": 1337,
|
|
1410
1074
|
"4326": 4326,
|
|
1411
1075
|
"143": 143,
|
|
1412
|
-
"137": 137
|
|
1076
|
+
"137": 137,
|
|
1077
|
+
"42161": 42161
|
|
1413
1078
|
};
|
|
1414
1079
|
const createExchangeWithdrawQuoteMutationRequestDestinationTokenEnum = {
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
"
|
|
1080
|
+
USDC: "USDC",
|
|
1081
|
+
USDm: "USDm",
|
|
1082
|
+
AUSD: "AUSD",
|
|
1083
|
+
"USDC.e": "USDC.e"
|
|
1419
1084
|
};
|
|
1420
1085
|
const createExchangeWithdrawQuoteMutationRequestOriginChainEnum = {
|
|
1421
1086
|
"1": 1,
|
|
@@ -1424,7 +1089,8 @@ const createExchangeWithdrawQuoteMutationRequestOriginChainEnum = {
|
|
|
1424
1089
|
"1337": 1337,
|
|
1425
1090
|
"4326": 4326,
|
|
1426
1091
|
"143": 143,
|
|
1427
|
-
"137": 137
|
|
1092
|
+
"137": 137,
|
|
1093
|
+
"42161": 42161
|
|
1428
1094
|
};
|
|
1429
1095
|
const createStripeSessionMutationRequestDestinationChainEnum = {
|
|
1430
1096
|
"1": 1,
|
|
@@ -1433,70 +1099,35 @@ const createStripeSessionMutationRequestDestinationChainEnum = {
|
|
|
1433
1099
|
"1337": 1337,
|
|
1434
1100
|
"4326": 4326,
|
|
1435
1101
|
"143": 143,
|
|
1436
|
-
"137": 137
|
|
1102
|
+
"137": 137,
|
|
1103
|
+
"42161": 42161
|
|
1437
1104
|
};
|
|
1438
1105
|
const createStripeSessionMutationRequestDestinationTokenEnum = {
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
"
|
|
1443
|
-
};
|
|
1444
|
-
const createSwapQuoteMutationRequestDestinationChainEnum = {
|
|
1445
|
-
"1": 1,
|
|
1446
|
-
"8453": 8453,
|
|
1447
|
-
"999": 999,
|
|
1448
|
-
"1337": 1337,
|
|
1449
|
-
"4326": 4326,
|
|
1450
|
-
"143": 143,
|
|
1451
|
-
"137": 137
|
|
1452
|
-
};
|
|
1453
|
-
const createSwapQuoteMutationRequestDestinationTokenEnum = {
|
|
1454
|
-
usdc: "usdc",
|
|
1455
|
-
usdm: "usdm",
|
|
1456
|
-
ausd: "ausd",
|
|
1457
|
-
"usdc.e": "usdc.e"
|
|
1458
|
-
};
|
|
1459
|
-
const createSwapQuoteMutationRequestSourceChainEnum = {
|
|
1460
|
-
"1": 1,
|
|
1461
|
-
"8453": 8453,
|
|
1462
|
-
"999": 999,
|
|
1463
|
-
"4326": 4326,
|
|
1464
|
-
"143": 143,
|
|
1465
|
-
"137": 137
|
|
1106
|
+
USDC: "USDC",
|
|
1107
|
+
USDm: "USDm",
|
|
1108
|
+
AUSD: "AUSD",
|
|
1109
|
+
"USDC.e": "USDC.e"
|
|
1466
1110
|
};
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
pol: "pol",
|
|
1472
|
-
usdc: "usdc",
|
|
1473
|
-
usdm: "usdm",
|
|
1474
|
-
usdt: "usdt"
|
|
1475
|
-
};
|
|
1476
|
-
const createSwapQuoteMutationRequestTradeTypeEnum = {
|
|
1477
|
-
EXACT_INPUT: "EXACT_INPUT",
|
|
1478
|
-
EXACT_OUTPUT: "EXACT_OUTPUT",
|
|
1479
|
-
EXPECTED_OUTPUT: "EXPECTED_OUTPUT"
|
|
1111
|
+
const createVirtualAccountMutationRequestCurrencyEnum = {
|
|
1112
|
+
USD: "USD",
|
|
1113
|
+
GBP: "GBP",
|
|
1114
|
+
EUR: "EUR"
|
|
1480
1115
|
};
|
|
1481
|
-
const
|
|
1116
|
+
const createVirtualAccountMutationRequestDestinationChainEnum = {
|
|
1482
1117
|
"1": 1,
|
|
1483
1118
|
"8453": 8453,
|
|
1484
1119
|
"999": 999,
|
|
1485
1120
|
"1337": 1337,
|
|
1486
1121
|
"4326": 4326,
|
|
1487
1122
|
"143": 143,
|
|
1488
|
-
"137": 137
|
|
1489
|
-
|
|
1490
|
-
const createVirtualAccountMutationRequestCurrencyEnum = {
|
|
1491
|
-
usd: "usd",
|
|
1492
|
-
gbp: "gbp",
|
|
1493
|
-
eur: "eur"
|
|
1123
|
+
"137": 137,
|
|
1124
|
+
"42161": 42161
|
|
1494
1125
|
};
|
|
1495
1126
|
const createVirtualAccountMutationRequestDestinationTokenEnum = {
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
"
|
|
1127
|
+
USDC: "USDC",
|
|
1128
|
+
USDm: "USDm",
|
|
1129
|
+
AUSD: "AUSD",
|
|
1130
|
+
"USDC.e": "USDC.e"
|
|
1500
1131
|
};
|
|
1501
1132
|
const disconnectExchangePathParamsExchangeEnum = { coinbase: "coinbase" };
|
|
1502
1133
|
const executeExchangeWithdrawalPathParamsExchangeEnum = { coinbase: "coinbase" };
|
|
@@ -1507,34 +1138,21 @@ const executeExchangeWithdrawal200StatusEnum = {
|
|
|
1507
1138
|
failed: "failed",
|
|
1508
1139
|
delayed: "delayed"
|
|
1509
1140
|
};
|
|
1510
|
-
const
|
|
1511
|
-
eth: "eth",
|
|
1512
|
-
hype: "hype",
|
|
1513
|
-
mon: "mon",
|
|
1514
|
-
pol: "pol",
|
|
1515
|
-
usdc: "usdc",
|
|
1516
|
-
usdm: "usdm",
|
|
1517
|
-
usdt: "usdt"
|
|
1518
|
-
};
|
|
1519
|
-
const processorEnvEnum = {
|
|
1520
|
-
sandbox: "sandbox",
|
|
1521
|
-
prod: "prod"
|
|
1522
|
-
};
|
|
1523
|
-
const getCardOrder200ChainEnum = {
|
|
1141
|
+
const destinationChainEnum = {
|
|
1524
1142
|
"1": 1,
|
|
1525
1143
|
"8453": 8453,
|
|
1526
1144
|
"999": 999,
|
|
1527
1145
|
"1337": 1337,
|
|
1528
1146
|
"4326": 4326,
|
|
1529
1147
|
"143": 143,
|
|
1530
|
-
"137": 137
|
|
1148
|
+
"137": 137,
|
|
1149
|
+
"42161": 42161
|
|
1531
1150
|
};
|
|
1532
1151
|
const getCardOrder200StatusEnum = {
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
requires_3ds: "requires_3ds"
|
|
1152
|
+
payment_pending: "payment_pending",
|
|
1153
|
+
order_completed: "order_completed",
|
|
1154
|
+
order_broadcasted: "order_broadcasted",
|
|
1155
|
+
order_cancelled: "order_cancelled"
|
|
1538
1156
|
};
|
|
1539
1157
|
const getCashAppOrder200StatusEnum = {
|
|
1540
1158
|
pending: "pending",
|
|
@@ -1569,7 +1187,7 @@ const getStripeOrder200StatusEnum = {
|
|
|
1569
1187
|
rejected: "rejected",
|
|
1570
1188
|
error: "error"
|
|
1571
1189
|
};
|
|
1572
|
-
const
|
|
1190
|
+
const getVirtualAccountStatus200IdentityVerificationStatusEnum = {
|
|
1573
1191
|
not_started: "not_started",
|
|
1574
1192
|
incomplete: "incomplete",
|
|
1575
1193
|
awaiting_questionnaire: "awaiting_questionnaire",
|
|
@@ -1586,27 +1204,14 @@ const dataStatusEnum = {
|
|
|
1586
1204
|
failed: "failed",
|
|
1587
1205
|
refunded: "refunded"
|
|
1588
1206
|
};
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
};
|
|
1594
|
-
const updateVirtualAccountMutationRequestChainEnum = {
|
|
1595
|
-
"1": 1,
|
|
1596
|
-
"8453": 8453,
|
|
1597
|
-
"999": 999,
|
|
1598
|
-
"1337": 1337,
|
|
1599
|
-
"4326": 4326,
|
|
1600
|
-
"143": 143,
|
|
1601
|
-
"137": 137
|
|
1207
|
+
const listCardPaymentMethodsMutationRequestCurrencyEnum = {
|
|
1208
|
+
USD: "USD",
|
|
1209
|
+
GBP: "GBP",
|
|
1210
|
+
EUR: "EUR"
|
|
1602
1211
|
};
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
"usdc.e": "usdc.e"
|
|
1212
|
+
const dataCurrencyEnum = {
|
|
1213
|
+
USD: "USD",
|
|
1214
|
+
GBP: "GBP",
|
|
1215
|
+
EUR: "EUR"
|
|
1608
1216
|
};
|
|
1609
|
-
|
|
1610
|
-
setConfig({ apiUrl: options.apiUrl });
|
|
1611
|
-
}
|
|
1612
|
-
export { ApiError, checkoutCard, checkoutCardMutationRequestChainEnum, checkoutCardMutationRequestDestinationTokenEnum, checkoutStripeSession, clearSession, client, client as default, configureCalm, connectExchange, connectExchangePathParamsExchangeEnum, createBlinkSignature, createBlinkSignatureMutationRequestDestinationChainEnum, createBlinkSignatureMutationRequestDestinationTokenEnum, createCardLink, createCardLinkMutationRequestCurrencyEnum, createCardLinkMutationRequestDestinationChainEnum, createCardLinkMutationRequestDestinationTokenEnum, createCashAppOrder, createCashAppOrder200StatusEnum, createCashAppOrderMutationRequestChainEnum, createCashAppOrderMutationRequestDestinationTokenEnum, createCashAppQuote, createCashAppQuoteMutationRequestChainEnum, createCashAppQuoteMutationRequestDestinationTokenEnum, createDepositAddress, createDepositAddressMutationRequestDestinationChainEnum, createDepositAddressMutationRequestDestinationTokenEnum, createDepositAddressMutationRequestSourceChainEnum, createDepositAddressMutationRequestSourceTokenEnum, createExchangeWithdrawQuote, createExchangeWithdrawQuoteMutationRequestDestinationChainEnum, createExchangeWithdrawQuoteMutationRequestDestinationTokenEnum, createExchangeWithdrawQuoteMutationRequestOriginChainEnum, createExchangeWithdrawQuotePathParamsExchangeEnum, createSessionDynamic, createSessionPrivy, createSessionSiwe, createSiweNonce, createStripeAuthIntent, createStripeCustomer, createStripeSession, createStripeSessionMutationRequestDestinationChainEnum, createStripeSessionMutationRequestDestinationTokenEnum, createStripeTokens, createSwapQuote, createSwapQuoteMutationRequestDestinationChainEnum, createSwapQuoteMutationRequestDestinationTokenEnum, createSwapQuoteMutationRequestSourceChainEnum, createSwapQuoteMutationRequestSourceTokenEnum, createSwapQuoteMutationRequestTradeTypeEnum, createVirtualAccount, createVirtualAccountMutationRequestChainEnum, createVirtualAccountMutationRequestCurrencyEnum, createVirtualAccountMutationRequestDestinationTokenEnum, dataCurrencyEnum, dataStatusEnum, disconnectExchange, disconnectExchangePathParamsExchangeEnum, executeExchangeWithdrawal, executeExchangeWithdrawal200StatusEnum, executeExchangeWithdrawalPathParamsExchangeEnum, getBalance, getBalancePathParamsTokenEnum, getBalances, getBlinkConfig, getCardConfig, getCardCustomer, getCardOrder, getCardOrder200ChainEnum, getCardOrder200StatusEnum, getCardQuote, getCashAppOrder, getCashAppOrder200StatusEnum, getConfig, getExchange, getExchangeAssets, getExchangeAssetsPathParamsExchangeEnum, getExchangePathParamsExchangeEnum, getExchangeWithdrawal, getExchangeWithdrawal200StatusEnum, getExchangeWithdrawalPathParamsExchangeEnum, getFxRates, getIdentityVerificationLink, getStripeConfig, getStripeCustomerStatus, getStripeOrder, getStripeOrder200StatusEnum, getStripeQuote, getStripeStatus, getTermsOfServiceLink, getWallet, getWallet200IdentityVerificationStatusEnum, listCryptoDeposits, listStripePaymentTokens, listStripeWallets, listVirtualAccounts, processorEnvEnum, refreshSession, registerWallet, setConfig, submitIdentityVerification, submitTermsOfService, updateVirtualAccount, updateVirtualAccountMutationRequestChainEnum, updateVirtualAccountMutationRequestDestinationTokenEnum };
|
|
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 };
|