@cosmosapp/pay_sdk 1.2.1 → 2.1.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/CHANGELOG.md +31 -0
- package/LICENSE +0 -75
- package/NOTICE +8 -0
- package/README.md +73 -13
- package/dist/chunk-AYVWYEOK.js +62 -0
- package/dist/chunk-AYVWYEOK.js.map +1 -0
- package/dist/{chunk-KZNJR223.js → chunk-NK5EHEKJ.js} +5 -3
- package/dist/chunk-NK5EHEKJ.js.map +1 -0
- package/dist/cosmosProvider-CFASjnd5.d.cts +100 -0
- package/dist/cosmosProvider-CFASjnd5.d.ts +100 -0
- package/dist/index.cjs +1311 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +905 -42
- package/dist/index.d.ts +905 -42
- package/dist/index.js +1295 -154
- package/dist/index.js.map +1 -1
- package/dist/intent-input-8rZfCrQ0.d.cts +2042 -0
- package/dist/intent-input-8rZfCrQ0.d.ts +2042 -0
- package/dist/swk/index.cjs +170 -0
- package/dist/swk/index.cjs.map +1 -0
- package/dist/swk/index.d.cts +207 -0
- package/dist/swk/index.d.ts +207 -0
- package/dist/swk/index.js +106 -0
- package/dist/swk/index.js.map +1 -0
- package/dist/web/index.cjs +129 -2
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +49 -4
- package/dist/web/index.d.ts +49 -4
- package/dist/web/index.js +67 -4
- package/dist/web/index.js.map +1 -1
- package/llms/08-products-customers.md +1 -1
- package/llms/13-types-reference.md +1 -1
- package/llms/15-swaps.md +58 -0
- package/llms/llms-full.txt +63 -2
- package/llms/llms.txt +1 -0
- package/package.json +20 -7
- package/dist/chunk-KZNJR223.js.map +0 -1
- package/dist/intent-input-Ch8ogEg-.d.cts +0 -750
- package/dist/intent-input-Ch8ogEg-.d.ts +0 -750
|
@@ -0,0 +1,2042 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A typed, extensible catalog of Stellar assets.
|
|
3
|
+
*
|
|
4
|
+
* Instead of hunting down an asset's issuer (or pasting the wrong one), use the
|
|
5
|
+
* built-in catalog — `Assets.USDC`, `Assets.EURC`, `Assets.XLM` — which carries
|
|
6
|
+
* the verified issuer for you. Need something else? `defineAsset(...)` makes a
|
|
7
|
+
* typed asset you can reuse. And a plain code string still works everywhere.
|
|
8
|
+
*
|
|
9
|
+
* ⚠️ Issuers are network-specific. The {@link Assets} catalog targets **mainnet**;
|
|
10
|
+
* {@link TestnetAssets} carries the testnet issuers. Bare code strings (e.g.
|
|
11
|
+
* `'USDC'`) are treated as *code only* (no issuer) for backwards compatibility —
|
|
12
|
+
* use the catalog object or `defineAsset` when you want the issuer filled in.
|
|
13
|
+
*/
|
|
14
|
+
/** A fully-described Stellar asset. */
|
|
15
|
+
interface AssetDefinition {
|
|
16
|
+
/** Asset code, e.g. `USDC`. Use `XLM` (or omit the issuer) for native lumens. */
|
|
17
|
+
code: string;
|
|
18
|
+
/** Issuer account (`G…`). `null`/omitted means the native asset (XLM). */
|
|
19
|
+
issuer?: string | null;
|
|
20
|
+
/** Optional Soroban contract id (`C…`) for the SAC / token contract. */
|
|
21
|
+
contract?: string;
|
|
22
|
+
/** Human-readable name. */
|
|
23
|
+
name?: string;
|
|
24
|
+
/** Network the `issuer` is valid on. */
|
|
25
|
+
network?: 'public' | 'testnet';
|
|
26
|
+
}
|
|
27
|
+
/** Anything accepted where an asset is expected: a code string or a definition. */
|
|
28
|
+
type AssetRef = string | AssetDefinition;
|
|
29
|
+
/** Normalized asset: a code plus a concrete issuer (or `null` for native). */
|
|
30
|
+
interface ResolvedAsset {
|
|
31
|
+
/** `XLM` for the native asset, otherwise the asset code. */
|
|
32
|
+
code: string;
|
|
33
|
+
/** Issuer `G…`, or `null` for the native asset. */
|
|
34
|
+
issuer: string | null;
|
|
35
|
+
/** Optional Soroban contract id. */
|
|
36
|
+
contract?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Built-in **mainnet** assets with verified issuers. Extend with your own via
|
|
40
|
+
* {@link defineAsset}. Issuers sourced from the official issuers (Circle for
|
|
41
|
+
* USDC/EURC).
|
|
42
|
+
*/
|
|
43
|
+
declare const Assets: {
|
|
44
|
+
/** Native lumens. */
|
|
45
|
+
readonly XLM: AssetDefinition;
|
|
46
|
+
/** USD Coin by Circle (mainnet). */
|
|
47
|
+
readonly USDC: {
|
|
48
|
+
readonly code: "USDC";
|
|
49
|
+
readonly issuer: "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN";
|
|
50
|
+
readonly name: "USD Coin";
|
|
51
|
+
readonly network: "public";
|
|
52
|
+
};
|
|
53
|
+
/** Euro Coin by Circle (mainnet). */
|
|
54
|
+
readonly EURC: {
|
|
55
|
+
readonly code: "EURC";
|
|
56
|
+
readonly issuer: "GDHU6WRG4IEQXM5NZ4BMPKOXHW76MZM4Y2IEMFDVXBSDP6SJY4ITNPP2";
|
|
57
|
+
readonly name: "Euro Coin";
|
|
58
|
+
readonly network: "public";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
/** Built-in **testnet** assets (Circle's Test SDF Network issuers). */
|
|
62
|
+
declare const TestnetAssets: {
|
|
63
|
+
readonly XLM: AssetDefinition;
|
|
64
|
+
readonly USDC: {
|
|
65
|
+
readonly code: "USDC";
|
|
66
|
+
readonly issuer: "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5";
|
|
67
|
+
readonly name: "USD Coin";
|
|
68
|
+
readonly network: "testnet";
|
|
69
|
+
};
|
|
70
|
+
readonly EURC: {
|
|
71
|
+
readonly code: "EURC";
|
|
72
|
+
readonly issuer: "GB3Q6QDZYTHWT7E5PVS3W7FUT5GVAFC5KSZFFLPU25GO7VTC3NM2ZTVO";
|
|
73
|
+
readonly name: "Euro Coin";
|
|
74
|
+
readonly network: "testnet";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/** Whether a reference denotes the native asset (XLM). */
|
|
78
|
+
declare function isNativeAsset(ref: AssetRef): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Create a reusable, typed custom asset. Validates the issuer/contract format so
|
|
81
|
+
* a typo surfaces immediately rather than on-chain.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* const AQUA = defineAsset({ code: 'AQUA', issuer: 'GBNZ...', name: 'Aquarius' });
|
|
85
|
+
* await client.paymentIntents.createPay({ destination, amount: '5', asset: AQUA });
|
|
86
|
+
*/
|
|
87
|
+
declare function defineAsset(def: AssetDefinition): AssetDefinition;
|
|
88
|
+
/**
|
|
89
|
+
* Normalize an {@link AssetRef} into `{ code, issuer, contract }`.
|
|
90
|
+
*
|
|
91
|
+
* - A bare string is treated as *code only* (`issuer: null`) — pass a catalog
|
|
92
|
+
* object or `defineAsset(...)` result when you want the issuer included.
|
|
93
|
+
* - The native asset normalizes to `{ code: 'XLM', issuer: null }`.
|
|
94
|
+
*/
|
|
95
|
+
declare function resolveAsset(ref: AssetRef): ResolvedAsset;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Type definitions for the Cosmos Pay Payments API.
|
|
99
|
+
*
|
|
100
|
+
* These mirror the server's OpenAPI schema (Stellar SEP-7 payment intents,
|
|
101
|
+
* webhooks, products, customers and analytics). Every type is exported so
|
|
102
|
+
* TypeScript consumers get full intellisense; JavaScript consumers can ignore
|
|
103
|
+
* them entirely.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/** Lifecycle state of a payment intent. */
|
|
107
|
+
declare const PaymentIntentStatus: {
|
|
108
|
+
readonly Pending: "PENDING";
|
|
109
|
+
readonly Submitted: "SUBMITTED";
|
|
110
|
+
readonly Succeeded: "SUCCEEDED";
|
|
111
|
+
readonly Failed: "FAILED";
|
|
112
|
+
readonly Cancelled: "CANCELLED";
|
|
113
|
+
readonly Expired: "EXPIRED";
|
|
114
|
+
};
|
|
115
|
+
type PaymentIntentStatus = (typeof PaymentIntentStatus)[keyof typeof PaymentIntentStatus];
|
|
116
|
+
/** SEP-7 operation a payment intent represents. */
|
|
117
|
+
declare const PaymentIntentKind: {
|
|
118
|
+
/** Source account is known → unsigned XDR + `web+stellar:tx` URI. */
|
|
119
|
+
readonly Tx: "TX";
|
|
120
|
+
/** No source → `web+stellar:pay` URI only (wallet picks the source). */
|
|
121
|
+
readonly Pay: "PAY";
|
|
122
|
+
};
|
|
123
|
+
type PaymentIntentKind = (typeof PaymentIntentKind)[keyof typeof PaymentIntentKind];
|
|
124
|
+
/** Domain events an integrator can subscribe a webhook to. */
|
|
125
|
+
declare const WebhookEventType: {
|
|
126
|
+
readonly PaymentIntentCreated: "PAYMENT_INTENT_CREATED";
|
|
127
|
+
readonly PaymentIntentUpdated: "PAYMENT_INTENT_UPDATED";
|
|
128
|
+
readonly PaymentIntentSucceeded: "PAYMENT_INTENT_SUCCEEDED";
|
|
129
|
+
readonly PaymentIntentFailed: "PAYMENT_INTENT_FAILED";
|
|
130
|
+
readonly PaymentIntentCancelled: "PAYMENT_INTENT_CANCELLED";
|
|
131
|
+
readonly PaymentIntentDeleted: "PAYMENT_INTENT_DELETED";
|
|
132
|
+
readonly ReceiverUpdated: "RECEIVER_UPDATED";
|
|
133
|
+
readonly PayinCreated: "PAYIN_CREATED";
|
|
134
|
+
readonly PayinUpdated: "PAYIN_UPDATED";
|
|
135
|
+
readonly PayinCompleted: "PAYIN_COMPLETED";
|
|
136
|
+
readonly PayoutCreated: "PAYOUT_CREATED";
|
|
137
|
+
readonly PayoutUpdated: "PAYOUT_UPDATED";
|
|
138
|
+
readonly PayoutCompleted: "PAYOUT_COMPLETED";
|
|
139
|
+
readonly SwapCreated: "SWAP_CREATED";
|
|
140
|
+
readonly SwapSubmitted: "SWAP_SUBMITTED";
|
|
141
|
+
readonly SwapSucceeded: "SWAP_SUCCEEDED";
|
|
142
|
+
readonly SwapFailed: "SWAP_FAILED";
|
|
143
|
+
readonly LiquidityCreated: "LIQUIDITY_CREATED";
|
|
144
|
+
readonly LiquiditySubmitted: "LIQUIDITY_SUBMITTED";
|
|
145
|
+
readonly LiquiditySucceeded: "LIQUIDITY_SUCCEEDED";
|
|
146
|
+
readonly LiquidityFailed: "LIQUIDITY_FAILED";
|
|
147
|
+
readonly CrossChainSwapCreated: "CROSS_CHAIN_SWAP_CREATED";
|
|
148
|
+
readonly CrossChainSwapUpdated: "CROSS_CHAIN_SWAP_UPDATED";
|
|
149
|
+
readonly CrossChainSwapSucceeded: "CROSS_CHAIN_SWAP_SUCCEEDED";
|
|
150
|
+
readonly CrossChainSwapRefunded: "CROSS_CHAIN_SWAP_REFUNDED";
|
|
151
|
+
readonly CrossChainSwapFailed: "CROSS_CHAIN_SWAP_FAILED";
|
|
152
|
+
readonly CrossChainSwapExpired: "CROSS_CHAIN_SWAP_EXPIRED";
|
|
153
|
+
};
|
|
154
|
+
type WebhookEventType = (typeof WebhookEventType)[keyof typeof WebhookEventType];
|
|
155
|
+
/** Delivery state of a single webhook attempt. */
|
|
156
|
+
declare const WebhookDeliveryStatus: {
|
|
157
|
+
readonly Pending: "PENDING";
|
|
158
|
+
readonly Succeeded: "SUCCEEDED";
|
|
159
|
+
readonly Failed: "FAILED";
|
|
160
|
+
};
|
|
161
|
+
type WebhookDeliveryStatus = (typeof WebhookDeliveryStatus)[keyof typeof WebhookDeliveryStatus];
|
|
162
|
+
/** Product billing kind. */
|
|
163
|
+
declare const ProductKind: {
|
|
164
|
+
readonly Recurring: "recurring";
|
|
165
|
+
readonly OneTime: "one_time";
|
|
166
|
+
readonly Link: "link";
|
|
167
|
+
};
|
|
168
|
+
type ProductKind = (typeof ProductKind)[keyof typeof ProductKind];
|
|
169
|
+
/** Lifecycle state of a swap. */
|
|
170
|
+
declare const SwapStatus: {
|
|
171
|
+
readonly Pending: "PENDING";
|
|
172
|
+
readonly Submitted: "SUBMITTED";
|
|
173
|
+
readonly Succeeded: "SUCCEEDED";
|
|
174
|
+
readonly Failed: "FAILED";
|
|
175
|
+
readonly Expired: "EXPIRED";
|
|
176
|
+
};
|
|
177
|
+
type SwapStatus = (typeof SwapStatus)[keyof typeof SwapStatus];
|
|
178
|
+
/** Which side of a pool an operation is on. */
|
|
179
|
+
declare const LiquidityOperationKind: {
|
|
180
|
+
readonly Deposit: "DEPOSIT";
|
|
181
|
+
readonly Withdraw: "WITHDRAW";
|
|
182
|
+
};
|
|
183
|
+
type LiquidityOperationKind = (typeof LiquidityOperationKind)[keyof typeof LiquidityOperationKind];
|
|
184
|
+
/** Lifecycle state of a liquidity pool operation. */
|
|
185
|
+
declare const LiquidityOperationStatus: {
|
|
186
|
+
readonly Pending: "PENDING";
|
|
187
|
+
readonly Submitted: "SUBMITTED";
|
|
188
|
+
readonly Succeeded: "SUCCEEDED";
|
|
189
|
+
readonly Failed: "FAILED";
|
|
190
|
+
readonly Expired: "EXPIRED";
|
|
191
|
+
};
|
|
192
|
+
type LiquidityOperationStatus = (typeof LiquidityOperationStatus)[keyof typeof LiquidityOperationStatus];
|
|
193
|
+
/** Body for `POST /v1/payment-intents/tx`. */
|
|
194
|
+
interface CreateTxPaymentIntentOptions {
|
|
195
|
+
/** Payer's Stellar account — the transaction source. A registered address-book name also works. */
|
|
196
|
+
source: string;
|
|
197
|
+
/** Payee's Stellar account. A registered address-book name also works. */
|
|
198
|
+
destination: string;
|
|
199
|
+
/** Amount as a decimal string (max 7 decimals). */
|
|
200
|
+
amount: string;
|
|
201
|
+
/**
|
|
202
|
+
* Typed asset (e.g. `Assets.USDC` or `defineAsset(...)`) — fills `assetCode`
|
|
203
|
+
* and `assetIssuer` for you. Takes a back seat to explicit code/issuer below.
|
|
204
|
+
*/
|
|
205
|
+
asset?: AssetRef;
|
|
206
|
+
/** Asset code. Omit (or `XLM`/`native`) for native lumens. */
|
|
207
|
+
assetCode?: string;
|
|
208
|
+
/** Issuer account for a non-native asset. */
|
|
209
|
+
assetIssuer?: string;
|
|
210
|
+
/** MEMO_ID (numeric uint64) for idempotency + on-chain identification. Auto-generated when omitted. */
|
|
211
|
+
memo?: string;
|
|
212
|
+
/** SEP-7 `msg`: shown to the user in their wallet (≤ 300 chars). */
|
|
213
|
+
msg?: string;
|
|
214
|
+
/** SEP-7 `callback` where the wallet POSTs the signed XDR, e.g. `url:https://...`. */
|
|
215
|
+
callback?: string;
|
|
216
|
+
}
|
|
217
|
+
/** Body for `POST /v1/payment-intents/pay`. */
|
|
218
|
+
interface CreatePayPaymentIntentOptions {
|
|
219
|
+
/** Payee's Stellar account. A registered address-book name also works. */
|
|
220
|
+
destination: string;
|
|
221
|
+
/** Amount the destination should receive. Omit to let the user enter it (e.g. donations). */
|
|
222
|
+
amount?: string;
|
|
223
|
+
/**
|
|
224
|
+
* Typed asset (e.g. `Assets.USDC` or `defineAsset(...)`) — fills `assetCode`
|
|
225
|
+
* and `assetIssuer` for you. Takes a back seat to explicit code/issuer below.
|
|
226
|
+
*/
|
|
227
|
+
asset?: AssetRef;
|
|
228
|
+
/** Asset code the destination receives. Omit for native lumens (XLM). */
|
|
229
|
+
assetCode?: string;
|
|
230
|
+
/** Issuer account for a non-native asset. */
|
|
231
|
+
assetIssuer?: string;
|
|
232
|
+
/** MEMO_ID (numeric uint64) for idempotency + on-chain identification. Auto-generated when omitted. */
|
|
233
|
+
memo?: string;
|
|
234
|
+
/** SEP-7 `msg`: shown to the user in their wallet (≤ 300 chars). */
|
|
235
|
+
msg?: string;
|
|
236
|
+
/** SEP-7 `callback`, e.g. `url:https://...`. */
|
|
237
|
+
callback?: string;
|
|
238
|
+
}
|
|
239
|
+
/** Body for `PATCH /v1/payment-intents/:id`. */
|
|
240
|
+
interface UpdatePaymentIntentOptions {
|
|
241
|
+
status?: PaymentIntentStatus;
|
|
242
|
+
/** Stellar transaction hash once the signed tx is submitted. */
|
|
243
|
+
txHash?: string;
|
|
244
|
+
/** Merchant reference. */
|
|
245
|
+
reference?: string;
|
|
246
|
+
}
|
|
247
|
+
/** Query for `GET /v1/payment-intents`. */
|
|
248
|
+
interface ListPaymentIntentsOptions {
|
|
249
|
+
status?: PaymentIntentStatus;
|
|
250
|
+
/** Page size (max 100, default 20). */
|
|
251
|
+
take?: number;
|
|
252
|
+
/** Offset (default 0). */
|
|
253
|
+
skip?: number;
|
|
254
|
+
}
|
|
255
|
+
/** Raw payment intent payload returned by the API. */
|
|
256
|
+
interface PaymentIntentData {
|
|
257
|
+
id: string;
|
|
258
|
+
kind: PaymentIntentKind;
|
|
259
|
+
status: PaymentIntentStatus;
|
|
260
|
+
network: string;
|
|
261
|
+
source: string | null;
|
|
262
|
+
destination: string;
|
|
263
|
+
amount: string | null;
|
|
264
|
+
asset: string;
|
|
265
|
+
assetIssuer: string | null;
|
|
266
|
+
memo: string;
|
|
267
|
+
msg: string | null;
|
|
268
|
+
callback: string | null;
|
|
269
|
+
xdr: string | null;
|
|
270
|
+
uri: string;
|
|
271
|
+
qr: string;
|
|
272
|
+
txHash: string | null;
|
|
273
|
+
reference: string | null;
|
|
274
|
+
createdAt: string;
|
|
275
|
+
updatedAt: string;
|
|
276
|
+
}
|
|
277
|
+
/** Raw paginated list of payment intents. */
|
|
278
|
+
interface PaymentIntentListData {
|
|
279
|
+
data: PaymentIntentData[];
|
|
280
|
+
total: number;
|
|
281
|
+
take: number;
|
|
282
|
+
skip: number;
|
|
283
|
+
}
|
|
284
|
+
/** Body for `POST /v1/payment-intents/:id/validate`. */
|
|
285
|
+
interface ValidatePaymentIntentOptions {
|
|
286
|
+
/** Hash of the submitted Stellar transaction to validate against this intent. */
|
|
287
|
+
txHash: string;
|
|
288
|
+
}
|
|
289
|
+
/** Raw outcome of a validation attempt. */
|
|
290
|
+
interface ValidationOutcomeData {
|
|
291
|
+
valid: boolean;
|
|
292
|
+
status: PaymentIntentStatus;
|
|
293
|
+
reason?: string | null;
|
|
294
|
+
paymentIntent?: PaymentIntentData;
|
|
295
|
+
}
|
|
296
|
+
/** Raw `{ id, deleted }` response. */
|
|
297
|
+
interface DeletedData {
|
|
298
|
+
id: string;
|
|
299
|
+
deleted: boolean;
|
|
300
|
+
}
|
|
301
|
+
/** Body for `POST /v1/webhooks`. */
|
|
302
|
+
interface CreateWebhookEndpointOptions {
|
|
303
|
+
/** HTTPS URL that will receive POSTed event notifications. */
|
|
304
|
+
url: string;
|
|
305
|
+
description?: string;
|
|
306
|
+
/** Event types to subscribe to. Omit/empty to receive all events. */
|
|
307
|
+
eventTypes?: WebhookEventType[];
|
|
308
|
+
}
|
|
309
|
+
/** Body for `PATCH /v1/webhooks/:id`. */
|
|
310
|
+
interface UpdateWebhookEndpointOptions {
|
|
311
|
+
url?: string;
|
|
312
|
+
description?: string;
|
|
313
|
+
/** Pause/resume deliveries to this endpoint. */
|
|
314
|
+
enabled?: boolean;
|
|
315
|
+
eventTypes?: WebhookEventType[];
|
|
316
|
+
}
|
|
317
|
+
/** Raw webhook endpoint payload. */
|
|
318
|
+
interface WebhookEndpointData {
|
|
319
|
+
id: string;
|
|
320
|
+
url: string;
|
|
321
|
+
description: string | null;
|
|
322
|
+
enabled: boolean;
|
|
323
|
+
eventTypes: WebhookEventType[];
|
|
324
|
+
createdAt: string;
|
|
325
|
+
updatedAt: string;
|
|
326
|
+
}
|
|
327
|
+
/** Raw webhook endpoint payload including the one-time signing secret. */
|
|
328
|
+
interface WebhookEndpointWithSecretData extends WebhookEndpointData {
|
|
329
|
+
/** HMAC signing secret — shown once. Store it securely. */
|
|
330
|
+
secret: string;
|
|
331
|
+
}
|
|
332
|
+
/** Raw result of a webhook ping. */
|
|
333
|
+
interface WebhookPingData {
|
|
334
|
+
ok: boolean;
|
|
335
|
+
responseStatus: number | null;
|
|
336
|
+
error: string | null;
|
|
337
|
+
}
|
|
338
|
+
/** Raw webhook delivery (audit) record. */
|
|
339
|
+
interface WebhookDeliveryData {
|
|
340
|
+
id: string;
|
|
341
|
+
endpointId: string;
|
|
342
|
+
eventType: WebhookEventType;
|
|
343
|
+
eventId: string;
|
|
344
|
+
payload: Record<string, unknown>;
|
|
345
|
+
status: WebhookDeliveryStatus;
|
|
346
|
+
attempts: number;
|
|
347
|
+
responseStatus: number | null;
|
|
348
|
+
error: string | null;
|
|
349
|
+
lastAttemptAt: string | null;
|
|
350
|
+
createdAt: string;
|
|
351
|
+
updatedAt: string;
|
|
352
|
+
}
|
|
353
|
+
/** Raw paginated list of webhook deliveries. */
|
|
354
|
+
interface WebhookDeliveryListData {
|
|
355
|
+
data: WebhookDeliveryData[];
|
|
356
|
+
total: number;
|
|
357
|
+
take: number;
|
|
358
|
+
skip: number;
|
|
359
|
+
}
|
|
360
|
+
/** Query for `GET /v1/webhooks/:id/deliveries`. */
|
|
361
|
+
interface ListWebhookDeliveriesOptions {
|
|
362
|
+
status?: WebhookDeliveryStatus;
|
|
363
|
+
take?: number;
|
|
364
|
+
skip?: number;
|
|
365
|
+
}
|
|
366
|
+
/** Shape of the JSON body POSTed to an integrator's webhook URL. */
|
|
367
|
+
interface WebhookEvent<T = PaymentIntentData> {
|
|
368
|
+
/** Stable event id (use for idempotency). */
|
|
369
|
+
id: string;
|
|
370
|
+
type: WebhookEventType;
|
|
371
|
+
createdAt: string;
|
|
372
|
+
data: T;
|
|
373
|
+
}
|
|
374
|
+
/** What each webhook event carries in `data`. */
|
|
375
|
+
interface WebhookEventDataMap {
|
|
376
|
+
PAYMENT_INTENT_CREATED: PaymentIntentData;
|
|
377
|
+
PAYMENT_INTENT_UPDATED: PaymentIntentData;
|
|
378
|
+
PAYMENT_INTENT_SUCCEEDED: PaymentIntentData;
|
|
379
|
+
PAYMENT_INTENT_FAILED: PaymentIntentData;
|
|
380
|
+
PAYMENT_INTENT_CANCELLED: PaymentIntentData;
|
|
381
|
+
PAYMENT_INTENT_DELETED: PaymentIntentData;
|
|
382
|
+
/** Identity and state only — ids, status, rails; never personal data. */
|
|
383
|
+
RECEIVER_UPDATED: Record<string, unknown>;
|
|
384
|
+
PAYIN_CREATED: Record<string, unknown>;
|
|
385
|
+
PAYIN_UPDATED: Record<string, unknown>;
|
|
386
|
+
PAYIN_COMPLETED: Record<string, unknown>;
|
|
387
|
+
PAYOUT_CREATED: Record<string, unknown>;
|
|
388
|
+
PAYOUT_UPDATED: Record<string, unknown>;
|
|
389
|
+
PAYOUT_COMPLETED: Record<string, unknown>;
|
|
390
|
+
/** A Stellar swap, or a Solana / Monad one (it carries `chain`). */
|
|
391
|
+
SWAP_CREATED: SwapData | ChainSwapData;
|
|
392
|
+
SWAP_SUBMITTED: SwapData | ChainSwapData;
|
|
393
|
+
SWAP_SUCCEEDED: SwapData | ChainSwapData;
|
|
394
|
+
SWAP_FAILED: SwapData | ChainSwapData;
|
|
395
|
+
LIQUIDITY_CREATED: LiquidityOperationData;
|
|
396
|
+
LIQUIDITY_SUBMITTED: LiquidityOperationData;
|
|
397
|
+
LIQUIDITY_SUCCEEDED: LiquidityOperationData;
|
|
398
|
+
LIQUIDITY_FAILED: LiquidityOperationData;
|
|
399
|
+
CROSS_CHAIN_SWAP_CREATED: CrossChainSwapData;
|
|
400
|
+
CROSS_CHAIN_SWAP_UPDATED: CrossChainSwapData;
|
|
401
|
+
CROSS_CHAIN_SWAP_SUCCEEDED: CrossChainSwapData;
|
|
402
|
+
CROSS_CHAIN_SWAP_REFUNDED: CrossChainSwapData;
|
|
403
|
+
CROSS_CHAIN_SWAP_FAILED: CrossChainSwapData;
|
|
404
|
+
CROSS_CHAIN_SWAP_EXPIRED: CrossChainSwapData;
|
|
405
|
+
}
|
|
406
|
+
/** One webhook event of a known type, with `data` typed for it. */
|
|
407
|
+
type TypedWebhookEvent<K extends keyof WebhookEventDataMap> = Omit<WebhookEvent<WebhookEventDataMap[K]>, 'type'> & {
|
|
408
|
+
type: K;
|
|
409
|
+
};
|
|
410
|
+
/** Any webhook event — narrow on `type` to get `data` typed. */
|
|
411
|
+
type AnyWebhookEvent = {
|
|
412
|
+
[K in keyof WebhookEventDataMap]: TypedWebhookEvent<K>;
|
|
413
|
+
}[keyof WebhookEventDataMap];
|
|
414
|
+
/** Body for `POST /v1/products`. */
|
|
415
|
+
interface CreateProductOptions {
|
|
416
|
+
name: string;
|
|
417
|
+
description?: string;
|
|
418
|
+
/** Decimal price (≤ 7 decimals). Omit for a customer-set amount. */
|
|
419
|
+
amount?: string;
|
|
420
|
+
/** Asset code the price is in. Omit for native lumens (XLM). */
|
|
421
|
+
assetCode?: string;
|
|
422
|
+
kind?: ProductKind;
|
|
423
|
+
active?: boolean;
|
|
424
|
+
reference?: string;
|
|
425
|
+
}
|
|
426
|
+
/** Body for `PATCH /v1/products/:id`. */
|
|
427
|
+
type UpdateProductOptions = Partial<CreateProductOptions>;
|
|
428
|
+
/** Raw product payload. */
|
|
429
|
+
interface ProductData {
|
|
430
|
+
id: string;
|
|
431
|
+
name: string;
|
|
432
|
+
description: string | null;
|
|
433
|
+
amount: string | null;
|
|
434
|
+
asset: string;
|
|
435
|
+
kind: ProductKind;
|
|
436
|
+
active: boolean;
|
|
437
|
+
reference: string | null;
|
|
438
|
+
createdAt: string;
|
|
439
|
+
updatedAt: string;
|
|
440
|
+
}
|
|
441
|
+
/** Body for `POST /v1/customers`. */
|
|
442
|
+
interface CreateCustomerOptions {
|
|
443
|
+
name: string;
|
|
444
|
+
alias?: string;
|
|
445
|
+
note?: string;
|
|
446
|
+
email?: string;
|
|
447
|
+
/** Optional Stellar account to associate the customer with. */
|
|
448
|
+
account?: string;
|
|
449
|
+
reference?: string;
|
|
450
|
+
}
|
|
451
|
+
/** Body for `PATCH /v1/customers/:id`. */
|
|
452
|
+
type UpdateCustomerOptions = Partial<CreateCustomerOptions>;
|
|
453
|
+
/**
|
|
454
|
+
* Raw customer payload.
|
|
455
|
+
*
|
|
456
|
+
* There is no `consumerId`: the API stopped sending it, because the owning
|
|
457
|
+
* consumer is the key that made the call and an internal id is not part of the
|
|
458
|
+
* contract.
|
|
459
|
+
*/
|
|
460
|
+
interface CustomerData {
|
|
461
|
+
id: string;
|
|
462
|
+
name: string;
|
|
463
|
+
alias: string | null;
|
|
464
|
+
note: string | null;
|
|
465
|
+
email: string | null;
|
|
466
|
+
account: string | null;
|
|
467
|
+
reference: string | null;
|
|
468
|
+
createdAt: string;
|
|
469
|
+
updatedAt: string;
|
|
470
|
+
/** Derived on-chain stats (present in list responses). */
|
|
471
|
+
payments?: number;
|
|
472
|
+
succeeded?: number;
|
|
473
|
+
total?: string;
|
|
474
|
+
}
|
|
475
|
+
/** Raw `{ data, total }` list of customers. */
|
|
476
|
+
interface CustomerListData {
|
|
477
|
+
data: CustomerData[];
|
|
478
|
+
total: number;
|
|
479
|
+
}
|
|
480
|
+
interface AnalyticsVolumeEntry {
|
|
481
|
+
asset: string;
|
|
482
|
+
amount: string;
|
|
483
|
+
count: number;
|
|
484
|
+
}
|
|
485
|
+
interface AnalyticsSeriesPoint {
|
|
486
|
+
date: string;
|
|
487
|
+
count: number;
|
|
488
|
+
volume: string;
|
|
489
|
+
}
|
|
490
|
+
interface AnalyticsRecentRow {
|
|
491
|
+
id: string;
|
|
492
|
+
kind: string;
|
|
493
|
+
status: PaymentIntentStatus;
|
|
494
|
+
amount: string | null;
|
|
495
|
+
asset: string;
|
|
496
|
+
destination: string;
|
|
497
|
+
createdAt: string;
|
|
498
|
+
}
|
|
499
|
+
/** Raw overview metrics returned by `GET /v1/summary`. */
|
|
500
|
+
interface AnalyticsSummaryData {
|
|
501
|
+
totals: {
|
|
502
|
+
all: number;
|
|
503
|
+
succeeded: number;
|
|
504
|
+
pending: number;
|
|
505
|
+
submitted: number;
|
|
506
|
+
failed: number;
|
|
507
|
+
cancelled: number;
|
|
508
|
+
expired: number;
|
|
509
|
+
successRate: number;
|
|
510
|
+
};
|
|
511
|
+
volume: AnalyticsVolumeEntry[];
|
|
512
|
+
webhooks: {
|
|
513
|
+
endpoints: number;
|
|
514
|
+
deliveries: number;
|
|
515
|
+
failedDeliveries: number;
|
|
516
|
+
};
|
|
517
|
+
customers: number;
|
|
518
|
+
series: AnalyticsSeriesPoint[];
|
|
519
|
+
recent: AnalyticsRecentRow[];
|
|
520
|
+
}
|
|
521
|
+
interface AnalyticsBalanceEntry {
|
|
522
|
+
asset: string;
|
|
523
|
+
amount: string;
|
|
524
|
+
pending: string;
|
|
525
|
+
count: number;
|
|
526
|
+
}
|
|
527
|
+
/** Raw balances returned by `GET /v1/balances`. */
|
|
528
|
+
interface AnalyticsBalancesData {
|
|
529
|
+
data: AnalyticsBalanceEntry[];
|
|
530
|
+
total: number;
|
|
531
|
+
}
|
|
532
|
+
interface ApiLogRow {
|
|
533
|
+
id: string;
|
|
534
|
+
method: string;
|
|
535
|
+
path: string;
|
|
536
|
+
statusCode: number;
|
|
537
|
+
durationMs: number;
|
|
538
|
+
ip: string | null;
|
|
539
|
+
userAgent: string | null;
|
|
540
|
+
status: 'ok' | 'pending' | 'fail';
|
|
541
|
+
at: string;
|
|
542
|
+
}
|
|
543
|
+
/** Raw API request log returned by `GET /v1/logs`. */
|
|
544
|
+
interface ApiLogsData {
|
|
545
|
+
data: ApiLogRow[];
|
|
546
|
+
total: number;
|
|
547
|
+
}
|
|
548
|
+
interface WebhookLogRow {
|
|
549
|
+
id: string;
|
|
550
|
+
endpointId: string;
|
|
551
|
+
url: string | null;
|
|
552
|
+
eventType: WebhookEventType;
|
|
553
|
+
eventId: string;
|
|
554
|
+
attempts: number;
|
|
555
|
+
responseStatus: number | null;
|
|
556
|
+
error: string | null;
|
|
557
|
+
status: 'ok' | 'pending' | 'fail';
|
|
558
|
+
at: string;
|
|
559
|
+
}
|
|
560
|
+
/** Raw webhook delivery log returned by `GET /v1/logs/webhooks`. */
|
|
561
|
+
interface WebhookLogsData {
|
|
562
|
+
data: WebhookLogRow[];
|
|
563
|
+
total: number;
|
|
564
|
+
}
|
|
565
|
+
interface HealthCheckData {
|
|
566
|
+
status: string;
|
|
567
|
+
info?: Record<string, {
|
|
568
|
+
status: string;
|
|
569
|
+
} & Record<string, unknown>> | null;
|
|
570
|
+
error?: Record<string, {
|
|
571
|
+
status: string;
|
|
572
|
+
} & Record<string, unknown>> | null;
|
|
573
|
+
details?: Record<string, {
|
|
574
|
+
status: string;
|
|
575
|
+
} & Record<string, unknown>>;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* The chain a same-chain swap runs on. `stellar` (the default when omitted) is
|
|
579
|
+
* the Stellar DEX; `solana` goes through Jupiter and `monad` through Kuru Flow,
|
|
580
|
+
* both mainnet only.
|
|
581
|
+
*/
|
|
582
|
+
type SwapChain = 'stellar' | 'solana' | 'monad';
|
|
583
|
+
/** The chains off Stellar, whose swaps come back as a {@link ChainSwapData}. */
|
|
584
|
+
type OtherSwapChain = Exclude<SwapChain, 'stellar'>;
|
|
585
|
+
/** Body for `POST /v1/swaps/quote` (pricing only; no fee parameter — the fee is enforced server-side per organization). */
|
|
586
|
+
interface QuoteSwapOptions {
|
|
587
|
+
/** Which chain to swap on. Omitted means Stellar. */
|
|
588
|
+
chain?: SwapChain;
|
|
589
|
+
/** Amount to send, as a decimal string in the asset's own units (max 7 decimals on Stellar). */
|
|
590
|
+
amount: string;
|
|
591
|
+
/**
|
|
592
|
+
* Stellar: asset code (omit, `XLM` or `native` for lumens). Solana / Monad:
|
|
593
|
+
* `SOL` / `MON`, `native`, or the SPL mint / ERC-20 address.
|
|
594
|
+
*/
|
|
595
|
+
sourceAssetCode?: string;
|
|
596
|
+
/** Stellar only: issuer account for a non-native source asset. */
|
|
597
|
+
sourceAssetIssuer?: string;
|
|
598
|
+
/** The asset the swap should deliver, spelled as for `sourceAssetCode`. */
|
|
599
|
+
destAssetCode: string;
|
|
600
|
+
/** Stellar only: issuer account for a non-native destination asset. */
|
|
601
|
+
destAssetIssuer?: string;
|
|
602
|
+
/** Allowed slippage in basis points. */
|
|
603
|
+
slippageBps?: number;
|
|
604
|
+
}
|
|
605
|
+
/** Body for `POST /v1/swaps`. */
|
|
606
|
+
interface CreateSwapOptions extends QuoteSwapOptions {
|
|
607
|
+
/** Source account performing (and signing) the swap, on `chain`. A registered address-book name also works on Stellar. */
|
|
608
|
+
source: string;
|
|
609
|
+
/** Stellar only: account that receives the swapped asset. Defaults to the source. */
|
|
610
|
+
destination?: string;
|
|
611
|
+
/** Stellar only: MEMO_ID (numeric uint64) for idempotency + on-chain identification. */
|
|
612
|
+
memo?: string;
|
|
613
|
+
/** Idempotency key (the `Idempotency-Key` header is preferred when both are set). */
|
|
614
|
+
idempotencyKey?: string;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Body for `POST /v1/swaps/:id/submit`: `signedXdr` for a Stellar swap,
|
|
618
|
+
* `signedTransaction` for a Solana or Monad one.
|
|
619
|
+
*/
|
|
620
|
+
type SubmitSwapOptions = {
|
|
621
|
+
/** Signed transaction envelope (base64 XDR) to relay to the Stellar network. */
|
|
622
|
+
signedXdr: string;
|
|
623
|
+
signedTransaction?: never;
|
|
624
|
+
} | {
|
|
625
|
+
/**
|
|
626
|
+
* Solana: base64 wire bytes of the signed VersionedTransaction. Monad: the
|
|
627
|
+
* `0x`-hex raw signed EIP-1559 transaction.
|
|
628
|
+
*/
|
|
629
|
+
signedTransaction: string;
|
|
630
|
+
signedXdr?: never;
|
|
631
|
+
};
|
|
632
|
+
/** Query for `GET /v1/swaps`. */
|
|
633
|
+
interface ListSwapsOptions {
|
|
634
|
+
/** Which chain to list. Omitted means Stellar. */
|
|
635
|
+
chain?: SwapChain;
|
|
636
|
+
status?: SwapStatus;
|
|
637
|
+
/** Page size (max 100, default 20). */
|
|
638
|
+
take?: number;
|
|
639
|
+
/** Offset (default 0). */
|
|
640
|
+
skip?: number;
|
|
641
|
+
}
|
|
642
|
+
/** Raw swap payload returned by the API. */
|
|
643
|
+
interface SwapData {
|
|
644
|
+
id: string;
|
|
645
|
+
status: SwapStatus;
|
|
646
|
+
network: string;
|
|
647
|
+
source: string;
|
|
648
|
+
destination: string;
|
|
649
|
+
sendAsset: string;
|
|
650
|
+
sendAssetIssuer: string | null;
|
|
651
|
+
sendAmount: string;
|
|
652
|
+
feeAmount: string;
|
|
653
|
+
feeBps: number;
|
|
654
|
+
swapAmount: string;
|
|
655
|
+
destAsset: string;
|
|
656
|
+
destAssetIssuer: string | null;
|
|
657
|
+
destEstimated: string;
|
|
658
|
+
destMin: string;
|
|
659
|
+
slippageBps: number;
|
|
660
|
+
path: {
|
|
661
|
+
code: string;
|
|
662
|
+
issuer: string | null;
|
|
663
|
+
}[];
|
|
664
|
+
memo: string | null;
|
|
665
|
+
xdr: string;
|
|
666
|
+
uri: string;
|
|
667
|
+
txHash: string;
|
|
668
|
+
qr: string;
|
|
669
|
+
createdAt: string;
|
|
670
|
+
updatedAt: string;
|
|
671
|
+
}
|
|
672
|
+
/** Raw paginated list of swaps. */
|
|
673
|
+
interface SwapListData {
|
|
674
|
+
data: SwapData[];
|
|
675
|
+
total: number;
|
|
676
|
+
take: number;
|
|
677
|
+
skip: number;
|
|
678
|
+
}
|
|
679
|
+
/** Raw pricing quote returned by `POST /v1/swaps/quote`. */
|
|
680
|
+
interface SwapQuoteData {
|
|
681
|
+
network: string;
|
|
682
|
+
/** Solana and Monad quotes only. */
|
|
683
|
+
chain?: OtherSwapChain;
|
|
684
|
+
/** The aggregator that priced a Solana or Monad swap. */
|
|
685
|
+
provider?: 'jupiter' | 'kuru';
|
|
686
|
+
source: {
|
|
687
|
+
asset: string;
|
|
688
|
+
issuer: string | null;
|
|
689
|
+
amount: string;
|
|
690
|
+
};
|
|
691
|
+
/** Stellar takes the fee from the source asset; Solana and Monad from the output (`asset` says which). */
|
|
692
|
+
fee: {
|
|
693
|
+
asset: string;
|
|
694
|
+
issuer: string | null;
|
|
695
|
+
amount: string;
|
|
696
|
+
bps: number;
|
|
697
|
+
wallet: string | null;
|
|
698
|
+
};
|
|
699
|
+
swap: {
|
|
700
|
+
asset: string;
|
|
701
|
+
issuer: string | null;
|
|
702
|
+
amount: string;
|
|
703
|
+
};
|
|
704
|
+
destination: {
|
|
705
|
+
asset: string;
|
|
706
|
+
issuer: string | null;
|
|
707
|
+
estimated: string;
|
|
708
|
+
minimum: string;
|
|
709
|
+
slippageBps: number;
|
|
710
|
+
};
|
|
711
|
+
path: {
|
|
712
|
+
code: string;
|
|
713
|
+
issuer: string | null;
|
|
714
|
+
}[];
|
|
715
|
+
}
|
|
716
|
+
/** Raw outcome of relaying a signed swap transaction. */
|
|
717
|
+
interface SwapSubmitOutcomeData {
|
|
718
|
+
submitted: boolean;
|
|
719
|
+
status: SwapStatus;
|
|
720
|
+
txHash?: string;
|
|
721
|
+
reason?: string;
|
|
722
|
+
resultCodes?: string[];
|
|
723
|
+
swap: SwapData;
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* What a Solana or Monad swap's wallet signs. Solana: an unsigned
|
|
727
|
+
* VersionedTransaction; Monad: a call the wallet signs as an EIP-1559
|
|
728
|
+
* transaction, filling in nonce and gas itself.
|
|
729
|
+
*/
|
|
730
|
+
type ChainSwapTransaction = {
|
|
731
|
+
encoding: 'base64';
|
|
732
|
+
data: string;
|
|
733
|
+
lastValidBlockHeight?: number;
|
|
734
|
+
} | {
|
|
735
|
+
to: string;
|
|
736
|
+
data: string;
|
|
737
|
+
value: string;
|
|
738
|
+
chainId: number;
|
|
739
|
+
};
|
|
740
|
+
/** An EVM call the wallet sends itself (a Monad ERC-20 `approve`). */
|
|
741
|
+
interface EvmCallData {
|
|
742
|
+
to: string;
|
|
743
|
+
data: string;
|
|
744
|
+
value: string;
|
|
745
|
+
chainId: number;
|
|
746
|
+
}
|
|
747
|
+
/** Raw Solana or Monad swap (`chain_swap`), built by Jupiter or Kuru Flow. */
|
|
748
|
+
interface ChainSwapData {
|
|
749
|
+
id: string;
|
|
750
|
+
chain: OtherSwapChain;
|
|
751
|
+
/** Always `public`: the aggregators run on mainnet only. */
|
|
752
|
+
network: string;
|
|
753
|
+
provider: 'jupiter' | 'kuru';
|
|
754
|
+
status: SwapStatus;
|
|
755
|
+
/** The wallet that signs, pays and receives. */
|
|
756
|
+
source: string;
|
|
757
|
+
/** `native` (SOL / MON), or the SPL mint / ERC-20 address. */
|
|
758
|
+
sendAsset: string;
|
|
759
|
+
sendAmount: string;
|
|
760
|
+
destAsset: string;
|
|
761
|
+
/** Quoted output, net of the commission. */
|
|
762
|
+
destEstimated: string;
|
|
763
|
+
/** On-chain minimum after slippage. */
|
|
764
|
+
destMin: string;
|
|
765
|
+
feeBps: number;
|
|
766
|
+
/** The commission, in the destination asset (taken from the output). */
|
|
767
|
+
feeAmount: string;
|
|
768
|
+
slippageBps: number;
|
|
769
|
+
path: {
|
|
770
|
+
code: string;
|
|
771
|
+
issuer: string | null;
|
|
772
|
+
}[];
|
|
773
|
+
transaction: ChainSwapTransaction;
|
|
774
|
+
/** Monad, selling an ERC-20 with too small an allowance: send and confirm this first. */
|
|
775
|
+
approval: EvmCallData | null;
|
|
776
|
+
/** The Solana signature / EVM hash, once submitted. */
|
|
777
|
+
txHash: string | null;
|
|
778
|
+
idempotencyKey: string | null;
|
|
779
|
+
/** Submit refuses the transaction after this; build a new swap. */
|
|
780
|
+
expiresAt: string;
|
|
781
|
+
createdAt: string;
|
|
782
|
+
updatedAt: string;
|
|
783
|
+
}
|
|
784
|
+
/** Raw paginated list of Solana or Monad swaps. */
|
|
785
|
+
interface ChainSwapListData {
|
|
786
|
+
data: ChainSwapData[];
|
|
787
|
+
total: number;
|
|
788
|
+
take: number;
|
|
789
|
+
skip: number;
|
|
790
|
+
}
|
|
791
|
+
/** Raw outcome of relaying a signed Solana or Monad swap. */
|
|
792
|
+
interface ChainSwapSubmitOutcomeData {
|
|
793
|
+
submitted: boolean;
|
|
794
|
+
status: SwapStatus;
|
|
795
|
+
txHash: string;
|
|
796
|
+
swap: ChainSwapData;
|
|
797
|
+
}
|
|
798
|
+
/** Where a cross-chain swap stands. SUCCEEDED, REFUNDED and FAILED are final. */
|
|
799
|
+
declare const CrossChainSwapStatus: {
|
|
800
|
+
readonly AwaitingDeposit: "AWAITING_DEPOSIT";
|
|
801
|
+
readonly DepositDetected: "DEPOSIT_DETECTED";
|
|
802
|
+
readonly IncompleteDeposit: "INCOMPLETE_DEPOSIT";
|
|
803
|
+
readonly Processing: "PROCESSING";
|
|
804
|
+
readonly Succeeded: "SUCCEEDED";
|
|
805
|
+
readonly Refunded: "REFUNDED";
|
|
806
|
+
readonly Failed: "FAILED";
|
|
807
|
+
readonly Expired: "EXPIRED";
|
|
808
|
+
};
|
|
809
|
+
type CrossChainSwapStatus = (typeof CrossChainSwapStatus)[keyof typeof CrossChainSwapStatus];
|
|
810
|
+
/** A token NEAR Intents can swap on one of the supported chains. */
|
|
811
|
+
interface CrossChainAssetData {
|
|
812
|
+
chain: SwapChain;
|
|
813
|
+
symbol: string;
|
|
814
|
+
/** NEAR Intents' id for the asset. */
|
|
815
|
+
assetId: string;
|
|
816
|
+
decimals: number;
|
|
817
|
+
/** SPL mint, ERC-20 address or Stellar issuer; null for the native coin. */
|
|
818
|
+
contract: string | null;
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Body for `POST /v1/cross-chain-swaps/quote`. Both legs on one chain is not a
|
|
822
|
+
* cross-chain swap — use `client.swaps` with `chain`.
|
|
823
|
+
*/
|
|
824
|
+
interface QuoteCrossChainSwapOptions {
|
|
825
|
+
originChain: SwapChain;
|
|
826
|
+
/** Native ticker, a symbol listed once, a contract, or Stellar `CODE:ISSUER`. */
|
|
827
|
+
originAsset: string;
|
|
828
|
+
destinationChain: SwapChain;
|
|
829
|
+
destinationAsset: string;
|
|
830
|
+
/** Gross amount of the origin asset, in its own units. */
|
|
831
|
+
amount: string;
|
|
832
|
+
/** Who receives the output, on `destinationChain`. */
|
|
833
|
+
recipient: string;
|
|
834
|
+
/** Where a failed or late deposit is refunded, on `originChain`. */
|
|
835
|
+
refundTo: string;
|
|
836
|
+
slippageBps?: number;
|
|
837
|
+
}
|
|
838
|
+
/** Body for `POST /v1/cross-chain-swaps`. */
|
|
839
|
+
interface CreateCrossChainSwapOptions extends QuoteCrossChainSwapOptions {
|
|
840
|
+
idempotencyKey?: string;
|
|
841
|
+
}
|
|
842
|
+
/** Raw cross-chain quote. */
|
|
843
|
+
interface CrossChainQuoteData {
|
|
844
|
+
network: string;
|
|
845
|
+
origin: {
|
|
846
|
+
chain: SwapChain;
|
|
847
|
+
asset: string;
|
|
848
|
+
assetId: string;
|
|
849
|
+
contract: string | null;
|
|
850
|
+
amount: string;
|
|
851
|
+
amountUsd: string | null;
|
|
852
|
+
};
|
|
853
|
+
destination: {
|
|
854
|
+
chain: SwapChain;
|
|
855
|
+
asset: string;
|
|
856
|
+
assetId: string;
|
|
857
|
+
contract: string | null;
|
|
858
|
+
amount: string;
|
|
859
|
+
amountUsd: string | null;
|
|
860
|
+
/** Below this NEAR Intents refunds instead of filling. */
|
|
861
|
+
minimum: string;
|
|
862
|
+
};
|
|
863
|
+
/** The plan commission, taken by NEAR Intents out of the input. */
|
|
864
|
+
fee: {
|
|
865
|
+
bps: number;
|
|
866
|
+
amount: string;
|
|
867
|
+
asset: string;
|
|
868
|
+
};
|
|
869
|
+
slippageBps: number;
|
|
870
|
+
timeEstimateSeconds: number;
|
|
871
|
+
}
|
|
872
|
+
/** A settlement transaction NEAR Intents reports. */
|
|
873
|
+
interface CrossChainTransactionData {
|
|
874
|
+
hash: string;
|
|
875
|
+
explorerUrl: string;
|
|
876
|
+
}
|
|
877
|
+
/** Raw cross-chain swap. */
|
|
878
|
+
interface CrossChainSwapData {
|
|
879
|
+
id: string;
|
|
880
|
+
status: CrossChainSwapStatus;
|
|
881
|
+
/** NEAR Intents' own status word, verbatim. */
|
|
882
|
+
providerStatus: string;
|
|
883
|
+
network: string;
|
|
884
|
+
originChain: SwapChain;
|
|
885
|
+
originAsset: string;
|
|
886
|
+
originContract: string | null;
|
|
887
|
+
destinationChain: SwapChain;
|
|
888
|
+
destinationAsset: string;
|
|
889
|
+
destinationContract: string | null;
|
|
890
|
+
amountIn: string;
|
|
891
|
+
feeBps: number;
|
|
892
|
+
feeAmount: string;
|
|
893
|
+
amountOutEstimated: string;
|
|
894
|
+
amountOutMin: string;
|
|
895
|
+
slippageBps: number;
|
|
896
|
+
recipient: string;
|
|
897
|
+
refundTo: string;
|
|
898
|
+
/** Send exactly `amountIn` of the origin asset here. */
|
|
899
|
+
depositAddress: string;
|
|
900
|
+
/** Stellar only, and required: attach it as a MEMO_TEXT. */
|
|
901
|
+
depositMemo: string | null;
|
|
902
|
+
/** The deposit as a wallet link: SEP-7 pay, Solana Pay or EIP-681. */
|
|
903
|
+
depositUri: string;
|
|
904
|
+
/** QR of `depositUri` (PNG data URL); absent from list rows. */
|
|
905
|
+
qr?: string;
|
|
906
|
+
depositTxHash: string | null;
|
|
907
|
+
amountOut: string | null;
|
|
908
|
+
refundedAmount: string | null;
|
|
909
|
+
originTxHashes: CrossChainTransactionData[] | null;
|
|
910
|
+
destinationTxHashes: CrossChainTransactionData[] | null;
|
|
911
|
+
timeEstimateSeconds: number;
|
|
912
|
+
correlationId: string;
|
|
913
|
+
/** NEAR Intents' signature over the quote and deposit address — keep it. */
|
|
914
|
+
quoteSignature: string;
|
|
915
|
+
idempotencyKey: string | null;
|
|
916
|
+
expiresAt: string;
|
|
917
|
+
createdAt: string;
|
|
918
|
+
updatedAt: string;
|
|
919
|
+
}
|
|
920
|
+
/** Query for `GET /v1/cross-chain-swaps`. */
|
|
921
|
+
interface ListCrossChainSwapsOptions {
|
|
922
|
+
status?: CrossChainSwapStatus;
|
|
923
|
+
take?: number;
|
|
924
|
+
skip?: number;
|
|
925
|
+
}
|
|
926
|
+
/** Raw paginated list of cross-chain swaps. */
|
|
927
|
+
interface CrossChainSwapListData {
|
|
928
|
+
data: CrossChainSwapData[];
|
|
929
|
+
total: number;
|
|
930
|
+
take: number;
|
|
931
|
+
skip: number;
|
|
932
|
+
}
|
|
933
|
+
/** Body for `POST /v1/liquidity-pools/deposit`. */
|
|
934
|
+
interface DepositLiquidityOptions {
|
|
935
|
+
/** Account whose funds go in, and which signs. An address-book name also works. */
|
|
936
|
+
source: string;
|
|
937
|
+
/** Asset A code. Omit (or `XLM`/`native`) for native lumens. */
|
|
938
|
+
assetACode?: string;
|
|
939
|
+
/** Issuer for a non-native asset A. */
|
|
940
|
+
assetAIssuer?: string;
|
|
941
|
+
/** Asset B code. */
|
|
942
|
+
assetBCode?: string;
|
|
943
|
+
/** Issuer for a non-native asset B. */
|
|
944
|
+
assetBIssuer?: string;
|
|
945
|
+
/** Ceiling on how much of asset A may go in, as a decimal string. */
|
|
946
|
+
maxAmountA: string;
|
|
947
|
+
/** Ceiling on how much of asset B may go in. */
|
|
948
|
+
maxAmountB: string;
|
|
949
|
+
/** Allowed price movement in basis points. */
|
|
950
|
+
slippageBps?: number;
|
|
951
|
+
/** MEMO_ID (numeric uint64) for on-chain identification. */
|
|
952
|
+
memo?: string;
|
|
953
|
+
/**
|
|
954
|
+
* Idempotency token. Sent both as the body field and as the `Idempotency-Key`
|
|
955
|
+
* header, which is what makes a retried deposit return the FIRST operation
|
|
956
|
+
* instead of building a second one against the same funds.
|
|
957
|
+
*/
|
|
958
|
+
idempotencyKey?: string;
|
|
959
|
+
}
|
|
960
|
+
/** Body for `POST /v1/liquidity-pools/withdraw`. */
|
|
961
|
+
interface WithdrawLiquidityOptions {
|
|
962
|
+
/** Account holding the shares, and which signs. */
|
|
963
|
+
source: string;
|
|
964
|
+
/** The pool to withdraw from (hex id). */
|
|
965
|
+
poolId: string;
|
|
966
|
+
/** Pool shares to burn, as a decimal string. */
|
|
967
|
+
shares: string;
|
|
968
|
+
/** Allowed price movement in basis points. */
|
|
969
|
+
slippageBps?: number;
|
|
970
|
+
memo?: string;
|
|
971
|
+
/** See {@link DepositLiquidityOptions.idempotencyKey}. */
|
|
972
|
+
idempotencyKey?: string;
|
|
973
|
+
}
|
|
974
|
+
/** Body for `POST /v1/liquidity-pools/operations/:id/submit`. */
|
|
975
|
+
interface SubmitLiquidityOptions {
|
|
976
|
+
/** Signed transaction envelope (base64 XDR) to relay to the network. */
|
|
977
|
+
signedXdr: string;
|
|
978
|
+
}
|
|
979
|
+
/** Query for `GET /v1/liquidity-pools/operations`. */
|
|
980
|
+
interface ListLiquidityOperationsOptions {
|
|
981
|
+
kind?: LiquidityOperationKind;
|
|
982
|
+
status?: LiquidityOperationStatus;
|
|
983
|
+
/** Page size (max 100, default 20). */
|
|
984
|
+
take?: number;
|
|
985
|
+
/** Offset (default 0). */
|
|
986
|
+
skip?: number;
|
|
987
|
+
}
|
|
988
|
+
/** Query for `GET /v1/liquidity-pools` (Horizon proxy). */
|
|
989
|
+
interface BrowseLiquidityPoolsOptions {
|
|
990
|
+
assetACode?: string;
|
|
991
|
+
assetAIssuer?: string;
|
|
992
|
+
assetBCode?: string;
|
|
993
|
+
assetBIssuer?: string;
|
|
994
|
+
/** Only pools this account holds shares in. */
|
|
995
|
+
account?: string;
|
|
996
|
+
/** Horizon paging cursor from a previous page. */
|
|
997
|
+
cursor?: string;
|
|
998
|
+
limit?: number;
|
|
999
|
+
}
|
|
1000
|
+
/** One side of a pool's reserves. */
|
|
1001
|
+
interface LiquidityReserveData {
|
|
1002
|
+
asset: string;
|
|
1003
|
+
issuer: string | null;
|
|
1004
|
+
amount: string;
|
|
1005
|
+
}
|
|
1006
|
+
/** Raw on-chain pool payload (Horizon proxy). */
|
|
1007
|
+
interface LiquidityPoolData {
|
|
1008
|
+
id: string;
|
|
1009
|
+
network: string;
|
|
1010
|
+
/** Pool fee in basis points — 30 for every constant-product pool today. */
|
|
1011
|
+
feeBp: number;
|
|
1012
|
+
totalTrustlines: string;
|
|
1013
|
+
totalShares: string;
|
|
1014
|
+
reserves: LiquidityReserveData[];
|
|
1015
|
+
}
|
|
1016
|
+
/** Raw cursor-paginated list of pools. */
|
|
1017
|
+
interface LiquidityPoolListData {
|
|
1018
|
+
data: LiquidityPoolData[];
|
|
1019
|
+
cursor?: string | null;
|
|
1020
|
+
}
|
|
1021
|
+
/** One account's stake in one pool. */
|
|
1022
|
+
interface LiquidityPositionData {
|
|
1023
|
+
poolId: string;
|
|
1024
|
+
/** Shares this account holds. */
|
|
1025
|
+
shares: string;
|
|
1026
|
+
/** Shares in existence. */
|
|
1027
|
+
totalShares: string;
|
|
1028
|
+
/** The account's share of the pool, in basis points. */
|
|
1029
|
+
shareOfPoolBps: number;
|
|
1030
|
+
reserves: LiquidityReserveData[];
|
|
1031
|
+
/** What those shares would redeem for right now. */
|
|
1032
|
+
redeemable: LiquidityReserveData[];
|
|
1033
|
+
}
|
|
1034
|
+
/** Raw payload of `GET /v1/liquidity-pools/positions`. */
|
|
1035
|
+
interface LiquidityPositionsData {
|
|
1036
|
+
account: string;
|
|
1037
|
+
network: string;
|
|
1038
|
+
data: LiquidityPositionData[];
|
|
1039
|
+
}
|
|
1040
|
+
/** Raw liquidity operation payload returned by the API. */
|
|
1041
|
+
interface LiquidityOperationData {
|
|
1042
|
+
id: string;
|
|
1043
|
+
kind: LiquidityOperationKind;
|
|
1044
|
+
status: LiquidityOperationStatus;
|
|
1045
|
+
network: string;
|
|
1046
|
+
source: string;
|
|
1047
|
+
poolId: string;
|
|
1048
|
+
assetA: string;
|
|
1049
|
+
assetAIssuer: string | null;
|
|
1050
|
+
assetB: string;
|
|
1051
|
+
assetBIssuer: string | null;
|
|
1052
|
+
amountA: string;
|
|
1053
|
+
amountB: string;
|
|
1054
|
+
shares: string | null;
|
|
1055
|
+
minPrice: string | null;
|
|
1056
|
+
maxPrice: string | null;
|
|
1057
|
+
slippageBps: number;
|
|
1058
|
+
idempotencyKey: string | null;
|
|
1059
|
+
feeBps: number;
|
|
1060
|
+
feeAmountA: string;
|
|
1061
|
+
feeAmountB: string;
|
|
1062
|
+
feeWallet: string | null;
|
|
1063
|
+
commissionMemo: string | null;
|
|
1064
|
+
xdr: string;
|
|
1065
|
+
uri: string;
|
|
1066
|
+
txHash: string;
|
|
1067
|
+
qr: string;
|
|
1068
|
+
expiresAt: string | null;
|
|
1069
|
+
createdAt: string;
|
|
1070
|
+
updatedAt: string;
|
|
1071
|
+
}
|
|
1072
|
+
/** Raw paginated list of liquidity operations. */
|
|
1073
|
+
interface LiquidityOperationListData {
|
|
1074
|
+
data: LiquidityOperationData[];
|
|
1075
|
+
total: number;
|
|
1076
|
+
take: number;
|
|
1077
|
+
skip: number;
|
|
1078
|
+
}
|
|
1079
|
+
/** Raw outcome of relaying a signed liquidity transaction. */
|
|
1080
|
+
interface LiquiditySubmitOutcomeData {
|
|
1081
|
+
submitted: boolean;
|
|
1082
|
+
status: LiquidityOperationStatus;
|
|
1083
|
+
txHash?: string;
|
|
1084
|
+
reason?: string;
|
|
1085
|
+
resultCodes?: string[];
|
|
1086
|
+
operation: LiquidityOperationData;
|
|
1087
|
+
}
|
|
1088
|
+
/** Where an event came from. */
|
|
1089
|
+
type ActivitySource = 'wallet' | 'dashboard' | 'server' | 'sdk';
|
|
1090
|
+
/** Severity of an event. */
|
|
1091
|
+
type ActivityLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
1092
|
+
/** One event to report. Always batched — see {@link ReportActivityOptions}. */
|
|
1093
|
+
interface ActivityEventInput {
|
|
1094
|
+
/** Dotted event name, e.g. `payment.submitted`. */
|
|
1095
|
+
type: string;
|
|
1096
|
+
/**
|
|
1097
|
+
* Client-generated id. The service de-duplicates on it, which is what makes a
|
|
1098
|
+
* retried batch safe: the second delivery is counted as a duplicate rather than
|
|
1099
|
+
* stored twice.
|
|
1100
|
+
*/
|
|
1101
|
+
eventId?: string;
|
|
1102
|
+
source?: ActivitySource;
|
|
1103
|
+
level?: ActivityLevel;
|
|
1104
|
+
category?: string;
|
|
1105
|
+
message?: string;
|
|
1106
|
+
sessionId?: string;
|
|
1107
|
+
distinctId?: string;
|
|
1108
|
+
appVersion?: string;
|
|
1109
|
+
platform?: string;
|
|
1110
|
+
network?: string;
|
|
1111
|
+
durationMs?: number;
|
|
1112
|
+
/** Free-form properties. Never put secrets or memo text here. */
|
|
1113
|
+
props?: Record<string, unknown>;
|
|
1114
|
+
/** When it happened (ISO-8601). Defaults to arrival time. */
|
|
1115
|
+
occurredAt?: string;
|
|
1116
|
+
}
|
|
1117
|
+
/** Body for `POST /v1/activity/events`. */
|
|
1118
|
+
interface ReportActivityOptions {
|
|
1119
|
+
events: ActivityEventInput[];
|
|
1120
|
+
}
|
|
1121
|
+
/** Raw outcome of a reported batch. */
|
|
1122
|
+
interface ActivityReportData {
|
|
1123
|
+
accepted: number;
|
|
1124
|
+
/** Events whose `eventId` had already been stored. */
|
|
1125
|
+
duplicates: number;
|
|
1126
|
+
}
|
|
1127
|
+
/** Query for `GET /v1/activity/events`. */
|
|
1128
|
+
interface ListActivityOptions {
|
|
1129
|
+
take?: number;
|
|
1130
|
+
skip?: number;
|
|
1131
|
+
source?: ActivitySource;
|
|
1132
|
+
level?: ActivityLevel;
|
|
1133
|
+
category?: string;
|
|
1134
|
+
type?: string;
|
|
1135
|
+
network?: string;
|
|
1136
|
+
/** ISO-8601 lower bound (inclusive). */
|
|
1137
|
+
since?: string;
|
|
1138
|
+
/** ISO-8601 upper bound (exclusive). */
|
|
1139
|
+
until?: string;
|
|
1140
|
+
}
|
|
1141
|
+
/** One stored event. */
|
|
1142
|
+
interface ActivityEventData {
|
|
1143
|
+
id: string;
|
|
1144
|
+
source: string;
|
|
1145
|
+
level: string;
|
|
1146
|
+
category: string;
|
|
1147
|
+
type: string;
|
|
1148
|
+
message: string | null;
|
|
1149
|
+
sessionId: string | null;
|
|
1150
|
+
distinctId: string | null;
|
|
1151
|
+
appVersion: string | null;
|
|
1152
|
+
platform: string | null;
|
|
1153
|
+
network: string | null;
|
|
1154
|
+
durationMs: number | null;
|
|
1155
|
+
props: Record<string, unknown> | null;
|
|
1156
|
+
ip: string | null;
|
|
1157
|
+
userAgent: string | null;
|
|
1158
|
+
/** When it happened. */
|
|
1159
|
+
at: string;
|
|
1160
|
+
/** When the service stored it. */
|
|
1161
|
+
receivedAt: string;
|
|
1162
|
+
}
|
|
1163
|
+
/** Raw paginated list of events. */
|
|
1164
|
+
interface ActivityListData {
|
|
1165
|
+
data: ActivityEventData[];
|
|
1166
|
+
total: number;
|
|
1167
|
+
take: number;
|
|
1168
|
+
skip: number;
|
|
1169
|
+
}
|
|
1170
|
+
/** One `{ key, count }` bucket of an activity summary. */
|
|
1171
|
+
interface ActivityBucket {
|
|
1172
|
+
key: string;
|
|
1173
|
+
count: number;
|
|
1174
|
+
}
|
|
1175
|
+
/** Raw payload of `GET /v1/activity/summary`. */
|
|
1176
|
+
interface ActivitySummaryData {
|
|
1177
|
+
total: number;
|
|
1178
|
+
sessions: number;
|
|
1179
|
+
devices: number;
|
|
1180
|
+
levels: ActivityBucket[];
|
|
1181
|
+
sources: ActivityBucket[];
|
|
1182
|
+
categories: ActivityBucket[];
|
|
1183
|
+
topTypes: ActivityBucket[];
|
|
1184
|
+
topErrors: ActivityBucket[];
|
|
1185
|
+
series: {
|
|
1186
|
+
date: string;
|
|
1187
|
+
count: number;
|
|
1188
|
+
errors: number;
|
|
1189
|
+
}[];
|
|
1190
|
+
}
|
|
1191
|
+
/** Stablecoins the ramps settle in. */
|
|
1192
|
+
type RampToken = 'USDC' | 'USDT' | 'USDB';
|
|
1193
|
+
/** Which side of a quote the requested amount refers to. */
|
|
1194
|
+
type CurrencyType = 'sender' | 'receiver';
|
|
1195
|
+
/** Fiat rails a payin can arrive over. */
|
|
1196
|
+
type PayinMethod = 'ach' | 'wire' | 'pix' | 'ted' | 'spei' | 'transfers' | 'pse' | 'international_swift' | 'rtp';
|
|
1197
|
+
/** Payer restrictions, for the rails that require them. */
|
|
1198
|
+
interface PayinPayerRules {
|
|
1199
|
+
pix_allowed_tax_ids?: string[];
|
|
1200
|
+
transfers_allowed_tax_id?: string;
|
|
1201
|
+
pse_allowed_tax_ids?: string[];
|
|
1202
|
+
pse_full_name?: string;
|
|
1203
|
+
pse_document_type?: string;
|
|
1204
|
+
pse_document_number?: string;
|
|
1205
|
+
pse_email?: string;
|
|
1206
|
+
pse_phone?: string;
|
|
1207
|
+
pse_bank_code?: string;
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Body for `POST /v1/onramp/quotes`.
|
|
1211
|
+
*
|
|
1212
|
+
* The field names are snake_case because they are the RAMP PROVIDER's, and the
|
|
1213
|
+
* service passes them through unchanged. Renaming them here would look tidier and
|
|
1214
|
+
* would put a translation layer between two systems that already agree.
|
|
1215
|
+
*/
|
|
1216
|
+
interface CreatePayinQuoteOptions {
|
|
1217
|
+
/** Wallet that receives the converted stablecoin. */
|
|
1218
|
+
blockchain_wallet_id: string;
|
|
1219
|
+
currency_type: CurrencyType;
|
|
1220
|
+
payment_method: PayinMethod;
|
|
1221
|
+
token: RampToken;
|
|
1222
|
+
/** Amount in MINOR units (e.g. cents). */
|
|
1223
|
+
request_amount: number;
|
|
1224
|
+
cover_fees?: boolean;
|
|
1225
|
+
payer_rules?: PayinPayerRules;
|
|
1226
|
+
is_otc?: boolean;
|
|
1227
|
+
partner_fee_id?: string;
|
|
1228
|
+
wallet_id?: string;
|
|
1229
|
+
}
|
|
1230
|
+
/** Raw payin quote. Expires quickly — read `expires_at` before acting on it. */
|
|
1231
|
+
interface PayinQuoteData {
|
|
1232
|
+
id: string;
|
|
1233
|
+
/** Unix seconds (~5 minutes out). */
|
|
1234
|
+
expires_at: number;
|
|
1235
|
+
commercial_quotation?: number;
|
|
1236
|
+
receiver_amount?: number;
|
|
1237
|
+
sender_amount?: number;
|
|
1238
|
+
}
|
|
1239
|
+
/** Body for `POST /v1/onramp/payins`. */
|
|
1240
|
+
interface CreatePayinOptions {
|
|
1241
|
+
payin_quote_id: string;
|
|
1242
|
+
}
|
|
1243
|
+
/** Query for `GET /v1/onramp/payins`. */
|
|
1244
|
+
interface ListPayinsOptions {
|
|
1245
|
+
take?: number;
|
|
1246
|
+
skip?: number;
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* Raw payin. The scalar fields are mirrored locally; `instructions` is passed
|
|
1250
|
+
* through from the provider verbatim (memo / CLABE / PIX code / CBU / PSE link…),
|
|
1251
|
+
* so its shape depends on `paymentMethod` and is deliberately not narrowed here.
|
|
1252
|
+
*/
|
|
1253
|
+
interface PayinData {
|
|
1254
|
+
id: string;
|
|
1255
|
+
blindpayId: string;
|
|
1256
|
+
status: string | null;
|
|
1257
|
+
token: string | null;
|
|
1258
|
+
network: string | null;
|
|
1259
|
+
paymentMethod: string | null;
|
|
1260
|
+
/** Minor units, as a decimal string. */
|
|
1261
|
+
senderAmount: string | null;
|
|
1262
|
+
receiverAmount: string | null;
|
|
1263
|
+
instructions: unknown;
|
|
1264
|
+
createdAt: string;
|
|
1265
|
+
}
|
|
1266
|
+
/** Raw paginated list of payins. */
|
|
1267
|
+
interface PayinListData {
|
|
1268
|
+
data: PayinData[];
|
|
1269
|
+
total: number;
|
|
1270
|
+
take: number;
|
|
1271
|
+
skip: number;
|
|
1272
|
+
}
|
|
1273
|
+
/** Body for `POST /v1/onramp/trustline`. */
|
|
1274
|
+
interface CreateTrustlineOptions {
|
|
1275
|
+
/** Stellar address that needs the asset trustline. */
|
|
1276
|
+
address: string;
|
|
1277
|
+
}
|
|
1278
|
+
/**
|
|
1279
|
+
* Raw trustline response — a provider passthrough, which is why it is an open
|
|
1280
|
+
* shape. It carries the unsigned envelope the customer signs; a wallet reads `xdr`
|
|
1281
|
+
* off it and must put that through its own signing guard before signing.
|
|
1282
|
+
*/
|
|
1283
|
+
interface TrustlineData {
|
|
1284
|
+
xdr?: string;
|
|
1285
|
+
[key: string]: unknown;
|
|
1286
|
+
}
|
|
1287
|
+
/** Banking partners a virtual account can be opened with. */
|
|
1288
|
+
type BankingPartner = 'jpmorgan' | 'citi' | 'hsbc' | 'cfsb';
|
|
1289
|
+
/** Body for `POST /v1/onramp/receivers/:receiverId/virtual-accounts`. */
|
|
1290
|
+
interface CreateVirtualAccountOptions {
|
|
1291
|
+
banking_partner: BankingPartner;
|
|
1292
|
+
token: RampToken;
|
|
1293
|
+
/** Cosmos Pay wallet id that receives the converted stablecoin. */
|
|
1294
|
+
blockchain_wallet_id: string;
|
|
1295
|
+
signed_agreement_id?: string;
|
|
1296
|
+
sole_proprietor_doc_type?: string;
|
|
1297
|
+
sole_proprietor_doc_file?: string;
|
|
1298
|
+
}
|
|
1299
|
+
/** Raw virtual account — a provider passthrough. */
|
|
1300
|
+
type VirtualAccountData = Record<string, unknown>;
|
|
1301
|
+
/** Chains a payout can be funded from. */
|
|
1302
|
+
type PayoutNetwork = 'ethereum' | 'base' | 'arbitrum' | 'polygon' | 'stellar' | 'solana' | 'tron' | 'sepolia' | 'base_sepolia' | 'arbitrum_sepolia' | 'polygon_amoy' | 'stellar_testnet' | 'solana_devnet';
|
|
1303
|
+
/** Chain families the authorize / create steps distinguish. */
|
|
1304
|
+
type PayoutChain = 'evm' | 'stellar' | 'solana';
|
|
1305
|
+
/** Body for `POST /v1/offramp/quotes`. */
|
|
1306
|
+
interface CreatePayoutQuoteOptions {
|
|
1307
|
+
/** Destination bank account, belonging to a verified receiver. */
|
|
1308
|
+
bank_account_id: string;
|
|
1309
|
+
currency_type: CurrencyType;
|
|
1310
|
+
cover_fees?: boolean;
|
|
1311
|
+
/** Amount in MINOR units. */
|
|
1312
|
+
request_amount: number;
|
|
1313
|
+
network: PayoutNetwork;
|
|
1314
|
+
token: RampToken;
|
|
1315
|
+
description?: string;
|
|
1316
|
+
partner_fee_id?: string;
|
|
1317
|
+
}
|
|
1318
|
+
/** Raw payout quote. */
|
|
1319
|
+
interface PayoutQuoteData {
|
|
1320
|
+
id: string;
|
|
1321
|
+
/** Unix seconds (~5 minutes out). */
|
|
1322
|
+
expires_at: number;
|
|
1323
|
+
sender_amount?: number;
|
|
1324
|
+
/** Local fiat amount to receive, in minor units. */
|
|
1325
|
+
receiver_amount?: number;
|
|
1326
|
+
receiver_local_amount?: number;
|
|
1327
|
+
/** EVM `approve` payload to sign (abi, address, functionName, amount). */
|
|
1328
|
+
contract?: unknown;
|
|
1329
|
+
}
|
|
1330
|
+
/** Body for `POST /v1/offramp/payouts/authorize`. */
|
|
1331
|
+
interface AuthorizePayoutOptions {
|
|
1332
|
+
quote_id: string;
|
|
1333
|
+
sender_wallet_address: string;
|
|
1334
|
+
/** Only the chains that need an unsigned transaction built for them. */
|
|
1335
|
+
chain: 'stellar' | 'solana';
|
|
1336
|
+
}
|
|
1337
|
+
/**
|
|
1338
|
+
* Raw authorize response — the unsigned transaction, passed through from the
|
|
1339
|
+
* provider. Its `xdr` (Stellar) is what a wallet must bound against the quote the
|
|
1340
|
+
* user actually confirmed before signing it.
|
|
1341
|
+
*/
|
|
1342
|
+
interface AuthorizePayoutData {
|
|
1343
|
+
xdr?: string;
|
|
1344
|
+
[key: string]: unknown;
|
|
1345
|
+
}
|
|
1346
|
+
/** Body for `POST /v1/offramp/payouts`. */
|
|
1347
|
+
interface CreatePayoutOptions {
|
|
1348
|
+
quote_id: string;
|
|
1349
|
+
sender_wallet_address: string;
|
|
1350
|
+
chain: PayoutChain;
|
|
1351
|
+
/** The signed transaction produced from `authorize` (or the EVM approval). */
|
|
1352
|
+
signed_transaction?: string;
|
|
1353
|
+
}
|
|
1354
|
+
/** Query for `GET /v1/offramp/payouts`. */
|
|
1355
|
+
interface ListPayoutsOptions {
|
|
1356
|
+
take?: number;
|
|
1357
|
+
skip?: number;
|
|
1358
|
+
}
|
|
1359
|
+
/** Raw payout. Same mirroring rules as {@link PayinData}. */
|
|
1360
|
+
interface PayoutData {
|
|
1361
|
+
id: string;
|
|
1362
|
+
blindpayId: string;
|
|
1363
|
+
status: string | null;
|
|
1364
|
+
token: string | null;
|
|
1365
|
+
network: string | null;
|
|
1366
|
+
/** Fiat rail the money lands on. */
|
|
1367
|
+
rail: string | null;
|
|
1368
|
+
senderAmount: string | null;
|
|
1369
|
+
receiverAmount: string | null;
|
|
1370
|
+
senderWalletAddress: string | null;
|
|
1371
|
+
createdAt: string;
|
|
1372
|
+
}
|
|
1373
|
+
/** Raw paginated list of payouts. */
|
|
1374
|
+
interface PayoutListData {
|
|
1375
|
+
data: PayoutData[];
|
|
1376
|
+
total: number;
|
|
1377
|
+
take: number;
|
|
1378
|
+
skip: number;
|
|
1379
|
+
}
|
|
1380
|
+
/** Body for `POST /v1/offramp/payouts/:id/documents`. */
|
|
1381
|
+
interface AttachPayoutDocumentOptions {
|
|
1382
|
+
transaction_document_type?: string;
|
|
1383
|
+
transaction_document_id?: string;
|
|
1384
|
+
/** Base64 (or data URL) of the document itself. */
|
|
1385
|
+
transaction_document_file?: string;
|
|
1386
|
+
description?: string;
|
|
1387
|
+
}
|
|
1388
|
+
/** Raw document response — a provider passthrough. */
|
|
1389
|
+
type PayoutDocumentData = Record<string, unknown>;
|
|
1390
|
+
/** A receiver is a person or a company. */
|
|
1391
|
+
type ReceiverType = 'individual' | 'business';
|
|
1392
|
+
/** How deep the verification goes. */
|
|
1393
|
+
type KycType = 'light' | 'standard' | 'enhanced';
|
|
1394
|
+
/** One beneficial owner of a business receiver. */
|
|
1395
|
+
interface ReceiverOwner {
|
|
1396
|
+
role?: string;
|
|
1397
|
+
first_name?: string;
|
|
1398
|
+
last_name?: string;
|
|
1399
|
+
date_of_birth?: string;
|
|
1400
|
+
tax_id?: string;
|
|
1401
|
+
country?: string;
|
|
1402
|
+
address_line_1?: string;
|
|
1403
|
+
address_line_2?: string;
|
|
1404
|
+
city?: string;
|
|
1405
|
+
state_province_region?: string;
|
|
1406
|
+
postal_code?: string;
|
|
1407
|
+
/** Ownership percentage. */
|
|
1408
|
+
ownership_percentage?: number;
|
|
1409
|
+
title?: string;
|
|
1410
|
+
id_doc_country?: string;
|
|
1411
|
+
id_doc_type?: string;
|
|
1412
|
+
/** `file_url` from `POST /v1/kyc/upload`. */
|
|
1413
|
+
id_doc_front_file?: string;
|
|
1414
|
+
id_doc_back_file?: string;
|
|
1415
|
+
proof_of_address_doc_type?: string;
|
|
1416
|
+
/** `file_url` from `POST /v1/kyc/upload`. */
|
|
1417
|
+
proof_of_address_doc_file?: string;
|
|
1418
|
+
/** The owner's tax id type. */
|
|
1419
|
+
tax_type?: string;
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* Body for `POST /v1/kyc/receivers`.
|
|
1423
|
+
*
|
|
1424
|
+
* Every `*_file` field takes a `file_url` returned by {@link KycManager.upload} —
|
|
1425
|
+
* not the bytes. Upload first, then create the receiver with the URLs.
|
|
1426
|
+
*/
|
|
1427
|
+
interface CreateReceiverOptions {
|
|
1428
|
+
type: ReceiverType;
|
|
1429
|
+
kyc_type: KycType;
|
|
1430
|
+
email: string;
|
|
1431
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
1432
|
+
country: string;
|
|
1433
|
+
first_name?: string;
|
|
1434
|
+
last_name?: string;
|
|
1435
|
+
/** ISO-8601 datetime. A date-only value is rejected upstream. */
|
|
1436
|
+
date_of_birth?: string;
|
|
1437
|
+
tax_id?: string;
|
|
1438
|
+
occupation?: string;
|
|
1439
|
+
id_doc_country?: string;
|
|
1440
|
+
id_doc_type?: string;
|
|
1441
|
+
/** `file_url` from `POST /v1/kyc/upload`. */
|
|
1442
|
+
id_doc_front_file?: string;
|
|
1443
|
+
id_doc_back_file?: string;
|
|
1444
|
+
selfie_file?: string;
|
|
1445
|
+
account_purpose?: string;
|
|
1446
|
+
account_purpose_other?: string;
|
|
1447
|
+
source_of_funds_doc_type?: string;
|
|
1448
|
+
source_of_funds_doc_file?: string;
|
|
1449
|
+
source_of_wealth?: string;
|
|
1450
|
+
/** `master_service_agreement` | `salary_slip` | `bank_statement`. */
|
|
1451
|
+
sole_proprietor_doc_type?: string;
|
|
1452
|
+
proof_of_address_doc_type?: string;
|
|
1453
|
+
proof_of_address_doc_file?: string;
|
|
1454
|
+
recipient_relationship?: string;
|
|
1455
|
+
purpose_of_transactions?: string;
|
|
1456
|
+
purpose_of_transactions_explanation?: string;
|
|
1457
|
+
legal_name?: string;
|
|
1458
|
+
alternate_name?: string;
|
|
1459
|
+
business_type?: string;
|
|
1460
|
+
business_industry?: string;
|
|
1461
|
+
business_description?: string;
|
|
1462
|
+
formation_date?: string;
|
|
1463
|
+
estimated_annual_revenue?: string;
|
|
1464
|
+
publicly_traded?: boolean;
|
|
1465
|
+
website?: string;
|
|
1466
|
+
incorporation_doc_file?: string;
|
|
1467
|
+
proof_of_ownership_doc_file?: string;
|
|
1468
|
+
owners?: ReceiverOwner[];
|
|
1469
|
+
address_line_1?: string;
|
|
1470
|
+
address_line_2?: string;
|
|
1471
|
+
city?: string;
|
|
1472
|
+
state_province_region?: string;
|
|
1473
|
+
postal_code?: string;
|
|
1474
|
+
phone_number?: string;
|
|
1475
|
+
ip_address?: string;
|
|
1476
|
+
/** Your own id for this receiver. */
|
|
1477
|
+
external_id?: string;
|
|
1478
|
+
image_url?: string;
|
|
1479
|
+
/**
|
|
1480
|
+
* Accepted terms-of-service id, from the redirect of
|
|
1481
|
+
* {@link KycManager.termsOfService}. The provider requires it to create a
|
|
1482
|
+
* receiver, which is why ToS is the FIRST step of the flow rather than the last.
|
|
1483
|
+
*/
|
|
1484
|
+
tos_id?: string;
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* Body for `PATCH /v1/kyc/receivers/:id` — the same fields, all optional.
|
|
1488
|
+
*
|
|
1489
|
+
* Identity is reviewed before it reaches the provider, edits included. Until the
|
|
1490
|
+
* receiver is enabled, an edit that touches KYC data sends it back to
|
|
1491
|
+
* `pending_review`. Once it exists at the provider, a tenant key may change only
|
|
1492
|
+
* `external_id` and `image_url`; any other field is `403 kyc_review_required` unless
|
|
1493
|
+
* the key is elevated (`X-Consumer-Role: admin`), because that edit rewrites the
|
|
1494
|
+
* identity at the provider directly.
|
|
1495
|
+
*/
|
|
1496
|
+
type UpdateReceiverOptions = Partial<CreateReceiverOptions>;
|
|
1497
|
+
/** Body for `POST /v1/kyc/receivers/:id/approve`. */
|
|
1498
|
+
interface ApproveReceiverOptions {
|
|
1499
|
+
redirect_url?: string;
|
|
1500
|
+
/**
|
|
1501
|
+
* The {@link ReceiverData.dossierVersion} this approval is for.
|
|
1502
|
+
*
|
|
1503
|
+
* Approving is a statement about KYC data someone read and accepted, and the
|
|
1504
|
+
* tenant can edit that data in between: an edit leaves the receiver in
|
|
1505
|
+
* `pending_review`, so without a version the approval lands on whatever is
|
|
1506
|
+
* stored when the request arrives and nobody can tell. Send it and a dossier
|
|
1507
|
+
* that moved on is a `409 kyc_state_invalid` — re-read, review again, approve
|
|
1508
|
+
* that version.
|
|
1509
|
+
*
|
|
1510
|
+
* {@link Receiver.approve} fills this in from the instance; omit it there only
|
|
1511
|
+
* if you mean "approve whatever is stored now".
|
|
1512
|
+
*/
|
|
1513
|
+
expected_version?: number;
|
|
1514
|
+
}
|
|
1515
|
+
/** Body for `POST /v1/kyc/receivers/:id/tos`. */
|
|
1516
|
+
interface RequestTosOptions {
|
|
1517
|
+
/** `code` returns the URL to show; `email` sends it to the receiver. */
|
|
1518
|
+
channel: 'code' | 'email';
|
|
1519
|
+
redirect_url?: string;
|
|
1520
|
+
}
|
|
1521
|
+
/** Body for `POST /v1/kyc/receivers/:id/enable`. */
|
|
1522
|
+
interface EnableReceiverOptions {
|
|
1523
|
+
/** An accepted terms-of-service id. */
|
|
1524
|
+
tos_id: string;
|
|
1525
|
+
}
|
|
1526
|
+
/** Body for `PATCH /v1/kyc/receivers/:id/access`. */
|
|
1527
|
+
interface SetReceiverAccessOptions {
|
|
1528
|
+
/** `true` cuts this receiver off from both ramps — an admin kill switch. */
|
|
1529
|
+
disabled: boolean;
|
|
1530
|
+
}
|
|
1531
|
+
/** Query for the paginated KYC collections. */
|
|
1532
|
+
interface ListKycOptions {
|
|
1533
|
+
take?: number;
|
|
1534
|
+
skip?: number;
|
|
1535
|
+
}
|
|
1536
|
+
/** Raw receiver payload. `kycStatus` is refreshed from the provider on read. */
|
|
1537
|
+
interface ReceiverData {
|
|
1538
|
+
id: string;
|
|
1539
|
+
blindpayId: string;
|
|
1540
|
+
type: string;
|
|
1541
|
+
kycType: string | null;
|
|
1542
|
+
kycStatus: string | null;
|
|
1543
|
+
email: string | null;
|
|
1544
|
+
name: string | null;
|
|
1545
|
+
country: string | null;
|
|
1546
|
+
externalId: string | null;
|
|
1547
|
+
/** True when the receiver is cut off from the ramps. */
|
|
1548
|
+
disabled: boolean;
|
|
1549
|
+
/**
|
|
1550
|
+
* How many times the submitted KYC data has been written. Send it back as
|
|
1551
|
+
* `expected_version` when approving, so the approval cannot land on a dossier
|
|
1552
|
+
* nobody read.
|
|
1553
|
+
*/
|
|
1554
|
+
dossierVersion: number;
|
|
1555
|
+
/**
|
|
1556
|
+
* The `dossierVersion` a reviewer approved, or null while unapproved. The
|
|
1557
|
+
* receiver cannot be enabled until it equals {@link ReceiverData.dossierVersion}
|
|
1558
|
+
* again, so an edit after approval sends it back through review.
|
|
1559
|
+
*/
|
|
1560
|
+
reviewedVersion: number | null;
|
|
1561
|
+
createdAt: string;
|
|
1562
|
+
updatedAt: string;
|
|
1563
|
+
}
|
|
1564
|
+
/** Raw paginated list of receivers. */
|
|
1565
|
+
interface ReceiverListData {
|
|
1566
|
+
data: ReceiverData[];
|
|
1567
|
+
total: number;
|
|
1568
|
+
take: number;
|
|
1569
|
+
skip: number;
|
|
1570
|
+
}
|
|
1571
|
+
/** Chains a receiver wallet can be registered on. */
|
|
1572
|
+
type ReceiverWalletNetwork = 'ethereum' | 'base' | 'arbitrum' | 'polygon' | 'stellar' | 'solana' | 'tron' | 'sepolia';
|
|
1573
|
+
/** Body for `POST /v1/kyc/receivers/:receiverId/wallets`. */
|
|
1574
|
+
interface CreateReceiverWalletOptions {
|
|
1575
|
+
name?: string;
|
|
1576
|
+
network: ReceiverWalletNetwork;
|
|
1577
|
+
address: string;
|
|
1578
|
+
/**
|
|
1579
|
+
* Proof the receiver controls the address, for the secure-wallet flow: the hash
|
|
1580
|
+
* of the transaction that signed the message from
|
|
1581
|
+
* {@link KycManager.walletSignMessage}.
|
|
1582
|
+
*/
|
|
1583
|
+
signature_tx_hash?: string;
|
|
1584
|
+
is_account_abstraction?: boolean;
|
|
1585
|
+
}
|
|
1586
|
+
/** Raw receiver wallet payload. */
|
|
1587
|
+
interface ReceiverWalletData {
|
|
1588
|
+
id: string;
|
|
1589
|
+
blindpayId: string;
|
|
1590
|
+
name: string | null;
|
|
1591
|
+
network: string;
|
|
1592
|
+
address: string | null;
|
|
1593
|
+
isAccountAbstraction: boolean;
|
|
1594
|
+
createdAt: string;
|
|
1595
|
+
}
|
|
1596
|
+
/** Raw paginated list of receiver wallets. */
|
|
1597
|
+
interface ReceiverWalletListData {
|
|
1598
|
+
data: ReceiverWalletData[];
|
|
1599
|
+
total: number;
|
|
1600
|
+
take: number;
|
|
1601
|
+
skip: number;
|
|
1602
|
+
}
|
|
1603
|
+
/** Fiat rails a bank account can be opened on. */
|
|
1604
|
+
type BankRail = 'wire' | 'ach' | 'rtp' | 'pix' | 'pix_safe' | 'ted' | 'spei_bitso' | 'transfers_bitso';
|
|
1605
|
+
/**
|
|
1606
|
+
* Body for `POST /v1/kyc/receivers/:receiverId/bank-accounts`.
|
|
1607
|
+
*
|
|
1608
|
+
* Only the fields every rail shares are named here. The rest — `pix_*`, `ted_*`,
|
|
1609
|
+
* `spei_*`, `swift_*`, `sepa_*`, `ach_cop_*`, some seventy of them — depend on
|
|
1610
|
+
* `type`, and the authority on which ones a given rail needs is
|
|
1611
|
+
* {@link KycManager.bankDetails}, at runtime. Enumerating them in a published type
|
|
1612
|
+
* would freeze a provider's field list into a release of this SDK and break the
|
|
1613
|
+
* day it adds a rail.
|
|
1614
|
+
*/
|
|
1615
|
+
interface CreateBankAccountOptions {
|
|
1616
|
+
type: BankRail;
|
|
1617
|
+
/** Label for the account. */
|
|
1618
|
+
name: string;
|
|
1619
|
+
account_class?: 'individual' | 'business';
|
|
1620
|
+
account_type?: 'checking' | 'saving';
|
|
1621
|
+
beneficiary_name?: string;
|
|
1622
|
+
recipient_relationship?: string;
|
|
1623
|
+
account_number?: string;
|
|
1624
|
+
routing_number?: string;
|
|
1625
|
+
business_industry?: string;
|
|
1626
|
+
phone_number?: string;
|
|
1627
|
+
tax_id?: string;
|
|
1628
|
+
address_line_1?: string;
|
|
1629
|
+
address_line_2?: string;
|
|
1630
|
+
city?: string;
|
|
1631
|
+
state_province_region?: string;
|
|
1632
|
+
country?: string;
|
|
1633
|
+
postal_code?: string;
|
|
1634
|
+
/** Rail-specific fields. See `bankDetails(rail)` for the ones a rail requires. */
|
|
1635
|
+
[key: string]: unknown;
|
|
1636
|
+
}
|
|
1637
|
+
/** Raw bank account payload. */
|
|
1638
|
+
interface BankAccountData {
|
|
1639
|
+
id: string;
|
|
1640
|
+
blindpayId: string;
|
|
1641
|
+
rail: string | null;
|
|
1642
|
+
name: string | null;
|
|
1643
|
+
country: string | null;
|
|
1644
|
+
createdAt: string;
|
|
1645
|
+
}
|
|
1646
|
+
/** Raw paginated list of bank accounts. */
|
|
1647
|
+
interface BankAccountListData {
|
|
1648
|
+
data: BankAccountData[];
|
|
1649
|
+
total: number;
|
|
1650
|
+
take: number;
|
|
1651
|
+
skip: number;
|
|
1652
|
+
}
|
|
1653
|
+
/** Body for `POST /v1/kyc/terms-of-service`. */
|
|
1654
|
+
interface InitiateTosOptions {
|
|
1655
|
+
redirect_url?: string;
|
|
1656
|
+
/** Attach the acceptance to an existing receiver. */
|
|
1657
|
+
receiver_id?: string;
|
|
1658
|
+
idempotency_key?: string;
|
|
1659
|
+
}
|
|
1660
|
+
/**
|
|
1661
|
+
* Raw terms-of-service response — a provider passthrough carrying the hosted URL
|
|
1662
|
+
* the receiver has to visit.
|
|
1663
|
+
*/
|
|
1664
|
+
interface TermsOfServiceData {
|
|
1665
|
+
url?: string;
|
|
1666
|
+
[key: string]: unknown;
|
|
1667
|
+
}
|
|
1668
|
+
/** Raw upload response. `file_url` is what every `*_file` field expects. */
|
|
1669
|
+
interface KycUploadData {
|
|
1670
|
+
file_url?: string;
|
|
1671
|
+
[key: string]: unknown;
|
|
1672
|
+
}
|
|
1673
|
+
/** Raw response of the rails catalogue / a rail's field schema — passthroughs. */
|
|
1674
|
+
type KycRailsData = unknown;
|
|
1675
|
+
type BankDetailsData = unknown;
|
|
1676
|
+
/** Raw response of the wallet sign-message challenge — a provider passthrough. */
|
|
1677
|
+
interface WalletSignMessageData {
|
|
1678
|
+
message?: string;
|
|
1679
|
+
[key: string]: unknown;
|
|
1680
|
+
}
|
|
1681
|
+
/** One status change of a payment intent — `GET /v1/payment-intents/{id}/transitions`. */
|
|
1682
|
+
interface PaymentIntentTransitionData {
|
|
1683
|
+
id: string;
|
|
1684
|
+
intentId: string;
|
|
1685
|
+
fromStatus: PaymentIntentStatus;
|
|
1686
|
+
toStatus: PaymentIntentStatus;
|
|
1687
|
+
txHash?: string | null;
|
|
1688
|
+
/** Who moved it: `api`, `validate`, `observer` or `system`. */
|
|
1689
|
+
actor: string;
|
|
1690
|
+
reason?: string | null;
|
|
1691
|
+
createdAt: string;
|
|
1692
|
+
}
|
|
1693
|
+
/** Query for `GET /v1/assets`. */
|
|
1694
|
+
interface ListRegistryAssetsOptions {
|
|
1695
|
+
network?: 'public' | 'testnet';
|
|
1696
|
+
/** Only the entries whose issuer was checked against the named organization. */
|
|
1697
|
+
verified?: boolean;
|
|
1698
|
+
}
|
|
1699
|
+
/** One `(code, issuer)` pair the server vouches for — or lists, unverified. */
|
|
1700
|
+
interface RegistryAssetData {
|
|
1701
|
+
code: string;
|
|
1702
|
+
/** Issuing account, or `null` for native XLM. */
|
|
1703
|
+
issuer: string | null;
|
|
1704
|
+
name: string;
|
|
1705
|
+
/** Who issues it, for display next to the code. */
|
|
1706
|
+
issuerName: string;
|
|
1707
|
+
/** The issuer's own on-chain `home_domain`, or empty when it publishes none. */
|
|
1708
|
+
issuerDomain: string;
|
|
1709
|
+
/** The issuing account was checked against `issuerName` — identity, not quality. */
|
|
1710
|
+
verified: boolean;
|
|
1711
|
+
/** Stellar Asset Contract id, when wrapped for Soroban. */
|
|
1712
|
+
contract: string | null;
|
|
1713
|
+
flags: {
|
|
1714
|
+
authRevocable: boolean;
|
|
1715
|
+
clawback: boolean;
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
/** Raw `GET /v1/assets` response. */
|
|
1719
|
+
interface AssetRegistryData {
|
|
1720
|
+
network: 'public' | 'testnet';
|
|
1721
|
+
/** Monotonic registry version: compare it against a bundled copy. */
|
|
1722
|
+
version: number;
|
|
1723
|
+
data: RegistryAssetData[];
|
|
1724
|
+
}
|
|
1725
|
+
type AliasChallengePurpose = 'CLAIM' | 'ADD_ADDRESS' | 'RECOVER';
|
|
1726
|
+
/** One verified address an alias points at. */
|
|
1727
|
+
interface AliasAddressData {
|
|
1728
|
+
id: string;
|
|
1729
|
+
address: string;
|
|
1730
|
+
network: string;
|
|
1731
|
+
label?: string | null;
|
|
1732
|
+
/** The default for this network. */
|
|
1733
|
+
isPrimary: boolean;
|
|
1734
|
+
/** When this address proved control of itself. */
|
|
1735
|
+
verifiedAt: string;
|
|
1736
|
+
}
|
|
1737
|
+
/** `GET /v1/aliases/resolve/{name}` — where to pay a handle. */
|
|
1738
|
+
interface AliasResolutionData {
|
|
1739
|
+
name: string;
|
|
1740
|
+
displayName: string;
|
|
1741
|
+
/** Every verified address on the requested network, primary first. */
|
|
1742
|
+
addresses: AliasAddressData[];
|
|
1743
|
+
/** The address to pay when the payer did not choose one. */
|
|
1744
|
+
primaryAddress?: string | null;
|
|
1745
|
+
}
|
|
1746
|
+
/** `GET /v1/aliases/availability/{name}`. */
|
|
1747
|
+
interface AliasAvailabilityData {
|
|
1748
|
+
name: string;
|
|
1749
|
+
available: boolean;
|
|
1750
|
+
/** Why not, when unavailable: `taken`, `reserved`, `bad_characters`, … */
|
|
1751
|
+
reason?: string | null;
|
|
1752
|
+
}
|
|
1753
|
+
/** `GET /v1/aliases/by-address/{address}`. */
|
|
1754
|
+
interface AliasByAddressData {
|
|
1755
|
+
data: {
|
|
1756
|
+
name: string;
|
|
1757
|
+
displayName: string;
|
|
1758
|
+
network: string;
|
|
1759
|
+
isPrimary: boolean;
|
|
1760
|
+
}[];
|
|
1761
|
+
}
|
|
1762
|
+
/** Body for `POST /v1/aliases/challenges`. */
|
|
1763
|
+
interface CreateAliasChallengeOptions {
|
|
1764
|
+
/** The handle being claimed. */
|
|
1765
|
+
name: string;
|
|
1766
|
+
address: string;
|
|
1767
|
+
/** Network id: `public`, `testnet`, or a custom id. */
|
|
1768
|
+
network: string;
|
|
1769
|
+
purpose?: AliasChallengePurpose;
|
|
1770
|
+
}
|
|
1771
|
+
/** A nonce to sign — `POST /v1/aliases/challenges`. */
|
|
1772
|
+
interface AliasChallengeData {
|
|
1773
|
+
nonce: string;
|
|
1774
|
+
/** The EXACT string to digest and sign. Sign this, never a string you rebuilt. */
|
|
1775
|
+
message: string;
|
|
1776
|
+
/** Domain tag the digest is framed with. */
|
|
1777
|
+
domain: string;
|
|
1778
|
+
purpose: AliasChallengePurpose;
|
|
1779
|
+
expiresAt: string;
|
|
1780
|
+
}
|
|
1781
|
+
/** Body for `POST /v1/aliases`. */
|
|
1782
|
+
interface ClaimAliasOptions {
|
|
1783
|
+
name: string;
|
|
1784
|
+
/** Recovery mailbox — required at claim time. */
|
|
1785
|
+
email: string;
|
|
1786
|
+
/** The nonce from a CLAIM challenge. */
|
|
1787
|
+
nonce: string;
|
|
1788
|
+
/** base64 ed25519 over the challenge digest. */
|
|
1789
|
+
signature: string;
|
|
1790
|
+
/** Human label for this first address. */
|
|
1791
|
+
label?: string;
|
|
1792
|
+
}
|
|
1793
|
+
/** Body for `POST /v1/aliases/{name}/addresses`. */
|
|
1794
|
+
interface AddAliasAddressOptions {
|
|
1795
|
+
address: string;
|
|
1796
|
+
network: string;
|
|
1797
|
+
/** The nonce from an ADD_ADDRESS challenge. */
|
|
1798
|
+
nonce: string;
|
|
1799
|
+
signature: string;
|
|
1800
|
+
label?: string;
|
|
1801
|
+
/** Make this the address a payer gets when they do not ask for one. */
|
|
1802
|
+
primary?: boolean;
|
|
1803
|
+
}
|
|
1804
|
+
/** Body for `POST /v1/aliases/{name}/recovery/complete`. */
|
|
1805
|
+
interface CompleteAliasRecoveryOptions {
|
|
1806
|
+
/** The token delivered by email. */
|
|
1807
|
+
token: string;
|
|
1808
|
+
/** The address that will own the alias from now on. */
|
|
1809
|
+
address: string;
|
|
1810
|
+
network: string;
|
|
1811
|
+
/** The nonce from a RECOVER challenge. */
|
|
1812
|
+
nonce: string;
|
|
1813
|
+
signature: string;
|
|
1814
|
+
}
|
|
1815
|
+
/** An alias the caller owns. */
|
|
1816
|
+
interface OwnedAliasData {
|
|
1817
|
+
id: string;
|
|
1818
|
+
/** Normalized handle — the form uniqueness is decided on. */
|
|
1819
|
+
name: string;
|
|
1820
|
+
/** As the claimant typed it. Display only. */
|
|
1821
|
+
displayName: string;
|
|
1822
|
+
status: 'ACTIVE' | 'SUSPENDED';
|
|
1823
|
+
addresses: AliasAddressData[];
|
|
1824
|
+
createdAt: string;
|
|
1825
|
+
email: string;
|
|
1826
|
+
emailVerifiedAt?: string | null;
|
|
1827
|
+
}
|
|
1828
|
+
/** Raw `GET /v1/aliases` page. */
|
|
1829
|
+
interface AliasListData {
|
|
1830
|
+
data: OwnedAliasData[];
|
|
1831
|
+
total: number;
|
|
1832
|
+
take: number;
|
|
1833
|
+
skip: number;
|
|
1834
|
+
}
|
|
1835
|
+
/** `DELETE` answers for aliases and alias addresses. */
|
|
1836
|
+
interface AliasDeletedData {
|
|
1837
|
+
id: string;
|
|
1838
|
+
deleted: boolean;
|
|
1839
|
+
}
|
|
1840
|
+
/** Answer of `POST /v1/aliases/:name/recovery` — the same whether or not the mailbox matches. */
|
|
1841
|
+
interface AliasRecoveryStartedData {
|
|
1842
|
+
accepted: boolean;
|
|
1843
|
+
}
|
|
1844
|
+
/** The shared public API key an open-source wallet embeds, per environment. */
|
|
1845
|
+
interface PublicKeyData {
|
|
1846
|
+
env: 'dev' | 'prod';
|
|
1847
|
+
apiKey: string;
|
|
1848
|
+
}
|
|
1849
|
+
/** A plugin this deployment serves, and this consumer's installation of it. */
|
|
1850
|
+
interface PluginData {
|
|
1851
|
+
slug: string;
|
|
1852
|
+
name: string;
|
|
1853
|
+
version: string;
|
|
1854
|
+
description: string;
|
|
1855
|
+
author: string;
|
|
1856
|
+
/** What the plugin may do; installing is consenting to exactly this list. */
|
|
1857
|
+
capabilities: string[];
|
|
1858
|
+
/** Hosts the plugin may call out to. */
|
|
1859
|
+
egress: string[];
|
|
1860
|
+
config: Record<string, unknown>;
|
|
1861
|
+
queries: unknown[];
|
|
1862
|
+
commands: unknown[];
|
|
1863
|
+
events: unknown[];
|
|
1864
|
+
/** Null when this consumer has not installed it. */
|
|
1865
|
+
installation: Record<string, unknown> | null;
|
|
1866
|
+
}
|
|
1867
|
+
interface PluginListData {
|
|
1868
|
+
data: PluginData[];
|
|
1869
|
+
}
|
|
1870
|
+
/** Body for `PUT /v1/plugins/:slug/installation`. */
|
|
1871
|
+
interface InstallPluginOptions {
|
|
1872
|
+
/** Exactly the capabilities the plugin declares — consent is all or nothing. */
|
|
1873
|
+
grantCapabilities: string[];
|
|
1874
|
+
config?: Record<string, unknown>;
|
|
1875
|
+
}
|
|
1876
|
+
interface PluginUninstalledData {
|
|
1877
|
+
slug: string;
|
|
1878
|
+
uninstalled: boolean;
|
|
1879
|
+
}
|
|
1880
|
+
/** Result of a plugin query or command. */
|
|
1881
|
+
interface PluginActionResultData<T = unknown> {
|
|
1882
|
+
plugin: string;
|
|
1883
|
+
action: string;
|
|
1884
|
+
output: T;
|
|
1885
|
+
}
|
|
1886
|
+
/** Body for `POST /v1/defindex/vaults/:vault/deposit`. */
|
|
1887
|
+
interface DefindexDepositOptions {
|
|
1888
|
+
/** One amount per vault asset, in its base units. */
|
|
1889
|
+
amounts: string[];
|
|
1890
|
+
/** The account that signs. */
|
|
1891
|
+
caller: string;
|
|
1892
|
+
invest?: boolean;
|
|
1893
|
+
slippageBps?: number;
|
|
1894
|
+
}
|
|
1895
|
+
/** Body for `POST /v1/defindex/vaults/:vault/withdraw`. */
|
|
1896
|
+
interface DefindexWithdrawOptions {
|
|
1897
|
+
shares: string;
|
|
1898
|
+
caller: string;
|
|
1899
|
+
slippageBps?: number;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* Error thrown when the Cosmos Pay API responds with a non-2xx status.
|
|
1904
|
+
*
|
|
1905
|
+
* Carries the HTTP status, the parsed response body and the request context so
|
|
1906
|
+
* callers can branch on `error.status` (e.g. 404 → not found, 403 → gateway).
|
|
1907
|
+
*/
|
|
1908
|
+
declare class CosmosPayAPIError extends Error {
|
|
1909
|
+
/** HTTP status code returned by the API. */
|
|
1910
|
+
readonly status: number;
|
|
1911
|
+
/** HTTP method of the failed request. */
|
|
1912
|
+
readonly method: string;
|
|
1913
|
+
/** Absolute URL of the failed request. */
|
|
1914
|
+
readonly url: string;
|
|
1915
|
+
/** Parsed response body (object when JSON, string otherwise, or null). */
|
|
1916
|
+
readonly body: unknown;
|
|
1917
|
+
/** Machine-readable error code extracted from the body when present. */
|
|
1918
|
+
readonly code: string | undefined;
|
|
1919
|
+
constructor(options: {
|
|
1920
|
+
status: number;
|
|
1921
|
+
method: string;
|
|
1922
|
+
url: string;
|
|
1923
|
+
body: unknown;
|
|
1924
|
+
});
|
|
1925
|
+
private static resolveMessage;
|
|
1926
|
+
private static resolveCode;
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* Error thrown when a request never reaches the API: network failure, abort or
|
|
1930
|
+
* timeout. Distinct from {@link CosmosPayAPIError}, which always has a status.
|
|
1931
|
+
*/
|
|
1932
|
+
declare class CosmosPayRequestError extends Error {
|
|
1933
|
+
readonly method: string;
|
|
1934
|
+
readonly url: string;
|
|
1935
|
+
readonly cause: unknown;
|
|
1936
|
+
constructor(options: {
|
|
1937
|
+
method: string;
|
|
1938
|
+
url: string;
|
|
1939
|
+
cause: unknown;
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* Typed identifiers for the wallets the web client knows about, so you can write
|
|
1945
|
+
* `Wallets.FREIGHTER` instead of remembering the `'freighter'` magic string —
|
|
1946
|
+
* while any custom adapter id still works.
|
|
1947
|
+
*/
|
|
1948
|
+
/** Built-in wallet ids (matches each adapter's `id`). */
|
|
1949
|
+
declare const Wallets: {
|
|
1950
|
+
/** Cosmos Pay's own wallet — extension, or the hosted build (see CosmosWalletAdapter). */
|
|
1951
|
+
readonly COSMOS: "cosmos";
|
|
1952
|
+
readonly FREIGHTER: "freighter";
|
|
1953
|
+
readonly XBULL: "xbull";
|
|
1954
|
+
readonly RABET: "rabet";
|
|
1955
|
+
readonly LOBSTR: "lobstr";
|
|
1956
|
+
readonly ALBEDO: "albedo";
|
|
1957
|
+
};
|
|
1958
|
+
/** A known wallet id, or any custom adapter id (autocomplete for the built-ins). */
|
|
1959
|
+
type WalletId = (typeof Wallets)[keyof typeof Wallets] | (string & {});
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* Stellar address helpers + a tiny named-address book.
|
|
1963
|
+
*
|
|
1964
|
+
* So integrators don't have to sprinkle raw `G...` strings everywhere (and risk
|
|
1965
|
+
* typos), they can name the accounts they care about once and reference them by
|
|
1966
|
+
* name. A plain address string always keeps working — `resolveAddress` only
|
|
1967
|
+
* substitutes registered names and otherwise passes the value straight through.
|
|
1968
|
+
*/
|
|
1969
|
+
/** Whether a value looks like a Stellar account address (`G…`). */
|
|
1970
|
+
declare function isStellarAddress(value: unknown): value is string;
|
|
1971
|
+
/** Whether a value looks like a muxed account address (`M…`). */
|
|
1972
|
+
declare function isMuxedAddress(value: unknown): value is string;
|
|
1973
|
+
/** Whether a value looks like a Soroban contract id (`C…`). */
|
|
1974
|
+
declare function isContractAddress(value: unknown): value is string;
|
|
1975
|
+
/** Whether a value is any kind of Stellar address (account, muxed or contract). */
|
|
1976
|
+
declare function isAddress(value: unknown): value is string;
|
|
1977
|
+
/** Throw unless `value` is a valid Stellar account/muxed/contract address. */
|
|
1978
|
+
declare function assertAddress(value: unknown, label?: string): string;
|
|
1979
|
+
/**
|
|
1980
|
+
* A registry of named Stellar addresses. Register the accounts you use a lot —
|
|
1981
|
+
* your merchant payout account, a treasury, frequent counterparties — and refer
|
|
1982
|
+
* to them by name anywhere an address is accepted.
|
|
1983
|
+
*
|
|
1984
|
+
* @example
|
|
1985
|
+
* addresses.define('merchant', 'GC...');
|
|
1986
|
+
* await client.paymentIntents.createPay({ destination: 'merchant', amount: '10' });
|
|
1987
|
+
*/
|
|
1988
|
+
declare class AddressBook {
|
|
1989
|
+
private readonly entries;
|
|
1990
|
+
constructor(initial?: Record<string, string>);
|
|
1991
|
+
/** Register (or overwrite) a named address. The address is validated. */
|
|
1992
|
+
define(name: string, address: string): this;
|
|
1993
|
+
/** Whether a name is registered. */
|
|
1994
|
+
has(name: string): boolean;
|
|
1995
|
+
/** Look up a registered address by name. */
|
|
1996
|
+
get(name: string): string | undefined;
|
|
1997
|
+
/** Remove a named address. */
|
|
1998
|
+
delete(name: string): boolean;
|
|
1999
|
+
/** All registered names. */
|
|
2000
|
+
names(): string[];
|
|
2001
|
+
/**
|
|
2002
|
+
* Resolve a reference to a concrete address: a registered name is substituted,
|
|
2003
|
+
* any other string is returned unchanged (so raw `G…`, muxed `M…`, federation
|
|
2004
|
+
* `name*domain`, etc. all keep working).
|
|
2005
|
+
*/
|
|
2006
|
+
resolve(ref: string): string;
|
|
2007
|
+
}
|
|
2008
|
+
/** Process-wide default address book. Use `addresses.define(...)` to populate it. */
|
|
2009
|
+
declare const addresses: AddressBook;
|
|
2010
|
+
/** Anything accepted where an address is expected: a raw address or a name in a book. */
|
|
2011
|
+
type AddressRef = string;
|
|
2012
|
+
/**
|
|
2013
|
+
* Resolve an {@link AddressRef} using the given book (the shared {@link addresses}
|
|
2014
|
+
* by default). Lenient: unknown strings pass through unchanged.
|
|
2015
|
+
*/
|
|
2016
|
+
declare function resolveAddress(ref: AddressRef, book?: AddressBook): string;
|
|
2017
|
+
|
|
2018
|
+
/**
|
|
2019
|
+
* Shared resolution of "create intent" input, used by both the server SDK and
|
|
2020
|
+
* the web client so the convenience layers behave identically: a typed
|
|
2021
|
+
* {@link AssetRef} (e.g. `Assets.USDC`) is expanded into `assetCode`/`assetIssuer`,
|
|
2022
|
+
* and named addresses are substituted via an {@link AddressBook}.
|
|
2023
|
+
*/
|
|
2024
|
+
|
|
2025
|
+
/** Fields the resolver understands (everything else passes through untouched). */
|
|
2026
|
+
interface ResolvableIntentInput {
|
|
2027
|
+
destination?: string;
|
|
2028
|
+
source?: string;
|
|
2029
|
+
/** Typed asset (`Assets.USDC`, `defineAsset(...)`) — fills code + issuer. */
|
|
2030
|
+
asset?: AssetRef;
|
|
2031
|
+
assetCode?: string;
|
|
2032
|
+
assetIssuer?: string;
|
|
2033
|
+
}
|
|
2034
|
+
/**
|
|
2035
|
+
* Expand `asset` into `assetCode`/`assetIssuer` and resolve named
|
|
2036
|
+
* `destination`/`source` addresses. Existing `assetCode`/`assetIssuer` win over a
|
|
2037
|
+
* provided `asset`; native assets leave the code unset (the API treats an omitted
|
|
2038
|
+
* asset as native XLM). Returns a new object — the input is not mutated.
|
|
2039
|
+
*/
|
|
2040
|
+
declare function resolveIntentBody<T extends ResolvableIntentInput>(options: T, book?: AddressBook): Omit<T, 'asset'>;
|
|
2041
|
+
|
|
2042
|
+
export { type ActivityReportData as $, type AliasResolutionData as A, type BrowseLiquidityPoolsOptions as B, type CreateAliasChallengeOptions as C, type DepositLiquidityOptions as D, type ListPayinsOptions as E, type CreateTrustlineOptions as F, type CreateVirtualAccountOptions as G, type HealthCheckData as H, type CreatePayoutQuoteOptions as I, type PayoutQuoteData as J, type AuthorizePayoutOptions as K, type ListRegistryAssetsOptions as L, type AuthorizePayoutData as M, type CreatePayoutOptions as N, type OwnedAliasData as O, type PayinQuoteData as P, type PayoutData as Q, type ListPayoutsOptions as R, type SubmitLiquidityOptions as S, type TrustlineData as T, type UpdateCustomerOptions as U, type VirtualAccountData as V, type WebhookLogsData as W, type AttachPayoutDocumentOptions as X, type PayoutDocumentData as Y, type ActivityEventInput as Z, type ReportActivityOptions as _, type AliasAvailabilityData as a, type WebhookDeliveryData as a$, type ListActivityOptions as a0, type ActivityListData as a1, type ActivitySummaryData as a2, type ReceiverData as a3, type UpdateReceiverOptions as a4, type ApproveReceiverOptions as a5, type RequestTosOptions as a6, type TermsOfServiceData as a7, type EnableReceiverOptions as a8, type CreateReceiverWalletOptions as a9, type PublicKeyData as aA, type PaymentIntentData as aB, PaymentIntentKind as aC, PaymentIntentStatus as aD, type UpdatePaymentIntentOptions as aE, type DeletedData as aF, type ValidationOutcomeData as aG, type CreateTxPaymentIntentOptions as aH, type CreatePayPaymentIntentOptions as aI, type PaymentIntentTransitionData as aJ, type ListPaymentIntentsOptions as aK, type ValidatePaymentIntentOptions as aL, type ProductData as aM, ProductKind as aN, type UpdateProductOptions as aO, type CreateProductOptions as aP, type ChainSwapData as aQ, type OtherSwapChain as aR, SwapStatus as aS, type ChainSwapTransaction as aT, type EvmCallData as aU, type SwapData as aV, type QuoteSwapOptions as aW, type SwapQuoteData as aX, type CreateSwapOptions as aY, type ListSwapsOptions as aZ, type SubmitSwapOptions as a_, type ReceiverWalletData as aa, type ListKycOptions as ab, type CreateBankAccountOptions as ac, type BankAccountData as ad, type CreateReceiverOptions as ae, type SetReceiverAccessOptions as af, type WalletSignMessageData as ag, type KycUploadData as ah, type InitiateTosOptions as ai, type KycRailsData as aj, type BankDetailsData as ak, type CrossChainSwapData as al, CrossChainSwapStatus as am, type SwapChain as an, type CrossChainTransactionData as ao, type CrossChainAssetData as ap, type QuoteCrossChainSwapOptions as aq, type CrossChainQuoteData as ar, type CreateCrossChainSwapOptions as as, type ListCrossChainSwapsOptions as at, type DefindexDepositOptions as au, type DefindexWithdrawOptions as av, type PluginData as aw, type InstallPluginOptions as ax, type PluginUninstalledData as ay, type PluginActionResultData as az, type AliasByAddressData as b, type WalletId as b$, WebhookEventType as b0, WebhookDeliveryStatus as b1, type WebhookEndpointData as b2, type WebhookEndpointWithSecretData as b3, type UpdateWebhookEndpointOptions as b4, type WebhookPingData as b5, type ListWebhookDeliveriesOptions as b6, type AnyWebhookEvent as b7, type WebhookEventDataMap as b8, type TypedWebhookEvent as b9, type CustomerListData as bA, type KycType as bB, type LiquidityOperationListData as bC, type LiquidityPoolListData as bD, type LiquidityPositionData as bE, type LiquidityReserveData as bF, type LiquiditySubmitOutcomeData as bG, type PayinListData as bH, type PayinMethod as bI, type PayinPayerRules as bJ, type PaymentIntentListData as bK, type PayoutChain as bL, type PayoutListData as bM, type PayoutNetwork as bN, type PluginListData as bO, type RampToken as bP, type ReceiverListData as bQ, type ReceiverOwner as bR, type ReceiverType as bS, type ReceiverWalletListData as bT, type ReceiverWalletNetwork as bU, type RegistryAssetData as bV, type ResolvableIntentInput as bW, type ResolvedAsset as bX, type SwapListData as bY, type SwapSubmitOutcomeData as bZ, TestnetAssets as b_, type CreateWebhookEndpointOptions as ba, type WebhookEvent as bb, type ActivityBucket as bc, type ActivityEventData as bd, type ActivityLevel as be, type ActivitySource as bf, AddressBook as bg, type AddressRef as bh, type AliasChallengePurpose as bi, type AnalyticsBalanceEntry as bj, type AnalyticsRecentRow as bk, type AnalyticsSeriesPoint as bl, type AnalyticsVolumeEntry as bm, type ApiLogRow as bn, type AssetDefinition as bo, type AssetRef as bp, Assets as bq, type BankAccountListData as br, type BankRail as bs, type BankingPartner as bt, type ChainSwapListData as bu, type ChainSwapSubmitOutcomeData as bv, CosmosPayAPIError as bw, CosmosPayRequestError as bx, type CrossChainSwapListData as by, type CurrencyType as bz, type AliasChallengeData as c, Wallets as c0, type WebhookDeliveryListData as c1, type WebhookLogRow as c2, addresses as c3, assertAddress as c4, defineAsset as c5, isAddress as c6, isContractAddress as c7, isMuxedAddress as c8, isNativeAsset as c9, isStellarAddress as ca, resolveAddress as cb, resolveAsset as cc, resolveIntentBody as cd, type ClaimAliasOptions as d, type AliasListData as e, type AddAliasAddressOptions as f, type AliasAddressData as g, type AliasDeletedData as h, type AliasRecoveryStartedData as i, type CompleteAliasRecoveryOptions as j, type AnalyticsSummaryData as k, type AnalyticsBalancesData as l, type ApiLogsData as m, type AssetRegistryData as n, type CustomerData as o, type CreateCustomerOptions as p, type LiquidityOperationData as q, LiquidityOperationKind as r, LiquidityOperationStatus as s, type WithdrawLiquidityOptions as t, type LiquidityPositionsData as u, type LiquidityPoolData as v, type ListLiquidityOperationsOptions as w, type CreatePayinQuoteOptions as x, type CreatePayinOptions as y, type PayinData as z };
|