@blindpay/node 2.5.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 (74) hide show
  1. package/dist/{api-client-Drd7alfK.d.mts → api-client-B7VQkM_4.d.mts} +94 -33
  2. package/dist/{api-client-Drd7alfK.d.ts → api-client-B7VQkM_4.d.ts} +94 -33
  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-CEJF5Y4K.mjs → chunk-WH2VNZE7.mjs} +11 -11
  6. package/dist/index.d.mts +4 -4
  7. package/dist/index.d.ts +4 -4
  8. package/dist/index.js +29 -11
  9. package/dist/index.mjs +11 -11
  10. package/dist/resources/api-keys/api-keys.test.js +29 -11
  11. package/dist/resources/api-keys/api-keys.test.mjs +5 -5
  12. package/dist/resources/api-keys/index.d.mts +1 -1
  13. package/dist/resources/api-keys/index.d.ts +1 -1
  14. package/dist/resources/available/available.test.js +29 -11
  15. package/dist/resources/available/available.test.mjs +5 -5
  16. package/dist/resources/available/index.d.mts +1 -1
  17. package/dist/resources/available/index.d.ts +1 -1
  18. package/dist/resources/bank-accounts/bank-accounts.test.js +29 -11
  19. package/dist/resources/bank-accounts/bank-accounts.test.mjs +5 -5
  20. package/dist/resources/bank-accounts/index.d.mts +2 -4
  21. package/dist/resources/bank-accounts/index.d.ts +2 -4
  22. package/dist/resources/instances/index.d.mts +1 -1
  23. package/dist/resources/instances/index.d.ts +1 -1
  24. package/dist/resources/instances/instances.test.js +29 -11
  25. package/dist/resources/instances/instances.test.mjs +5 -5
  26. package/dist/resources/partner-fees/index.d.mts +1 -1
  27. package/dist/resources/partner-fees/index.d.ts +1 -1
  28. package/dist/resources/partner-fees/partner-fees.test.js +29 -11
  29. package/dist/resources/partner-fees/partner-fees.test.mjs +5 -5
  30. package/dist/resources/payins/index.d.mts +9 -33
  31. package/dist/resources/payins/index.d.ts +9 -33
  32. package/dist/resources/payins/payins-quotes.test.js +29 -11
  33. package/dist/resources/payins/payins-quotes.test.mjs +5 -5
  34. package/dist/resources/payins/payins.test.js +141 -36
  35. package/dist/resources/payins/payins.test.mjs +117 -30
  36. package/dist/resources/payins/quotes.d.mts +1 -1
  37. package/dist/resources/payins/quotes.d.ts +1 -1
  38. package/dist/resources/payouts/index.d.mts +42 -17
  39. package/dist/resources/payouts/index.d.ts +42 -17
  40. package/dist/resources/payouts/index.js +8 -0
  41. package/dist/resources/payouts/index.mjs +1 -1
  42. package/dist/resources/payouts/payouts.test.js +139 -11
  43. package/dist/resources/payouts/payouts.test.mjs +115 -5
  44. package/dist/resources/quotes/index.d.mts +1 -1
  45. package/dist/resources/quotes/index.d.ts +1 -1
  46. package/dist/resources/quotes/quotes.test.js +29 -11
  47. package/dist/resources/quotes/quotes.test.mjs +5 -5
  48. package/dist/resources/receivers/index.d.mts +9 -7
  49. package/dist/resources/receivers/index.d.ts +9 -7
  50. package/dist/resources/receivers/receivers.test.js +36 -19
  51. package/dist/resources/receivers/receivers.test.mjs +12 -13
  52. package/dist/resources/terms-of-service/index.d.mts +1 -1
  53. package/dist/resources/terms-of-service/index.d.ts +1 -1
  54. package/dist/resources/terms-of-service/terms-of-service.test.js +29 -11
  55. package/dist/resources/terms-of-service/terms-of-service.test.mjs +5 -5
  56. package/dist/resources/virtual-accounts/index.d.mts +22 -7
  57. package/dist/resources/virtual-accounts/index.d.ts +22 -7
  58. package/dist/resources/virtual-accounts/index.js +20 -10
  59. package/dist/resources/virtual-accounts/index.mjs +1 -1
  60. package/dist/resources/virtual-accounts/virtual-accounts.test.js +148 -30
  61. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +124 -24
  62. package/dist/resources/wallets/blockchain.d.mts +1 -1
  63. package/dist/resources/wallets/blockchain.d.ts +1 -1
  64. package/dist/resources/wallets/blockchain.test.js +29 -11
  65. package/dist/resources/wallets/blockchain.test.mjs +5 -5
  66. package/dist/resources/wallets/offramp.d.mts +1 -1
  67. package/dist/resources/wallets/offramp.d.ts +1 -1
  68. package/dist/resources/wallets/offramp.test.js +29 -11
  69. package/dist/resources/wallets/offramp.test.mjs +5 -5
  70. package/dist/resources/webhooks/index.d.mts +1 -1
  71. package/dist/resources/webhooks/index.d.ts +1 -1
  72. package/dist/resources/webhooks/webhooks.test.js +29 -11
  73. package/dist/resources/webhooks/webhooks.test.mjs +5 -5
  74. package/package.json +2 -1
@@ -18702,7 +18702,7 @@ var import_expect_type = __toESM(require_dist(), 1);
18702
18702
  var import_svix = require("svix");
18703
18703
 
18704
18704
  // package.json
18705
- var version = "2.5.0";
18705
+ var version = "3.0.0";
18706
18706
 
18707
18707
  // src/internal/blindpay-error.ts
18708
18708
  var BlindPayError = class extends Error {
@@ -18967,6 +18967,14 @@ function createPayoutsResource(instanceId, client) {
18967
18967
  createEvm(_c) {
18968
18968
  var data = __objRest(_c, []);
18969
18969
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
18970
+ },
18971
+ authorizeSolana(_d) {
18972
+ var data = __objRest(_d, []);
18973
+ return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
18974
+ },
18975
+ createSolana(_e) {
18976
+ var data = __objRest(_e, []);
18977
+ return client.post(`/instances/${instanceId}/payouts/solana`, data);
18970
18978
  }
18971
18979
  };
18972
18980
  }
@@ -19059,30 +19067,40 @@ function createTermsOfServiceResource(instanceId, client) {
19059
19067
  // src/resources/virtual-accounts/index.ts
19060
19068
  function createVirtualAccountsResource(instanceId, client) {
19061
19069
  return {
19062
- update(_a3) {
19070
+ list(receiver_id) {
19071
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19072
+ },
19073
+ get({
19074
+ receiver_id,
19075
+ id
19076
+ }) {
19077
+ return client.get(
19078
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
19079
+ );
19080
+ },
19081
+ create(_a3) {
19063
19082
  var _b = _a3, {
19064
19083
  receiver_id
19065
19084
  } = _b, data = __objRest(_b, [
19066
19085
  "receiver_id"
19067
19086
  ]);
19068
- return client.put(
19087
+ return client.post(
19069
19088
  `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19070
19089
  data
19071
19090
  );
19072
19091
  },
19073
- create(_c) {
19092
+ update(_c) {
19074
19093
  var _d = _c, {
19075
- receiver_id
19094
+ receiver_id,
19095
+ id
19076
19096
  } = _d, data = __objRest(_d, [
19077
- "receiver_id"
19097
+ "receiver_id",
19098
+ "id"
19078
19099
  ]);
19079
- return client.post(
19080
- `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19100
+ return client.put(
19101
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
19081
19102
  data
19082
19103
  );
19083
- },
19084
- get(receiver_id) {
19085
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19086
19104
  }
19087
19105
  };
19088
19106
  }
@@ -19370,24 +19388,95 @@ var BlindPay = class {
19370
19388
  describe("Virtual accounts", () => {
19371
19389
  afterEach(() => fetchMock.resetMocks());
19372
19390
  const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
19373
- describe("Update virtual account", () => {
19374
- it("should update a virtual account", () => __async(null, null, function* () {
19375
- fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
19391
+ describe("List virtual accounts", () => {
19392
+ it("should list virtual accounts", () => __async(null, null, function* () {
19393
+ const mockedVirtualAccounts = [
19394
+ {
19395
+ id: "va_000000000000",
19396
+ banking_partner: "jpmorgan",
19397
+ kyc_status: "approved",
19398
+ us: {
19399
+ ach: {
19400
+ routing_number: "123456789",
19401
+ account_number: "123456789"
19402
+ },
19403
+ wire: {
19404
+ routing_number: "123456789",
19405
+ account_number: "123456789"
19406
+ },
19407
+ rtp: {
19408
+ routing_number: "123456789",
19409
+ account_number: "123456789"
19410
+ },
19411
+ swift_bic_code: "CHASUS33",
19412
+ account_type: "Business checking",
19413
+ beneficiary: {
19414
+ name: "Receiver Name",
19415
+ address_line_1: "8 The Green, #19364",
19416
+ address_line_2: "Dover, DE 19901"
19417
+ },
19418
+ receiving_bank: {
19419
+ name: "JPMorgan Chase",
19420
+ address_line_1: "270 Park Ave",
19421
+ address_line_2: "New York, NY, 10017-2070"
19422
+ }
19423
+ },
19424
+ token: "USDC",
19425
+ blockchain_wallet_id: "bw_000000000000",
19426
+ blockchain_wallet: {
19427
+ network: "base",
19428
+ address: "0x1234567890123456789012345678901234567890"
19429
+ }
19430
+ },
19431
+ {
19432
+ id: "va_000000000001",
19433
+ banking_partner: "citi",
19434
+ kyc_status: "approved",
19435
+ us: {
19436
+ ach: {
19437
+ routing_number: "123456789",
19438
+ account_number: "123456789"
19439
+ },
19440
+ wire: {
19441
+ routing_number: "123456789",
19442
+ account_number: "123456789"
19443
+ },
19444
+ rtp: {
19445
+ routing_number: "123456789",
19446
+ account_number: "123456789"
19447
+ },
19448
+ swift_bic_code: "CHASUS33",
19449
+ account_type: "Business checking",
19450
+ beneficiary: {
19451
+ name: "Receiver Name",
19452
+ address_line_1: "8 The Green, #19364",
19453
+ address_line_2: "Dover, DE 19901"
19454
+ },
19455
+ receiving_bank: {
19456
+ name: "JPMorgan Chase",
19457
+ address_line_1: "270 Park Ave",
19458
+ address_line_2: "New York, NY, 10017-2070"
19459
+ }
19460
+ },
19461
+ token: "USDC",
19462
+ blockchain_wallet_id: "bw_000000000000",
19463
+ blockchain_wallet: null
19464
+ }
19465
+ ];
19466
+ fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccounts), {
19376
19467
  headers: { "Content-Type": "application/json" }
19377
19468
  });
19378
- const { data, error } = yield blindpay.virtualAccounts.update({
19379
- receiver_id: "re_000000000000",
19380
- blockchain_wallet_id: "bw_000000000000",
19381
- token: "USDC"
19382
- });
19469
+ const { data, error } = yield blindpay.virtualAccounts.list("re_000000000000");
19383
19470
  globalExpect(error).toBeNull();
19384
- globalExpect(data).toEqual({ data: null });
19471
+ globalExpect(data).toEqual(mockedVirtualAccounts);
19385
19472
  }));
19386
19473
  });
19387
- describe("Create virtual account", () => {
19388
- it("should create a virtual account", () => __async(null, null, function* () {
19474
+ describe("Get virtual account", () => {
19475
+ it("should get a virtual account by id", () => __async(null, null, function* () {
19389
19476
  const mockedVirtualAccount = {
19390
19477
  id: "va_000000000000",
19478
+ banking_partner: "jpmorgan",
19479
+ kyc_status: "approved",
19391
19480
  us: {
19392
19481
  ach: {
19393
19482
  routing_number: "123456789",
@@ -19415,24 +19504,29 @@ describe("Virtual accounts", () => {
19415
19504
  }
19416
19505
  },
19417
19506
  token: "USDC",
19418
- blockchain_wallet_id: "bw_000000000000"
19507
+ blockchain_wallet_id: "bw_000000000000",
19508
+ blockchain_wallet: {
19509
+ network: "base",
19510
+ address: "0x1234567890123456789012345678901234567890"
19511
+ }
19419
19512
  };
19420
19513
  fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
19421
19514
  headers: { "Content-Type": "application/json" }
19422
19515
  });
19423
- const { data, error } = yield blindpay.virtualAccounts.create({
19516
+ const { data, error } = yield blindpay.virtualAccounts.get({
19424
19517
  receiver_id: "re_000000000000",
19425
- blockchain_wallet_id: "bw_000000000000",
19426
- token: "USDC"
19518
+ id: "va_000000000000"
19427
19519
  });
19428
19520
  globalExpect(error).toBeNull();
19429
19521
  globalExpect(data).toEqual(mockedVirtualAccount);
19430
19522
  }));
19431
19523
  });
19432
- describe("Get virtual account", () => {
19433
- it("should get a virtual account", () => __async(null, null, function* () {
19524
+ describe("Create virtual account", () => {
19525
+ it("should create a virtual account", () => __async(null, null, function* () {
19434
19526
  const mockedVirtualAccount = {
19435
19527
  id: "va_000000000000",
19528
+ banking_partner: "jpmorgan",
19529
+ kyc_status: "approved",
19436
19530
  us: {
19437
19531
  ach: {
19438
19532
  routing_number: "123456789",
@@ -19460,16 +19554,40 @@ describe("Virtual accounts", () => {
19460
19554
  }
19461
19555
  },
19462
19556
  token: "USDC",
19463
- blockchain_wallet_id: "bw_000000000000"
19557
+ blockchain_wallet_id: "bw_000000000000",
19558
+ blockchain_wallet: {
19559
+ network: "base",
19560
+ address: "0x1234567890123456789012345678901234567890"
19561
+ }
19464
19562
  };
19465
19563
  fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
19466
19564
  headers: { "Content-Type": "application/json" }
19467
19565
  });
19468
- const { data, error } = yield blindpay.virtualAccounts.get("re_000000000000");
19566
+ const { data, error } = yield blindpay.virtualAccounts.create({
19567
+ receiver_id: "re_000000000000",
19568
+ banking_partner: "jpmorgan",
19569
+ blockchain_wallet_id: "bw_000000000000",
19570
+ token: "USDC"
19571
+ });
19469
19572
  globalExpect(error).toBeNull();
19470
19573
  globalExpect(data).toEqual(mockedVirtualAccount);
19471
19574
  }));
19472
19575
  });
19576
+ describe("Update virtual account", () => {
19577
+ it("should update a virtual account", () => __async(null, null, function* () {
19578
+ fetchMock.mockResponseOnce(JSON.stringify(null), {
19579
+ headers: { "Content-Type": "application/json" }
19580
+ });
19581
+ const { data, error } = yield blindpay.virtualAccounts.update({
19582
+ receiver_id: "re_000000000000",
19583
+ id: "va_000000000000",
19584
+ blockchain_wallet_id: "bw_000000000001",
19585
+ token: "USDT"
19586
+ });
19587
+ globalExpect(error).toBeNull();
19588
+ globalExpect(data).toEqual(null);
19589
+ }));
19590
+ });
19473
19591
  });
19474
19592
  /*! Bundled license information:
19475
19593
 
@@ -8,21 +8,21 @@ import {
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-CEJF5Y4K.mjs";
12
- import "../../chunk-UC57SCKQ.mjs";
11
+ } from "../../chunk-WH2VNZE7.mjs";
13
12
  import "../../chunk-FG25JHDX.mjs";
14
13
  import "../../chunk-QGNLMN6Z.mjs";
14
+ import "../../chunk-UC57SCKQ.mjs";
15
15
  import "../../chunk-TBTA7A2P.mjs";
16
16
  import "../../chunk-67XECGMJ.mjs";
17
17
  import "../../chunk-Z6EYX4D3.mjs";
18
- import "../../chunk-5XJJKYXE.mjs";
19
- import "../../chunk-U7CKUUO7.mjs";
18
+ import "../../chunk-LEPGLH7Q.mjs";
20
19
  import "../../chunk-RC5NN5UF.mjs";
21
20
  import "../../chunk-W7NJUABI.mjs";
22
21
  import "../../chunk-VRA5HP7F.mjs";
23
- import "../../chunk-3QQCDR3E.mjs";
22
+ import "../../chunk-VBZHAPK7.mjs";
24
23
  import "../../chunk-LRHWT4JU.mjs";
25
24
  import "../../chunk-CPOSU35L.mjs";
25
+ import "../../chunk-U7CKUUO7.mjs";
26
26
  import "../../chunk-B5T7AQLH.mjs";
27
27
  import {
28
28
  __async,
@@ -37,24 +37,95 @@ var require_virtual_accounts_test = __commonJS({
37
37
  describe("Virtual accounts", () => {
38
38
  afterEach(() => fetchMock.resetMocks());
39
39
  const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
40
- describe("Update virtual account", () => {
41
- it("should update a virtual account", () => __async(null, null, function* () {
42
- fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
40
+ describe("List virtual accounts", () => {
41
+ it("should list virtual accounts", () => __async(null, null, function* () {
42
+ const mockedVirtualAccounts = [
43
+ {
44
+ id: "va_000000000000",
45
+ banking_partner: "jpmorgan",
46
+ kyc_status: "approved",
47
+ us: {
48
+ ach: {
49
+ routing_number: "123456789",
50
+ account_number: "123456789"
51
+ },
52
+ wire: {
53
+ routing_number: "123456789",
54
+ account_number: "123456789"
55
+ },
56
+ rtp: {
57
+ routing_number: "123456789",
58
+ account_number: "123456789"
59
+ },
60
+ swift_bic_code: "CHASUS33",
61
+ account_type: "Business checking",
62
+ beneficiary: {
63
+ name: "Receiver Name",
64
+ address_line_1: "8 The Green, #19364",
65
+ address_line_2: "Dover, DE 19901"
66
+ },
67
+ receiving_bank: {
68
+ name: "JPMorgan Chase",
69
+ address_line_1: "270 Park Ave",
70
+ address_line_2: "New York, NY, 10017-2070"
71
+ }
72
+ },
73
+ token: "USDC",
74
+ blockchain_wallet_id: "bw_000000000000",
75
+ blockchain_wallet: {
76
+ network: "base",
77
+ address: "0x1234567890123456789012345678901234567890"
78
+ }
79
+ },
80
+ {
81
+ id: "va_000000000001",
82
+ banking_partner: "citi",
83
+ kyc_status: "approved",
84
+ us: {
85
+ ach: {
86
+ routing_number: "123456789",
87
+ account_number: "123456789"
88
+ },
89
+ wire: {
90
+ routing_number: "123456789",
91
+ account_number: "123456789"
92
+ },
93
+ rtp: {
94
+ routing_number: "123456789",
95
+ account_number: "123456789"
96
+ },
97
+ swift_bic_code: "CHASUS33",
98
+ account_type: "Business checking",
99
+ beneficiary: {
100
+ name: "Receiver Name",
101
+ address_line_1: "8 The Green, #19364",
102
+ address_line_2: "Dover, DE 19901"
103
+ },
104
+ receiving_bank: {
105
+ name: "JPMorgan Chase",
106
+ address_line_1: "270 Park Ave",
107
+ address_line_2: "New York, NY, 10017-2070"
108
+ }
109
+ },
110
+ token: "USDC",
111
+ blockchain_wallet_id: "bw_000000000000",
112
+ blockchain_wallet: null
113
+ }
114
+ ];
115
+ fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccounts), {
43
116
  headers: { "Content-Type": "application/json" }
44
117
  });
45
- const { data, error } = yield blindpay.virtualAccounts.update({
46
- receiver_id: "re_000000000000",
47
- blockchain_wallet_id: "bw_000000000000",
48
- token: "USDC"
49
- });
118
+ const { data, error } = yield blindpay.virtualAccounts.list("re_000000000000");
50
119
  globalExpect(error).toBeNull();
51
- globalExpect(data).toEqual({ data: null });
120
+ globalExpect(data).toEqual(mockedVirtualAccounts);
52
121
  }));
53
122
  });
54
- describe("Create virtual account", () => {
55
- it("should create a virtual account", () => __async(null, null, function* () {
123
+ describe("Get virtual account", () => {
124
+ it("should get a virtual account by id", () => __async(null, null, function* () {
56
125
  const mockedVirtualAccount = {
57
126
  id: "va_000000000000",
127
+ banking_partner: "jpmorgan",
128
+ kyc_status: "approved",
58
129
  us: {
59
130
  ach: {
60
131
  routing_number: "123456789",
@@ -82,24 +153,29 @@ var require_virtual_accounts_test = __commonJS({
82
153
  }
83
154
  },
84
155
  token: "USDC",
85
- blockchain_wallet_id: "bw_000000000000"
156
+ blockchain_wallet_id: "bw_000000000000",
157
+ blockchain_wallet: {
158
+ network: "base",
159
+ address: "0x1234567890123456789012345678901234567890"
160
+ }
86
161
  };
87
162
  fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
88
163
  headers: { "Content-Type": "application/json" }
89
164
  });
90
- const { data, error } = yield blindpay.virtualAccounts.create({
165
+ const { data, error } = yield blindpay.virtualAccounts.get({
91
166
  receiver_id: "re_000000000000",
92
- blockchain_wallet_id: "bw_000000000000",
93
- token: "USDC"
167
+ id: "va_000000000000"
94
168
  });
95
169
  globalExpect(error).toBeNull();
96
170
  globalExpect(data).toEqual(mockedVirtualAccount);
97
171
  }));
98
172
  });
99
- describe("Get virtual account", () => {
100
- it("should get a virtual account", () => __async(null, null, function* () {
173
+ describe("Create virtual account", () => {
174
+ it("should create a virtual account", () => __async(null, null, function* () {
101
175
  const mockedVirtualAccount = {
102
176
  id: "va_000000000000",
177
+ banking_partner: "jpmorgan",
178
+ kyc_status: "approved",
103
179
  us: {
104
180
  ach: {
105
181
  routing_number: "123456789",
@@ -127,16 +203,40 @@ var require_virtual_accounts_test = __commonJS({
127
203
  }
128
204
  },
129
205
  token: "USDC",
130
- blockchain_wallet_id: "bw_000000000000"
206
+ blockchain_wallet_id: "bw_000000000000",
207
+ blockchain_wallet: {
208
+ network: "base",
209
+ address: "0x1234567890123456789012345678901234567890"
210
+ }
131
211
  };
132
212
  fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
133
213
  headers: { "Content-Type": "application/json" }
134
214
  });
135
- const { data, error } = yield blindpay.virtualAccounts.get("re_000000000000");
215
+ const { data, error } = yield blindpay.virtualAccounts.create({
216
+ receiver_id: "re_000000000000",
217
+ banking_partner: "jpmorgan",
218
+ blockchain_wallet_id: "bw_000000000000",
219
+ token: "USDC"
220
+ });
136
221
  globalExpect(error).toBeNull();
137
222
  globalExpect(data).toEqual(mockedVirtualAccount);
138
223
  }));
139
224
  });
225
+ describe("Update virtual account", () => {
226
+ it("should update a virtual account", () => __async(null, null, function* () {
227
+ fetchMock.mockResponseOnce(JSON.stringify(null), {
228
+ headers: { "Content-Type": "application/json" }
229
+ });
230
+ const { data, error } = yield blindpay.virtualAccounts.update({
231
+ receiver_id: "re_000000000000",
232
+ id: "va_000000000000",
233
+ blockchain_wallet_id: "bw_000000000001",
234
+ token: "USDT"
235
+ });
236
+ globalExpect(error).toBeNull();
237
+ globalExpect(data).toEqual(null);
238
+ }));
239
+ });
140
240
  });
141
241
  }
142
242
  });
@@ -1,4 +1,4 @@
1
- import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-Drd7alfK.mjs';
1
+ import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-B7VQkM_4.mjs';
2
2
 
3
3
  type GetBlockchainWalletMessage = string;
4
4
  type GetBlockchainWalletMessageResponse = {
@@ -1,4 +1,4 @@
1
- import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-Drd7alfK.js';
1
+ import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-B7VQkM_4.js';
2
2
 
3
3
  type GetBlockchainWalletMessage = string;
4
4
  type GetBlockchainWalletMessageResponse = {
@@ -18702,7 +18702,7 @@ var import_expect_type = __toESM(require_dist(), 1);
18702
18702
  var import_svix = require("svix");
18703
18703
 
18704
18704
  // package.json
18705
- var version = "2.5.0";
18705
+ var version = "3.0.0";
18706
18706
 
18707
18707
  // src/internal/blindpay-error.ts
18708
18708
  var BlindPayError = class extends Error {
@@ -18967,6 +18967,14 @@ function createPayoutsResource(instanceId, client) {
18967
18967
  createEvm(_c) {
18968
18968
  var data = __objRest(_c, []);
18969
18969
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
18970
+ },
18971
+ authorizeSolana(_d) {
18972
+ var data = __objRest(_d, []);
18973
+ return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
18974
+ },
18975
+ createSolana(_e) {
18976
+ var data = __objRest(_e, []);
18977
+ return client.post(`/instances/${instanceId}/payouts/solana`, data);
18970
18978
  }
18971
18979
  };
18972
18980
  }
@@ -19059,30 +19067,40 @@ function createTermsOfServiceResource(instanceId, client) {
19059
19067
  // src/resources/virtual-accounts/index.ts
19060
19068
  function createVirtualAccountsResource(instanceId, client) {
19061
19069
  return {
19062
- update(_a3) {
19070
+ list(receiver_id) {
19071
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19072
+ },
19073
+ get({
19074
+ receiver_id,
19075
+ id
19076
+ }) {
19077
+ return client.get(
19078
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
19079
+ );
19080
+ },
19081
+ create(_a3) {
19063
19082
  var _b = _a3, {
19064
19083
  receiver_id
19065
19084
  } = _b, data = __objRest(_b, [
19066
19085
  "receiver_id"
19067
19086
  ]);
19068
- return client.put(
19087
+ return client.post(
19069
19088
  `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19070
19089
  data
19071
19090
  );
19072
19091
  },
19073
- create(_c) {
19092
+ update(_c) {
19074
19093
  var _d = _c, {
19075
- receiver_id
19094
+ receiver_id,
19095
+ id
19076
19096
  } = _d, data = __objRest(_d, [
19077
- "receiver_id"
19097
+ "receiver_id",
19098
+ "id"
19078
19099
  ]);
19079
- return client.post(
19080
- `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19100
+ return client.put(
19101
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
19081
19102
  data
19082
19103
  );
19083
- },
19084
- get(receiver_id) {
19085
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19086
19104
  }
19087
19105
  };
19088
19106
  }
@@ -8,21 +8,21 @@ import {
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-CEJF5Y4K.mjs";
12
- import "../../chunk-UC57SCKQ.mjs";
11
+ } from "../../chunk-WH2VNZE7.mjs";
13
12
  import "../../chunk-FG25JHDX.mjs";
14
13
  import "../../chunk-QGNLMN6Z.mjs";
14
+ import "../../chunk-UC57SCKQ.mjs";
15
15
  import "../../chunk-TBTA7A2P.mjs";
16
16
  import "../../chunk-67XECGMJ.mjs";
17
17
  import "../../chunk-Z6EYX4D3.mjs";
18
- import "../../chunk-5XJJKYXE.mjs";
19
- import "../../chunk-U7CKUUO7.mjs";
18
+ import "../../chunk-LEPGLH7Q.mjs";
20
19
  import "../../chunk-RC5NN5UF.mjs";
21
20
  import "../../chunk-W7NJUABI.mjs";
22
21
  import "../../chunk-VRA5HP7F.mjs";
23
- import "../../chunk-3QQCDR3E.mjs";
22
+ import "../../chunk-VBZHAPK7.mjs";
24
23
  import "../../chunk-LRHWT4JU.mjs";
25
24
  import "../../chunk-CPOSU35L.mjs";
25
+ import "../../chunk-U7CKUUO7.mjs";
26
26
  import "../../chunk-B5T7AQLH.mjs";
27
27
  import {
28
28
  __async,
@@ -1,4 +1,4 @@
1
- import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.mjs';
1
+ import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-B7VQkM_4.mjs';
2
2
 
3
3
  type OfframpWallet = {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.js';
1
+ import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-B7VQkM_4.js';
2
2
 
3
3
  type OfframpWallet = {
4
4
  id: string;
@@ -18702,7 +18702,7 @@ var import_expect_type = __toESM(require_dist(), 1);
18702
18702
  var import_svix = require("svix");
18703
18703
 
18704
18704
  // package.json
18705
- var version = "2.5.0";
18705
+ var version = "3.0.0";
18706
18706
 
18707
18707
  // src/internal/blindpay-error.ts
18708
18708
  var BlindPayError = class extends Error {
@@ -18967,6 +18967,14 @@ function createPayoutsResource(instanceId, client) {
18967
18967
  createEvm(_c) {
18968
18968
  var data = __objRest(_c, []);
18969
18969
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
18970
+ },
18971
+ authorizeSolana(_d) {
18972
+ var data = __objRest(_d, []);
18973
+ return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
18974
+ },
18975
+ createSolana(_e) {
18976
+ var data = __objRest(_e, []);
18977
+ return client.post(`/instances/${instanceId}/payouts/solana`, data);
18970
18978
  }
18971
18979
  };
18972
18980
  }
@@ -19059,30 +19067,40 @@ function createTermsOfServiceResource(instanceId, client) {
19059
19067
  // src/resources/virtual-accounts/index.ts
19060
19068
  function createVirtualAccountsResource(instanceId, client) {
19061
19069
  return {
19062
- update(_a3) {
19070
+ list(receiver_id) {
19071
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19072
+ },
19073
+ get({
19074
+ receiver_id,
19075
+ id
19076
+ }) {
19077
+ return client.get(
19078
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
19079
+ );
19080
+ },
19081
+ create(_a3) {
19063
19082
  var _b = _a3, {
19064
19083
  receiver_id
19065
19084
  } = _b, data = __objRest(_b, [
19066
19085
  "receiver_id"
19067
19086
  ]);
19068
- return client.put(
19087
+ return client.post(
19069
19088
  `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19070
19089
  data
19071
19090
  );
19072
19091
  },
19073
- create(_c) {
19092
+ update(_c) {
19074
19093
  var _d = _c, {
19075
- receiver_id
19094
+ receiver_id,
19095
+ id
19076
19096
  } = _d, data = __objRest(_d, [
19077
- "receiver_id"
19097
+ "receiver_id",
19098
+ "id"
19078
19099
  ]);
19079
- return client.post(
19080
- `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19100
+ return client.put(
19101
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
19081
19102
  data
19082
19103
  );
19083
- },
19084
- get(receiver_id) {
19085
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19086
19104
  }
19087
19105
  };
19088
19106
  }