@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.
Files changed (77) hide show
  1. package/dist/{api-client-Cw2mNJeR.d.mts → api-client-B7VQkM_4.d.mts} +96 -35
  2. package/dist/{api-client-Cw2mNJeR.d.ts → api-client-B7VQkM_4.d.ts} +96 -35
  3. package/dist/{chunk-5XJJKYXE.mjs → chunk-LEPGLH7Q.mjs} +20 -10
  4. package/dist/{chunk-3QQCDR3E.mjs → chunk-VBZHAPK7.mjs} +8 -0
  5. package/dist/{chunk-OTRFWEEC.mjs → chunk-VRA5HP7F.mjs} +4 -0
  6. package/dist/{chunk-4DVSRRBP.mjs → chunk-WH2VNZE7.mjs} +25 -22
  7. package/dist/index.d.mts +14 -14
  8. package/dist/index.d.ts +14 -14
  9. package/dist/index.js +50 -25
  10. package/dist/index.mjs +8 -8
  11. package/dist/resources/api-keys/api-keys.test.js +50 -25
  12. package/dist/resources/api-keys/api-keys.test.mjs +5 -5
  13. package/dist/resources/api-keys/index.d.mts +1 -1
  14. package/dist/resources/api-keys/index.d.ts +1 -1
  15. package/dist/resources/available/available.test.js +50 -25
  16. package/dist/resources/available/available.test.mjs +5 -5
  17. package/dist/resources/available/index.d.mts +1 -1
  18. package/dist/resources/available/index.d.ts +1 -1
  19. package/dist/resources/bank-accounts/bank-accounts.test.js +50 -25
  20. package/dist/resources/bank-accounts/bank-accounts.test.mjs +5 -5
  21. package/dist/resources/bank-accounts/index.d.mts +2 -4
  22. package/dist/resources/bank-accounts/index.d.ts +2 -4
  23. package/dist/resources/instances/index.d.mts +1 -1
  24. package/dist/resources/instances/index.d.ts +1 -1
  25. package/dist/resources/instances/instances.test.js +50 -25
  26. package/dist/resources/instances/instances.test.mjs +5 -5
  27. package/dist/resources/partner-fees/index.d.mts +1 -1
  28. package/dist/resources/partner-fees/index.d.ts +1 -1
  29. package/dist/resources/partner-fees/partner-fees.test.js +50 -25
  30. package/dist/resources/partner-fees/partner-fees.test.mjs +5 -5
  31. package/dist/resources/payins/index.d.mts +9 -33
  32. package/dist/resources/payins/index.d.ts +9 -33
  33. package/dist/resources/payins/payins-quotes.test.js +100 -25
  34. package/dist/resources/payins/payins-quotes.test.mjs +55 -5
  35. package/dist/resources/payins/payins.test.js +164 -52
  36. package/dist/resources/payins/payins.test.mjs +119 -32
  37. package/dist/resources/payins/quotes.d.mts +38 -2
  38. package/dist/resources/payins/quotes.d.ts +38 -2
  39. package/dist/resources/payins/quotes.js +4 -0
  40. package/dist/resources/payins/quotes.mjs +1 -1
  41. package/dist/resources/payouts/index.d.mts +42 -17
  42. package/dist/resources/payouts/index.d.ts +42 -17
  43. package/dist/resources/payouts/index.js +8 -0
  44. package/dist/resources/payouts/index.mjs +1 -1
  45. package/dist/resources/payouts/payouts.test.js +162 -27
  46. package/dist/resources/payouts/payouts.test.mjs +117 -7
  47. package/dist/resources/quotes/index.d.mts +1 -1
  48. package/dist/resources/quotes/index.d.ts +1 -1
  49. package/dist/resources/quotes/quotes.test.js +50 -25
  50. package/dist/resources/quotes/quotes.test.mjs +5 -5
  51. package/dist/resources/receivers/index.d.mts +9 -7
  52. package/dist/resources/receivers/index.d.ts +9 -7
  53. package/dist/resources/receivers/receivers.test.js +57 -33
  54. package/dist/resources/receivers/receivers.test.mjs +12 -13
  55. package/dist/resources/terms-of-service/index.d.mts +1 -1
  56. package/dist/resources/terms-of-service/index.d.ts +1 -1
  57. package/dist/resources/terms-of-service/terms-of-service.test.js +50 -25
  58. package/dist/resources/terms-of-service/terms-of-service.test.mjs +5 -5
  59. package/dist/resources/virtual-accounts/index.d.mts +22 -7
  60. package/dist/resources/virtual-accounts/index.d.ts +22 -7
  61. package/dist/resources/virtual-accounts/index.js +20 -10
  62. package/dist/resources/virtual-accounts/index.mjs +1 -1
  63. package/dist/resources/virtual-accounts/virtual-accounts.test.js +169 -44
  64. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +124 -24
  65. package/dist/resources/wallets/blockchain.d.mts +1 -1
  66. package/dist/resources/wallets/blockchain.d.ts +1 -1
  67. package/dist/resources/wallets/blockchain.test.js +50 -25
  68. package/dist/resources/wallets/blockchain.test.mjs +5 -5
  69. package/dist/resources/wallets/offramp.d.mts +1 -1
  70. package/dist/resources/wallets/offramp.d.ts +1 -1
  71. package/dist/resources/wallets/offramp.test.js +50 -25
  72. package/dist/resources/wallets/offramp.test.mjs +5 -5
  73. package/dist/resources/webhooks/index.d.mts +1 -1
  74. package/dist/resources/webhooks/index.d.ts +1 -1
  75. package/dist/resources/webhooks/webhooks.test.js +50 -25
  76. package/dist/resources/webhooks/webhooks.test.mjs +5 -5
  77. 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: number;
296
- prev_page: number;
295
+ next_page: string;
296
+ prev_page: string;
297
297
  }
298
298
 
299
- type TrackingTransaction = {
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 TrackingPayment = {
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 TrackingLiquidity = {
316
- step: string;
317
- provider_transaction_id: string;
318
- provider_status: string;
319
- estimated_time_of_arrival: string;
320
- completed_at: string;
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 TrackingComplete = {
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 TrackingPartnerFee = {
331
- step: string;
332
- transaction_hash: string;
333
- completed_at: string;
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, TrackingTransaction as b, TrackingPayment as c, TrackingComplete as d, TrackingPartnerFee as e, PaginationMetadata as f, CurrencyType as g, Currency as h, TrackingLiquidity as i, TransactionDocumentType as j };
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: number;
296
- prev_page: number;
295
+ next_page: string;
296
+ prev_page: string;
297
297
  }
298
298
 
299
- type TrackingTransaction = {
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 TrackingPayment = {
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 TrackingLiquidity = {
316
- step: string;
317
- provider_transaction_id: string;
318
- provider_status: string;
319
- estimated_time_of_arrival: string;
320
- completed_at: string;
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 TrackingComplete = {
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 TrackingPartnerFee = {
331
- step: string;
332
- transaction_hash: string;
333
- completed_at: string;
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, TrackingTransaction as b, TrackingPayment as c, TrackingComplete as d, TrackingPartnerFee as e, PaginationMetadata as f, CurrencyType as g, Currency as h, TrackingLiquidity as i, TransactionDocumentType as j };
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
- update(_a) {
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.put(
26
+ return client.post(
16
27
  `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
17
28
  data
18
29
  );
19
30
  },
20
- create(_c) {
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.post(
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-5XJJKYXE.mjs";
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-OTRFWEEC.mjs";
40
+ } from "./chunk-VRA5HP7F.mjs";
41
41
  import {
42
42
  createPayoutsResource,
43
43
  init_payouts
44
- } from "./chunk-3QQCDR3E.mjs";
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 = "2.4.0";
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 { createHmac, timingSafeEqual } from "crypto";
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.id The value of the `svix-id` header
236
- * @param params.timestamp The value of the `svix-timestamp` header
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
- id,
244
- timestamp,
245
- payload,
246
- svixSignature
241
+ headers,
242
+ payload
247
243
  }) {
248
- const signedContent = `${id}.${timestamp}.${payload}`;
249
- const secretBytes = Buffer.from(secret.split("_")[1], "base64");
250
- const expectedSignature = createHmac("sha256", secretBytes).update(signedContent).digest("base64");
251
- return svixSignature.length === expectedSignature.length && timingSafeEqual(Buffer.from(svixSignature), Buffer.from(expectedSignature));
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 { AchCopDocument, ArgentinaTransfers, 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';
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-Cw2mNJeR.mjs';
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.id The value of the `svix-id` header
73
- * @param params.timestamp The value of the `svix-timestamp` header
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, id, timestamp, payload, svixSignature, }: {
76
+ verifyWebhookSignature({ secret, headers, payload, }: {
79
77
  secret: string;
80
- id: string;
81
- timestamp: string;
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 { AchCopDocument, ArgentinaTransfers, 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';
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-Cw2mNJeR.js';
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.id The value of the `svix-id` header
73
- * @param params.timestamp The value of the `svix-timestamp` header
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, id, timestamp, payload, svixSignature, }: {
76
+ verifyWebhookSignature({ secret, headers, payload, }: {
79
77
  secret: string;
80
- id: string;
81
- timestamp: string;
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