@blindpay/node 1.0.0 → 1.1.1

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 (105) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +24 -37
  3. package/dist/{chunk-HKFAJXJG.mjs → chunk-3QQCDR3E.mjs} +12 -32
  4. package/dist/{chunk-LUDGZPXY.mjs → chunk-5XJJKYXE.mjs} +9 -16
  5. package/dist/chunk-64EFLUS3.mjs +106 -0
  6. package/dist/chunk-B5T7AQLH.mjs +38 -0
  7. package/dist/{chunk-VKN2AMCW.mjs → chunk-BONN6PYB.mjs} +12 -30
  8. package/dist/{chunk-M6IYYMRW.mjs → chunk-E7M4CJKR.mjs} +4 -12
  9. package/dist/chunk-IZYPRCCV.mjs +82 -0
  10. package/dist/{chunk-QVOSGLUO.mjs → chunk-LRHWT4JU.mjs} +6 -10
  11. package/dist/chunk-QGNLMN6Z.mjs +49 -0
  12. package/dist/{chunk-3CZJEDS5.mjs → chunk-RC5NN5UF.mjs} +5 -14
  13. package/dist/{chunk-GNDAATIJ.mjs → chunk-TBTA7A2P.mjs} +4 -12
  14. package/dist/{chunk-CNNEROQ7.mjs → chunk-UC57SCKQ.mjs} +6 -17
  15. package/dist/{chunk-UCAW3RTZ.mjs → chunk-W7NJUABI.mjs} +12 -20
  16. package/dist/{chunk-ES7RXEM7.mjs → chunk-YPXYUS2X.mjs} +46 -37
  17. package/dist/index.d.mts +14 -10
  18. package/dist/index.d.ts +14 -10
  19. package/dist/index.js +237 -435
  20. package/dist/index.mjs +19 -19
  21. package/dist/resources/api-keys/api-keys.test.js +238 -445
  22. package/dist/resources/api-keys/api-keys.test.mjs +19 -28
  23. package/dist/resources/api-keys/index.d.mts +20 -20
  24. package/dist/resources/api-keys/index.d.ts +20 -20
  25. package/dist/resources/api-keys/index.js +6 -10
  26. package/dist/resources/api-keys/index.mjs +1 -1
  27. package/dist/resources/available/available.test.js +235 -433
  28. package/dist/resources/available/available.test.mjs +16 -16
  29. package/dist/resources/bank-accounts/bank-accounts.test.js +245 -455
  30. package/dist/resources/bank-accounts/bank-accounts.test.mjs +26 -38
  31. package/dist/resources/bank-accounts/index.d.mts +22 -145
  32. package/dist/resources/bank-accounts/index.d.ts +22 -145
  33. package/dist/resources/bank-accounts/index.js +102 -184
  34. package/dist/resources/bank-accounts/index.mjs +1 -1
  35. package/dist/resources/instances/index.d.mts +9 -20
  36. package/dist/resources/instances/index.d.ts +9 -20
  37. package/dist/resources/instances/index.js +11 -20
  38. package/dist/resources/instances/index.mjs +1 -1
  39. package/dist/resources/instances/instances.test.js +239 -446
  40. package/dist/resources/instances/instances.test.mjs +20 -29
  41. package/dist/resources/partner-fees/index.d.mts +8 -18
  42. package/dist/resources/partner-fees/index.d.ts +8 -18
  43. package/dist/resources/partner-fees/index.js +5 -14
  44. package/dist/resources/partner-fees/index.mjs +1 -1
  45. package/dist/resources/partner-fees/partner-fees.test.js +238 -445
  46. package/dist/resources/partner-fees/partner-fees.test.mjs +19 -28
  47. package/dist/resources/payins/index.d.mts +15 -30
  48. package/dist/resources/payins/index.d.ts +15 -30
  49. package/dist/resources/payins/index.js +12 -20
  50. package/dist/resources/payins/index.mjs +1 -1
  51. package/dist/resources/payins/payins-quotes.test.js +235 -435
  52. package/dist/resources/payins/payins-quotes.test.mjs +16 -18
  53. package/dist/resources/payins/payins.test.js +240 -449
  54. package/dist/resources/payins/payins.test.mjs +21 -32
  55. package/dist/resources/payins/quotes.d.mts +3 -5
  56. package/dist/resources/payins/quotes.d.ts +3 -5
  57. package/dist/resources/payins/quotes.js +4 -12
  58. package/dist/resources/payins/quotes.mjs +1 -1
  59. package/dist/resources/payouts/index.d.mts +13 -28
  60. package/dist/resources/payouts/index.d.ts +13 -28
  61. package/dist/resources/payouts/index.js +12 -32
  62. package/dist/resources/payouts/index.mjs +1 -1
  63. package/dist/resources/payouts/payouts.test.js +239 -449
  64. package/dist/resources/payouts/payouts.test.mjs +20 -32
  65. package/dist/resources/quotes/index.d.mts +3 -5
  66. package/dist/resources/quotes/index.d.ts +3 -5
  67. package/dist/resources/quotes/index.js +4 -12
  68. package/dist/resources/quotes/index.mjs +1 -1
  69. package/dist/resources/quotes/quotes.test.js +235 -435
  70. package/dist/resources/quotes/quotes.test.mjs +16 -18
  71. package/dist/resources/receivers/index.d.mts +13 -27
  72. package/dist/resources/receivers/index.d.ts +13 -27
  73. package/dist/resources/receivers/index.js +12 -30
  74. package/dist/resources/receivers/index.mjs +1 -1
  75. package/dist/resources/receivers/receivers.test.js +241 -452
  76. package/dist/resources/receivers/receivers.test.mjs +22 -35
  77. package/dist/resources/virtual-accounts/index.d.mts +7 -12
  78. package/dist/resources/virtual-accounts/index.d.ts +7 -12
  79. package/dist/resources/virtual-accounts/index.js +9 -16
  80. package/dist/resources/virtual-accounts/index.mjs +1 -1
  81. package/dist/resources/virtual-accounts/virtual-accounts.test.js +238 -441
  82. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +19 -24
  83. package/dist/resources/wallets/blockchain.d.mts +23 -31
  84. package/dist/resources/wallets/blockchain.d.ts +23 -31
  85. package/dist/resources/wallets/blockchain.js +51 -33
  86. package/dist/resources/wallets/blockchain.mjs +1 -1
  87. package/dist/resources/wallets/blockchain.test.js +268 -451
  88. package/dist/resources/wallets/blockchain.test.mjs +49 -34
  89. package/dist/resources/wallets/offramp.d.mts +10 -13
  90. package/dist/resources/wallets/offramp.d.ts +10 -13
  91. package/dist/resources/wallets/offramp.js +14 -14
  92. package/dist/resources/wallets/offramp.mjs +1 -1
  93. package/dist/resources/wallets/offramp.test.js +241 -442
  94. package/dist/resources/wallets/offramp.test.mjs +22 -25
  95. package/dist/resources/webhooks/index.d.mts +9 -22
  96. package/dist/resources/webhooks/index.d.ts +9 -22
  97. package/dist/resources/webhooks/index.js +6 -17
  98. package/dist/resources/webhooks/index.mjs +1 -1
  99. package/dist/resources/webhooks/webhooks.test.js +239 -448
  100. package/dist/resources/webhooks/webhooks.test.mjs +20 -31
  101. package/package.json +2 -4
  102. package/dist/chunk-2DAKB5XK.mjs +0 -212
  103. package/dist/chunk-GEDDLCJY.mjs +0 -77
  104. package/dist/chunk-LK3JPQ6I.mjs +0 -49
  105. package/dist/chunk-LLWEHHKB.mjs +0 -47
package/dist/index.js CHANGED
@@ -69,7 +69,7 @@ var __async = (__this, __arguments, generator) => {
69
69
  // src/index.ts
70
70
  var index_exports = {};
71
71
  __export(index_exports, {
72
- Blindpay: () => Blindpay,
72
+ BlindPay: () => BlindPay,
73
73
  createApiKeysResource: () => createApiKeysResource,
74
74
  createAvailableResource: () => createAvailableResource,
75
75
  createBankAccountsResource: () => createBankAccountsResource,
@@ -91,10 +91,10 @@ module.exports = __toCommonJS(index_exports);
91
91
  var import_node_crypto = require("crypto");
92
92
 
93
93
  // package.json
94
- var version = "1.0.0";
94
+ var version = "1.1.1";
95
95
 
96
96
  // src/internal/blindpay-error.ts
97
- var BlindpayError = class extends Error {
97
+ var BlindPayError = class extends Error {
98
98
  constructor(message) {
99
99
  super(message);
100
100
  this.name = "BlindpayError";
@@ -102,23 +102,19 @@ var BlindpayError = class extends Error {
102
102
  };
103
103
 
104
104
  // src/resources/api-keys/index.ts
105
- function createApiKeysResource(client) {
105
+ function createApiKeysResource(instanceId, client) {
106
106
  return {
107
- list({ instanceId }) {
107
+ list() {
108
108
  return client.get(`/instances/${instanceId}/api-keys`);
109
109
  },
110
110
  create(_a) {
111
- var _b = _a, {
112
- instanceId
113
- } = _b, data = __objRest(_b, [
114
- "instanceId"
115
- ]);
111
+ var data = __objRest(_a, []);
116
112
  return client.post(`/instances/${instanceId}/api-keys`, data);
117
113
  },
118
- get({ instanceId, id }) {
119
- return client.get(`/instances/${instanceId}/api_keys/${id}`);
114
+ get(id) {
115
+ return client.get(`/instances/${instanceId}/api-keys/${id}`);
120
116
  },
121
- delete({ instanceId, id }) {
117
+ delete(id) {
122
118
  return client.delete(`/instances/${instanceId}/api-keys/${id}`);
123
119
  }
124
120
  };
@@ -137,621 +133,427 @@ function createAvailableResource(client) {
137
133
  }
138
134
 
139
135
  // src/resources/bank-accounts/index.ts
140
- function createBankAccountsResource(client) {
136
+ function createBankAccountsResource(instanceId, client) {
141
137
  return {
142
- list({
143
- instanceId,
144
- receiverId
145
- }) {
146
- return client.get(`/instances/${instanceId}/receivers/${receiverId}/bank-accounts`);
147
- },
148
- createPix({
149
- instanceId,
150
- receiverId,
151
- name,
152
- pix_key
153
- }) {
154
- return client.post(`/instances/${instanceId}/receivers/${receiverId}/bank-accounts`, {
155
- type: "pix",
156
- name,
157
- pix_key
158
- });
159
- },
160
- createArgentinaTransfers({
161
- instanceId,
162
- receiverId,
163
- beneficiary_name,
164
- name,
165
- transfers_account,
166
- transfers_type
167
- }) {
168
- return client.post(`/instances/${instanceId}/receivers/${receiverId}/bank-accounts`, {
169
- type: "transfers_bitso",
170
- beneficiary_name,
171
- name,
172
- transfers_account,
173
- transfers_type
174
- });
175
- },
176
- createSpei({
177
- instanceId,
178
- receiverId,
179
- beneficiary_name,
180
- name,
181
- spei_clabe,
182
- spei_institution_code,
183
- spei_protocol
184
- }) {
185
- return client.post(`/instances/${instanceId}/receivers/${receiverId}/bank-accounts`, {
186
- type: "spei_bitso",
187
- beneficiary_name,
188
- name,
189
- spei_clabe,
190
- spei_institution_code,
191
- spei_protocol
192
- });
193
- },
194
- createColombiaAch({
195
- instanceId,
196
- receiverId,
197
- name,
198
- account_type,
199
- ach_cop_beneficiary_first_name,
200
- ach_cop_beneficiary_last_name,
201
- ach_cop_document_id,
202
- ach_cop_document_type,
203
- ach_cop_email,
204
- ach_cop_bank_code,
205
- ach_cop_bank_account
206
- }) {
207
- return client.post(`/instances/${instanceId}/receivers/${receiverId}/bank-accounts`, {
208
- type: "ach_cop_bitso",
209
- name,
210
- account_type,
211
- ach_cop_beneficiary_first_name,
212
- ach_cop_beneficiary_last_name,
213
- ach_cop_document_id,
214
- ach_cop_document_type,
215
- ach_cop_email,
216
- ach_cop_bank_code,
217
- ach_cop_bank_account
218
- });
219
- },
220
- createAch({
221
- instanceId,
222
- receiverId,
223
- name,
224
- account_class,
225
- account_number,
226
- account_type,
227
- beneficiary_name,
228
- routing_number
229
- }) {
230
- return client.post(`/instances/${instanceId}/receivers/${receiverId}/bank-accounts`, {
231
- type: "ach",
232
- name,
233
- account_class,
234
- account_number,
235
- account_type,
236
- beneficiary_name,
237
- routing_number
238
- });
239
- },
240
- createWire({
241
- instanceId,
242
- receiverId,
243
- name,
244
- account_number,
245
- beneficiary_name,
246
- routing_number,
247
- address_line_1,
248
- address_line_2,
249
- city,
250
- state_province_region,
251
- country,
252
- postal_code
253
- }) {
254
- return client.post(`/instances/${instanceId}/receivers/${receiverId}/bank-accounts`, {
255
- type: "wire",
256
- name,
257
- account_number,
258
- beneficiary_name,
259
- routing_number,
260
- address_line_1,
261
- address_line_2,
262
- city,
263
- state_province_region,
264
- country,
265
- postal_code
266
- });
267
- },
268
- createInternationalSwift({
269
- instanceId,
270
- receiverId,
271
- name,
272
- swift_account_holder_name,
273
- swift_account_number_iban,
274
- swift_bank_address_line_1,
275
- swift_bank_address_line_2,
276
- swift_bank_city,
277
- swift_bank_country,
278
- swift_bank_name,
279
- swift_bank_postal_code,
280
- swift_bank_state_province_region,
281
- swift_beneficiary_address_line_1,
282
- swift_beneficiary_address_line_2,
283
- swift_beneficiary_city,
284
- swift_beneficiary_country,
285
- swift_beneficiary_postal_code,
286
- swift_beneficiary_state_province_region,
287
- swift_code_bic,
288
- swift_intermediary_bank_account_number_iban,
289
- swift_intermediary_bank_country,
290
- swift_intermediary_bank_name,
291
- swift_intermediary_bank_swift_code_bic
292
- }) {
293
- return client.post(`/instances/${instanceId}/receivers/${receiverId}/bank-accounts`, {
294
- type: "international_swift",
295
- name,
296
- swift_account_holder_name,
297
- swift_account_number_iban,
298
- swift_bank_address_line_1,
299
- swift_bank_address_line_2,
300
- swift_bank_city,
301
- swift_bank_country,
302
- swift_bank_name,
303
- swift_bank_postal_code,
304
- swift_bank_state_province_region,
305
- swift_beneficiary_address_line_1,
306
- swift_beneficiary_address_line_2,
307
- swift_beneficiary_city,
308
- swift_beneficiary_country,
309
- swift_beneficiary_postal_code,
310
- swift_beneficiary_state_province_region,
311
- swift_code_bic,
312
- swift_intermediary_bank_account_number_iban,
313
- swift_intermediary_bank_country,
314
- swift_intermediary_bank_name,
315
- swift_intermediary_bank_swift_code_bic
316
- });
138
+ list(receiver_id) {
139
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`);
317
140
  },
318
141
  get({
319
- instanceId,
320
- receiverId,
142
+ receiver_id,
321
143
  id
322
144
  }) {
323
145
  return client.get(
324
- `/instances/${instanceId}/receivers/${receiverId}/bank-accounts/${id}`
146
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${id}`
325
147
  );
326
148
  },
327
- delete({
328
- instanceId,
329
- receiverId,
330
- id
331
- }) {
149
+ delete({ receiver_id, id }) {
332
150
  return client.delete(
333
- `/instances/${instanceId}/receivers/${receiverId}/bank-accounts/${id}`
151
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${id}`
334
152
  );
153
+ },
154
+ createPix(_a) {
155
+ var _b = _a, {
156
+ receiver_id
157
+ } = _b, data = __objRest(_b, [
158
+ "receiver_id"
159
+ ]);
160
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
161
+ type: "pix"
162
+ }, data));
163
+ },
164
+ createArgentinaTransfers(_c) {
165
+ var _d = _c, {
166
+ receiver_id
167
+ } = _d, data = __objRest(_d, [
168
+ "receiver_id"
169
+ ]);
170
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
171
+ type: "transfers_bitso"
172
+ }, data));
173
+ },
174
+ createSpei(_e) {
175
+ var _f = _e, {
176
+ receiver_id
177
+ } = _f, data = __objRest(_f, [
178
+ "receiver_id"
179
+ ]);
180
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
181
+ type: "spei_bitso"
182
+ }, data));
183
+ },
184
+ createColombiaAch(_g) {
185
+ var _h = _g, {
186
+ receiver_id
187
+ } = _h, data = __objRest(_h, [
188
+ "receiver_id"
189
+ ]);
190
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
191
+ type: "ach_cop_bitso"
192
+ }, data));
193
+ },
194
+ createAch(_i) {
195
+ var _j = _i, {
196
+ receiver_id
197
+ } = _j, data = __objRest(_j, [
198
+ "receiver_id"
199
+ ]);
200
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
201
+ type: "ach"
202
+ }, data));
203
+ },
204
+ createWire(_k) {
205
+ var _l = _k, {
206
+ receiver_id
207
+ } = _l, data = __objRest(_l, [
208
+ "receiver_id"
209
+ ]);
210
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
211
+ type: "wire"
212
+ }, data));
213
+ },
214
+ createInternationalSwift(_m) {
215
+ var _n = _m, {
216
+ receiver_id
217
+ } = _n, data = __objRest(_n, [
218
+ "receiver_id"
219
+ ]);
220
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
221
+ type: "international_swift"
222
+ }, data));
335
223
  }
336
224
  };
337
225
  }
338
226
 
339
227
  // src/resources/instances/index.ts
340
- function createInstancesResource(client) {
228
+ function createInstancesResource(instanceId, client) {
341
229
  return {
342
- getMembers({
343
- instanceId
344
- }) {
230
+ getMembers() {
345
231
  return client.get(`/instances/${instanceId}/members`);
346
232
  },
347
233
  update(_a) {
348
- var _b = _a, { instanceId } = _b, data = __objRest(_b, ["instanceId"]);
234
+ var data = __objRest(_a, []);
349
235
  return client.put(`/instances/${instanceId}`, data);
350
236
  },
351
- delete({ instanceId }) {
237
+ delete() {
352
238
  return client.delete(`/instances/${instanceId}`);
353
239
  },
354
- deleteMember({
355
- instanceId,
356
- id
357
- }) {
358
- return client.delete(`/instances/${instanceId}/members/${id}`);
240
+ deleteMember(memberId) {
241
+ return client.delete(`/instances/${instanceId}/members/${memberId}`);
359
242
  },
360
- updateMemberRole(_c) {
361
- var _d = _c, {
362
- instanceId,
363
- id
364
- } = _d, data = __objRest(_d, [
365
- "instanceId",
366
- "id"
367
- ]);
368
- return client.put(`/instances/${instanceId}/members/${id}`, data);
243
+ updateMemberRole({
244
+ memberId,
245
+ role
246
+ }) {
247
+ return client.put(`/instances/${instanceId}/members/${memberId}`, { role });
369
248
  }
370
249
  };
371
250
  }
372
251
 
373
252
  // src/resources/partner-fees/index.ts
374
- function createPartnerFeesResource(client) {
253
+ function createPartnerFeesResource(instanceId, client) {
375
254
  return {
376
- list({
377
- instanceId
378
- }) {
255
+ list() {
379
256
  return client.get(`/instances/${instanceId}/partner-fees`);
380
257
  },
381
258
  create(_a) {
382
- var _b = _a, {
383
- instanceId
384
- } = _b, data = __objRest(_b, [
385
- "instanceId"
386
- ]);
259
+ var data = __objRest(_a, []);
387
260
  return client.post(`/instances/${instanceId}/partner-fees`, data);
388
261
  },
389
- get({
390
- instanceId,
391
- id
392
- }) {
262
+ get(id) {
393
263
  return client.get(`/instances/${instanceId}/partner-fees/${id}`);
394
264
  },
395
- delete({ instanceId, id }) {
265
+ delete(id) {
396
266
  return client.delete(`/instances/${instanceId}/partner-fees/${id}`);
397
267
  }
398
268
  };
399
269
  }
400
270
 
401
271
  // src/resources/payins/index.ts
402
- function createPayinsResource(client) {
272
+ function createPayinsResource(instanceId, client) {
403
273
  return {
404
- list({
405
- instanceId,
406
- params
407
- }) {
274
+ list(params) {
408
275
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
409
276
  return client.get(`/instances/${instanceId}/payins${queryParams}`);
410
277
  },
411
- get({ instanceId, id }) {
412
- return client.get(`/instances/${instanceId}/payins/${id}`);
278
+ get(payinId) {
279
+ return client.get(`/instances/${instanceId}/payins/${payinId}`);
413
280
  },
414
- getTrack({ id }) {
415
- return client.get(`/e/payins/${id}`);
281
+ getTrack(payinId) {
282
+ return client.get(`/e/payins/${payinId}`);
416
283
  },
417
- export({
418
- instanceId,
419
- params
420
- }) {
284
+ export(_a) {
285
+ var params = __objRest(_a, []);
421
286
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
422
287
  return client.get(`/instances/${instanceId}/export/payins${queryParams}`);
423
288
  },
424
- createEvm(_a) {
425
- var _b = _a, {
426
- instanceId
427
- } = _b, data = __objRest(_b, [
428
- "instanceId"
429
- ]);
430
- return client.post(`/instances/${instanceId}/payins/evm`, data);
289
+ createEvm(payin_quote_id) {
290
+ return client.post(`/instances/${instanceId}/payins/evm`, {
291
+ payin_quote_id
292
+ });
431
293
  }
432
294
  };
433
295
  }
434
296
 
435
297
  // src/resources/payins/quotes.ts
436
- function createPayinQuotesResource(client) {
298
+ function createPayinQuotesResource(instanceId, client) {
437
299
  return {
438
300
  create(_a) {
439
- var _b = _a, {
440
- instanceId
441
- } = _b, data = __objRest(_b, [
442
- "instanceId"
443
- ]);
301
+ var data = __objRest(_a, []);
444
302
  return client.post(`/instances/${instanceId}/payin-quotes`, data);
445
303
  },
446
- getFxRate(_c) {
447
- var _d = _c, {
448
- instanceId
449
- } = _d, data = __objRest(_d, [
450
- "instanceId"
451
- ]);
304
+ getFxRate(_b) {
305
+ var data = __objRest(_b, []);
452
306
  return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
453
307
  }
454
308
  };
455
309
  }
456
310
 
457
311
  // src/resources/payouts/index.ts
458
- function createPayoutsResource(client) {
312
+ function createPayoutsResource(instanceId, client) {
459
313
  return {
460
- list({
461
- instanceId,
462
- params
463
- }) {
314
+ list(params) {
464
315
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
465
316
  return client.get(`/instances/${instanceId}/payouts${queryParams}`);
466
317
  },
467
- export({
468
- instanceId,
469
- params
470
- }) {
318
+ export(params) {
471
319
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
472
320
  return client.get(`/instances/${instanceId}/export/payouts${queryParams}`);
473
321
  },
474
- get({ instanceId, id }) {
475
- return client.get(`/instances/${instanceId}/payouts/${id}`);
322
+ get(payoutId) {
323
+ return client.get(`/instances/${instanceId}/payouts/${payoutId}`);
476
324
  },
477
- getTrack({
478
- id
479
- }) {
480
- return client.get(`/e/payouts/${id}`);
325
+ getTrack(payoutId) {
326
+ return client.get(`/e/payouts/${payoutId}`);
481
327
  },
482
328
  authorizeStellarToken(_a) {
483
- var _b = _a, {
484
- instanceId
485
- } = _b, data = __objRest(_b, [
486
- "instanceId"
487
- ]);
329
+ var data = __objRest(_a, []);
488
330
  return client.post(`/instances/${instanceId}/payouts/stellar/authorize`, data);
489
331
  },
490
- createStellar(_c) {
491
- var _d = _c, {
492
- instanceId
493
- } = _d, data = __objRest(_d, [
494
- "instanceId"
495
- ]);
332
+ createStellar(_b) {
333
+ var data = __objRest(_b, []);
496
334
  return client.post(`/instances/${instanceId}/payouts/stellar`, data);
497
335
  },
498
- createEvm(_e) {
499
- var _f = _e, {
500
- instanceId
501
- } = _f, data = __objRest(_f, [
502
- "instanceId"
503
- ]);
336
+ createEvm(_c) {
337
+ var data = __objRest(_c, []);
504
338
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
505
339
  }
506
340
  };
507
341
  }
508
342
 
509
343
  // src/resources/quotes/index.ts
510
- function createQuotesResource(client) {
344
+ function createQuotesResource(instanceId, client) {
511
345
  return {
512
346
  create(_a) {
513
- var _b = _a, {
514
- instanceId
515
- } = _b, data = __objRest(_b, [
516
- "instanceId"
517
- ]);
347
+ var data = __objRest(_a, []);
518
348
  return client.post(`/instances/${instanceId}/quotes`, data);
519
349
  },
520
- getFxRate(_c) {
521
- var _d = _c, {
522
- instanceId
523
- } = _d, data = __objRest(_d, [
524
- "instanceId"
525
- ]);
350
+ getFxRate(_b) {
351
+ var data = __objRest(_b, []);
526
352
  return client.post(`/instances/${instanceId}/quotes/fx`, data);
527
353
  }
528
354
  };
529
355
  }
530
356
 
531
357
  // src/resources/receivers/index.ts
532
- function createReceiversResource(client) {
358
+ function createReceiversResource(instanceId, client) {
533
359
  return {
534
- list({
535
- instanceId
536
- }) {
360
+ list() {
537
361
  return client.get(`/instances/${instanceId}/receivers`);
538
362
  },
539
363
  create(_a) {
540
- var _b = _a, {
541
- instanceId
542
- } = _b, data = __objRest(_b, [
543
- "instanceId"
544
- ]);
364
+ var data = __objRest(_a, []);
545
365
  return client.post(`/instances/${instanceId}/receivers`, data);
546
366
  },
547
- get({
548
- instanceId,
549
- id
550
- }) {
551
- return client.get(`/instances/${instanceId}/receivers/${id}`);
367
+ get(receiver_id) {
368
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
552
369
  },
553
- update(_c) {
554
- var _d = _c, {
555
- instanceId,
556
- id
557
- } = _d, data = __objRest(_d, [
558
- "instanceId",
559
- "id"
560
- ]);
561
- return client.patch(`/instances/${instanceId}/receivers/${id}`, data);
370
+ update(_b) {
371
+ var _c = _b, { receiver_id } = _c, data = __objRest(_c, ["receiver_id"]);
372
+ return client.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
562
373
  },
563
- delete({ instanceId, id }) {
564
- return client.delete(`/instances/${instanceId}/receivers/${id}`);
374
+ delete(receiver_id) {
375
+ return client.delete(`/instances/${instanceId}/receivers/${receiver_id}`);
565
376
  },
566
- getLimits({
567
- instanceId,
568
- id
569
- }) {
570
- return client.get(`/instances/${instanceId}/limits/receivers/${id}`);
377
+ getLimits(receiver_id) {
378
+ return client.get(`/instances/${instanceId}/limits/receivers/${receiver_id}`);
571
379
  }
572
380
  };
573
381
  }
574
382
 
575
383
  // src/resources/virtual-accounts/index.ts
576
- function createVirtualAccountsResource(client) {
384
+ function createVirtualAccountsResource(instanceId, client) {
577
385
  return {
578
386
  update(_a) {
579
387
  var _b = _a, {
580
- instanceId,
581
- receiverId
388
+ receiver_id
582
389
  } = _b, data = __objRest(_b, [
583
- "instanceId",
584
- "receiverId"
390
+ "receiver_id"
585
391
  ]);
586
392
  return client.put(
587
- `/instances/${instanceId}/receivers/${receiverId}/virtual-accounts`,
393
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
588
394
  data
589
395
  );
590
396
  },
591
397
  create(_c) {
592
398
  var _d = _c, {
593
- instanceId,
594
- receiverId
399
+ receiver_id
595
400
  } = _d, data = __objRest(_d, [
596
- "instanceId",
597
- "receiverId"
401
+ "receiver_id"
598
402
  ]);
599
403
  return client.post(
600
- `/instances/${instanceId}/receivers/${receiverId}/virtual-accounts`,
404
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
601
405
  data
602
406
  );
603
407
  },
604
- get({
605
- instanceId,
606
- receiverId
607
- }) {
608
- return client.get(`/instances/${instanceId}/receivers/${receiverId}/virtual-accounts`);
408
+ get(receiver_id) {
409
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
609
410
  }
610
411
  };
611
412
  }
612
413
 
613
414
  // src/resources/wallets/blockchain.ts
614
- function createBlockchainWalletsResource(client) {
415
+ function createBlockchainWalletsResource(instanceId, client) {
615
416
  return {
616
- list({
617
- instanceId,
618
- receiverId
619
- }) {
417
+ list(receiver_id) {
620
418
  return client.get(
621
- `/instances/${instanceId}/receivers/${receiverId}/blockchain-wallets`
419
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`
622
420
  );
623
421
  },
624
- create(_a) {
422
+ createWithAddress(_a) {
625
423
  var _b = _a, {
626
- instanceId
424
+ receiver_id
627
425
  } = _b, data = __objRest(_b, [
628
- "instanceId"
426
+ "receiver_id"
629
427
  ]);
630
- return client.post(`/instances/${instanceId}/blockchain-wallets`, data);
428
+ return client.post(
429
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`,
430
+ __spreadProps(__spreadValues({}, data), {
431
+ is_account_abstraction: true
432
+ })
433
+ );
631
434
  },
632
- getWalletMessage({
633
- receiverId,
634
- instanceId
635
- }) {
435
+ createWithHash(_c) {
436
+ var _d = _c, {
437
+ receiver_id
438
+ } = _d, data = __objRest(_d, [
439
+ "receiver_id"
440
+ ]);
441
+ return client.post(
442
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`,
443
+ __spreadProps(__spreadValues({}, data), {
444
+ is_account_abstraction: false
445
+ })
446
+ );
447
+ },
448
+ getWalletMessage(receiver_id) {
636
449
  return client.get(
637
- `/instances/${instanceId}/receivers/${receiverId}/blockchain-wallets/sign-message`
450
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/sign-message`
638
451
  );
639
452
  },
640
453
  get({
641
- instanceId,
642
- receiverId,
454
+ receiver_id,
643
455
  id
644
456
  }) {
645
457
  return client.get(
646
- `/instances/${instanceId}/receivers/${receiverId}/blockchain-wallets/${id}`
458
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/${id}`
647
459
  );
648
460
  },
649
461
  delete({
650
- instanceId,
651
- receiverId,
462
+ receiver_id,
652
463
  id
653
464
  }) {
654
465
  return client.delete(
655
- `/instances/${instanceId}/receivers/${receiverId}/blockchain-wallets/${id}`
466
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/${id}`
656
467
  );
657
468
  },
658
- createAssetTrustline(_c) {
659
- var _d = _c, {
660
- instanceId
661
- } = _d, data = __objRest(_d, [
662
- "instanceId"
663
- ]);
664
- return client.post(`/instances/${instanceId}/create-asset-trustline`, data);
469
+ createAssetTrustline(address) {
470
+ return client.post(`/instances/${instanceId}/create-asset-trustline`, {
471
+ address
472
+ });
665
473
  },
666
474
  mintUsdbStellar(_e) {
667
- var _f = _e, {
668
- instanceId
669
- } = _f, data = __objRest(_f, [
670
- "instanceId"
671
- ]);
475
+ var data = __objRest(_e, []);
672
476
  return client.post(`/instances/${instanceId}/mint-usdb-stellar`, data);
673
477
  }
674
478
  };
675
479
  }
676
480
 
677
481
  // src/resources/wallets/offramp.ts
678
- function createOfframpWalletsResource(client) {
482
+ function createOfframpWalletsResource(instanceId, client) {
679
483
  return {
680
484
  list({
681
- instanceId
485
+ bank_account_id,
486
+ receiver_id
682
487
  }) {
683
- return client.get(`/instances/${instanceId}/offramp_wallets`);
488
+ return client.get(
489
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${bank_account_id}/offramp-wallets`
490
+ );
684
491
  },
685
492
  create(_a) {
686
493
  var _b = _a, {
687
- receiverId,
688
- instanceId,
689
- bankAccountId
494
+ receiver_id,
495
+ bank_account_id
690
496
  } = _b, data = __objRest(_b, [
691
- "receiverId",
692
- "instanceId",
693
- "bankAccountId"
497
+ "receiver_id",
498
+ "bank_account_id"
694
499
  ]);
695
500
  return client.post(
696
- `/instances/${instanceId}/receivers/${receiverId}/bank-accounts/${bankAccountId}/offramp_wallets`,
501
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${bank_account_id}/offramp-wallets`,
697
502
  data
698
503
  );
699
504
  },
700
505
  get({
701
- receiverId,
702
- instanceId,
703
- bankAccountId,
506
+ receiver_id,
507
+ bank_account_id,
704
508
  id
705
509
  }) {
706
510
  return client.get(
707
- `/instances/${instanceId}/receivers/${receiverId}/bank-accounts/${bankAccountId}/offramp_wallets/${id}`
511
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${bank_account_id}/offramp-wallets/${id}`
708
512
  );
709
513
  }
710
514
  };
711
515
  }
712
516
 
713
517
  // src/resources/webhooks/index.ts
714
- function createWebhookEndpointsResource(client) {
518
+ function createWebhookEndpointsResource(instanceId, client) {
715
519
  return {
716
- list({
717
- instanceId
718
- }) {
520
+ list() {
719
521
  return client.get(`/instances/${instanceId}/webhook-endpoints`);
720
522
  },
721
523
  create(_a) {
722
- var _b = _a, {
723
- instanceId
724
- } = _b, data = __objRest(_b, [
725
- "instanceId"
726
- ]);
524
+ var data = __objRest(_a, []);
727
525
  return client.post(`/instances/${instanceId}/webhook-endpoints`, data);
728
526
  },
729
- delete({ instanceId, id }) {
527
+ delete(id) {
730
528
  return client.delete(`/instances/${instanceId}/webhook-endpoints/${id}`);
731
529
  },
732
- getSecret({
733
- instanceId,
734
- id
735
- }) {
530
+ getSecret(id) {
736
531
  return client.get(`/instances/${instanceId}/webhook-endpoints/${id}/secret`);
737
532
  },
738
- getPortalAccessUrl({
739
- instanceId
740
- }) {
533
+ getPortalAccessUrl() {
741
534
  return client.get(`/instances/${instanceId}/webhook-endpoints/portal-access`);
742
535
  }
743
536
  };
744
537
  }
745
538
 
746
539
  // src/client.ts
747
- var Blindpay = class {
748
- constructor(apiKey) {
540
+ var BlindPay = class {
541
+ constructor({
542
+ apiKey,
543
+ instanceId
544
+ }) {
749
545
  // Options
750
546
  this.baseUrl = "https://api.blindpay.com/v1";
751
547
  if (!apiKey) {
752
- throw new BlindpayError("Api key not provided, get your api key on blindpay dashboard");
548
+ throw new BlindPayError("Api key not provided, get your api key on blindpay dashboard");
549
+ }
550
+ if (!instanceId) {
551
+ throw new BlindPayError(
552
+ "Instance id not provided, get your instance id on blindpay dashboard"
553
+ );
753
554
  }
754
555
  this.apiKey = apiKey;
556
+ this.instanceId = instanceId;
755
557
  this.headers = {
756
558
  "Content-Type": "application/json",
757
559
  Accept: "application/json",
@@ -766,23 +568,23 @@ var Blindpay = class {
766
568
  delete: this.delete.bind(this)
767
569
  };
768
570
  this.available = createAvailableResource(this.api);
769
- this.instances = __spreadProps(__spreadValues({}, createInstancesResource(this.api)), {
770
- apiKeys: createApiKeysResource(this.api),
771
- webhookEndpoints: createWebhookEndpointsResource(this.api)
571
+ this.instances = __spreadProps(__spreadValues({}, createInstancesResource(this.instanceId, this.api)), {
572
+ apiKeys: createApiKeysResource(this.instanceId, this.api),
573
+ webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api)
772
574
  });
773
- this.partnerFees = createPartnerFeesResource(this.api);
774
- this.payins = __spreadProps(__spreadValues({}, createPayinsResource(this.api)), {
775
- quotes: createPayinQuotesResource(this.api)
575
+ this.partnerFees = createPartnerFeesResource(this.instanceId, this.api);
576
+ this.payins = __spreadProps(__spreadValues({}, createPayinsResource(this.instanceId, this.api)), {
577
+ quotes: createPayinQuotesResource(this.instanceId, this.api)
776
578
  });
777
- this.quotes = createQuotesResource(this.api);
778
- this.payouts = createPayoutsResource(this.api);
779
- this.receivers = __spreadProps(__spreadValues({}, createReceiversResource(this.api)), {
780
- bankAccounts: createBankAccountsResource(this.api)
579
+ this.quotes = createQuotesResource(this.instanceId, this.api);
580
+ this.payouts = createPayoutsResource(this.instanceId, this.api);
581
+ this.receivers = __spreadProps(__spreadValues({}, createReceiversResource(this.instanceId, this.api)), {
582
+ bankAccounts: createBankAccountsResource(this.instanceId, this.api)
781
583
  });
782
- this.virtualAccounts = createVirtualAccountsResource(this.api);
584
+ this.virtualAccounts = createVirtualAccountsResource(this.instanceId, this.api);
783
585
  this.wallets = {
784
- blockchain: createBlockchainWalletsResource(this.api),
785
- offramp: createOfframpWalletsResource(this.api)
586
+ blockchain: createBlockchainWalletsResource(this.instanceId, this.api),
587
+ offramp: createOfframpWalletsResource(this.instanceId, this.api)
786
588
  };
787
589
  }
788
590
  request(method, path, body) {
@@ -877,7 +679,7 @@ var Blindpay = class {
877
679
  };
878
680
  // Annotate the CommonJS export names for ESM import in node:
879
681
  0 && (module.exports = {
880
- Blindpay,
682
+ BlindPay,
881
683
  createApiKeysResource,
882
684
  createAvailableResource,
883
685
  createBankAccountsResource,