@blindpay/node 2.4.0 → 3.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/dist/{api-client-Cw2mNJeR.d.mts → api-client-B7VQkM_4.d.mts} +96 -35
- package/dist/{api-client-Cw2mNJeR.d.ts → api-client-B7VQkM_4.d.ts} +96 -35
- package/dist/{chunk-5XJJKYXE.mjs → chunk-LEPGLH7Q.mjs} +20 -10
- package/dist/{chunk-3QQCDR3E.mjs → chunk-VBZHAPK7.mjs} +8 -0
- package/dist/{chunk-OTRFWEEC.mjs → chunk-VRA5HP7F.mjs} +4 -0
- package/dist/{chunk-4DVSRRBP.mjs → chunk-WH2VNZE7.mjs} +25 -22
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.js +50 -25
- package/dist/index.mjs +8 -8
- package/dist/resources/api-keys/api-keys.test.js +50 -25
- package/dist/resources/api-keys/api-keys.test.mjs +5 -5
- package/dist/resources/api-keys/index.d.mts +1 -1
- package/dist/resources/api-keys/index.d.ts +1 -1
- package/dist/resources/available/available.test.js +50 -25
- package/dist/resources/available/available.test.mjs +5 -5
- package/dist/resources/available/index.d.mts +1 -1
- package/dist/resources/available/index.d.ts +1 -1
- package/dist/resources/bank-accounts/bank-accounts.test.js +50 -25
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +5 -5
- package/dist/resources/bank-accounts/index.d.mts +2 -4
- package/dist/resources/bank-accounts/index.d.ts +2 -4
- package/dist/resources/instances/index.d.mts +1 -1
- package/dist/resources/instances/index.d.ts +1 -1
- package/dist/resources/instances/instances.test.js +50 -25
- package/dist/resources/instances/instances.test.mjs +5 -5
- package/dist/resources/partner-fees/index.d.mts +1 -1
- package/dist/resources/partner-fees/index.d.ts +1 -1
- package/dist/resources/partner-fees/partner-fees.test.js +50 -25
- package/dist/resources/partner-fees/partner-fees.test.mjs +5 -5
- package/dist/resources/payins/index.d.mts +9 -33
- package/dist/resources/payins/index.d.ts +9 -33
- package/dist/resources/payins/payins-quotes.test.js +100 -25
- package/dist/resources/payins/payins-quotes.test.mjs +55 -5
- package/dist/resources/payins/payins.test.js +164 -52
- package/dist/resources/payins/payins.test.mjs +119 -32
- package/dist/resources/payins/quotes.d.mts +38 -2
- package/dist/resources/payins/quotes.d.ts +38 -2
- package/dist/resources/payins/quotes.js +4 -0
- package/dist/resources/payins/quotes.mjs +1 -1
- package/dist/resources/payouts/index.d.mts +42 -17
- package/dist/resources/payouts/index.d.ts +42 -17
- package/dist/resources/payouts/index.js +8 -0
- package/dist/resources/payouts/index.mjs +1 -1
- package/dist/resources/payouts/payouts.test.js +162 -27
- package/dist/resources/payouts/payouts.test.mjs +117 -7
- package/dist/resources/quotes/index.d.mts +1 -1
- package/dist/resources/quotes/index.d.ts +1 -1
- package/dist/resources/quotes/quotes.test.js +50 -25
- package/dist/resources/quotes/quotes.test.mjs +5 -5
- package/dist/resources/receivers/index.d.mts +9 -7
- package/dist/resources/receivers/index.d.ts +9 -7
- package/dist/resources/receivers/receivers.test.js +57 -33
- package/dist/resources/receivers/receivers.test.mjs +12 -13
- package/dist/resources/terms-of-service/index.d.mts +1 -1
- package/dist/resources/terms-of-service/index.d.ts +1 -1
- package/dist/resources/terms-of-service/terms-of-service.test.js +50 -25
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +5 -5
- package/dist/resources/virtual-accounts/index.d.mts +22 -7
- package/dist/resources/virtual-accounts/index.d.ts +22 -7
- package/dist/resources/virtual-accounts/index.js +20 -10
- package/dist/resources/virtual-accounts/index.mjs +1 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +169 -44
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +124 -24
- package/dist/resources/wallets/blockchain.d.mts +1 -1
- package/dist/resources/wallets/blockchain.d.ts +1 -1
- package/dist/resources/wallets/blockchain.test.js +50 -25
- package/dist/resources/wallets/blockchain.test.mjs +5 -5
- package/dist/resources/wallets/offramp.d.mts +1 -1
- package/dist/resources/wallets/offramp.d.ts +1 -1
- package/dist/resources/wallets/offramp.test.js +50 -25
- package/dist/resources/wallets/offramp.test.mjs +5 -5
- package/dist/resources/webhooks/index.d.mts +1 -1
- package/dist/resources/webhooks/index.d.ts +1 -1
- package/dist/resources/webhooks/webhooks.test.js +50 -25
- package/dist/resources/webhooks/webhooks.test.mjs +5 -5
- package/package.json +6 -2
|
@@ -292,46 +292,107 @@ type PaginationParams = {
|
|
|
292
292
|
|
|
293
293
|
type PaginationMetadata = {
|
|
294
294
|
has_more: boolean;
|
|
295
|
-
next_page:
|
|
296
|
-
prev_page:
|
|
295
|
+
next_page: string;
|
|
296
|
+
prev_page: string;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
type
|
|
300
|
-
step: string;
|
|
301
|
-
status: string;
|
|
302
|
-
transaction_hash: string;
|
|
303
|
-
completed_at: string;
|
|
304
|
-
};
|
|
299
|
+
type ArgentinaTransfers = "CVU" | "CBU" | "ALIAS";
|
|
305
300
|
|
|
306
|
-
type
|
|
307
|
-
step: string;
|
|
308
|
-
provider_name: string;
|
|
309
|
-
provider_transaction_id: string;
|
|
310
|
-
provider_status: string;
|
|
311
|
-
estimated_time_of_arrival: string;
|
|
312
|
-
completed_at: string;
|
|
313
|
-
};
|
|
301
|
+
type AchCopDocument = "CC" | "CE" | "NIT" | "PASS" | "PEP";
|
|
314
302
|
|
|
315
|
-
type
|
|
316
|
-
step:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
303
|
+
type PayinTrackingTransaction = {
|
|
304
|
+
step: TrackingStatus
|
|
305
|
+
status: 'failed' | 'completed' | null;
|
|
306
|
+
external_id: string | null;
|
|
307
|
+
completed_at: string | null;
|
|
308
|
+
sender_name: string | null;
|
|
309
|
+
sender_tax_id: string | null;
|
|
310
|
+
sender_bank_code: string | null;
|
|
311
|
+
sender_account_number: string | null;
|
|
312
|
+
trace_number: string | null;
|
|
313
|
+
transaction_reference: string | null;
|
|
314
|
+
description: string | null;
|
|
315
|
+
pse_instruction: {
|
|
316
|
+
payment_link: string;
|
|
317
|
+
fid: string;
|
|
318
|
+
full_name: string;
|
|
319
|
+
tax_id: string;
|
|
320
|
+
document_type: Extract<AchCopDocument, 'CC' | 'NIT'>;
|
|
321
|
+
phone: string;
|
|
322
|
+
email: string;
|
|
323
|
+
bank_code: string | null;
|
|
324
|
+
} | null
|
|
325
|
+
transfers_instruction: {
|
|
326
|
+
account: string;
|
|
327
|
+
type: ArgentinaTransfers;
|
|
328
|
+
tax_id: string | null;
|
|
329
|
+
} | null
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
type PayinTrackingPayment = {
|
|
333
|
+
step: TrackingStatus
|
|
334
|
+
provider_name?: string | null
|
|
335
|
+
completed_at?: string | null
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
type PayinTrackingComplete = {
|
|
339
|
+
step: TrackingStatus
|
|
340
|
+
transaction_hash: string | null;
|
|
341
|
+
completed_at: string | null;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
type PayinTrackingPartnerFee = {
|
|
345
|
+
step: TrackingStatus
|
|
346
|
+
transaction_hash?: string | null
|
|
347
|
+
completed_at?: string | null
|
|
348
|
+
}
|
|
322
349
|
|
|
323
|
-
type
|
|
324
|
-
step: string;
|
|
325
|
-
status: string;
|
|
326
|
-
transaction_hash: string;
|
|
327
|
-
completed_at: string;
|
|
328
|
-
};
|
|
350
|
+
type TrackingStatus = 'processing' | 'on_hold' | 'completed';
|
|
329
351
|
|
|
330
|
-
type
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
352
|
+
type EstimatedTimeOfArrival = '5_min' | '30_min' | '2_hours' | '1_business_day' | '2_business_days' | '5_business_days';
|
|
353
|
+
|
|
354
|
+
type PayoutTrackingTransaction = {
|
|
355
|
+
step: TrackingStatus
|
|
356
|
+
status: 'failed' | 'found';
|
|
357
|
+
transaction_hash: string | null
|
|
358
|
+
completed_at: string | null
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
type PayoutTrackingPayment = {
|
|
362
|
+
step: TrackingStatus
|
|
363
|
+
provider_name: string | null ;
|
|
364
|
+
provider_transaction_id: string | null ;
|
|
365
|
+
provider_status: 'canceled' | 'failed' | 'returned' | 'sent' | null
|
|
366
|
+
recipient_name: string | null ;
|
|
367
|
+
recipient_tax_id: string | null ;
|
|
368
|
+
recipient_bank_code: string | null ;
|
|
369
|
+
recipient_branch_code: string | null ;
|
|
370
|
+
recipient_account_number: string | null ;
|
|
371
|
+
recipient_account_type: string | null ;
|
|
372
|
+
estimated_time_of_arrival: EstimatedTimeOfArrival | null ;
|
|
373
|
+
completed_at: string | null ;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
type PayoutTrackingLiquidity = {
|
|
377
|
+
step: TrackingStatus
|
|
378
|
+
provider_transaction_id: string | null ;
|
|
379
|
+
provider_status: 'deposited' | 'converted' | 'withdrawn' | null;
|
|
380
|
+
estimated_time_of_arrival: EstimatedTimeOfArrival | null;
|
|
381
|
+
completed_at: string | null ;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
type PayoutTrackingComplete = {
|
|
385
|
+
step: TrackingStatus
|
|
386
|
+
status: 'tokens_refunded' | 'paid' | null;
|
|
387
|
+
transaction_hash: string | null;
|
|
388
|
+
completed_at: string | null;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
type PayoutTrackingPartnerFee = {
|
|
392
|
+
step: TrackingStatus
|
|
393
|
+
transaction_hash: string | null;
|
|
394
|
+
completed_at: string | null;
|
|
395
|
+
}
|
|
335
396
|
|
|
336
397
|
/**
|
|
337
398
|
*
|
|
@@ -346,4 +407,4 @@ interface InternalApiClient {
|
|
|
346
407
|
delete: <T>(path: string, body?: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
347
408
|
}
|
|
348
409
|
|
|
349
|
-
export type { AccountClass as A, BlindpayApiResponse as B, Country as C, InternalApiClient as I, Network as N, PaginationParams as P, Rail as R, StablecoinToken as S, TransactionStatus as T, BankAccountType as a,
|
|
410
|
+
export type { AccountClass as A, BlindpayApiResponse as B, Country as C, InternalApiClient as I, Network as N, PaginationParams as P, Rail as R, StablecoinToken as S, TransactionStatus as T, BankAccountType as a, AchCopDocument as b, ArgentinaTransfers as c, PayinTrackingTransaction as d, PayinTrackingPayment as e, PayinTrackingComplete as f, PayinTrackingPartnerFee as g, PaginationMetadata as h, CurrencyType as i, Currency as j, PayoutTrackingTransaction as k, PayoutTrackingPayment as l, PayoutTrackingLiquidity as m, PayoutTrackingComplete as n, PayoutTrackingPartnerFee as o, TransactionDocumentType as p };
|
|
@@ -292,46 +292,107 @@ type PaginationParams = {
|
|
|
292
292
|
|
|
293
293
|
type PaginationMetadata = {
|
|
294
294
|
has_more: boolean;
|
|
295
|
-
next_page:
|
|
296
|
-
prev_page:
|
|
295
|
+
next_page: string;
|
|
296
|
+
prev_page: string;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
type
|
|
300
|
-
step: string;
|
|
301
|
-
status: string;
|
|
302
|
-
transaction_hash: string;
|
|
303
|
-
completed_at: string;
|
|
304
|
-
};
|
|
299
|
+
type ArgentinaTransfers = "CVU" | "CBU" | "ALIAS";
|
|
305
300
|
|
|
306
|
-
type
|
|
307
|
-
step: string;
|
|
308
|
-
provider_name: string;
|
|
309
|
-
provider_transaction_id: string;
|
|
310
|
-
provider_status: string;
|
|
311
|
-
estimated_time_of_arrival: string;
|
|
312
|
-
completed_at: string;
|
|
313
|
-
};
|
|
301
|
+
type AchCopDocument = "CC" | "CE" | "NIT" | "PASS" | "PEP";
|
|
314
302
|
|
|
315
|
-
type
|
|
316
|
-
step:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
303
|
+
type PayinTrackingTransaction = {
|
|
304
|
+
step: TrackingStatus
|
|
305
|
+
status: 'failed' | 'completed' | null;
|
|
306
|
+
external_id: string | null;
|
|
307
|
+
completed_at: string | null;
|
|
308
|
+
sender_name: string | null;
|
|
309
|
+
sender_tax_id: string | null;
|
|
310
|
+
sender_bank_code: string | null;
|
|
311
|
+
sender_account_number: string | null;
|
|
312
|
+
trace_number: string | null;
|
|
313
|
+
transaction_reference: string | null;
|
|
314
|
+
description: string | null;
|
|
315
|
+
pse_instruction: {
|
|
316
|
+
payment_link: string;
|
|
317
|
+
fid: string;
|
|
318
|
+
full_name: string;
|
|
319
|
+
tax_id: string;
|
|
320
|
+
document_type: Extract<AchCopDocument, 'CC' | 'NIT'>;
|
|
321
|
+
phone: string;
|
|
322
|
+
email: string;
|
|
323
|
+
bank_code: string | null;
|
|
324
|
+
} | null
|
|
325
|
+
transfers_instruction: {
|
|
326
|
+
account: string;
|
|
327
|
+
type: ArgentinaTransfers;
|
|
328
|
+
tax_id: string | null;
|
|
329
|
+
} | null
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
type PayinTrackingPayment = {
|
|
333
|
+
step: TrackingStatus
|
|
334
|
+
provider_name?: string | null
|
|
335
|
+
completed_at?: string | null
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
type PayinTrackingComplete = {
|
|
339
|
+
step: TrackingStatus
|
|
340
|
+
transaction_hash: string | null;
|
|
341
|
+
completed_at: string | null;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
type PayinTrackingPartnerFee = {
|
|
345
|
+
step: TrackingStatus
|
|
346
|
+
transaction_hash?: string | null
|
|
347
|
+
completed_at?: string | null
|
|
348
|
+
}
|
|
322
349
|
|
|
323
|
-
type
|
|
324
|
-
step: string;
|
|
325
|
-
status: string;
|
|
326
|
-
transaction_hash: string;
|
|
327
|
-
completed_at: string;
|
|
328
|
-
};
|
|
350
|
+
type TrackingStatus = 'processing' | 'on_hold' | 'completed';
|
|
329
351
|
|
|
330
|
-
type
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
352
|
+
type EstimatedTimeOfArrival = '5_min' | '30_min' | '2_hours' | '1_business_day' | '2_business_days' | '5_business_days';
|
|
353
|
+
|
|
354
|
+
type PayoutTrackingTransaction = {
|
|
355
|
+
step: TrackingStatus
|
|
356
|
+
status: 'failed' | 'found';
|
|
357
|
+
transaction_hash: string | null
|
|
358
|
+
completed_at: string | null
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
type PayoutTrackingPayment = {
|
|
362
|
+
step: TrackingStatus
|
|
363
|
+
provider_name: string | null ;
|
|
364
|
+
provider_transaction_id: string | null ;
|
|
365
|
+
provider_status: 'canceled' | 'failed' | 'returned' | 'sent' | null
|
|
366
|
+
recipient_name: string | null ;
|
|
367
|
+
recipient_tax_id: string | null ;
|
|
368
|
+
recipient_bank_code: string | null ;
|
|
369
|
+
recipient_branch_code: string | null ;
|
|
370
|
+
recipient_account_number: string | null ;
|
|
371
|
+
recipient_account_type: string | null ;
|
|
372
|
+
estimated_time_of_arrival: EstimatedTimeOfArrival | null ;
|
|
373
|
+
completed_at: string | null ;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
type PayoutTrackingLiquidity = {
|
|
377
|
+
step: TrackingStatus
|
|
378
|
+
provider_transaction_id: string | null ;
|
|
379
|
+
provider_status: 'deposited' | 'converted' | 'withdrawn' | null;
|
|
380
|
+
estimated_time_of_arrival: EstimatedTimeOfArrival | null;
|
|
381
|
+
completed_at: string | null ;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
type PayoutTrackingComplete = {
|
|
385
|
+
step: TrackingStatus
|
|
386
|
+
status: 'tokens_refunded' | 'paid' | null;
|
|
387
|
+
transaction_hash: string | null;
|
|
388
|
+
completed_at: string | null;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
type PayoutTrackingPartnerFee = {
|
|
392
|
+
step: TrackingStatus
|
|
393
|
+
transaction_hash: string | null;
|
|
394
|
+
completed_at: string | null;
|
|
395
|
+
}
|
|
335
396
|
|
|
336
397
|
/**
|
|
337
398
|
*
|
|
@@ -346,4 +407,4 @@ interface InternalApiClient {
|
|
|
346
407
|
delete: <T>(path: string, body?: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
347
408
|
}
|
|
348
409
|
|
|
349
|
-
export type { AccountClass as A, BlindpayApiResponse as B, Country as C, InternalApiClient as I, Network as N, PaginationParams as P, Rail as R, StablecoinToken as S, TransactionStatus as T, BankAccountType as a,
|
|
410
|
+
export type { AccountClass as A, BlindpayApiResponse as B, Country as C, InternalApiClient as I, Network as N, PaginationParams as P, Rail as R, StablecoinToken as S, TransactionStatus as T, BankAccountType as a, AchCopDocument as b, ArgentinaTransfers as c, PayinTrackingTransaction as d, PayinTrackingPayment as e, PayinTrackingComplete as f, PayinTrackingPartnerFee as g, PaginationMetadata as h, CurrencyType as i, Currency as j, PayoutTrackingTransaction as k, PayoutTrackingPayment as l, PayoutTrackingLiquidity as m, PayoutTrackingComplete as n, PayoutTrackingPartnerFee as o, TransactionDocumentType as p };
|
|
@@ -6,30 +6,40 @@ import {
|
|
|
6
6
|
// src/resources/virtual-accounts/index.ts
|
|
7
7
|
function createVirtualAccountsResource(instanceId, client) {
|
|
8
8
|
return {
|
|
9
|
-
|
|
9
|
+
list(receiver_id) {
|
|
10
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
11
|
+
},
|
|
12
|
+
get({
|
|
13
|
+
receiver_id,
|
|
14
|
+
id
|
|
15
|
+
}) {
|
|
16
|
+
return client.get(
|
|
17
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
create(_a) {
|
|
10
21
|
var _b = _a, {
|
|
11
22
|
receiver_id
|
|
12
23
|
} = _b, data = __objRest(_b, [
|
|
13
24
|
"receiver_id"
|
|
14
25
|
]);
|
|
15
|
-
return client.
|
|
26
|
+
return client.post(
|
|
16
27
|
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
17
28
|
data
|
|
18
29
|
);
|
|
19
30
|
},
|
|
20
|
-
|
|
31
|
+
update(_c) {
|
|
21
32
|
var _d = _c, {
|
|
22
|
-
receiver_id
|
|
33
|
+
receiver_id,
|
|
34
|
+
id
|
|
23
35
|
} = _d, data = __objRest(_d, [
|
|
24
|
-
"receiver_id"
|
|
36
|
+
"receiver_id",
|
|
37
|
+
"id"
|
|
25
38
|
]);
|
|
26
|
-
return client.
|
|
27
|
-
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
39
|
+
return client.put(
|
|
40
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
|
|
28
41
|
data
|
|
29
42
|
);
|
|
30
|
-
},
|
|
31
|
-
get(receiver_id) {
|
|
32
|
-
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
33
43
|
}
|
|
34
44
|
};
|
|
35
45
|
}
|
|
@@ -31,6 +31,14 @@ function createPayoutsResource(instanceId, client) {
|
|
|
31
31
|
createEvm(_c) {
|
|
32
32
|
var data = __objRest(_c, []);
|
|
33
33
|
return client.post(`/instances/${instanceId}/payouts/evm`, data);
|
|
34
|
+
},
|
|
35
|
+
authorizeSolana(_d) {
|
|
36
|
+
var data = __objRest(_d, []);
|
|
37
|
+
return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
|
|
38
|
+
},
|
|
39
|
+
createSolana(_e) {
|
|
40
|
+
var data = __objRest(_e, []);
|
|
41
|
+
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
34
42
|
}
|
|
35
43
|
};
|
|
36
44
|
}
|
|
@@ -16,6 +16,10 @@ function createPayinQuotesResource(instanceId, client) {
|
|
|
16
16
|
},
|
|
17
17
|
get(id) {
|
|
18
18
|
return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
|
|
19
|
+
},
|
|
20
|
+
list(params) {
|
|
21
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
22
|
+
return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
|
|
19
23
|
}
|
|
20
24
|
};
|
|
21
25
|
}
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
createVirtualAccountsResource,
|
|
27
27
|
init_virtual_accounts
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LEPGLH7Q.mjs";
|
|
29
29
|
import {
|
|
30
30
|
createPartnerFeesResource,
|
|
31
31
|
init_partner_fees
|
|
@@ -37,23 +37,23 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
createPayinQuotesResource,
|
|
39
39
|
init_quotes
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-VRA5HP7F.mjs";
|
|
41
41
|
import {
|
|
42
42
|
createPayoutsResource,
|
|
43
43
|
init_payouts
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-VBZHAPK7.mjs";
|
|
45
45
|
import {
|
|
46
46
|
createApiKeysResource,
|
|
47
47
|
init_api_keys
|
|
48
48
|
} from "./chunk-LRHWT4JU.mjs";
|
|
49
|
-
import {
|
|
50
|
-
createAvailableResource,
|
|
51
|
-
init_available
|
|
52
|
-
} from "./chunk-U7CKUUO7.mjs";
|
|
53
49
|
import {
|
|
54
50
|
createBankAccountsResource,
|
|
55
51
|
init_bank_accounts
|
|
56
52
|
} from "./chunk-CPOSU35L.mjs";
|
|
53
|
+
import {
|
|
54
|
+
createAvailableResource,
|
|
55
|
+
init_available
|
|
56
|
+
} from "./chunk-U7CKUUO7.mjs";
|
|
57
57
|
import {
|
|
58
58
|
createInstancesResource,
|
|
59
59
|
init_instances
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
var version;
|
|
70
70
|
var init_package = __esm({
|
|
71
71
|
"package.json"() {
|
|
72
|
-
version = "
|
|
72
|
+
version = "3.0.0";
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -88,7 +88,7 @@ var init_blindpay_error = __esm({
|
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
// src/client.ts
|
|
91
|
-
import {
|
|
91
|
+
import { Webhook } from "svix";
|
|
92
92
|
var BlindPay;
|
|
93
93
|
var init_client = __esm({
|
|
94
94
|
"src/client.ts"() {
|
|
@@ -229,26 +229,29 @@ var init_client = __esm({
|
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
232
|
-
* Verifies the BlindPay webhook signature
|
|
232
|
+
* Verifies the BlindPay webhook signature using Svix
|
|
233
233
|
*
|
|
234
234
|
* @param params.secret The webhook secret from BlindPay dashboard
|
|
235
|
-
* @param params.
|
|
236
|
-
* @param params.
|
|
237
|
-
* @param params.payload The raw request body
|
|
238
|
-
* @param params.svixSignature The value of the `svix-signature` header
|
|
235
|
+
* @param params.headers The webhook headers object containing svix-id, svix-timestamp, and svix-signature
|
|
236
|
+
* @param params.payload The raw request body as a string
|
|
239
237
|
* @returns {boolean} True if the signature is valid, false otherwise
|
|
240
238
|
*/
|
|
241
239
|
verifyWebhookSignature({
|
|
242
240
|
secret,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
payload,
|
|
246
|
-
svixSignature
|
|
241
|
+
headers,
|
|
242
|
+
payload
|
|
247
243
|
}) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
244
|
+
try {
|
|
245
|
+
const webhook = new Webhook(secret);
|
|
246
|
+
webhook.verify(payload, {
|
|
247
|
+
"svix-id": headers.id,
|
|
248
|
+
"svix-timestamp": headers.timestamp,
|
|
249
|
+
"svix-signature": headers.signature
|
|
250
|
+
});
|
|
251
|
+
return true;
|
|
252
|
+
} catch (e) {
|
|
253
|
+
return false;
|
|
254
|
+
}
|
|
252
255
|
}
|
|
253
256
|
};
|
|
254
257
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export { CreateApiKeyInput, CreateApiKeyResponse, DeleteApiKeyInput, GetApiKeyIn
|
|
|
3
3
|
import { createAvailableResource } from './resources/available/index.mjs';
|
|
4
4
|
export { BankDetailKey, GetBankDetailsResponse, GetRailsResponse, GetSwiftCodeBankDetailsInput, GetSwiftCodeBankDetailsResponse } from './resources/available/index.mjs';
|
|
5
5
|
import { createBankAccountsResource } from './resources/bank-accounts/index.mjs';
|
|
6
|
-
export {
|
|
6
|
+
export { CreateAchInput, CreateAchResponse, CreateArgentinaTransfersInput, CreateArgentinaTransfersResponse, CreateColombiaAchInput, CreateColombiaAchResponse, CreateInternationalSwiftInput, CreateInternationalSwiftResponse, CreatePixInput, CreatePixResponse, CreateRtpInput, CreateRtpResponse, CreateSpeiInput, CreateSpeiResponse, CreateWireInput, CreateWireResponse, DeleteBankAccountInput, GetBankAccountInput, GetBankAccountResponse, ListBankAccountsInput, ListBankAccountsResponse } from './resources/bank-accounts/index.mjs';
|
|
7
7
|
import { createInstancesResource } from './resources/instances/index.mjs';
|
|
8
8
|
export { DeleteInstanceMemberInput, GetInstanceMembersResponse, InstanceMemberRole, UpdateInstanceInput, UpdateInstanceMemberRoleInput } from './resources/instances/index.mjs';
|
|
9
9
|
import { createPartnerFeesResource } from './resources/partner-fees/index.mjs';
|
|
@@ -11,23 +11,23 @@ export { CreatePartnerFeeInput, CreatePartnerFeeResponse, DeletePartnerFeeInput,
|
|
|
11
11
|
import { createPayinsResource } from './resources/payins/index.mjs';
|
|
12
12
|
export { CreateEvmPayinInput, CreateEvmPayinResponse, CreatePayinInput, ExportPayinsInput, ExportPayinsResponse, GetPayinInput, GetPayinResponse, GetPayinTrackInput, GetPayinTrackResponse, ListPayinsInput, ListPayinsResponse, Payin } from './resources/payins/index.mjs';
|
|
13
13
|
import { createPayinQuotesResource } from './resources/payins/quotes.mjs';
|
|
14
|
-
export { CreatePayinQuoteInput, CreatePayinQuoteResponse, GetPayinFxRateInput, GetPayinFxRateResponse, GetPayinQuoteInput, GetPayinQuoteResponse, PayinPaymentMethod } from './resources/payins/quotes.mjs';
|
|
14
|
+
export { CreatePayinQuoteInput, CreatePayinQuoteResponse, GetPayinFxRateInput, GetPayinFxRateResponse, GetPayinQuoteInput, GetPayinQuoteResponse, ListPayinQuotesInput, ListPayinQuotesResponse, PayinPaymentMethod } from './resources/payins/quotes.mjs';
|
|
15
15
|
import { createPayoutsResource } from './resources/payouts/index.mjs';
|
|
16
|
-
export { AuthorizeStellarTokenInput, AuthorizeStellarTokenResponse, CreateEvmPayoutInput, CreateEvmPayoutResponse, CreatePayoutInput, CreateStellarPayoutInput, CreateStellarPayoutResponse, ExportPayoutsInput, ExportPayoutsResponse, GetPayoutInput, GetPayoutResponse, GetPayoutTrackInput, GetPayoutTrackResponse, ListPayoutsInput, ListPayoutsResponse, Payout, SpeiProtocol } from './resources/payouts/index.mjs';
|
|
16
|
+
export { AuthorizeSolanaInput, AuthorizeSolanaResponse, AuthorizeStellarTokenInput, AuthorizeStellarTokenResponse, CreateEvmPayoutInput, CreateEvmPayoutResponse, CreatePayoutInput, CreateSolanaPayoutInput, CreateSolanaPayoutResponse, CreateStellarPayoutInput, CreateStellarPayoutResponse, ExportPayoutsInput, ExportPayoutsResponse, GetPayoutInput, GetPayoutResponse, GetPayoutTrackInput, GetPayoutTrackResponse, ListPayoutsInput, ListPayoutsResponse, Payout, SpeiProtocol } from './resources/payouts/index.mjs';
|
|
17
17
|
import { createQuotesResource } from './resources/quotes/index.mjs';
|
|
18
18
|
export { CreateQuoteInput, CreateQuoteResponse, GetFxRateInput, GetFxRateResponse } from './resources/quotes/index.mjs';
|
|
19
19
|
import { createReceiversResource } from './resources/receivers/index.mjs';
|
|
20
20
|
export { BusinessWithStandardKYB, CreateBusinessWithStandardKYBInput, CreateBusinessWithStandardKYBResponse, CreateIndividualWithEnhancedKYCInput, CreateIndividualWithEnhancedKYCResponse, CreateIndividualWithStandardKYCInput, CreateIndividualWithStandardKYCResponse, DeleteReceiverInput, GetLimitIncreaseRequestsInput, GetLimitIncreaseRequestsResponse, GetReceiverInput, GetReceiverLimitsInput, GetReceiverLimitsResponse, GetReceiverResponse, IdentificationDocument, IndividualWithEnhancedKYC, IndividualWithStandardKYC, KycType, LimitIncreaseRequestStatus, LimitIncreaseRequestSupportingDocumentType, ListReceiversResponse, Owner, OwnerRole, ProofOfAddressDocType, PurposeOfTransactions, RequestLimitIncreaseInput, RequestLimitIncreaseResponse, SourceOfFundsDocType, UpdateReceiverInput } from './resources/receivers/index.mjs';
|
|
21
21
|
import { createTermsOfServiceResource } from './resources/terms-of-service/index.mjs';
|
|
22
22
|
import { createVirtualAccountsResource } from './resources/virtual-accounts/index.mjs';
|
|
23
|
-
export { CreateVirtualAccountInput, CreateVirtualAccountResponse, GetVirtualAccountInput, GetVirtualAccountResponse, UpdateVirtualAccountInput, VirtualAccount } from './resources/virtual-accounts/index.mjs';
|
|
23
|
+
export { BankingPartner, CreateVirtualAccountInput, CreateVirtualAccountResponse, GetVirtualAccountInput, GetVirtualAccountResponse, ListVirtualAccountsInput, ListVirtualAccountsResponse, UpdateVirtualAccountInput, VirtualAccount } from './resources/virtual-accounts/index.mjs';
|
|
24
24
|
import { createBlockchainWalletsResource } from './resources/wallets/blockchain.mjs';
|
|
25
25
|
export { CreateAssetTrustlineInput, CreateAssetTrustlineResponse, CreateBlockchainWalletResponse, CreateBlockchainWalletWithAddressInput, CreateBlockchainWalletWithHashInput, DeleteBlockchainWalletInput, GetBlockchainWalletInput, GetBlockchainWalletMessage, GetBlockchainWalletMessageResponse, GetBlockchainWalletResponse, ListBlockchainWalletsInput, ListBlockchainWalletsResponse, MintUsdbSolanaInput, MintUsdbSolanaResponse, MintUsdbStellarInput, PrepareSolanaDelegationTransactionInput, PrepareSolanaDelegationTransactionResponse } from './resources/wallets/blockchain.mjs';
|
|
26
26
|
import { createOfframpWalletsResource } from './resources/wallets/offramp.mjs';
|
|
27
27
|
export { CreateOfframpWalletInput, CreateOfframpWalletResponse, GetOfframpWalletInput, GetOfframpWalletResponse, ListOfframpWalletsInput, ListOfframpWalletsResponse, OfframpWallet } from './resources/wallets/offramp.mjs';
|
|
28
28
|
import { createWebhookEndpointsResource } from './resources/webhooks/index.mjs';
|
|
29
29
|
export { CreateWebhookEndpointInput, CreateWebhookEndpointResponse, DeleteWebhookEndpointInput, GetPortalAccessUrlResponse, GetWebhookEndpointSecretInput, GetWebhookEndpointSecretResponse, ListWebhookEndpointsResponse, WebhookEvents } from './resources/webhooks/index.mjs';
|
|
30
|
-
import './api-client-
|
|
30
|
+
import './api-client-B7VQkM_4.mjs';
|
|
31
31
|
|
|
32
32
|
declare class BlindPay {
|
|
33
33
|
private readonly baseUrl;
|
|
@@ -66,21 +66,21 @@ declare class BlindPay {
|
|
|
66
66
|
private patch;
|
|
67
67
|
private delete;
|
|
68
68
|
/**
|
|
69
|
-
* Verifies the BlindPay webhook signature
|
|
69
|
+
* Verifies the BlindPay webhook signature using Svix
|
|
70
70
|
*
|
|
71
71
|
* @param params.secret The webhook secret from BlindPay dashboard
|
|
72
|
-
* @param params.
|
|
73
|
-
* @param params.
|
|
74
|
-
* @param params.payload The raw request body
|
|
75
|
-
* @param params.svixSignature The value of the `svix-signature` header
|
|
72
|
+
* @param params.headers The webhook headers object containing svix-id, svix-timestamp, and svix-signature
|
|
73
|
+
* @param params.payload The raw request body as a string
|
|
76
74
|
* @returns {boolean} True if the signature is valid, false otherwise
|
|
77
75
|
*/
|
|
78
|
-
verifyWebhookSignature({ secret,
|
|
76
|
+
verifyWebhookSignature({ secret, headers, payload, }: {
|
|
79
77
|
secret: string;
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
headers: {
|
|
79
|
+
id: string;
|
|
80
|
+
timestamp: string;
|
|
81
|
+
signature: string;
|
|
82
|
+
};
|
|
82
83
|
payload: string;
|
|
83
|
-
svixSignature: string;
|
|
84
84
|
}): boolean;
|
|
85
85
|
}
|
|
86
86
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { CreateApiKeyInput, CreateApiKeyResponse, DeleteApiKeyInput, GetApiKeyIn
|
|
|
3
3
|
import { createAvailableResource } from './resources/available/index.js';
|
|
4
4
|
export { BankDetailKey, GetBankDetailsResponse, GetRailsResponse, GetSwiftCodeBankDetailsInput, GetSwiftCodeBankDetailsResponse } from './resources/available/index.js';
|
|
5
5
|
import { createBankAccountsResource } from './resources/bank-accounts/index.js';
|
|
6
|
-
export {
|
|
6
|
+
export { CreateAchInput, CreateAchResponse, CreateArgentinaTransfersInput, CreateArgentinaTransfersResponse, CreateColombiaAchInput, CreateColombiaAchResponse, CreateInternationalSwiftInput, CreateInternationalSwiftResponse, CreatePixInput, CreatePixResponse, CreateRtpInput, CreateRtpResponse, CreateSpeiInput, CreateSpeiResponse, CreateWireInput, CreateWireResponse, DeleteBankAccountInput, GetBankAccountInput, GetBankAccountResponse, ListBankAccountsInput, ListBankAccountsResponse } from './resources/bank-accounts/index.js';
|
|
7
7
|
import { createInstancesResource } from './resources/instances/index.js';
|
|
8
8
|
export { DeleteInstanceMemberInput, GetInstanceMembersResponse, InstanceMemberRole, UpdateInstanceInput, UpdateInstanceMemberRoleInput } from './resources/instances/index.js';
|
|
9
9
|
import { createPartnerFeesResource } from './resources/partner-fees/index.js';
|
|
@@ -11,23 +11,23 @@ export { CreatePartnerFeeInput, CreatePartnerFeeResponse, DeletePartnerFeeInput,
|
|
|
11
11
|
import { createPayinsResource } from './resources/payins/index.js';
|
|
12
12
|
export { CreateEvmPayinInput, CreateEvmPayinResponse, CreatePayinInput, ExportPayinsInput, ExportPayinsResponse, GetPayinInput, GetPayinResponse, GetPayinTrackInput, GetPayinTrackResponse, ListPayinsInput, ListPayinsResponse, Payin } from './resources/payins/index.js';
|
|
13
13
|
import { createPayinQuotesResource } from './resources/payins/quotes.js';
|
|
14
|
-
export { CreatePayinQuoteInput, CreatePayinQuoteResponse, GetPayinFxRateInput, GetPayinFxRateResponse, GetPayinQuoteInput, GetPayinQuoteResponse, PayinPaymentMethod } from './resources/payins/quotes.js';
|
|
14
|
+
export { CreatePayinQuoteInput, CreatePayinQuoteResponse, GetPayinFxRateInput, GetPayinFxRateResponse, GetPayinQuoteInput, GetPayinQuoteResponse, ListPayinQuotesInput, ListPayinQuotesResponse, PayinPaymentMethod } from './resources/payins/quotes.js';
|
|
15
15
|
import { createPayoutsResource } from './resources/payouts/index.js';
|
|
16
|
-
export { AuthorizeStellarTokenInput, AuthorizeStellarTokenResponse, CreateEvmPayoutInput, CreateEvmPayoutResponse, CreatePayoutInput, CreateStellarPayoutInput, CreateStellarPayoutResponse, ExportPayoutsInput, ExportPayoutsResponse, GetPayoutInput, GetPayoutResponse, GetPayoutTrackInput, GetPayoutTrackResponse, ListPayoutsInput, ListPayoutsResponse, Payout, SpeiProtocol } from './resources/payouts/index.js';
|
|
16
|
+
export { AuthorizeSolanaInput, AuthorizeSolanaResponse, AuthorizeStellarTokenInput, AuthorizeStellarTokenResponse, CreateEvmPayoutInput, CreateEvmPayoutResponse, CreatePayoutInput, CreateSolanaPayoutInput, CreateSolanaPayoutResponse, CreateStellarPayoutInput, CreateStellarPayoutResponse, ExportPayoutsInput, ExportPayoutsResponse, GetPayoutInput, GetPayoutResponse, GetPayoutTrackInput, GetPayoutTrackResponse, ListPayoutsInput, ListPayoutsResponse, Payout, SpeiProtocol } from './resources/payouts/index.js';
|
|
17
17
|
import { createQuotesResource } from './resources/quotes/index.js';
|
|
18
18
|
export { CreateQuoteInput, CreateQuoteResponse, GetFxRateInput, GetFxRateResponse } from './resources/quotes/index.js';
|
|
19
19
|
import { createReceiversResource } from './resources/receivers/index.js';
|
|
20
20
|
export { BusinessWithStandardKYB, CreateBusinessWithStandardKYBInput, CreateBusinessWithStandardKYBResponse, CreateIndividualWithEnhancedKYCInput, CreateIndividualWithEnhancedKYCResponse, CreateIndividualWithStandardKYCInput, CreateIndividualWithStandardKYCResponse, DeleteReceiverInput, GetLimitIncreaseRequestsInput, GetLimitIncreaseRequestsResponse, GetReceiverInput, GetReceiverLimitsInput, GetReceiverLimitsResponse, GetReceiverResponse, IdentificationDocument, IndividualWithEnhancedKYC, IndividualWithStandardKYC, KycType, LimitIncreaseRequestStatus, LimitIncreaseRequestSupportingDocumentType, ListReceiversResponse, Owner, OwnerRole, ProofOfAddressDocType, PurposeOfTransactions, RequestLimitIncreaseInput, RequestLimitIncreaseResponse, SourceOfFundsDocType, UpdateReceiverInput } from './resources/receivers/index.js';
|
|
21
21
|
import { createTermsOfServiceResource } from './resources/terms-of-service/index.js';
|
|
22
22
|
import { createVirtualAccountsResource } from './resources/virtual-accounts/index.js';
|
|
23
|
-
export { CreateVirtualAccountInput, CreateVirtualAccountResponse, GetVirtualAccountInput, GetVirtualAccountResponse, UpdateVirtualAccountInput, VirtualAccount } from './resources/virtual-accounts/index.js';
|
|
23
|
+
export { BankingPartner, CreateVirtualAccountInput, CreateVirtualAccountResponse, GetVirtualAccountInput, GetVirtualAccountResponse, ListVirtualAccountsInput, ListVirtualAccountsResponse, UpdateVirtualAccountInput, VirtualAccount } from './resources/virtual-accounts/index.js';
|
|
24
24
|
import { createBlockchainWalletsResource } from './resources/wallets/blockchain.js';
|
|
25
25
|
export { CreateAssetTrustlineInput, CreateAssetTrustlineResponse, CreateBlockchainWalletResponse, CreateBlockchainWalletWithAddressInput, CreateBlockchainWalletWithHashInput, DeleteBlockchainWalletInput, GetBlockchainWalletInput, GetBlockchainWalletMessage, GetBlockchainWalletMessageResponse, GetBlockchainWalletResponse, ListBlockchainWalletsInput, ListBlockchainWalletsResponse, MintUsdbSolanaInput, MintUsdbSolanaResponse, MintUsdbStellarInput, PrepareSolanaDelegationTransactionInput, PrepareSolanaDelegationTransactionResponse } from './resources/wallets/blockchain.js';
|
|
26
26
|
import { createOfframpWalletsResource } from './resources/wallets/offramp.js';
|
|
27
27
|
export { CreateOfframpWalletInput, CreateOfframpWalletResponse, GetOfframpWalletInput, GetOfframpWalletResponse, ListOfframpWalletsInput, ListOfframpWalletsResponse, OfframpWallet } from './resources/wallets/offramp.js';
|
|
28
28
|
import { createWebhookEndpointsResource } from './resources/webhooks/index.js';
|
|
29
29
|
export { CreateWebhookEndpointInput, CreateWebhookEndpointResponse, DeleteWebhookEndpointInput, GetPortalAccessUrlResponse, GetWebhookEndpointSecretInput, GetWebhookEndpointSecretResponse, ListWebhookEndpointsResponse, WebhookEvents } from './resources/webhooks/index.js';
|
|
30
|
-
import './api-client-
|
|
30
|
+
import './api-client-B7VQkM_4.js';
|
|
31
31
|
|
|
32
32
|
declare class BlindPay {
|
|
33
33
|
private readonly baseUrl;
|
|
@@ -66,21 +66,21 @@ declare class BlindPay {
|
|
|
66
66
|
private patch;
|
|
67
67
|
private delete;
|
|
68
68
|
/**
|
|
69
|
-
* Verifies the BlindPay webhook signature
|
|
69
|
+
* Verifies the BlindPay webhook signature using Svix
|
|
70
70
|
*
|
|
71
71
|
* @param params.secret The webhook secret from BlindPay dashboard
|
|
72
|
-
* @param params.
|
|
73
|
-
* @param params.
|
|
74
|
-
* @param params.payload The raw request body
|
|
75
|
-
* @param params.svixSignature The value of the `svix-signature` header
|
|
72
|
+
* @param params.headers The webhook headers object containing svix-id, svix-timestamp, and svix-signature
|
|
73
|
+
* @param params.payload The raw request body as a string
|
|
76
74
|
* @returns {boolean} True if the signature is valid, false otherwise
|
|
77
75
|
*/
|
|
78
|
-
verifyWebhookSignature({ secret,
|
|
76
|
+
verifyWebhookSignature({ secret, headers, payload, }: {
|
|
79
77
|
secret: string;
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
headers: {
|
|
79
|
+
id: string;
|
|
80
|
+
timestamp: string;
|
|
81
|
+
signature: string;
|
|
82
|
+
};
|
|
82
83
|
payload: string;
|
|
83
|
-
svixSignature: string;
|
|
84
84
|
}): boolean;
|
|
85
85
|
}
|
|
86
86
|
|