@cosmosapp/pay_sdk 1.2.0 → 2.0.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 +18 -0
- package/LICENSE +0 -75
- package/NOTICE +8 -0
- package/README.md +15 -18
- package/dist/chunk-AYVWYEOK.js +62 -0
- package/dist/chunk-AYVWYEOK.js.map +1 -0
- package/dist/{chunk-TZDZBVFS.js → chunk-TM4HAKWE.js} +5 -3
- package/dist/chunk-TM4HAKWE.js.map +1 -0
- package/dist/cosmosProvider-CFASjnd5.d.cts +100 -0
- package/dist/cosmosProvider-CFASjnd5.d.ts +100 -0
- package/dist/index.cjs +739 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +618 -6
- package/dist/index.d.ts +618 -6
- package/dist/index.js +731 -5
- package/dist/index.js.map +1 -1
- package/dist/intent-input-BtUp3tFN.d.cts +1697 -0
- package/dist/intent-input-BtUp3tFN.d.ts +1697 -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/03-quickstart.md +4 -4
- package/llms/05-payment-intents.md +6 -2
- package/llms/08-products-customers.md +1 -1
- package/llms/13-types-reference.md +1 -1
- package/llms/14-recipes.md +14 -8
- package/llms/llms-full.txt +26 -16
- package/package.json +17 -6
- package/dist/chunk-TZDZBVFS.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,1697 @@
|
|
|
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
|
+
};
|
|
133
|
+
type WebhookEventType = (typeof WebhookEventType)[keyof typeof WebhookEventType];
|
|
134
|
+
/** Delivery state of a single webhook attempt. */
|
|
135
|
+
declare const WebhookDeliveryStatus: {
|
|
136
|
+
readonly Pending: "PENDING";
|
|
137
|
+
readonly Succeeded: "SUCCEEDED";
|
|
138
|
+
readonly Failed: "FAILED";
|
|
139
|
+
};
|
|
140
|
+
type WebhookDeliveryStatus = (typeof WebhookDeliveryStatus)[keyof typeof WebhookDeliveryStatus];
|
|
141
|
+
/** Product billing kind. */
|
|
142
|
+
declare const ProductKind: {
|
|
143
|
+
readonly Recurring: "recurring";
|
|
144
|
+
readonly OneTime: "one_time";
|
|
145
|
+
readonly Link: "link";
|
|
146
|
+
};
|
|
147
|
+
type ProductKind = (typeof ProductKind)[keyof typeof ProductKind];
|
|
148
|
+
/** Lifecycle state of a swap. */
|
|
149
|
+
declare const SwapStatus: {
|
|
150
|
+
readonly Pending: "PENDING";
|
|
151
|
+
readonly Submitted: "SUBMITTED";
|
|
152
|
+
readonly Succeeded: "SUCCEEDED";
|
|
153
|
+
readonly Failed: "FAILED";
|
|
154
|
+
readonly Expired: "EXPIRED";
|
|
155
|
+
};
|
|
156
|
+
type SwapStatus = (typeof SwapStatus)[keyof typeof SwapStatus];
|
|
157
|
+
/** Which side of a pool an operation is on. */
|
|
158
|
+
declare const LiquidityOperationKind: {
|
|
159
|
+
readonly Deposit: "DEPOSIT";
|
|
160
|
+
readonly Withdraw: "WITHDRAW";
|
|
161
|
+
};
|
|
162
|
+
type LiquidityOperationKind = (typeof LiquidityOperationKind)[keyof typeof LiquidityOperationKind];
|
|
163
|
+
/** Lifecycle state of a liquidity pool operation. */
|
|
164
|
+
declare const LiquidityOperationStatus: {
|
|
165
|
+
readonly Pending: "PENDING";
|
|
166
|
+
readonly Submitted: "SUBMITTED";
|
|
167
|
+
readonly Succeeded: "SUCCEEDED";
|
|
168
|
+
readonly Failed: "FAILED";
|
|
169
|
+
readonly Expired: "EXPIRED";
|
|
170
|
+
};
|
|
171
|
+
type LiquidityOperationStatus = (typeof LiquidityOperationStatus)[keyof typeof LiquidityOperationStatus];
|
|
172
|
+
/** Body for `POST /v1/payment-intents/tx`. */
|
|
173
|
+
interface CreateTxPaymentIntentOptions {
|
|
174
|
+
/** Payer's Stellar account — the transaction source. A registered address-book name also works. */
|
|
175
|
+
source: string;
|
|
176
|
+
/** Payee's Stellar account. A registered address-book name also works. */
|
|
177
|
+
destination: string;
|
|
178
|
+
/** Amount as a decimal string (max 7 decimals). */
|
|
179
|
+
amount: string;
|
|
180
|
+
/**
|
|
181
|
+
* Typed asset (e.g. `Assets.USDC` or `defineAsset(...)`) — fills `assetCode`
|
|
182
|
+
* and `assetIssuer` for you. Takes a back seat to explicit code/issuer below.
|
|
183
|
+
*/
|
|
184
|
+
asset?: AssetRef;
|
|
185
|
+
/** Asset code. Omit (or `XLM`/`native`) for native lumens. */
|
|
186
|
+
assetCode?: string;
|
|
187
|
+
/** Issuer account for a non-native asset. */
|
|
188
|
+
assetIssuer?: string;
|
|
189
|
+
/** MEMO_ID (numeric uint64) for idempotency + on-chain identification. Auto-generated when omitted. */
|
|
190
|
+
memo?: string;
|
|
191
|
+
/** SEP-7 `msg`: shown to the user in their wallet (≤ 300 chars). */
|
|
192
|
+
msg?: string;
|
|
193
|
+
/** SEP-7 `callback` where the wallet POSTs the signed XDR, e.g. `url:https://...`. */
|
|
194
|
+
callback?: string;
|
|
195
|
+
}
|
|
196
|
+
/** Body for `POST /v1/payment-intents/pay`. */
|
|
197
|
+
interface CreatePayPaymentIntentOptions {
|
|
198
|
+
/** Payee's Stellar account. A registered address-book name also works. */
|
|
199
|
+
destination: string;
|
|
200
|
+
/** Amount the destination should receive. Omit to let the user enter it (e.g. donations). */
|
|
201
|
+
amount?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Typed asset (e.g. `Assets.USDC` or `defineAsset(...)`) — fills `assetCode`
|
|
204
|
+
* and `assetIssuer` for you. Takes a back seat to explicit code/issuer below.
|
|
205
|
+
*/
|
|
206
|
+
asset?: AssetRef;
|
|
207
|
+
/** Asset code the destination receives. Omit for native lumens (XLM). */
|
|
208
|
+
assetCode?: string;
|
|
209
|
+
/** Issuer account for a non-native asset. */
|
|
210
|
+
assetIssuer?: string;
|
|
211
|
+
/** MEMO_ID (numeric uint64) for idempotency + on-chain identification. Auto-generated when omitted. */
|
|
212
|
+
memo?: string;
|
|
213
|
+
/** SEP-7 `msg`: shown to the user in their wallet (≤ 300 chars). */
|
|
214
|
+
msg?: string;
|
|
215
|
+
/** SEP-7 `callback`, e.g. `url:https://...`. */
|
|
216
|
+
callback?: string;
|
|
217
|
+
}
|
|
218
|
+
/** Body for `PATCH /v1/payment-intents/:id`. */
|
|
219
|
+
interface UpdatePaymentIntentOptions {
|
|
220
|
+
status?: PaymentIntentStatus;
|
|
221
|
+
/** Stellar transaction hash once the signed tx is submitted. */
|
|
222
|
+
txHash?: string;
|
|
223
|
+
/** Merchant reference. */
|
|
224
|
+
reference?: string;
|
|
225
|
+
}
|
|
226
|
+
/** Query for `GET /v1/payment-intents`. */
|
|
227
|
+
interface ListPaymentIntentsOptions {
|
|
228
|
+
status?: PaymentIntentStatus;
|
|
229
|
+
/** Page size (max 100, default 20). */
|
|
230
|
+
take?: number;
|
|
231
|
+
/** Offset (default 0). */
|
|
232
|
+
skip?: number;
|
|
233
|
+
}
|
|
234
|
+
/** Raw payment intent payload returned by the API. */
|
|
235
|
+
interface PaymentIntentData {
|
|
236
|
+
id: string;
|
|
237
|
+
kind: PaymentIntentKind;
|
|
238
|
+
status: PaymentIntentStatus;
|
|
239
|
+
network: string;
|
|
240
|
+
source: string | null;
|
|
241
|
+
destination: string;
|
|
242
|
+
amount: string | null;
|
|
243
|
+
asset: string;
|
|
244
|
+
assetIssuer: string | null;
|
|
245
|
+
memo: string;
|
|
246
|
+
msg: string | null;
|
|
247
|
+
callback: string | null;
|
|
248
|
+
xdr: string | null;
|
|
249
|
+
uri: string;
|
|
250
|
+
qr: string;
|
|
251
|
+
txHash: string | null;
|
|
252
|
+
reference: string | null;
|
|
253
|
+
createdAt: string;
|
|
254
|
+
updatedAt: string;
|
|
255
|
+
}
|
|
256
|
+
/** Raw paginated list of payment intents. */
|
|
257
|
+
interface PaymentIntentListData {
|
|
258
|
+
data: PaymentIntentData[];
|
|
259
|
+
total: number;
|
|
260
|
+
take: number;
|
|
261
|
+
skip: number;
|
|
262
|
+
}
|
|
263
|
+
/** Body for `POST /v1/payment-intents/:id/validate`. */
|
|
264
|
+
interface ValidatePaymentIntentOptions {
|
|
265
|
+
/** Hash of the submitted Stellar transaction to validate against this intent. */
|
|
266
|
+
txHash: string;
|
|
267
|
+
}
|
|
268
|
+
/** Raw outcome of a validation attempt. */
|
|
269
|
+
interface ValidationOutcomeData {
|
|
270
|
+
valid: boolean;
|
|
271
|
+
status: PaymentIntentStatus;
|
|
272
|
+
reason?: string | null;
|
|
273
|
+
paymentIntent?: PaymentIntentData;
|
|
274
|
+
}
|
|
275
|
+
/** Raw `{ id, deleted }` response. */
|
|
276
|
+
interface DeletedData {
|
|
277
|
+
id: string;
|
|
278
|
+
deleted: boolean;
|
|
279
|
+
}
|
|
280
|
+
/** Body for `POST /v1/webhooks`. */
|
|
281
|
+
interface CreateWebhookEndpointOptions {
|
|
282
|
+
/** HTTPS URL that will receive POSTed event notifications. */
|
|
283
|
+
url: string;
|
|
284
|
+
description?: string;
|
|
285
|
+
/** Event types to subscribe to. Omit/empty to receive all events. */
|
|
286
|
+
eventTypes?: WebhookEventType[];
|
|
287
|
+
}
|
|
288
|
+
/** Body for `PATCH /v1/webhooks/:id`. */
|
|
289
|
+
interface UpdateWebhookEndpointOptions {
|
|
290
|
+
url?: string;
|
|
291
|
+
description?: string;
|
|
292
|
+
/** Pause/resume deliveries to this endpoint. */
|
|
293
|
+
enabled?: boolean;
|
|
294
|
+
eventTypes?: WebhookEventType[];
|
|
295
|
+
}
|
|
296
|
+
/** Raw webhook endpoint payload. */
|
|
297
|
+
interface WebhookEndpointData {
|
|
298
|
+
id: string;
|
|
299
|
+
url: string;
|
|
300
|
+
description: string | null;
|
|
301
|
+
enabled: boolean;
|
|
302
|
+
eventTypes: WebhookEventType[];
|
|
303
|
+
createdAt: string;
|
|
304
|
+
updatedAt: string;
|
|
305
|
+
}
|
|
306
|
+
/** Raw webhook endpoint payload including the one-time signing secret. */
|
|
307
|
+
interface WebhookEndpointWithSecretData extends WebhookEndpointData {
|
|
308
|
+
/** HMAC signing secret — shown once. Store it securely. */
|
|
309
|
+
secret: string;
|
|
310
|
+
}
|
|
311
|
+
/** Raw result of a webhook ping. */
|
|
312
|
+
interface WebhookPingData {
|
|
313
|
+
ok: boolean;
|
|
314
|
+
responseStatus: number | null;
|
|
315
|
+
error: string | null;
|
|
316
|
+
}
|
|
317
|
+
/** Raw webhook delivery (audit) record. */
|
|
318
|
+
interface WebhookDeliveryData {
|
|
319
|
+
id: string;
|
|
320
|
+
endpointId: string;
|
|
321
|
+
eventType: WebhookEventType;
|
|
322
|
+
eventId: string;
|
|
323
|
+
payload: Record<string, unknown>;
|
|
324
|
+
status: WebhookDeliveryStatus;
|
|
325
|
+
attempts: number;
|
|
326
|
+
responseStatus: number | null;
|
|
327
|
+
error: string | null;
|
|
328
|
+
lastAttemptAt: string | null;
|
|
329
|
+
createdAt: string;
|
|
330
|
+
updatedAt: string;
|
|
331
|
+
}
|
|
332
|
+
/** Raw paginated list of webhook deliveries. */
|
|
333
|
+
interface WebhookDeliveryListData {
|
|
334
|
+
data: WebhookDeliveryData[];
|
|
335
|
+
total: number;
|
|
336
|
+
take: number;
|
|
337
|
+
skip: number;
|
|
338
|
+
}
|
|
339
|
+
/** Query for `GET /v1/webhooks/:id/deliveries`. */
|
|
340
|
+
interface ListWebhookDeliveriesOptions {
|
|
341
|
+
status?: WebhookDeliveryStatus;
|
|
342
|
+
take?: number;
|
|
343
|
+
skip?: number;
|
|
344
|
+
}
|
|
345
|
+
/** Shape of the JSON body POSTed to an integrator's webhook URL. */
|
|
346
|
+
interface WebhookEvent<T = PaymentIntentData> {
|
|
347
|
+
/** Stable event id (use for idempotency). */
|
|
348
|
+
id: string;
|
|
349
|
+
type: WebhookEventType;
|
|
350
|
+
createdAt: string;
|
|
351
|
+
data: T;
|
|
352
|
+
}
|
|
353
|
+
/** Body for `POST /v1/products`. */
|
|
354
|
+
interface CreateProductOptions {
|
|
355
|
+
name: string;
|
|
356
|
+
description?: string;
|
|
357
|
+
/** Decimal price (≤ 7 decimals). Omit for a customer-set amount. */
|
|
358
|
+
amount?: string;
|
|
359
|
+
/** Asset code the price is in. Omit for native lumens (XLM). */
|
|
360
|
+
assetCode?: string;
|
|
361
|
+
kind?: ProductKind;
|
|
362
|
+
active?: boolean;
|
|
363
|
+
reference?: string;
|
|
364
|
+
}
|
|
365
|
+
/** Body for `PATCH /v1/products/:id`. */
|
|
366
|
+
type UpdateProductOptions = Partial<CreateProductOptions>;
|
|
367
|
+
/** Raw product payload. */
|
|
368
|
+
interface ProductData {
|
|
369
|
+
id: string;
|
|
370
|
+
name: string;
|
|
371
|
+
description: string | null;
|
|
372
|
+
amount: string | null;
|
|
373
|
+
asset: string;
|
|
374
|
+
kind: ProductKind;
|
|
375
|
+
active: boolean;
|
|
376
|
+
reference: string | null;
|
|
377
|
+
createdAt: string;
|
|
378
|
+
updatedAt: string;
|
|
379
|
+
}
|
|
380
|
+
/** Body for `POST /v1/customers`. */
|
|
381
|
+
interface CreateCustomerOptions {
|
|
382
|
+
name: string;
|
|
383
|
+
alias?: string;
|
|
384
|
+
note?: string;
|
|
385
|
+
email?: string;
|
|
386
|
+
/** Optional Stellar account to associate the customer with. */
|
|
387
|
+
account?: string;
|
|
388
|
+
reference?: string;
|
|
389
|
+
}
|
|
390
|
+
/** Body for `PATCH /v1/customers/:id`. */
|
|
391
|
+
type UpdateCustomerOptions = Partial<CreateCustomerOptions>;
|
|
392
|
+
/**
|
|
393
|
+
* Raw customer payload.
|
|
394
|
+
*
|
|
395
|
+
* There is no `consumerId`: the API stopped sending it, because the owning
|
|
396
|
+
* consumer is the key that made the call and an internal id is not part of the
|
|
397
|
+
* contract.
|
|
398
|
+
*/
|
|
399
|
+
interface CustomerData {
|
|
400
|
+
id: string;
|
|
401
|
+
name: string;
|
|
402
|
+
alias: string | null;
|
|
403
|
+
note: string | null;
|
|
404
|
+
email: string | null;
|
|
405
|
+
account: string | null;
|
|
406
|
+
reference: string | null;
|
|
407
|
+
createdAt: string;
|
|
408
|
+
updatedAt: string;
|
|
409
|
+
/** Derived on-chain stats (present in list responses). */
|
|
410
|
+
payments?: number;
|
|
411
|
+
succeeded?: number;
|
|
412
|
+
total?: string;
|
|
413
|
+
}
|
|
414
|
+
/** Raw `{ data, total }` list of customers. */
|
|
415
|
+
interface CustomerListData {
|
|
416
|
+
data: CustomerData[];
|
|
417
|
+
total: number;
|
|
418
|
+
}
|
|
419
|
+
interface AnalyticsVolumeEntry {
|
|
420
|
+
asset: string;
|
|
421
|
+
amount: string;
|
|
422
|
+
count: number;
|
|
423
|
+
}
|
|
424
|
+
interface AnalyticsSeriesPoint {
|
|
425
|
+
date: string;
|
|
426
|
+
count: number;
|
|
427
|
+
volume: string;
|
|
428
|
+
}
|
|
429
|
+
interface AnalyticsRecentRow {
|
|
430
|
+
id: string;
|
|
431
|
+
kind: string;
|
|
432
|
+
status: PaymentIntentStatus;
|
|
433
|
+
amount: string | null;
|
|
434
|
+
asset: string;
|
|
435
|
+
destination: string;
|
|
436
|
+
createdAt: string;
|
|
437
|
+
}
|
|
438
|
+
/** Raw overview metrics returned by `GET /v1/summary`. */
|
|
439
|
+
interface AnalyticsSummaryData {
|
|
440
|
+
totals: {
|
|
441
|
+
all: number;
|
|
442
|
+
succeeded: number;
|
|
443
|
+
pending: number;
|
|
444
|
+
submitted: number;
|
|
445
|
+
failed: number;
|
|
446
|
+
cancelled: number;
|
|
447
|
+
expired: number;
|
|
448
|
+
successRate: number;
|
|
449
|
+
};
|
|
450
|
+
volume: AnalyticsVolumeEntry[];
|
|
451
|
+
webhooks: {
|
|
452
|
+
endpoints: number;
|
|
453
|
+
deliveries: number;
|
|
454
|
+
failedDeliveries: number;
|
|
455
|
+
};
|
|
456
|
+
customers: number;
|
|
457
|
+
series: AnalyticsSeriesPoint[];
|
|
458
|
+
recent: AnalyticsRecentRow[];
|
|
459
|
+
}
|
|
460
|
+
interface AnalyticsBalanceEntry {
|
|
461
|
+
asset: string;
|
|
462
|
+
amount: string;
|
|
463
|
+
pending: string;
|
|
464
|
+
count: number;
|
|
465
|
+
}
|
|
466
|
+
/** Raw balances returned by `GET /v1/balances`. */
|
|
467
|
+
interface AnalyticsBalancesData {
|
|
468
|
+
data: AnalyticsBalanceEntry[];
|
|
469
|
+
total: number;
|
|
470
|
+
}
|
|
471
|
+
interface ApiLogRow {
|
|
472
|
+
id: string;
|
|
473
|
+
method: string;
|
|
474
|
+
path: string;
|
|
475
|
+
statusCode: number;
|
|
476
|
+
durationMs: number;
|
|
477
|
+
ip: string | null;
|
|
478
|
+
userAgent: string | null;
|
|
479
|
+
status: 'ok' | 'pending' | 'fail';
|
|
480
|
+
at: string;
|
|
481
|
+
}
|
|
482
|
+
/** Raw API request log returned by `GET /v1/logs`. */
|
|
483
|
+
interface ApiLogsData {
|
|
484
|
+
data: ApiLogRow[];
|
|
485
|
+
total: number;
|
|
486
|
+
}
|
|
487
|
+
interface WebhookLogRow {
|
|
488
|
+
id: string;
|
|
489
|
+
endpointId: string;
|
|
490
|
+
url: string | null;
|
|
491
|
+
eventType: WebhookEventType;
|
|
492
|
+
eventId: string;
|
|
493
|
+
attempts: number;
|
|
494
|
+
responseStatus: number | null;
|
|
495
|
+
error: string | null;
|
|
496
|
+
status: 'ok' | 'pending' | 'fail';
|
|
497
|
+
at: string;
|
|
498
|
+
}
|
|
499
|
+
/** Raw webhook delivery log returned by `GET /v1/logs/webhooks`. */
|
|
500
|
+
interface WebhookLogsData {
|
|
501
|
+
data: WebhookLogRow[];
|
|
502
|
+
total: number;
|
|
503
|
+
}
|
|
504
|
+
interface HealthCheckData {
|
|
505
|
+
status: string;
|
|
506
|
+
info?: Record<string, {
|
|
507
|
+
status: string;
|
|
508
|
+
} & Record<string, unknown>> | null;
|
|
509
|
+
error?: Record<string, {
|
|
510
|
+
status: string;
|
|
511
|
+
} & Record<string, unknown>> | null;
|
|
512
|
+
details?: Record<string, {
|
|
513
|
+
status: string;
|
|
514
|
+
} & Record<string, unknown>>;
|
|
515
|
+
}
|
|
516
|
+
/** Body for `POST /v1/swaps/quote` (pricing only; no fee parameter — the fee is enforced server-side per organization). */
|
|
517
|
+
interface QuoteSwapOptions {
|
|
518
|
+
/** Amount to send, as a decimal string (max 7 decimals). */
|
|
519
|
+
amount: string;
|
|
520
|
+
/** Source asset code. Omit (or `XLM`/`native`) for native lumens. */
|
|
521
|
+
sourceAssetCode?: string;
|
|
522
|
+
/** Issuer account for a non-native source asset. */
|
|
523
|
+
sourceAssetIssuer?: string;
|
|
524
|
+
/** Destination asset code the swap should deliver. */
|
|
525
|
+
destAssetCode: string;
|
|
526
|
+
/** Issuer account for a non-native destination asset. */
|
|
527
|
+
destAssetIssuer?: string;
|
|
528
|
+
/** Allowed slippage in basis points. */
|
|
529
|
+
slippageBps?: number;
|
|
530
|
+
}
|
|
531
|
+
/** Body for `POST /v1/swaps`. */
|
|
532
|
+
interface CreateSwapOptions extends QuoteSwapOptions {
|
|
533
|
+
/** Source account performing the swap. A registered address-book name also works. */
|
|
534
|
+
source: string;
|
|
535
|
+
/** Destination account that receives the swapped asset. Defaults to the source. */
|
|
536
|
+
destination?: string;
|
|
537
|
+
/** MEMO_ID (numeric uint64) for idempotency + on-chain identification. */
|
|
538
|
+
memo?: string;
|
|
539
|
+
}
|
|
540
|
+
/** Body for `POST /v1/swaps/:id/submit`. */
|
|
541
|
+
interface SubmitSwapOptions {
|
|
542
|
+
/** Signed transaction envelope (base64 XDR) to relay to the network. */
|
|
543
|
+
signedXdr: string;
|
|
544
|
+
}
|
|
545
|
+
/** Query for `GET /v1/swaps`. */
|
|
546
|
+
interface ListSwapsOptions {
|
|
547
|
+
status?: SwapStatus;
|
|
548
|
+
/** Page size (max 100, default 20). */
|
|
549
|
+
take?: number;
|
|
550
|
+
/** Offset (default 0). */
|
|
551
|
+
skip?: number;
|
|
552
|
+
}
|
|
553
|
+
/** Raw swap payload returned by the API. */
|
|
554
|
+
interface SwapData {
|
|
555
|
+
id: string;
|
|
556
|
+
status: SwapStatus;
|
|
557
|
+
network: string;
|
|
558
|
+
source: string;
|
|
559
|
+
destination: string;
|
|
560
|
+
sendAsset: string;
|
|
561
|
+
sendAssetIssuer: string | null;
|
|
562
|
+
sendAmount: string;
|
|
563
|
+
feeAmount: string;
|
|
564
|
+
feeBps: number;
|
|
565
|
+
swapAmount: string;
|
|
566
|
+
destAsset: string;
|
|
567
|
+
destAssetIssuer: string | null;
|
|
568
|
+
destEstimated: string;
|
|
569
|
+
destMin: string;
|
|
570
|
+
slippageBps: number;
|
|
571
|
+
path: {
|
|
572
|
+
code: string;
|
|
573
|
+
issuer: string | null;
|
|
574
|
+
}[];
|
|
575
|
+
memo: string | null;
|
|
576
|
+
xdr: string;
|
|
577
|
+
uri: string;
|
|
578
|
+
txHash: string;
|
|
579
|
+
qr: string;
|
|
580
|
+
createdAt: string;
|
|
581
|
+
updatedAt: string;
|
|
582
|
+
}
|
|
583
|
+
/** Raw paginated list of swaps. */
|
|
584
|
+
interface SwapListData {
|
|
585
|
+
data: SwapData[];
|
|
586
|
+
total: number;
|
|
587
|
+
take: number;
|
|
588
|
+
skip: number;
|
|
589
|
+
}
|
|
590
|
+
/** Raw pricing quote returned by `POST /v1/swaps/quote`. */
|
|
591
|
+
interface SwapQuoteData {
|
|
592
|
+
network: string;
|
|
593
|
+
source: {
|
|
594
|
+
asset: string;
|
|
595
|
+
issuer: string | null;
|
|
596
|
+
amount: string;
|
|
597
|
+
};
|
|
598
|
+
fee: {
|
|
599
|
+
asset: string;
|
|
600
|
+
issuer: string | null;
|
|
601
|
+
amount: string;
|
|
602
|
+
bps: number;
|
|
603
|
+
wallet: string | null;
|
|
604
|
+
};
|
|
605
|
+
swap: {
|
|
606
|
+
asset: string;
|
|
607
|
+
issuer: string | null;
|
|
608
|
+
amount: string;
|
|
609
|
+
};
|
|
610
|
+
destination: {
|
|
611
|
+
asset: string;
|
|
612
|
+
issuer: string | null;
|
|
613
|
+
estimated: string;
|
|
614
|
+
minimum: string;
|
|
615
|
+
slippageBps: number;
|
|
616
|
+
};
|
|
617
|
+
path: {
|
|
618
|
+
code: string;
|
|
619
|
+
issuer: string | null;
|
|
620
|
+
}[];
|
|
621
|
+
}
|
|
622
|
+
/** Raw outcome of relaying a signed swap transaction. */
|
|
623
|
+
interface SwapSubmitOutcomeData {
|
|
624
|
+
submitted: boolean;
|
|
625
|
+
status: SwapStatus;
|
|
626
|
+
txHash?: string;
|
|
627
|
+
reason?: string;
|
|
628
|
+
resultCodes?: string[];
|
|
629
|
+
swap: SwapData;
|
|
630
|
+
}
|
|
631
|
+
/** Body for `POST /v1/liquidity-pools/deposit`. */
|
|
632
|
+
interface DepositLiquidityOptions {
|
|
633
|
+
/** Account whose funds go in, and which signs. An address-book name also works. */
|
|
634
|
+
source: string;
|
|
635
|
+
/** Asset A code. Omit (or `XLM`/`native`) for native lumens. */
|
|
636
|
+
assetACode?: string;
|
|
637
|
+
/** Issuer for a non-native asset A. */
|
|
638
|
+
assetAIssuer?: string;
|
|
639
|
+
/** Asset B code. */
|
|
640
|
+
assetBCode?: string;
|
|
641
|
+
/** Issuer for a non-native asset B. */
|
|
642
|
+
assetBIssuer?: string;
|
|
643
|
+
/** Ceiling on how much of asset A may go in, as a decimal string. */
|
|
644
|
+
maxAmountA: string;
|
|
645
|
+
/** Ceiling on how much of asset B may go in. */
|
|
646
|
+
maxAmountB: string;
|
|
647
|
+
/** Allowed price movement in basis points. */
|
|
648
|
+
slippageBps?: number;
|
|
649
|
+
/** MEMO_ID (numeric uint64) for on-chain identification. */
|
|
650
|
+
memo?: string;
|
|
651
|
+
/**
|
|
652
|
+
* Idempotency token. Sent both as the body field and as the `Idempotency-Key`
|
|
653
|
+
* header, which is what makes a retried deposit return the FIRST operation
|
|
654
|
+
* instead of building a second one against the same funds.
|
|
655
|
+
*/
|
|
656
|
+
idempotencyKey?: string;
|
|
657
|
+
}
|
|
658
|
+
/** Body for `POST /v1/liquidity-pools/withdraw`. */
|
|
659
|
+
interface WithdrawLiquidityOptions {
|
|
660
|
+
/** Account holding the shares, and which signs. */
|
|
661
|
+
source: string;
|
|
662
|
+
/** The pool to withdraw from (hex id). */
|
|
663
|
+
poolId: string;
|
|
664
|
+
/** Pool shares to burn, as a decimal string. */
|
|
665
|
+
shares: string;
|
|
666
|
+
/** Allowed price movement in basis points. */
|
|
667
|
+
slippageBps?: number;
|
|
668
|
+
memo?: string;
|
|
669
|
+
/** See {@link DepositLiquidityOptions.idempotencyKey}. */
|
|
670
|
+
idempotencyKey?: string;
|
|
671
|
+
}
|
|
672
|
+
/** Body for `POST /v1/liquidity-pools/operations/:id/submit`. */
|
|
673
|
+
interface SubmitLiquidityOptions {
|
|
674
|
+
/** Signed transaction envelope (base64 XDR) to relay to the network. */
|
|
675
|
+
signedXdr: string;
|
|
676
|
+
}
|
|
677
|
+
/** Query for `GET /v1/liquidity-pools/operations`. */
|
|
678
|
+
interface ListLiquidityOperationsOptions {
|
|
679
|
+
kind?: LiquidityOperationKind;
|
|
680
|
+
status?: LiquidityOperationStatus;
|
|
681
|
+
/** Page size (max 100, default 20). */
|
|
682
|
+
take?: number;
|
|
683
|
+
/** Offset (default 0). */
|
|
684
|
+
skip?: number;
|
|
685
|
+
}
|
|
686
|
+
/** Query for `GET /v1/liquidity-pools` (Horizon proxy). */
|
|
687
|
+
interface BrowseLiquidityPoolsOptions {
|
|
688
|
+
assetACode?: string;
|
|
689
|
+
assetAIssuer?: string;
|
|
690
|
+
assetBCode?: string;
|
|
691
|
+
assetBIssuer?: string;
|
|
692
|
+
/** Only pools this account holds shares in. */
|
|
693
|
+
account?: string;
|
|
694
|
+
/** Horizon paging cursor from a previous page. */
|
|
695
|
+
cursor?: string;
|
|
696
|
+
limit?: number;
|
|
697
|
+
}
|
|
698
|
+
/** One side of a pool's reserves. */
|
|
699
|
+
interface LiquidityReserveData {
|
|
700
|
+
asset: string;
|
|
701
|
+
issuer: string | null;
|
|
702
|
+
amount: string;
|
|
703
|
+
}
|
|
704
|
+
/** Raw on-chain pool payload (Horizon proxy). */
|
|
705
|
+
interface LiquidityPoolData {
|
|
706
|
+
id: string;
|
|
707
|
+
network: string;
|
|
708
|
+
/** Pool fee in basis points — 30 for every constant-product pool today. */
|
|
709
|
+
feeBp: number;
|
|
710
|
+
totalTrustlines: string;
|
|
711
|
+
totalShares: string;
|
|
712
|
+
reserves: LiquidityReserveData[];
|
|
713
|
+
}
|
|
714
|
+
/** Raw cursor-paginated list of pools. */
|
|
715
|
+
interface LiquidityPoolListData {
|
|
716
|
+
data: LiquidityPoolData[];
|
|
717
|
+
cursor?: string | null;
|
|
718
|
+
}
|
|
719
|
+
/** One account's stake in one pool. */
|
|
720
|
+
interface LiquidityPositionData {
|
|
721
|
+
poolId: string;
|
|
722
|
+
/** Shares this account holds. */
|
|
723
|
+
shares: string;
|
|
724
|
+
/** Shares in existence. */
|
|
725
|
+
totalShares: string;
|
|
726
|
+
/** The account's share of the pool, in basis points. */
|
|
727
|
+
shareOfPoolBps: number;
|
|
728
|
+
reserves: LiquidityReserveData[];
|
|
729
|
+
/** What those shares would redeem for right now. */
|
|
730
|
+
redeemable: LiquidityReserveData[];
|
|
731
|
+
}
|
|
732
|
+
/** Raw payload of `GET /v1/liquidity-pools/positions`. */
|
|
733
|
+
interface LiquidityPositionsData {
|
|
734
|
+
account: string;
|
|
735
|
+
network: string;
|
|
736
|
+
data: LiquidityPositionData[];
|
|
737
|
+
}
|
|
738
|
+
/** Raw liquidity operation payload returned by the API. */
|
|
739
|
+
interface LiquidityOperationData {
|
|
740
|
+
id: string;
|
|
741
|
+
kind: LiquidityOperationKind;
|
|
742
|
+
status: LiquidityOperationStatus;
|
|
743
|
+
network: string;
|
|
744
|
+
source: string;
|
|
745
|
+
poolId: string;
|
|
746
|
+
assetA: string;
|
|
747
|
+
assetAIssuer: string | null;
|
|
748
|
+
assetB: string;
|
|
749
|
+
assetBIssuer: string | null;
|
|
750
|
+
amountA: string;
|
|
751
|
+
amountB: string;
|
|
752
|
+
shares: string | null;
|
|
753
|
+
minPrice: string | null;
|
|
754
|
+
maxPrice: string | null;
|
|
755
|
+
slippageBps: number;
|
|
756
|
+
idempotencyKey: string | null;
|
|
757
|
+
feeBps: number;
|
|
758
|
+
feeAmountA: string;
|
|
759
|
+
feeAmountB: string;
|
|
760
|
+
feeWallet: string | null;
|
|
761
|
+
commissionMemo: string | null;
|
|
762
|
+
xdr: string;
|
|
763
|
+
uri: string;
|
|
764
|
+
txHash: string;
|
|
765
|
+
qr: string;
|
|
766
|
+
expiresAt: string | null;
|
|
767
|
+
createdAt: string;
|
|
768
|
+
updatedAt: string;
|
|
769
|
+
}
|
|
770
|
+
/** Raw paginated list of liquidity operations. */
|
|
771
|
+
interface LiquidityOperationListData {
|
|
772
|
+
data: LiquidityOperationData[];
|
|
773
|
+
total: number;
|
|
774
|
+
take: number;
|
|
775
|
+
skip: number;
|
|
776
|
+
}
|
|
777
|
+
/** Raw outcome of relaying a signed liquidity transaction. */
|
|
778
|
+
interface LiquiditySubmitOutcomeData {
|
|
779
|
+
submitted: boolean;
|
|
780
|
+
status: LiquidityOperationStatus;
|
|
781
|
+
txHash?: string;
|
|
782
|
+
reason?: string;
|
|
783
|
+
resultCodes?: string[];
|
|
784
|
+
operation: LiquidityOperationData;
|
|
785
|
+
}
|
|
786
|
+
/** Where an event came from. */
|
|
787
|
+
type ActivitySource = 'wallet' | 'dashboard' | 'server' | 'sdk';
|
|
788
|
+
/** Severity of an event. */
|
|
789
|
+
type ActivityLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
790
|
+
/** One event to report. Always batched — see {@link ReportActivityOptions}. */
|
|
791
|
+
interface ActivityEventInput {
|
|
792
|
+
/** Dotted event name, e.g. `payment.submitted`. */
|
|
793
|
+
type: string;
|
|
794
|
+
/**
|
|
795
|
+
* Client-generated id. The service de-duplicates on it, which is what makes a
|
|
796
|
+
* retried batch safe: the second delivery is counted as a duplicate rather than
|
|
797
|
+
* stored twice.
|
|
798
|
+
*/
|
|
799
|
+
eventId?: string;
|
|
800
|
+
source?: ActivitySource;
|
|
801
|
+
level?: ActivityLevel;
|
|
802
|
+
category?: string;
|
|
803
|
+
message?: string;
|
|
804
|
+
sessionId?: string;
|
|
805
|
+
distinctId?: string;
|
|
806
|
+
appVersion?: string;
|
|
807
|
+
platform?: string;
|
|
808
|
+
network?: string;
|
|
809
|
+
durationMs?: number;
|
|
810
|
+
/** Free-form properties. Never put secrets or memo text here. */
|
|
811
|
+
props?: Record<string, unknown>;
|
|
812
|
+
/** When it happened (ISO-8601). Defaults to arrival time. */
|
|
813
|
+
occurredAt?: string;
|
|
814
|
+
}
|
|
815
|
+
/** Body for `POST /v1/activity/events`. */
|
|
816
|
+
interface ReportActivityOptions {
|
|
817
|
+
events: ActivityEventInput[];
|
|
818
|
+
}
|
|
819
|
+
/** Raw outcome of a reported batch. */
|
|
820
|
+
interface ActivityReportData {
|
|
821
|
+
accepted: number;
|
|
822
|
+
/** Events whose `eventId` had already been stored. */
|
|
823
|
+
duplicates: number;
|
|
824
|
+
}
|
|
825
|
+
/** Query for `GET /v1/activity/events`. */
|
|
826
|
+
interface ListActivityOptions {
|
|
827
|
+
take?: number;
|
|
828
|
+
skip?: number;
|
|
829
|
+
source?: ActivitySource;
|
|
830
|
+
level?: ActivityLevel;
|
|
831
|
+
category?: string;
|
|
832
|
+
type?: string;
|
|
833
|
+
network?: string;
|
|
834
|
+
/** ISO-8601 lower bound (inclusive). */
|
|
835
|
+
since?: string;
|
|
836
|
+
/** ISO-8601 upper bound (exclusive). */
|
|
837
|
+
until?: string;
|
|
838
|
+
}
|
|
839
|
+
/** One stored event. */
|
|
840
|
+
interface ActivityEventData {
|
|
841
|
+
id: string;
|
|
842
|
+
source: string;
|
|
843
|
+
level: string;
|
|
844
|
+
category: string;
|
|
845
|
+
type: string;
|
|
846
|
+
message: string | null;
|
|
847
|
+
sessionId: string | null;
|
|
848
|
+
distinctId: string | null;
|
|
849
|
+
appVersion: string | null;
|
|
850
|
+
platform: string | null;
|
|
851
|
+
network: string | null;
|
|
852
|
+
durationMs: number | null;
|
|
853
|
+
props: Record<string, unknown> | null;
|
|
854
|
+
ip: string | null;
|
|
855
|
+
userAgent: string | null;
|
|
856
|
+
/** When it happened. */
|
|
857
|
+
at: string;
|
|
858
|
+
/** When the service stored it. */
|
|
859
|
+
receivedAt: string;
|
|
860
|
+
}
|
|
861
|
+
/** Raw paginated list of events. */
|
|
862
|
+
interface ActivityListData {
|
|
863
|
+
data: ActivityEventData[];
|
|
864
|
+
total: number;
|
|
865
|
+
take: number;
|
|
866
|
+
skip: number;
|
|
867
|
+
}
|
|
868
|
+
/** One `{ key, count }` bucket of an activity summary. */
|
|
869
|
+
interface ActivityBucket {
|
|
870
|
+
key: string;
|
|
871
|
+
count: number;
|
|
872
|
+
}
|
|
873
|
+
/** Raw payload of `GET /v1/activity/summary`. */
|
|
874
|
+
interface ActivitySummaryData {
|
|
875
|
+
total: number;
|
|
876
|
+
sessions: number;
|
|
877
|
+
devices: number;
|
|
878
|
+
levels: ActivityBucket[];
|
|
879
|
+
sources: ActivityBucket[];
|
|
880
|
+
categories: ActivityBucket[];
|
|
881
|
+
topTypes: ActivityBucket[];
|
|
882
|
+
topErrors: ActivityBucket[];
|
|
883
|
+
series: {
|
|
884
|
+
date: string;
|
|
885
|
+
count: number;
|
|
886
|
+
errors: number;
|
|
887
|
+
}[];
|
|
888
|
+
}
|
|
889
|
+
/** Stablecoins the ramps settle in. */
|
|
890
|
+
type RampToken = 'USDC' | 'USDT' | 'USDB';
|
|
891
|
+
/** Which side of a quote the requested amount refers to. */
|
|
892
|
+
type CurrencyType = 'sender' | 'receiver';
|
|
893
|
+
/** Fiat rails a payin can arrive over. */
|
|
894
|
+
type PayinMethod = 'ach' | 'wire' | 'pix' | 'ted' | 'spei' | 'transfers' | 'pse' | 'international_swift' | 'rtp';
|
|
895
|
+
/** Payer restrictions, for the rails that require them. */
|
|
896
|
+
interface PayinPayerRules {
|
|
897
|
+
pix_allowed_tax_ids?: string[];
|
|
898
|
+
transfers_allowed_tax_id?: string;
|
|
899
|
+
pse_allowed_tax_ids?: string[];
|
|
900
|
+
pse_full_name?: string;
|
|
901
|
+
pse_document_type?: string;
|
|
902
|
+
pse_document_number?: string;
|
|
903
|
+
pse_email?: string;
|
|
904
|
+
pse_phone?: string;
|
|
905
|
+
pse_bank_code?: string;
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* Body for `POST /v1/onramp/quotes`.
|
|
909
|
+
*
|
|
910
|
+
* The field names are snake_case because they are the RAMP PROVIDER's, and the
|
|
911
|
+
* service passes them through unchanged. Renaming them here would look tidier and
|
|
912
|
+
* would put a translation layer between two systems that already agree.
|
|
913
|
+
*/
|
|
914
|
+
interface CreatePayinQuoteOptions {
|
|
915
|
+
/** Wallet that receives the converted stablecoin. */
|
|
916
|
+
blockchain_wallet_id: string;
|
|
917
|
+
currency_type: CurrencyType;
|
|
918
|
+
payment_method: PayinMethod;
|
|
919
|
+
token: RampToken;
|
|
920
|
+
/** Amount in MINOR units (e.g. cents). */
|
|
921
|
+
request_amount: number;
|
|
922
|
+
cover_fees?: boolean;
|
|
923
|
+
payer_rules?: PayinPayerRules;
|
|
924
|
+
is_otc?: boolean;
|
|
925
|
+
partner_fee_id?: string;
|
|
926
|
+
wallet_id?: string;
|
|
927
|
+
}
|
|
928
|
+
/** Raw payin quote. Expires quickly — read `expires_at` before acting on it. */
|
|
929
|
+
interface PayinQuoteData {
|
|
930
|
+
id: string;
|
|
931
|
+
/** Unix seconds (~5 minutes out). */
|
|
932
|
+
expires_at: number;
|
|
933
|
+
commercial_quotation?: number;
|
|
934
|
+
receiver_amount?: number;
|
|
935
|
+
sender_amount?: number;
|
|
936
|
+
}
|
|
937
|
+
/** Body for `POST /v1/onramp/payins`. */
|
|
938
|
+
interface CreatePayinOptions {
|
|
939
|
+
payin_quote_id: string;
|
|
940
|
+
}
|
|
941
|
+
/** Query for `GET /v1/onramp/payins`. */
|
|
942
|
+
interface ListPayinsOptions {
|
|
943
|
+
take?: number;
|
|
944
|
+
skip?: number;
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Raw payin. The scalar fields are mirrored locally; `instructions` is passed
|
|
948
|
+
* through from the provider verbatim (memo / CLABE / PIX code / CBU / PSE link…),
|
|
949
|
+
* so its shape depends on `paymentMethod` and is deliberately not narrowed here.
|
|
950
|
+
*/
|
|
951
|
+
interface PayinData {
|
|
952
|
+
id: string;
|
|
953
|
+
blindpayId: string;
|
|
954
|
+
status: string | null;
|
|
955
|
+
token: string | null;
|
|
956
|
+
network: string | null;
|
|
957
|
+
paymentMethod: string | null;
|
|
958
|
+
/** Minor units, as a decimal string. */
|
|
959
|
+
senderAmount: string | null;
|
|
960
|
+
receiverAmount: string | null;
|
|
961
|
+
instructions: unknown;
|
|
962
|
+
createdAt: string;
|
|
963
|
+
}
|
|
964
|
+
/** Raw paginated list of payins. */
|
|
965
|
+
interface PayinListData {
|
|
966
|
+
data: PayinData[];
|
|
967
|
+
total: number;
|
|
968
|
+
take: number;
|
|
969
|
+
skip: number;
|
|
970
|
+
}
|
|
971
|
+
/** Body for `POST /v1/onramp/trustline`. */
|
|
972
|
+
interface CreateTrustlineOptions {
|
|
973
|
+
/** Stellar address that needs the asset trustline. */
|
|
974
|
+
address: string;
|
|
975
|
+
}
|
|
976
|
+
/**
|
|
977
|
+
* Raw trustline response — a provider passthrough, which is why it is an open
|
|
978
|
+
* shape. It carries the unsigned envelope the customer signs; a wallet reads `xdr`
|
|
979
|
+
* off it and must put that through its own signing guard before signing.
|
|
980
|
+
*/
|
|
981
|
+
interface TrustlineData {
|
|
982
|
+
xdr?: string;
|
|
983
|
+
[key: string]: unknown;
|
|
984
|
+
}
|
|
985
|
+
/** Banking partners a virtual account can be opened with. */
|
|
986
|
+
type BankingPartner = 'jpmorgan' | 'citi' | 'hsbc' | 'cfsb';
|
|
987
|
+
/** Body for `POST /v1/onramp/receivers/:receiverId/virtual-accounts`. */
|
|
988
|
+
interface CreateVirtualAccountOptions {
|
|
989
|
+
banking_partner: BankingPartner;
|
|
990
|
+
token: RampToken;
|
|
991
|
+
/** Cosmos Pay wallet id that receives the converted stablecoin. */
|
|
992
|
+
blockchain_wallet_id: string;
|
|
993
|
+
signed_agreement_id?: string;
|
|
994
|
+
sole_proprietor_doc_type?: string;
|
|
995
|
+
sole_proprietor_doc_file?: string;
|
|
996
|
+
}
|
|
997
|
+
/** Raw virtual account — a provider passthrough. */
|
|
998
|
+
type VirtualAccountData = Record<string, unknown>;
|
|
999
|
+
/** Chains a payout can be funded from. */
|
|
1000
|
+
type PayoutNetwork = 'ethereum' | 'base' | 'arbitrum' | 'polygon' | 'stellar' | 'solana' | 'tron' | 'sepolia' | 'base_sepolia' | 'arbitrum_sepolia' | 'polygon_amoy' | 'stellar_testnet' | 'solana_devnet';
|
|
1001
|
+
/** Chain families the authorize / create steps distinguish. */
|
|
1002
|
+
type PayoutChain = 'evm' | 'stellar' | 'solana';
|
|
1003
|
+
/** Body for `POST /v1/offramp/quotes`. */
|
|
1004
|
+
interface CreatePayoutQuoteOptions {
|
|
1005
|
+
/** Destination bank account, belonging to a verified receiver. */
|
|
1006
|
+
bank_account_id: string;
|
|
1007
|
+
currency_type: CurrencyType;
|
|
1008
|
+
cover_fees?: boolean;
|
|
1009
|
+
/** Amount in MINOR units. */
|
|
1010
|
+
request_amount: number;
|
|
1011
|
+
network: PayoutNetwork;
|
|
1012
|
+
token: RampToken;
|
|
1013
|
+
description?: string;
|
|
1014
|
+
partner_fee_id?: string;
|
|
1015
|
+
}
|
|
1016
|
+
/** Raw payout quote. */
|
|
1017
|
+
interface PayoutQuoteData {
|
|
1018
|
+
id: string;
|
|
1019
|
+
/** Unix seconds (~5 minutes out). */
|
|
1020
|
+
expires_at: number;
|
|
1021
|
+
sender_amount?: number;
|
|
1022
|
+
/** Local fiat amount to receive, in minor units. */
|
|
1023
|
+
receiver_amount?: number;
|
|
1024
|
+
receiver_local_amount?: number;
|
|
1025
|
+
/** EVM `approve` payload to sign (abi, address, functionName, amount). */
|
|
1026
|
+
contract?: unknown;
|
|
1027
|
+
}
|
|
1028
|
+
/** Body for `POST /v1/offramp/payouts/authorize`. */
|
|
1029
|
+
interface AuthorizePayoutOptions {
|
|
1030
|
+
quote_id: string;
|
|
1031
|
+
sender_wallet_address: string;
|
|
1032
|
+
/** Only the chains that need an unsigned transaction built for them. */
|
|
1033
|
+
chain: 'stellar' | 'solana';
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Raw authorize response — the unsigned transaction, passed through from the
|
|
1037
|
+
* provider. Its `xdr` (Stellar) is what a wallet must bound against the quote the
|
|
1038
|
+
* user actually confirmed before signing it.
|
|
1039
|
+
*/
|
|
1040
|
+
interface AuthorizePayoutData {
|
|
1041
|
+
xdr?: string;
|
|
1042
|
+
[key: string]: unknown;
|
|
1043
|
+
}
|
|
1044
|
+
/** Body for `POST /v1/offramp/payouts`. */
|
|
1045
|
+
interface CreatePayoutOptions {
|
|
1046
|
+
quote_id: string;
|
|
1047
|
+
sender_wallet_address: string;
|
|
1048
|
+
chain: PayoutChain;
|
|
1049
|
+
/** The signed transaction produced from `authorize` (or the EVM approval). */
|
|
1050
|
+
signed_transaction?: string;
|
|
1051
|
+
}
|
|
1052
|
+
/** Query for `GET /v1/offramp/payouts`. */
|
|
1053
|
+
interface ListPayoutsOptions {
|
|
1054
|
+
take?: number;
|
|
1055
|
+
skip?: number;
|
|
1056
|
+
}
|
|
1057
|
+
/** Raw payout. Same mirroring rules as {@link PayinData}. */
|
|
1058
|
+
interface PayoutData {
|
|
1059
|
+
id: string;
|
|
1060
|
+
blindpayId: string;
|
|
1061
|
+
status: string | null;
|
|
1062
|
+
token: string | null;
|
|
1063
|
+
network: string | null;
|
|
1064
|
+
/** Fiat rail the money lands on. */
|
|
1065
|
+
rail: string | null;
|
|
1066
|
+
senderAmount: string | null;
|
|
1067
|
+
receiverAmount: string | null;
|
|
1068
|
+
senderWalletAddress: string | null;
|
|
1069
|
+
createdAt: string;
|
|
1070
|
+
}
|
|
1071
|
+
/** Raw paginated list of payouts. */
|
|
1072
|
+
interface PayoutListData {
|
|
1073
|
+
data: PayoutData[];
|
|
1074
|
+
total: number;
|
|
1075
|
+
take: number;
|
|
1076
|
+
skip: number;
|
|
1077
|
+
}
|
|
1078
|
+
/** Body for `POST /v1/offramp/payouts/:id/documents`. */
|
|
1079
|
+
interface AttachPayoutDocumentOptions {
|
|
1080
|
+
transaction_document_type?: string;
|
|
1081
|
+
transaction_document_id?: string;
|
|
1082
|
+
/** Base64 (or data URL) of the document itself. */
|
|
1083
|
+
transaction_document_file?: string;
|
|
1084
|
+
description?: string;
|
|
1085
|
+
}
|
|
1086
|
+
/** Raw document response — a provider passthrough. */
|
|
1087
|
+
type PayoutDocumentData = Record<string, unknown>;
|
|
1088
|
+
/** A receiver is a person or a company. */
|
|
1089
|
+
type ReceiverType = 'individual' | 'business';
|
|
1090
|
+
/** How deep the verification goes. */
|
|
1091
|
+
type KycType = 'light' | 'standard' | 'enhanced';
|
|
1092
|
+
/** One beneficial owner of a business receiver. */
|
|
1093
|
+
interface ReceiverOwner {
|
|
1094
|
+
role?: string;
|
|
1095
|
+
first_name?: string;
|
|
1096
|
+
last_name?: string;
|
|
1097
|
+
date_of_birth?: string;
|
|
1098
|
+
tax_id?: string;
|
|
1099
|
+
country?: string;
|
|
1100
|
+
address_line_1?: string;
|
|
1101
|
+
address_line_2?: string;
|
|
1102
|
+
city?: string;
|
|
1103
|
+
state_province_region?: string;
|
|
1104
|
+
postal_code?: string;
|
|
1105
|
+
/** Ownership percentage. */
|
|
1106
|
+
ownership_percentage?: number;
|
|
1107
|
+
title?: string;
|
|
1108
|
+
id_doc_country?: string;
|
|
1109
|
+
id_doc_type?: string;
|
|
1110
|
+
/** `file_url` from `POST /v1/kyc/upload`. */
|
|
1111
|
+
id_doc_front_file?: string;
|
|
1112
|
+
id_doc_back_file?: string;
|
|
1113
|
+
proof_of_address_doc_type?: string;
|
|
1114
|
+
/** `file_url` from `POST /v1/kyc/upload`. */
|
|
1115
|
+
proof_of_address_doc_file?: string;
|
|
1116
|
+
/** The owner's tax id type. */
|
|
1117
|
+
tax_type?: string;
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* Body for `POST /v1/kyc/receivers`.
|
|
1121
|
+
*
|
|
1122
|
+
* Every `*_file` field takes a `file_url` returned by {@link KycManager.upload} —
|
|
1123
|
+
* not the bytes. Upload first, then create the receiver with the URLs.
|
|
1124
|
+
*/
|
|
1125
|
+
interface CreateReceiverOptions {
|
|
1126
|
+
type: ReceiverType;
|
|
1127
|
+
kyc_type: KycType;
|
|
1128
|
+
email: string;
|
|
1129
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
1130
|
+
country: string;
|
|
1131
|
+
first_name?: string;
|
|
1132
|
+
last_name?: string;
|
|
1133
|
+
/** ISO-8601 datetime. A date-only value is rejected upstream. */
|
|
1134
|
+
date_of_birth?: string;
|
|
1135
|
+
tax_id?: string;
|
|
1136
|
+
occupation?: string;
|
|
1137
|
+
id_doc_country?: string;
|
|
1138
|
+
id_doc_type?: string;
|
|
1139
|
+
/** `file_url` from `POST /v1/kyc/upload`. */
|
|
1140
|
+
id_doc_front_file?: string;
|
|
1141
|
+
id_doc_back_file?: string;
|
|
1142
|
+
selfie_file?: string;
|
|
1143
|
+
account_purpose?: string;
|
|
1144
|
+
account_purpose_other?: string;
|
|
1145
|
+
source_of_funds_doc_type?: string;
|
|
1146
|
+
source_of_funds_doc_file?: string;
|
|
1147
|
+
source_of_wealth?: string;
|
|
1148
|
+
/** `master_service_agreement` | `salary_slip` | `bank_statement`. */
|
|
1149
|
+
sole_proprietor_doc_type?: string;
|
|
1150
|
+
proof_of_address_doc_type?: string;
|
|
1151
|
+
proof_of_address_doc_file?: string;
|
|
1152
|
+
recipient_relationship?: string;
|
|
1153
|
+
purpose_of_transactions?: string;
|
|
1154
|
+
purpose_of_transactions_explanation?: string;
|
|
1155
|
+
legal_name?: string;
|
|
1156
|
+
alternate_name?: string;
|
|
1157
|
+
business_type?: string;
|
|
1158
|
+
business_industry?: string;
|
|
1159
|
+
business_description?: string;
|
|
1160
|
+
formation_date?: string;
|
|
1161
|
+
estimated_annual_revenue?: string;
|
|
1162
|
+
publicly_traded?: boolean;
|
|
1163
|
+
website?: string;
|
|
1164
|
+
incorporation_doc_file?: string;
|
|
1165
|
+
proof_of_ownership_doc_file?: string;
|
|
1166
|
+
owners?: ReceiverOwner[];
|
|
1167
|
+
address_line_1?: string;
|
|
1168
|
+
address_line_2?: string;
|
|
1169
|
+
city?: string;
|
|
1170
|
+
state_province_region?: string;
|
|
1171
|
+
postal_code?: string;
|
|
1172
|
+
phone_number?: string;
|
|
1173
|
+
ip_address?: string;
|
|
1174
|
+
/** Your own id for this receiver. */
|
|
1175
|
+
external_id?: string;
|
|
1176
|
+
image_url?: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* Accepted terms-of-service id, from the redirect of
|
|
1179
|
+
* {@link KycManager.termsOfService}. The provider requires it to create a
|
|
1180
|
+
* receiver, which is why ToS is the FIRST step of the flow rather than the last.
|
|
1181
|
+
*/
|
|
1182
|
+
tos_id?: string;
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Body for `PATCH /v1/kyc/receivers/:id` — the same fields, all optional.
|
|
1186
|
+
*
|
|
1187
|
+
* Identity is reviewed before it reaches the provider, edits included. Until the
|
|
1188
|
+
* receiver is enabled, an edit that touches KYC data sends it back to
|
|
1189
|
+
* `pending_review`. Once it exists at the provider, a tenant key may change only
|
|
1190
|
+
* `external_id` and `image_url`; any other field is `403 kyc_review_required` unless
|
|
1191
|
+
* the key is elevated (`X-Consumer-Role: admin`), because that edit rewrites the
|
|
1192
|
+
* identity at the provider directly.
|
|
1193
|
+
*/
|
|
1194
|
+
type UpdateReceiverOptions = Partial<CreateReceiverOptions>;
|
|
1195
|
+
/** Body for `POST /v1/kyc/receivers/:id/approve`. */
|
|
1196
|
+
interface ApproveReceiverOptions {
|
|
1197
|
+
redirect_url?: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* The {@link ReceiverData.dossierVersion} this approval is for.
|
|
1200
|
+
*
|
|
1201
|
+
* Approving is a statement about KYC data someone read and accepted, and the
|
|
1202
|
+
* tenant can edit that data in between: an edit leaves the receiver in
|
|
1203
|
+
* `pending_review`, so without a version the approval lands on whatever is
|
|
1204
|
+
* stored when the request arrives and nobody can tell. Send it and a dossier
|
|
1205
|
+
* that moved on is a `409 kyc_state_invalid` — re-read, review again, approve
|
|
1206
|
+
* that version.
|
|
1207
|
+
*
|
|
1208
|
+
* {@link Receiver.approve} fills this in from the instance; omit it there only
|
|
1209
|
+
* if you mean "approve whatever is stored now".
|
|
1210
|
+
*/
|
|
1211
|
+
expected_version?: number;
|
|
1212
|
+
}
|
|
1213
|
+
/** Body for `POST /v1/kyc/receivers/:id/tos`. */
|
|
1214
|
+
interface RequestTosOptions {
|
|
1215
|
+
/** `code` returns the URL to show; `email` sends it to the receiver. */
|
|
1216
|
+
channel: 'code' | 'email';
|
|
1217
|
+
redirect_url?: string;
|
|
1218
|
+
}
|
|
1219
|
+
/** Body for `POST /v1/kyc/receivers/:id/enable`. */
|
|
1220
|
+
interface EnableReceiverOptions {
|
|
1221
|
+
/** An accepted terms-of-service id. */
|
|
1222
|
+
tos_id: string;
|
|
1223
|
+
}
|
|
1224
|
+
/** Body for `PATCH /v1/kyc/receivers/:id/access`. */
|
|
1225
|
+
interface SetReceiverAccessOptions {
|
|
1226
|
+
/** `true` cuts this receiver off from both ramps — an admin kill switch. */
|
|
1227
|
+
disabled: boolean;
|
|
1228
|
+
}
|
|
1229
|
+
/** Query for the paginated KYC collections. */
|
|
1230
|
+
interface ListKycOptions {
|
|
1231
|
+
take?: number;
|
|
1232
|
+
skip?: number;
|
|
1233
|
+
}
|
|
1234
|
+
/** Raw receiver payload. `kycStatus` is refreshed from the provider on read. */
|
|
1235
|
+
interface ReceiverData {
|
|
1236
|
+
id: string;
|
|
1237
|
+
blindpayId: string;
|
|
1238
|
+
type: string;
|
|
1239
|
+
kycType: string | null;
|
|
1240
|
+
kycStatus: string | null;
|
|
1241
|
+
email: string | null;
|
|
1242
|
+
name: string | null;
|
|
1243
|
+
country: string | null;
|
|
1244
|
+
externalId: string | null;
|
|
1245
|
+
/** True when the receiver is cut off from the ramps. */
|
|
1246
|
+
disabled: boolean;
|
|
1247
|
+
/**
|
|
1248
|
+
* How many times the submitted KYC data has been written. Send it back as
|
|
1249
|
+
* `expected_version` when approving, so the approval cannot land on a dossier
|
|
1250
|
+
* nobody read.
|
|
1251
|
+
*/
|
|
1252
|
+
dossierVersion: number;
|
|
1253
|
+
/**
|
|
1254
|
+
* The `dossierVersion` a reviewer approved, or null while unapproved. The
|
|
1255
|
+
* receiver cannot be enabled until it equals {@link ReceiverData.dossierVersion}
|
|
1256
|
+
* again, so an edit after approval sends it back through review.
|
|
1257
|
+
*/
|
|
1258
|
+
reviewedVersion: number | null;
|
|
1259
|
+
createdAt: string;
|
|
1260
|
+
updatedAt: string;
|
|
1261
|
+
}
|
|
1262
|
+
/** Raw paginated list of receivers. */
|
|
1263
|
+
interface ReceiverListData {
|
|
1264
|
+
data: ReceiverData[];
|
|
1265
|
+
total: number;
|
|
1266
|
+
take: number;
|
|
1267
|
+
skip: number;
|
|
1268
|
+
}
|
|
1269
|
+
/** Chains a receiver wallet can be registered on. */
|
|
1270
|
+
type ReceiverWalletNetwork = 'ethereum' | 'base' | 'arbitrum' | 'polygon' | 'stellar' | 'solana' | 'tron' | 'sepolia';
|
|
1271
|
+
/** Body for `POST /v1/kyc/receivers/:receiverId/wallets`. */
|
|
1272
|
+
interface CreateReceiverWalletOptions {
|
|
1273
|
+
name?: string;
|
|
1274
|
+
network: ReceiverWalletNetwork;
|
|
1275
|
+
address: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* Proof the receiver controls the address, for the secure-wallet flow: the hash
|
|
1278
|
+
* of the transaction that signed the message from
|
|
1279
|
+
* {@link KycManager.walletSignMessage}.
|
|
1280
|
+
*/
|
|
1281
|
+
signature_tx_hash?: string;
|
|
1282
|
+
is_account_abstraction?: boolean;
|
|
1283
|
+
}
|
|
1284
|
+
/** Raw receiver wallet payload. */
|
|
1285
|
+
interface ReceiverWalletData {
|
|
1286
|
+
id: string;
|
|
1287
|
+
blindpayId: string;
|
|
1288
|
+
name: string | null;
|
|
1289
|
+
network: string;
|
|
1290
|
+
address: string | null;
|
|
1291
|
+
isAccountAbstraction: boolean;
|
|
1292
|
+
createdAt: string;
|
|
1293
|
+
}
|
|
1294
|
+
/** Raw paginated list of receiver wallets. */
|
|
1295
|
+
interface ReceiverWalletListData {
|
|
1296
|
+
data: ReceiverWalletData[];
|
|
1297
|
+
total: number;
|
|
1298
|
+
take: number;
|
|
1299
|
+
skip: number;
|
|
1300
|
+
}
|
|
1301
|
+
/** Fiat rails a bank account can be opened on. */
|
|
1302
|
+
type BankRail = 'wire' | 'ach' | 'rtp' | 'pix' | 'pix_safe' | 'ted' | 'spei_bitso' | 'transfers_bitso';
|
|
1303
|
+
/**
|
|
1304
|
+
* Body for `POST /v1/kyc/receivers/:receiverId/bank-accounts`.
|
|
1305
|
+
*
|
|
1306
|
+
* Only the fields every rail shares are named here. The rest — `pix_*`, `ted_*`,
|
|
1307
|
+
* `spei_*`, `swift_*`, `sepa_*`, `ach_cop_*`, some seventy of them — depend on
|
|
1308
|
+
* `type`, and the authority on which ones a given rail needs is
|
|
1309
|
+
* {@link KycManager.bankDetails}, at runtime. Enumerating them in a published type
|
|
1310
|
+
* would freeze a provider's field list into a release of this SDK and break the
|
|
1311
|
+
* day it adds a rail.
|
|
1312
|
+
*/
|
|
1313
|
+
interface CreateBankAccountOptions {
|
|
1314
|
+
type: BankRail;
|
|
1315
|
+
/** Label for the account. */
|
|
1316
|
+
name: string;
|
|
1317
|
+
account_class?: 'individual' | 'business';
|
|
1318
|
+
account_type?: 'checking' | 'saving';
|
|
1319
|
+
beneficiary_name?: string;
|
|
1320
|
+
recipient_relationship?: string;
|
|
1321
|
+
account_number?: string;
|
|
1322
|
+
routing_number?: string;
|
|
1323
|
+
business_industry?: string;
|
|
1324
|
+
phone_number?: string;
|
|
1325
|
+
tax_id?: string;
|
|
1326
|
+
address_line_1?: string;
|
|
1327
|
+
address_line_2?: string;
|
|
1328
|
+
city?: string;
|
|
1329
|
+
state_province_region?: string;
|
|
1330
|
+
country?: string;
|
|
1331
|
+
postal_code?: string;
|
|
1332
|
+
/** Rail-specific fields. See `bankDetails(rail)` for the ones a rail requires. */
|
|
1333
|
+
[key: string]: unknown;
|
|
1334
|
+
}
|
|
1335
|
+
/** Raw bank account payload. */
|
|
1336
|
+
interface BankAccountData {
|
|
1337
|
+
id: string;
|
|
1338
|
+
blindpayId: string;
|
|
1339
|
+
rail: string | null;
|
|
1340
|
+
name: string | null;
|
|
1341
|
+
country: string | null;
|
|
1342
|
+
createdAt: string;
|
|
1343
|
+
}
|
|
1344
|
+
/** Raw paginated list of bank accounts. */
|
|
1345
|
+
interface BankAccountListData {
|
|
1346
|
+
data: BankAccountData[];
|
|
1347
|
+
total: number;
|
|
1348
|
+
take: number;
|
|
1349
|
+
skip: number;
|
|
1350
|
+
}
|
|
1351
|
+
/** Body for `POST /v1/kyc/terms-of-service`. */
|
|
1352
|
+
interface InitiateTosOptions {
|
|
1353
|
+
redirect_url?: string;
|
|
1354
|
+
/** Attach the acceptance to an existing receiver. */
|
|
1355
|
+
receiver_id?: string;
|
|
1356
|
+
idempotency_key?: string;
|
|
1357
|
+
}
|
|
1358
|
+
/**
|
|
1359
|
+
* Raw terms-of-service response — a provider passthrough carrying the hosted URL
|
|
1360
|
+
* the receiver has to visit.
|
|
1361
|
+
*/
|
|
1362
|
+
interface TermsOfServiceData {
|
|
1363
|
+
url?: string;
|
|
1364
|
+
[key: string]: unknown;
|
|
1365
|
+
}
|
|
1366
|
+
/** Raw upload response. `file_url` is what every `*_file` field expects. */
|
|
1367
|
+
interface KycUploadData {
|
|
1368
|
+
file_url?: string;
|
|
1369
|
+
[key: string]: unknown;
|
|
1370
|
+
}
|
|
1371
|
+
/** Raw response of the rails catalogue / a rail's field schema — passthroughs. */
|
|
1372
|
+
type KycRailsData = unknown;
|
|
1373
|
+
type BankDetailsData = unknown;
|
|
1374
|
+
/** Raw response of the wallet sign-message challenge — a provider passthrough. */
|
|
1375
|
+
interface WalletSignMessageData {
|
|
1376
|
+
message?: string;
|
|
1377
|
+
[key: string]: unknown;
|
|
1378
|
+
}
|
|
1379
|
+
/** Identity providers a Pollar login can go through. */
|
|
1380
|
+
type PollarProvider = 'google' | 'github';
|
|
1381
|
+
/** State of a login, polled between the redirect and the token exchange. */
|
|
1382
|
+
type PollarLoginStatus = 'pending' | 'authorized' | 'exchanging' | 'consumed' | 'failed' | 'expired';
|
|
1383
|
+
/** A Pollar wallet, as returned alongside a session or a registration. */
|
|
1384
|
+
interface PollarWalletData {
|
|
1385
|
+
type: 'internal' | 'smart' | 'external';
|
|
1386
|
+
address: string | null;
|
|
1387
|
+
chain: 'STELLAR' | 'POLYGON' | 'SOLANA';
|
|
1388
|
+
/** False until the reserve is funded — see {@link PollarManager.activateWallet}. */
|
|
1389
|
+
exists_on_stellar?: boolean;
|
|
1390
|
+
funding_mode?: 'IMMEDIATE' | 'DEFERRED';
|
|
1391
|
+
network?: string;
|
|
1392
|
+
}
|
|
1393
|
+
/** The public half of the DPoP key a client binds its session to. */
|
|
1394
|
+
interface PollarDpopJwk {
|
|
1395
|
+
kty: 'EC';
|
|
1396
|
+
crv: 'P-256';
|
|
1397
|
+
x: string;
|
|
1398
|
+
y: string;
|
|
1399
|
+
}
|
|
1400
|
+
/** The fields both login flows accept. */
|
|
1401
|
+
interface PollarAuthorizeBaseOptions {
|
|
1402
|
+
provider: PollarProvider;
|
|
1403
|
+
code_challenge_method?: 'S256';
|
|
1404
|
+
/** Binds the resulting session to a key this client holds. */
|
|
1405
|
+
dpop_jwk?: PollarDpopJwk;
|
|
1406
|
+
/** Shown to the user in their session list. */
|
|
1407
|
+
device_label?: string;
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Body for `POST /v1/pollar/oauth/authorize`.
|
|
1411
|
+
*
|
|
1412
|
+
* The code that comes back is redeemed with the `code_verifier` the challenge was
|
|
1413
|
+
* derived from, so an intercepted code is worth nothing without the client that
|
|
1414
|
+
* started the flow. How much that matters depends on the flow, and the type follows:
|
|
1415
|
+
*
|
|
1416
|
+
* - **Redirect** (`redirect_uri` set): `code_challenge` is required. The code crosses
|
|
1417
|
+
* a browser, and the public callback hands it to whoever presents `state` — which
|
|
1418
|
+
* is inside `authorization_url` — so the service answers `400 validation_failed`
|
|
1419
|
+
* to a redirect-flow authorize without one.
|
|
1420
|
+
* - **Poll** (no `redirect_uri`): the code only travels over your authenticated
|
|
1421
|
+
* channel, so PKCE is optional. Send it anyway.
|
|
1422
|
+
*/
|
|
1423
|
+
type PollarAuthorizeOptions = (PollarAuthorizeBaseOptions & {
|
|
1424
|
+
/** Where the browser lands with the code. Must be allow-listed for the consumer. */
|
|
1425
|
+
redirect_uri: string;
|
|
1426
|
+
/** Base64url SHA-256 of the verifier held by the client. */
|
|
1427
|
+
code_challenge: string;
|
|
1428
|
+
}) | (PollarAuthorizeBaseOptions & {
|
|
1429
|
+
redirect_uri?: undefined;
|
|
1430
|
+
/** Base64url SHA-256 of the verifier held by the client. */
|
|
1431
|
+
code_challenge?: string;
|
|
1432
|
+
});
|
|
1433
|
+
/** Raw authorize response — where to send the user, and what to poll. */
|
|
1434
|
+
interface PollarAuthorizeData {
|
|
1435
|
+
/** Correlates the login. Poll `sessions/{state}` with it. */
|
|
1436
|
+
state: string;
|
|
1437
|
+
/** The URL to open for the user. */
|
|
1438
|
+
authorization_url: string;
|
|
1439
|
+
provider: PollarProvider;
|
|
1440
|
+
redirect_uri: string | null;
|
|
1441
|
+
expires_at: string;
|
|
1442
|
+
}
|
|
1443
|
+
/** Raw polling response for a login in progress. */
|
|
1444
|
+
interface PollarLoginSessionData {
|
|
1445
|
+
status: PollarLoginStatus;
|
|
1446
|
+
state: string;
|
|
1447
|
+
/** The bridge code to redeem — present once `status` is `authorized`. */
|
|
1448
|
+
code?: string;
|
|
1449
|
+
code_expires_at?: string | null;
|
|
1450
|
+
error_code?: string | null;
|
|
1451
|
+
}
|
|
1452
|
+
/** Body for `POST /v1/pollar/oauth/token`. */
|
|
1453
|
+
interface PollarTokenOptions {
|
|
1454
|
+
/** The bridge code collected from the polled session. */
|
|
1455
|
+
code: string;
|
|
1456
|
+
/** The PKCE verifier the challenge was derived from. Required when `authorize` sent a `code_challenge`. */
|
|
1457
|
+
code_verifier?: string;
|
|
1458
|
+
}
|
|
1459
|
+
/** A user profile as Pollar knows it. */
|
|
1460
|
+
interface PollarProfileData {
|
|
1461
|
+
email?: string;
|
|
1462
|
+
first_name?: string;
|
|
1463
|
+
last_name?: string;
|
|
1464
|
+
avatar?: string;
|
|
1465
|
+
[key: string]: unknown;
|
|
1466
|
+
}
|
|
1467
|
+
/** Raw Pollar session — the tokens, the wallets and the profile. */
|
|
1468
|
+
interface PollarSessionData {
|
|
1469
|
+
access_token: string;
|
|
1470
|
+
refresh_token?: string;
|
|
1471
|
+
token_type?: 'Bearer' | 'DPoP';
|
|
1472
|
+
/** Unix seconds. */
|
|
1473
|
+
expires_at?: number;
|
|
1474
|
+
user_id?: string | null;
|
|
1475
|
+
/** The primary wallet; `wallets` carries the rest. */
|
|
1476
|
+
wallet?: PollarWalletData;
|
|
1477
|
+
wallets?: PollarWalletData[];
|
|
1478
|
+
profile?: PollarProfileData;
|
|
1479
|
+
}
|
|
1480
|
+
/** Body for `POST /v1/pollar/oauth/refresh`. */
|
|
1481
|
+
interface PollarRefreshOptions {
|
|
1482
|
+
refresh_token: string;
|
|
1483
|
+
}
|
|
1484
|
+
/** Raw rotated token pair. */
|
|
1485
|
+
interface PollarRefreshData {
|
|
1486
|
+
access_token: string;
|
|
1487
|
+
refresh_token?: string;
|
|
1488
|
+
token_type?: 'Bearer';
|
|
1489
|
+
expires_at?: number;
|
|
1490
|
+
}
|
|
1491
|
+
/** Body for `POST /v1/pollar/oauth/logout`. */
|
|
1492
|
+
interface PollarLogoutOptions {
|
|
1493
|
+
access_token: string;
|
|
1494
|
+
/** Revoke every device, not just this one. */
|
|
1495
|
+
everywhere?: boolean;
|
|
1496
|
+
}
|
|
1497
|
+
/** How many sessions the logout revoked. */
|
|
1498
|
+
interface PollarLogoutData {
|
|
1499
|
+
revoked: number;
|
|
1500
|
+
}
|
|
1501
|
+
/** Body for `POST /v1/pollar/wallets/activate`. */
|
|
1502
|
+
interface ActivatePollarWalletOptions {
|
|
1503
|
+
public_key: string;
|
|
1504
|
+
}
|
|
1505
|
+
/** Raw activation result — the reserve that was funded. */
|
|
1506
|
+
interface PollarActivationData {
|
|
1507
|
+
public_key: string;
|
|
1508
|
+
/** XLM sent to cover the base reserve. */
|
|
1509
|
+
amount: string;
|
|
1510
|
+
activated: boolean;
|
|
1511
|
+
}
|
|
1512
|
+
/** One asset to enable on a wallet. */
|
|
1513
|
+
interface PollarTrustlineAsset {
|
|
1514
|
+
code: string;
|
|
1515
|
+
issuer: string;
|
|
1516
|
+
}
|
|
1517
|
+
/** Body for `POST /v1/pollar/wallets/:address/trustlines`. */
|
|
1518
|
+
interface PollarTrustlinesOptions {
|
|
1519
|
+
assets: PollarTrustlineAsset[];
|
|
1520
|
+
}
|
|
1521
|
+
/** Raw trustline result — a status code for the operation. */
|
|
1522
|
+
interface PollarTrustlineData {
|
|
1523
|
+
code: string;
|
|
1524
|
+
[key: string]: unknown;
|
|
1525
|
+
}
|
|
1526
|
+
/** Body for `POST /v1/pollar/users` and `/users/with-wallet`. */
|
|
1527
|
+
interface RegisterPollarUserOptions {
|
|
1528
|
+
/** Your own id for this user — how you find them again. */
|
|
1529
|
+
external_id: string;
|
|
1530
|
+
email?: string;
|
|
1531
|
+
first_name?: string;
|
|
1532
|
+
last_name?: string;
|
|
1533
|
+
avatar?: string;
|
|
1534
|
+
}
|
|
1535
|
+
/** Raw registration result. */
|
|
1536
|
+
interface PollarUserData {
|
|
1537
|
+
external_id: string;
|
|
1538
|
+
code: 'SERVER_USER_REGISTERED' | 'SERVER_USER_WALLET_CREATED';
|
|
1539
|
+
user_id: string | null;
|
|
1540
|
+
wallet?: PollarWalletData;
|
|
1541
|
+
}
|
|
1542
|
+
/** Body for `POST /v1/pollar/tokens/verify`. */
|
|
1543
|
+
interface VerifyPollarTokenOptions {
|
|
1544
|
+
token: string;
|
|
1545
|
+
}
|
|
1546
|
+
/** Raw verification result — who the token belongs to, and until when. */
|
|
1547
|
+
interface PollarTokenVerificationData {
|
|
1548
|
+
user_id: string;
|
|
1549
|
+
application_id: string;
|
|
1550
|
+
/** Unix seconds. */
|
|
1551
|
+
expires_at: number;
|
|
1552
|
+
network?: string;
|
|
1553
|
+
auth_provider?: string;
|
|
1554
|
+
wallet?: PollarWalletData;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* Error thrown when the Cosmos Pay API responds with a non-2xx status.
|
|
1559
|
+
*
|
|
1560
|
+
* Carries the HTTP status, the parsed response body and the request context so
|
|
1561
|
+
* callers can branch on `error.status` (e.g. 404 → not found, 403 → gateway).
|
|
1562
|
+
*/
|
|
1563
|
+
declare class CosmosPayAPIError extends Error {
|
|
1564
|
+
/** HTTP status code returned by the API. */
|
|
1565
|
+
readonly status: number;
|
|
1566
|
+
/** HTTP method of the failed request. */
|
|
1567
|
+
readonly method: string;
|
|
1568
|
+
/** Absolute URL of the failed request. */
|
|
1569
|
+
readonly url: string;
|
|
1570
|
+
/** Parsed response body (object when JSON, string otherwise, or null). */
|
|
1571
|
+
readonly body: unknown;
|
|
1572
|
+
/** Machine-readable error code extracted from the body when present. */
|
|
1573
|
+
readonly code: string | undefined;
|
|
1574
|
+
constructor(options: {
|
|
1575
|
+
status: number;
|
|
1576
|
+
method: string;
|
|
1577
|
+
url: string;
|
|
1578
|
+
body: unknown;
|
|
1579
|
+
});
|
|
1580
|
+
private static resolveMessage;
|
|
1581
|
+
private static resolveCode;
|
|
1582
|
+
}
|
|
1583
|
+
/**
|
|
1584
|
+
* Error thrown when a request never reaches the API: network failure, abort or
|
|
1585
|
+
* timeout. Distinct from {@link CosmosPayAPIError}, which always has a status.
|
|
1586
|
+
*/
|
|
1587
|
+
declare class CosmosPayRequestError extends Error {
|
|
1588
|
+
readonly method: string;
|
|
1589
|
+
readonly url: string;
|
|
1590
|
+
readonly cause: unknown;
|
|
1591
|
+
constructor(options: {
|
|
1592
|
+
method: string;
|
|
1593
|
+
url: string;
|
|
1594
|
+
cause: unknown;
|
|
1595
|
+
});
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* Typed identifiers for the wallets the web client knows about, so you can write
|
|
1600
|
+
* `Wallets.FREIGHTER` instead of remembering the `'freighter'` magic string —
|
|
1601
|
+
* while any custom adapter id still works.
|
|
1602
|
+
*/
|
|
1603
|
+
/** Built-in wallet ids (matches each adapter's `id`). */
|
|
1604
|
+
declare const Wallets: {
|
|
1605
|
+
/** Cosmos Pay's own wallet — extension, or the hosted build (see CosmosWalletAdapter). */
|
|
1606
|
+
readonly COSMOS: "cosmos";
|
|
1607
|
+
readonly FREIGHTER: "freighter";
|
|
1608
|
+
readonly XBULL: "xbull";
|
|
1609
|
+
readonly RABET: "rabet";
|
|
1610
|
+
readonly LOBSTR: "lobstr";
|
|
1611
|
+
readonly ALBEDO: "albedo";
|
|
1612
|
+
};
|
|
1613
|
+
/** A known wallet id, or any custom adapter id (autocomplete for the built-ins). */
|
|
1614
|
+
type WalletId = (typeof Wallets)[keyof typeof Wallets] | (string & {});
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
* Stellar address helpers + a tiny named-address book.
|
|
1618
|
+
*
|
|
1619
|
+
* So integrators don't have to sprinkle raw `G...` strings everywhere (and risk
|
|
1620
|
+
* typos), they can name the accounts they care about once and reference them by
|
|
1621
|
+
* name. A plain address string always keeps working — `resolveAddress` only
|
|
1622
|
+
* substitutes registered names and otherwise passes the value straight through.
|
|
1623
|
+
*/
|
|
1624
|
+
/** Whether a value looks like a Stellar account address (`G…`). */
|
|
1625
|
+
declare function isStellarAddress(value: unknown): value is string;
|
|
1626
|
+
/** Whether a value looks like a muxed account address (`M…`). */
|
|
1627
|
+
declare function isMuxedAddress(value: unknown): value is string;
|
|
1628
|
+
/** Whether a value looks like a Soroban contract id (`C…`). */
|
|
1629
|
+
declare function isContractAddress(value: unknown): value is string;
|
|
1630
|
+
/** Whether a value is any kind of Stellar address (account, muxed or contract). */
|
|
1631
|
+
declare function isAddress(value: unknown): value is string;
|
|
1632
|
+
/** Throw unless `value` is a valid Stellar account/muxed/contract address. */
|
|
1633
|
+
declare function assertAddress(value: unknown, label?: string): string;
|
|
1634
|
+
/**
|
|
1635
|
+
* A registry of named Stellar addresses. Register the accounts you use a lot —
|
|
1636
|
+
* your merchant payout account, a treasury, frequent counterparties — and refer
|
|
1637
|
+
* to them by name anywhere an address is accepted.
|
|
1638
|
+
*
|
|
1639
|
+
* @example
|
|
1640
|
+
* addresses.define('merchant', 'GC...');
|
|
1641
|
+
* await client.paymentIntents.createPay({ destination: 'merchant', amount: '10' });
|
|
1642
|
+
*/
|
|
1643
|
+
declare class AddressBook {
|
|
1644
|
+
private readonly entries;
|
|
1645
|
+
constructor(initial?: Record<string, string>);
|
|
1646
|
+
/** Register (or overwrite) a named address. The address is validated. */
|
|
1647
|
+
define(name: string, address: string): this;
|
|
1648
|
+
/** Whether a name is registered. */
|
|
1649
|
+
has(name: string): boolean;
|
|
1650
|
+
/** Look up a registered address by name. */
|
|
1651
|
+
get(name: string): string | undefined;
|
|
1652
|
+
/** Remove a named address. */
|
|
1653
|
+
delete(name: string): boolean;
|
|
1654
|
+
/** All registered names. */
|
|
1655
|
+
names(): string[];
|
|
1656
|
+
/**
|
|
1657
|
+
* Resolve a reference to a concrete address: a registered name is substituted,
|
|
1658
|
+
* any other string is returned unchanged (so raw `G…`, muxed `M…`, federation
|
|
1659
|
+
* `name*domain`, etc. all keep working).
|
|
1660
|
+
*/
|
|
1661
|
+
resolve(ref: string): string;
|
|
1662
|
+
}
|
|
1663
|
+
/** Process-wide default address book. Use `addresses.define(...)` to populate it. */
|
|
1664
|
+
declare const addresses: AddressBook;
|
|
1665
|
+
/** Anything accepted where an address is expected: a raw address or a name in a book. */
|
|
1666
|
+
type AddressRef = string;
|
|
1667
|
+
/**
|
|
1668
|
+
* Resolve an {@link AddressRef} using the given book (the shared {@link addresses}
|
|
1669
|
+
* by default). Lenient: unknown strings pass through unchanged.
|
|
1670
|
+
*/
|
|
1671
|
+
declare function resolveAddress(ref: AddressRef, book?: AddressBook): string;
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* Shared resolution of "create intent" input, used by both the server SDK and
|
|
1675
|
+
* the web client so the convenience layers behave identically: a typed
|
|
1676
|
+
* {@link AssetRef} (e.g. `Assets.USDC`) is expanded into `assetCode`/`assetIssuer`,
|
|
1677
|
+
* and named addresses are substituted via an {@link AddressBook}.
|
|
1678
|
+
*/
|
|
1679
|
+
|
|
1680
|
+
/** Fields the resolver understands (everything else passes through untouched). */
|
|
1681
|
+
interface ResolvableIntentInput {
|
|
1682
|
+
destination?: string;
|
|
1683
|
+
source?: string;
|
|
1684
|
+
/** Typed asset (`Assets.USDC`, `defineAsset(...)`) — fills code + issuer. */
|
|
1685
|
+
asset?: AssetRef;
|
|
1686
|
+
assetCode?: string;
|
|
1687
|
+
assetIssuer?: string;
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1690
|
+
* Expand `asset` into `assetCode`/`assetIssuer` and resolve named
|
|
1691
|
+
* `destination`/`source` addresses. Existing `assetCode`/`assetIssuer` win over a
|
|
1692
|
+
* provided `asset`; native assets leave the code unset (the API treats an omitted
|
|
1693
|
+
* asset as native XLM). Returns a new object — the input is not mutated.
|
|
1694
|
+
*/
|
|
1695
|
+
declare function resolveIntentBody<T extends ResolvableIntentInput>(options: T, book?: AddressBook): Omit<T, 'asset'>;
|
|
1696
|
+
|
|
1697
|
+
export { type CreateReceiverOptions as $, type AnalyticsSummaryData as A, type BrowseLiquidityPoolsOptions as B, type CustomerData as C, type DepositLiquidityOptions as D, type ListActivityOptions as E, type ActivityListData as F, type ActivitySummaryData as G, type HealthCheckData as H, type ReceiverData as I, type UpdateReceiverOptions as J, type ApproveReceiverOptions as K, type LiquidityOperationData as L, type RequestTosOptions as M, type TermsOfServiceData as N, type EnableReceiverOptions as O, type PayinQuoteData as P, type CreateReceiverWalletOptions as Q, type ReportActivityOptions as R, type SubmitLiquidityOptions as S, type TrustlineData as T, type UpdateCustomerOptions as U, type VirtualAccountData as V, type WebhookLogsData as W, type ReceiverWalletData as X, type ListKycOptions as Y, type CreateBankAccountOptions as Z, type BankAccountData as _, type AnalyticsBalancesData as a, type AnalyticsVolumeEntry as a$, type SetReceiverAccessOptions as a0, type WalletSignMessageData as a1, type KycUploadData as a2, type InitiateTosOptions as a3, type KycRailsData as a4, type BankDetailsData as a5, type PollarAuthorizeOptions as a6, type PollarAuthorizeData as a7, type PollarLoginSessionData as a8, type PollarTokenOptions as a9, type CreateProductOptions as aA, type SwapData as aB, SwapStatus as aC, type SubmitSwapOptions as aD, type QuoteSwapOptions as aE, type SwapQuoteData as aF, type CreateSwapOptions as aG, type ListSwapsOptions as aH, type WebhookDeliveryData as aI, WebhookEventType as aJ, WebhookDeliveryStatus as aK, type WebhookEndpointData as aL, type WebhookEndpointWithSecretData as aM, type UpdateWebhookEndpointOptions as aN, type WebhookPingData as aO, type ListWebhookDeliveriesOptions as aP, type WebhookEvent as aQ, type CreateWebhookEndpointOptions as aR, type ActivityBucket as aS, type ActivityEventData as aT, type ActivityLevel as aU, type ActivitySource as aV, AddressBook as aW, type AddressRef as aX, type AnalyticsBalanceEntry as aY, type AnalyticsRecentRow as aZ, type AnalyticsSeriesPoint as a_, type PollarSessionData as aa, type PollarRefreshOptions as ab, type PollarRefreshData as ac, type PollarLogoutOptions as ad, type PollarLogoutData as ae, type VerifyPollarTokenOptions as af, type PollarTokenVerificationData as ag, type ActivatePollarWalletOptions as ah, type PollarActivationData as ai, type PollarTrustlineData as aj, type PollarTrustlinesOptions as ak, type RegisterPollarUserOptions as al, type PollarUserData as am, type PaymentIntentData as an, PaymentIntentKind as ao, PaymentIntentStatus as ap, type UpdatePaymentIntentOptions as aq, type DeletedData as ar, type ValidationOutcomeData as as, type CreateTxPaymentIntentOptions as at, type CreatePayPaymentIntentOptions as au, type ListPaymentIntentsOptions as av, type ValidatePaymentIntentOptions as aw, type ProductData as ax, ProductKind as ay, type UpdateProductOptions as az, type ApiLogsData as b, type ApiLogRow as b0, type AssetDefinition as b1, type AssetRef as b2, Assets as b3, type BankAccountListData as b4, type BankRail as b5, type BankingPartner as b6, CosmosPayAPIError as b7, CosmosPayRequestError as b8, type CurrencyType as b9, type ReceiverWalletNetwork as bA, type ResolvableIntentInput as bB, type ResolvedAsset as bC, type SwapListData as bD, type SwapSubmitOutcomeData as bE, TestnetAssets as bF, type WalletId as bG, Wallets as bH, type WebhookDeliveryListData as bI, type WebhookLogRow as bJ, addresses as bK, assertAddress as bL, defineAsset as bM, isAddress as bN, isContractAddress as bO, isMuxedAddress as bP, isNativeAsset as bQ, isStellarAddress as bR, resolveAddress as bS, resolveAsset as bT, resolveIntentBody as bU, 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 PollarAuthorizeBaseOptions as bo, type PollarDpopJwk as bp, type PollarLoginStatus as bq, type PollarProfileData as br, type PollarProvider as bs, type PollarTrustlineAsset as bt, type PollarWalletData as bu, type RampToken as bv, type ReceiverListData as bw, type ReceiverOwner as bx, type ReceiverType as by, type ReceiverWalletListData as bz, type CreateCustomerOptions as c, LiquidityOperationKind as d, LiquidityOperationStatus as e, type WithdrawLiquidityOptions as f, type LiquidityPositionsData as g, type LiquidityPoolData as h, type ListLiquidityOperationsOptions as i, type CreatePayinQuoteOptions as j, type CreatePayinOptions as k, type PayinData as l, type ListPayinsOptions as m, type CreateTrustlineOptions as n, type CreateVirtualAccountOptions as o, type CreatePayoutQuoteOptions as p, type PayoutQuoteData as q, type AuthorizePayoutOptions as r, type AuthorizePayoutData as s, type CreatePayoutOptions as t, type PayoutData as u, type ListPayoutsOptions as v, type AttachPayoutDocumentOptions as w, type PayoutDocumentData as x, type ActivityEventInput as y, type ActivityReportData as z };
|