@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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Blind Pay, Inc.
3
+ Copyright (c) 2025 Blind Pay, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -14,24 +14,33 @@ pnpm add @blindpay/node
14
14
  bun add @blindpay/node
15
15
  ```
16
16
 
17
- ## 🔑 Authentication
17
+ ## Authentication
18
18
 
19
- Get your API key from the Blindpay (https://app.blindpay.com/instances/{instanceId}/api-keys) and initialize the client:
19
+ To get started, you will need both your API key and your instance id, you can obtain your API key and instance id from the Blindpay dashboard [https://app.blindpay.com/instances/{instanceId}/api-keys](https://app.blindpay.com/instances/{instanceId}/api-keys)
20
20
 
21
21
  ```typescript
22
- import { Blindpay } from '@blindpay/node';
22
+ import { BlindPay } from '@blindpay/node';
23
23
 
24
- const blindpay = new Blindpay('your-api-key-here');
24
+ const blindpay = new BlindPay({
25
+ apiKey: 'your-api-key-here',
26
+ instanceId: 'your-instance-id-here'
27
+ })
25
28
  ```
26
29
 
30
+ > [!NOTE]
31
+ > All api calls are going to use the provided api key and instance id
32
+
27
33
  ## Quick Start
28
34
 
29
35
  ### Check for available rails
30
36
 
31
37
  ```typescript
32
38
  async function getAvailableRails() {
33
- const blindpay = new Blindpay("your-api-key");
34
-
39
+ const blindpay = new BlindPay({
40
+ apiKey: 'your-api-key-here',
41
+ instanceId: 'your-instance-id-here'
42
+ });
43
+
35
44
  const { data, error } = await blindpay.available.getRails();
36
45
 
37
46
  if (error) {
@@ -44,29 +53,11 @@ async function getAvailableRails() {
44
53
  getAvailableRails()
45
54
  ```
46
55
 
47
- ## Response Format
48
-
49
- All API methods return a consistent response format:
50
-
51
- ```typescript
52
- export type BlindpayApiResponse<T> = BlindpayErrorResponse | BlindpaySuccessResponse<T>
53
-
54
- export type ErrorResponse = {
55
- message: string;
56
- }
56
+ ## Response format
57
57
 
58
- export type BlindpayErrorResponse = {
59
- data: null
60
- error: ErrorResponse;
61
- }
58
+ All API methods return a consistent response format
62
59
 
63
- export type BlindpaySuccessResponse<T> = {
64
- data: T;
65
- error: null;
66
- }
67
- ```
68
-
69
- ### Success Response
60
+ ### Success response
70
61
 
71
62
  ```typescript
72
63
  {
@@ -75,7 +66,7 @@ export type BlindpaySuccessResponse<T> = {
75
66
  }
76
67
  ```
77
68
 
78
- ### Error Response
69
+ ### Error response
79
70
 
80
71
  ```typescript
81
72
  {
@@ -86,9 +77,9 @@ export type BlindpaySuccessResponse<T> = {
86
77
  }
87
78
  ```
88
79
 
89
- ## Error Handling
80
+ ## Error handling
90
81
 
91
- The SDK uses a consistent error handling pattern. Always check for errors:
82
+ This SDK uses a consistent error handling pattern. Always check for errors:
92
83
 
93
84
  ```typescript
94
85
  const { data, error } = await blindpay.payins.list({
@@ -108,16 +99,12 @@ For detailed API documentation, visit:
108
99
  - [Blindpay API documentation](https://blindpay.com/docs/getting-started/overview)
109
100
  - [API Reference](https://api.blindpay.com/reference)
110
101
 
111
- ## 🆘 Support
102
+ ## Support
112
103
 
113
104
  - 📧 Email: [gabriel@blindpay.com](mailto:gabriel@blindpay.com)
114
- - 🐛 Issues: [GitHub Issues](https://github.com/blindpaylabs/node/issues)
115
-
116
- ## 🏷️ Changelog
117
-
118
- See [CHANGELOG.md](CHANGELOG.md) for a list of changes and version history.
105
+ - 🐛 Issues: [GitHub Issues](https://github.com/blindpaylabs/blindpay-node/issues)
119
106
 
120
- ## 📝 License
107
+ ## License
121
108
 
122
109
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
123
110
 
@@ -4,52 +4,32 @@ import {
4
4
  } from "./chunk-OBKEW4AQ.mjs";
5
5
 
6
6
  // src/resources/payouts/index.ts
7
- function createPayoutsResource(client) {
7
+ function createPayoutsResource(instanceId, client) {
8
8
  return {
9
- list({
10
- instanceId,
11
- params
12
- }) {
9
+ list(params) {
13
10
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
14
11
  return client.get(`/instances/${instanceId}/payouts${queryParams}`);
15
12
  },
16
- export({
17
- instanceId,
18
- params
19
- }) {
13
+ export(params) {
20
14
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
21
15
  return client.get(`/instances/${instanceId}/export/payouts${queryParams}`);
22
16
  },
23
- get({ instanceId, id }) {
24
- return client.get(`/instances/${instanceId}/payouts/${id}`);
17
+ get(payoutId) {
18
+ return client.get(`/instances/${instanceId}/payouts/${payoutId}`);
25
19
  },
26
- getTrack({
27
- id
28
- }) {
29
- return client.get(`/e/payouts/${id}`);
20
+ getTrack(payoutId) {
21
+ return client.get(`/e/payouts/${payoutId}`);
30
22
  },
31
23
  authorizeStellarToken(_a) {
32
- var _b = _a, {
33
- instanceId
34
- } = _b, data = __objRest(_b, [
35
- "instanceId"
36
- ]);
24
+ var data = __objRest(_a, []);
37
25
  return client.post(`/instances/${instanceId}/payouts/stellar/authorize`, data);
38
26
  },
39
- createStellar(_c) {
40
- var _d = _c, {
41
- instanceId
42
- } = _d, data = __objRest(_d, [
43
- "instanceId"
44
- ]);
27
+ createStellar(_b) {
28
+ var data = __objRest(_b, []);
45
29
  return client.post(`/instances/${instanceId}/payouts/stellar`, data);
46
30
  },
47
- createEvm(_e) {
48
- var _f = _e, {
49
- instanceId
50
- } = _f, data = __objRest(_f, [
51
- "instanceId"
52
- ]);
31
+ createEvm(_c) {
32
+ var data = __objRest(_c, []);
53
33
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
54
34
  }
55
35
  };
@@ -4,39 +4,32 @@ import {
4
4
  } from "./chunk-OBKEW4AQ.mjs";
5
5
 
6
6
  // src/resources/virtual-accounts/index.ts
7
- function createVirtualAccountsResource(client) {
7
+ function createVirtualAccountsResource(instanceId, client) {
8
8
  return {
9
9
  update(_a) {
10
10
  var _b = _a, {
11
- instanceId,
12
- receiverId
11
+ receiver_id
13
12
  } = _b, data = __objRest(_b, [
14
- "instanceId",
15
- "receiverId"
13
+ "receiver_id"
16
14
  ]);
17
15
  return client.put(
18
- `/instances/${instanceId}/receivers/${receiverId}/virtual-accounts`,
16
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19
17
  data
20
18
  );
21
19
  },
22
20
  create(_c) {
23
21
  var _d = _c, {
24
- instanceId,
25
- receiverId
22
+ receiver_id
26
23
  } = _d, data = __objRest(_d, [
27
- "instanceId",
28
- "receiverId"
24
+ "receiver_id"
29
25
  ]);
30
26
  return client.post(
31
- `/instances/${instanceId}/receivers/${receiverId}/virtual-accounts`,
27
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
32
28
  data
33
29
  );
34
30
  },
35
- get({
36
- instanceId,
37
- receiverId
38
- }) {
39
- return client.get(`/instances/${instanceId}/receivers/${receiverId}/virtual-accounts`);
31
+ get(receiver_id) {
32
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
40
33
  }
41
34
  };
42
35
  }
@@ -0,0 +1,106 @@
1
+ import {
2
+ __esm,
3
+ __objRest,
4
+ __spreadValues
5
+ } from "./chunk-OBKEW4AQ.mjs";
6
+
7
+ // src/resources/bank-accounts/index.ts
8
+ function createBankAccountsResource(instanceId, client) {
9
+ return {
10
+ list(receiver_id) {
11
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`);
12
+ },
13
+ get({
14
+ receiver_id,
15
+ id
16
+ }) {
17
+ return client.get(
18
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${id}`
19
+ );
20
+ },
21
+ delete({ receiver_id, id }) {
22
+ return client.delete(
23
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${id}`
24
+ );
25
+ },
26
+ createPix(_a) {
27
+ var _b = _a, {
28
+ receiver_id
29
+ } = _b, data = __objRest(_b, [
30
+ "receiver_id"
31
+ ]);
32
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
33
+ type: "pix"
34
+ }, data));
35
+ },
36
+ createArgentinaTransfers(_c) {
37
+ var _d = _c, {
38
+ receiver_id
39
+ } = _d, data = __objRest(_d, [
40
+ "receiver_id"
41
+ ]);
42
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
43
+ type: "transfers_bitso"
44
+ }, data));
45
+ },
46
+ createSpei(_e) {
47
+ var _f = _e, {
48
+ receiver_id
49
+ } = _f, data = __objRest(_f, [
50
+ "receiver_id"
51
+ ]);
52
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
53
+ type: "spei_bitso"
54
+ }, data));
55
+ },
56
+ createColombiaAch(_g) {
57
+ var _h = _g, {
58
+ receiver_id
59
+ } = _h, data = __objRest(_h, [
60
+ "receiver_id"
61
+ ]);
62
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
63
+ type: "ach_cop_bitso"
64
+ }, data));
65
+ },
66
+ createAch(_i) {
67
+ var _j = _i, {
68
+ receiver_id
69
+ } = _j, data = __objRest(_j, [
70
+ "receiver_id"
71
+ ]);
72
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
73
+ type: "ach"
74
+ }, data));
75
+ },
76
+ createWire(_k) {
77
+ var _l = _k, {
78
+ receiver_id
79
+ } = _l, data = __objRest(_l, [
80
+ "receiver_id"
81
+ ]);
82
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
83
+ type: "wire"
84
+ }, data));
85
+ },
86
+ createInternationalSwift(_m) {
87
+ var _n = _m, {
88
+ receiver_id
89
+ } = _n, data = __objRest(_n, [
90
+ "receiver_id"
91
+ ]);
92
+ return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
93
+ type: "international_swift"
94
+ }, data));
95
+ }
96
+ };
97
+ }
98
+ var init_bank_accounts = __esm({
99
+ "src/resources/bank-accounts/index.ts"() {
100
+ }
101
+ });
102
+
103
+ export {
104
+ createBankAccountsResource,
105
+ init_bank_accounts
106
+ };
@@ -0,0 +1,38 @@
1
+ import {
2
+ __esm,
3
+ __objRest
4
+ } from "./chunk-OBKEW4AQ.mjs";
5
+
6
+ // src/resources/instances/index.ts
7
+ function createInstancesResource(instanceId, client) {
8
+ return {
9
+ getMembers() {
10
+ return client.get(`/instances/${instanceId}/members`);
11
+ },
12
+ update(_a) {
13
+ var data = __objRest(_a, []);
14
+ return client.put(`/instances/${instanceId}`, data);
15
+ },
16
+ delete() {
17
+ return client.delete(`/instances/${instanceId}`);
18
+ },
19
+ deleteMember(memberId) {
20
+ return client.delete(`/instances/${instanceId}/members/${memberId}`);
21
+ },
22
+ updateMemberRole({
23
+ memberId,
24
+ role
25
+ }) {
26
+ return client.put(`/instances/${instanceId}/members/${memberId}`, { role });
27
+ }
28
+ };
29
+ }
30
+ var init_instances = __esm({
31
+ "src/resources/instances/index.ts"() {
32
+ }
33
+ });
34
+
35
+ export {
36
+ createInstancesResource,
37
+ init_instances
38
+ };
@@ -4,45 +4,27 @@ import {
4
4
  } from "./chunk-OBKEW4AQ.mjs";
5
5
 
6
6
  // src/resources/receivers/index.ts
7
- function createReceiversResource(client) {
7
+ function createReceiversResource(instanceId, client) {
8
8
  return {
9
- list({
10
- instanceId
11
- }) {
9
+ list() {
12
10
  return client.get(`/instances/${instanceId}/receivers`);
13
11
  },
14
12
  create(_a) {
15
- var _b = _a, {
16
- instanceId
17
- } = _b, data = __objRest(_b, [
18
- "instanceId"
19
- ]);
13
+ var data = __objRest(_a, []);
20
14
  return client.post(`/instances/${instanceId}/receivers`, data);
21
15
  },
22
- get({
23
- instanceId,
24
- id
25
- }) {
26
- return client.get(`/instances/${instanceId}/receivers/${id}`);
16
+ get(receiver_id) {
17
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
27
18
  },
28
- update(_c) {
29
- var _d = _c, {
30
- instanceId,
31
- id
32
- } = _d, data = __objRest(_d, [
33
- "instanceId",
34
- "id"
35
- ]);
36
- return client.patch(`/instances/${instanceId}/receivers/${id}`, data);
19
+ update(_b) {
20
+ var _c = _b, { receiver_id } = _c, data = __objRest(_c, ["receiver_id"]);
21
+ return client.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
37
22
  },
38
- delete({ instanceId, id }) {
39
- return client.delete(`/instances/${instanceId}/receivers/${id}`);
23
+ delete(receiver_id) {
24
+ return client.delete(`/instances/${instanceId}/receivers/${receiver_id}`);
40
25
  },
41
- getLimits({
42
- instanceId,
43
- id
44
- }) {
45
- return client.get(`/instances/${instanceId}/limits/receivers/${id}`);
26
+ getLimits(receiver_id) {
27
+ return client.get(`/instances/${instanceId}/limits/receivers/${receiver_id}`);
46
28
  }
47
29
  };
48
30
  }
@@ -4,22 +4,14 @@ import {
4
4
  } from "./chunk-OBKEW4AQ.mjs";
5
5
 
6
6
  // src/resources/payins/quotes.ts
7
- function createPayinQuotesResource(client) {
7
+ function createPayinQuotesResource(instanceId, client) {
8
8
  return {
9
9
  create(_a) {
10
- var _b = _a, {
11
- instanceId
12
- } = _b, data = __objRest(_b, [
13
- "instanceId"
14
- ]);
10
+ var data = __objRest(_a, []);
15
11
  return client.post(`/instances/${instanceId}/payin-quotes`, data);
16
12
  },
17
- getFxRate(_c) {
18
- var _d = _c, {
19
- instanceId
20
- } = _d, data = __objRest(_d, [
21
- "instanceId"
22
- ]);
13
+ getFxRate(_b) {
14
+ var data = __objRest(_b, []);
23
15
  return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
24
16
  }
25
17
  };
@@ -0,0 +1,82 @@
1
+ import {
2
+ __esm,
3
+ __objRest,
4
+ __spreadProps,
5
+ __spreadValues
6
+ } from "./chunk-OBKEW4AQ.mjs";
7
+
8
+ // src/resources/wallets/blockchain.ts
9
+ function createBlockchainWalletsResource(instanceId, client) {
10
+ return {
11
+ list(receiver_id) {
12
+ return client.get(
13
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`
14
+ );
15
+ },
16
+ createWithAddress(_a) {
17
+ var _b = _a, {
18
+ receiver_id
19
+ } = _b, data = __objRest(_b, [
20
+ "receiver_id"
21
+ ]);
22
+ return client.post(
23
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`,
24
+ __spreadProps(__spreadValues({}, data), {
25
+ is_account_abstraction: true
26
+ })
27
+ );
28
+ },
29
+ createWithHash(_c) {
30
+ var _d = _c, {
31
+ receiver_id
32
+ } = _d, data = __objRest(_d, [
33
+ "receiver_id"
34
+ ]);
35
+ return client.post(
36
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`,
37
+ __spreadProps(__spreadValues({}, data), {
38
+ is_account_abstraction: false
39
+ })
40
+ );
41
+ },
42
+ getWalletMessage(receiver_id) {
43
+ return client.get(
44
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/sign-message`
45
+ );
46
+ },
47
+ get({
48
+ receiver_id,
49
+ id
50
+ }) {
51
+ return client.get(
52
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/${id}`
53
+ );
54
+ },
55
+ delete({
56
+ receiver_id,
57
+ id
58
+ }) {
59
+ return client.delete(
60
+ `/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/${id}`
61
+ );
62
+ },
63
+ createAssetTrustline(address) {
64
+ return client.post(`/instances/${instanceId}/create-asset-trustline`, {
65
+ address
66
+ });
67
+ },
68
+ mintUsdbStellar(_e) {
69
+ var data = __objRest(_e, []);
70
+ return client.post(`/instances/${instanceId}/mint-usdb-stellar`, data);
71
+ }
72
+ };
73
+ }
74
+ var init_blockchain = __esm({
75
+ "src/resources/wallets/blockchain.ts"() {
76
+ }
77
+ });
78
+
79
+ export {
80
+ createBlockchainWalletsResource,
81
+ init_blockchain
82
+ };
@@ -4,23 +4,19 @@ import {
4
4
  } from "./chunk-OBKEW4AQ.mjs";
5
5
 
6
6
  // src/resources/api-keys/index.ts
7
- function createApiKeysResource(client) {
7
+ function createApiKeysResource(instanceId, client) {
8
8
  return {
9
- list({ instanceId }) {
9
+ list() {
10
10
  return client.get(`/instances/${instanceId}/api-keys`);
11
11
  },
12
12
  create(_a) {
13
- var _b = _a, {
14
- instanceId
15
- } = _b, data = __objRest(_b, [
16
- "instanceId"
17
- ]);
13
+ var data = __objRest(_a, []);
18
14
  return client.post(`/instances/${instanceId}/api-keys`, data);
19
15
  },
20
- get({ instanceId, id }) {
21
- return client.get(`/instances/${instanceId}/api_keys/${id}`);
16
+ get(id) {
17
+ return client.get(`/instances/${instanceId}/api-keys/${id}`);
22
18
  },
23
- delete({ instanceId, id }) {
19
+ delete(id) {
24
20
  return client.delete(`/instances/${instanceId}/api-keys/${id}`);
25
21
  }
26
22
  };
@@ -0,0 +1,49 @@
1
+ import {
2
+ __esm,
3
+ __objRest
4
+ } from "./chunk-OBKEW4AQ.mjs";
5
+
6
+ // src/resources/wallets/offramp.ts
7
+ function createOfframpWalletsResource(instanceId, client) {
8
+ return {
9
+ list({
10
+ bank_account_id,
11
+ receiver_id
12
+ }) {
13
+ return client.get(
14
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${bank_account_id}/offramp-wallets`
15
+ );
16
+ },
17
+ create(_a) {
18
+ var _b = _a, {
19
+ receiver_id,
20
+ bank_account_id
21
+ } = _b, data = __objRest(_b, [
22
+ "receiver_id",
23
+ "bank_account_id"
24
+ ]);
25
+ return client.post(
26
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${bank_account_id}/offramp-wallets`,
27
+ data
28
+ );
29
+ },
30
+ get({
31
+ receiver_id,
32
+ bank_account_id,
33
+ id
34
+ }) {
35
+ return client.get(
36
+ `/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${bank_account_id}/offramp-wallets/${id}`
37
+ );
38
+ }
39
+ };
40
+ }
41
+ var init_offramp = __esm({
42
+ "src/resources/wallets/offramp.ts"() {
43
+ }
44
+ });
45
+
46
+ export {
47
+ createOfframpWalletsResource,
48
+ init_offramp
49
+ };
@@ -4,28 +4,19 @@ import {
4
4
  } from "./chunk-OBKEW4AQ.mjs";
5
5
 
6
6
  // src/resources/partner-fees/index.ts
7
- function createPartnerFeesResource(client) {
7
+ function createPartnerFeesResource(instanceId, client) {
8
8
  return {
9
- list({
10
- instanceId
11
- }) {
9
+ list() {
12
10
  return client.get(`/instances/${instanceId}/partner-fees`);
13
11
  },
14
12
  create(_a) {
15
- var _b = _a, {
16
- instanceId
17
- } = _b, data = __objRest(_b, [
18
- "instanceId"
19
- ]);
13
+ var data = __objRest(_a, []);
20
14
  return client.post(`/instances/${instanceId}/partner-fees`, data);
21
15
  },
22
- get({
23
- instanceId,
24
- id
25
- }) {
16
+ get(id) {
26
17
  return client.get(`/instances/${instanceId}/partner-fees/${id}`);
27
18
  },
28
- delete({ instanceId, id }) {
19
+ delete(id) {
29
20
  return client.delete(`/instances/${instanceId}/partner-fees/${id}`);
30
21
  }
31
22
  };