@blindpay/node 1.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 (139) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +124 -0
  3. package/dist/api-client-Cw2mNJeR.d.mts +349 -0
  4. package/dist/api-client-Cw2mNJeR.d.ts +349 -0
  5. package/dist/chunk-2DAKB5XK.mjs +212 -0
  6. package/dist/chunk-3CZJEDS5.mjs +41 -0
  7. package/dist/chunk-CNNEROQ7.mjs +46 -0
  8. package/dist/chunk-ES7RXEM7.mjs +245 -0
  9. package/dist/chunk-GCCHFONX.mjs +17893 -0
  10. package/dist/chunk-GEDDLCJY.mjs +77 -0
  11. package/dist/chunk-GNDAATIJ.mjs +35 -0
  12. package/dist/chunk-HKFAJXJG.mjs +65 -0
  13. package/dist/chunk-LK3JPQ6I.mjs +49 -0
  14. package/dist/chunk-LLWEHHKB.mjs +47 -0
  15. package/dist/chunk-LUDGZPXY.mjs +51 -0
  16. package/dist/chunk-M6IYYMRW.mjs +35 -0
  17. package/dist/chunk-OBKEW4AQ.mjs +91 -0
  18. package/dist/chunk-QHMIK7U3.mjs +24 -0
  19. package/dist/chunk-QVOSGLUO.mjs +36 -0
  20. package/dist/chunk-UCAW3RTZ.mjs +47 -0
  21. package/dist/chunk-VKN2AMCW.mjs +57 -0
  22. package/dist/index.d.mts +81 -0
  23. package/dist/index.d.ts +81 -0
  24. package/dist/index.js +895 -0
  25. package/dist/index.mjs +95 -0
  26. package/dist/magic-string.es-6D2DRE4K.mjs +1325 -0
  27. package/dist/resources/api-keys/api-keys.test.d.mts +2 -0
  28. package/dist/resources/api-keys/api-keys.test.d.ts +2 -0
  29. package/dist/resources/api-keys/api-keys.test.js +19881 -0
  30. package/dist/resources/api-keys/api-keys.test.mjs +130 -0
  31. package/dist/resources/api-keys/index.d.mts +45 -0
  32. package/dist/resources/api-keys/index.d.ts +45 -0
  33. package/dist/resources/api-keys/index.js +64 -0
  34. package/dist/resources/api-keys/index.mjs +9 -0
  35. package/dist/resources/available/available.test.d.mts +2 -0
  36. package/dist/resources/available/available.test.d.ts +2 -0
  37. package/dist/resources/available/available.test.js +19877 -0
  38. package/dist/resources/available/available.test.mjs +122 -0
  39. package/dist/resources/available/index.d.mts +25 -0
  40. package/dist/resources/available/index.d.ts +25 -0
  41. package/dist/resources/available/index.js +39 -0
  42. package/dist/resources/available/index.mjs +9 -0
  43. package/dist/resources/bank-accounts/bank-accounts.test.d.mts +2 -0
  44. package/dist/resources/bank-accounts/bank-accounts.test.d.ts +2 -0
  45. package/dist/resources/bank-accounts/bank-accounts.test.js +20173 -0
  46. package/dist/resources/bank-accounts/bank-accounts.test.mjs +418 -0
  47. package/dist/resources/bank-accounts/index.d.mts +414 -0
  48. package/dist/resources/bank-accounts/index.d.ts +414 -0
  49. package/dist/resources/bank-accounts/index.js +227 -0
  50. package/dist/resources/bank-accounts/index.mjs +9 -0
  51. package/dist/resources/instances/index.d.mts +42 -0
  52. package/dist/resources/instances/index.d.ts +42 -0
  53. package/dist/resources/instances/index.js +75 -0
  54. package/dist/resources/instances/index.mjs +9 -0
  55. package/dist/resources/instances/instances.test.d.mts +2 -0
  56. package/dist/resources/instances/instances.test.d.ts +2 -0
  57. package/dist/resources/instances/instances.test.js +19873 -0
  58. package/dist/resources/instances/instances.test.mjs +118 -0
  59. package/dist/resources/partner-fees/index.d.mts +65 -0
  60. package/dist/resources/partner-fees/index.d.ts +65 -0
  61. package/dist/resources/partner-fees/index.js +69 -0
  62. package/dist/resources/partner-fees/index.mjs +9 -0
  63. package/dist/resources/partner-fees/partner-fees.test.d.mts +2 -0
  64. package/dist/resources/partner-fees/partner-fees.test.d.ts +2 -0
  65. package/dist/resources/partner-fees/partner-fees.test.js +19889 -0
  66. package/dist/resources/partner-fees/partner-fees.test.mjs +134 -0
  67. package/dist/resources/payins/index.d.mts +200 -0
  68. package/dist/resources/payins/index.d.ts +200 -0
  69. package/dist/resources/payins/index.js +75 -0
  70. package/dist/resources/payins/index.mjs +9 -0
  71. package/dist/resources/payins/payins-quotes.test.d.mts +2 -0
  72. package/dist/resources/payins/payins-quotes.test.d.ts +2 -0
  73. package/dist/resources/payins/payins-quotes.test.js +19852 -0
  74. package/dist/resources/payins/payins-quotes.test.mjs +97 -0
  75. package/dist/resources/payins/payins.test.d.mts +2 -0
  76. package/dist/resources/payins/payins.test.d.ts +2 -0
  77. package/dist/resources/payins/payins.test.js +20268 -0
  78. package/dist/resources/payins/payins.test.mjs +513 -0
  79. package/dist/resources/payins/quotes.d.mts +45 -0
  80. package/dist/resources/payins/quotes.d.ts +45 -0
  81. package/dist/resources/payins/quotes.js +63 -0
  82. package/dist/resources/payins/quotes.mjs +9 -0
  83. package/dist/resources/payouts/index.d.mts +155 -0
  84. package/dist/resources/payouts/index.d.ts +155 -0
  85. package/dist/resources/payouts/index.js +93 -0
  86. package/dist/resources/payouts/index.mjs +9 -0
  87. package/dist/resources/payouts/payouts.test.d.mts +2 -0
  88. package/dist/resources/payouts/payouts.test.d.ts +2 -0
  89. package/dist/resources/payouts/payouts.test.js +20346 -0
  90. package/dist/resources/payouts/payouts.test.mjs +591 -0
  91. package/dist/resources/quotes/index.d.mts +59 -0
  92. package/dist/resources/quotes/index.d.ts +59 -0
  93. package/dist/resources/quotes/index.js +63 -0
  94. package/dist/resources/quotes/index.mjs +9 -0
  95. package/dist/resources/quotes/quotes.test.d.mts +2 -0
  96. package/dist/resources/quotes/quotes.test.d.ts +2 -0
  97. package/dist/resources/quotes/quotes.test.js +19866 -0
  98. package/dist/resources/quotes/quotes.test.mjs +111 -0
  99. package/dist/resources/receivers/index.d.mts +205 -0
  100. package/dist/resources/receivers/index.d.ts +205 -0
  101. package/dist/resources/receivers/index.js +85 -0
  102. package/dist/resources/receivers/index.mjs +9 -0
  103. package/dist/resources/receivers/receivers.test.d.mts +2 -0
  104. package/dist/resources/receivers/receivers.test.d.ts +2 -0
  105. package/dist/resources/receivers/receivers.test.js +20145 -0
  106. package/dist/resources/receivers/receivers.test.mjs +390 -0
  107. package/dist/resources/virtual-accounts/index.d.mts +58 -0
  108. package/dist/resources/virtual-accounts/index.d.ts +58 -0
  109. package/dist/resources/virtual-accounts/index.js +79 -0
  110. package/dist/resources/virtual-accounts/index.mjs +9 -0
  111. package/dist/resources/virtual-accounts/virtual-accounts.test.d.mts +2 -0
  112. package/dist/resources/virtual-accounts/virtual-accounts.test.d.ts +2 -0
  113. package/dist/resources/virtual-accounts/virtual-accounts.test.js +19902 -0
  114. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +147 -0
  115. package/dist/resources/wallets/blockchain.d.mts +83 -0
  116. package/dist/resources/wallets/blockchain.d.ts +83 -0
  117. package/dist/resources/wallets/blockchain.js +105 -0
  118. package/dist/resources/wallets/blockchain.mjs +9 -0
  119. package/dist/resources/wallets/blockchain.test.d.mts +2 -0
  120. package/dist/resources/wallets/blockchain.test.d.ts +2 -0
  121. package/dist/resources/wallets/blockchain.test.js +19897 -0
  122. package/dist/resources/wallets/blockchain.test.mjs +142 -0
  123. package/dist/resources/wallets/offramp.d.mts +46 -0
  124. package/dist/resources/wallets/offramp.d.ts +46 -0
  125. package/dist/resources/wallets/offramp.js +77 -0
  126. package/dist/resources/wallets/offramp.mjs +9 -0
  127. package/dist/resources/wallets/offramp.test.d.mts +2 -0
  128. package/dist/resources/wallets/offramp.test.d.ts +2 -0
  129. package/dist/resources/wallets/offramp.test.js +19872 -0
  130. package/dist/resources/wallets/offramp.test.mjs +117 -0
  131. package/dist/resources/webhooks/index.d.mts +49 -0
  132. package/dist/resources/webhooks/index.d.ts +49 -0
  133. package/dist/resources/webhooks/index.js +74 -0
  134. package/dist/resources/webhooks/index.mjs +9 -0
  135. package/dist/resources/webhooks/webhooks.test.d.mts +2 -0
  136. package/dist/resources/webhooks/webhooks.test.d.ts +2 -0
  137. package/dist/resources/webhooks/webhooks.test.js +19878 -0
  138. package/dist/resources/webhooks/webhooks.test.mjs +123 -0
  139. package/package.json +65 -0
@@ -0,0 +1,513 @@
1
+ import {
2
+ afterEach,
3
+ describe,
4
+ globalExpect,
5
+ init_dist,
6
+ it
7
+ } from "../../chunk-GCCHFONX.mjs";
8
+ import {
9
+ Blindpay,
10
+ init_client
11
+ } from "../../chunk-ES7RXEM7.mjs";
12
+ import "../../chunk-GEDDLCJY.mjs";
13
+ import "../../chunk-LK3JPQ6I.mjs";
14
+ import "../../chunk-CNNEROQ7.mjs";
15
+ import "../../chunk-GNDAATIJ.mjs";
16
+ import "../../chunk-VKN2AMCW.mjs";
17
+ import "../../chunk-LUDGZPXY.mjs";
18
+ import "../../chunk-3CZJEDS5.mjs";
19
+ import "../../chunk-UCAW3RTZ.mjs";
20
+ import "../../chunk-M6IYYMRW.mjs";
21
+ import "../../chunk-HKFAJXJG.mjs";
22
+ import "../../chunk-QVOSGLUO.mjs";
23
+ import "../../chunk-2DAKB5XK.mjs";
24
+ import "../../chunk-QHMIK7U3.mjs";
25
+ import "../../chunk-LLWEHHKB.mjs";
26
+ import {
27
+ __async,
28
+ __commonJS
29
+ } from "../../chunk-OBKEW4AQ.mjs";
30
+
31
+ // src/resources/payins/payins.test.ts
32
+ var require_payins_test = __commonJS({
33
+ "src/resources/payins/payins.test.ts"(exports) {
34
+ init_dist();
35
+ init_client();
36
+ describe("Payins", () => {
37
+ afterEach(() => fetchMock.resetMocks());
38
+ const blindpay = new Blindpay("test-key");
39
+ describe("List payins", () => {
40
+ it("should list payins", () => __async(null, null, function* () {
41
+ const mockedPayins = {
42
+ data: [
43
+ {
44
+ receiver_id: "re_000000000000",
45
+ id: "re_000000000000",
46
+ pix_code: "00020101021226790014br.gov.bcb.pix2557brcode.starkinfra.com/v2/bcf07f6c4110454e9fd6f120bab13e835204000053039865802BR5915Blind Pay, Inc.6010Vila Velha62070503***6304BCAB",
47
+ memo_code: "8K45GHBNT6BQ6462",
48
+ clabe: "014027000000000008",
49
+ status: "processing",
50
+ payin_quote_id: "pq_000000000000",
51
+ instance_id: "in_000000000000",
52
+ tracking_transaction: {
53
+ step: "processing",
54
+ status: "failed",
55
+ transaction_hash: "0x123...890",
56
+ completed_at: "2011-10-05T14:48:00.000Z"
57
+ },
58
+ tracking_payment: {
59
+ step: "on_hold",
60
+ provider_name: "blockchain",
61
+ provider_transaction_id: "tx_123456789",
62
+ provider_status: "confirmed",
63
+ estimated_time_of_arrival: "2011-10-05T15:00:00.000Z",
64
+ completed_at: "2011-10-05T14:48:00.000Z"
65
+ },
66
+ tracking_complete: {
67
+ step: "on_hold",
68
+ status: "completed",
69
+ transaction_hash: "0x123...890",
70
+ completed_at: "2011-10-05T14:48:00.000Z"
71
+ },
72
+ tracking_partner_fee: {
73
+ step: "on_hold",
74
+ transaction_hash: "0x123...890",
75
+ completed_at: "2011-10-05T14:48:00.000Z"
76
+ },
77
+ created_at: "2021-01-01T00:00:00Z",
78
+ updated_at: "2021-01-01T00:00:00Z",
79
+ image_url: "https://example.com/image.png",
80
+ first_name: "John",
81
+ last_name: "Doe",
82
+ legal_name: "Company Name Inc.",
83
+ type: "individual",
84
+ payment_method: "pix",
85
+ sender_amount: 5240,
86
+ receiver_amount: 1010,
87
+ token: "USDC",
88
+ partner_fee_amount: 150,
89
+ total_fee_amount: 1.53,
90
+ commercial_quotation: 495,
91
+ blindpay_quotation: 505,
92
+ currency: "BRL",
93
+ billing_fee: 100,
94
+ name: "Wallet Display Name",
95
+ address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
96
+ network: "polygon",
97
+ blindpay_bank_details: {
98
+ routing_number: "121145349",
99
+ account_number: "621327727210181",
100
+ account_type: "Business checking",
101
+ swift_bic_code: "CHASUS33",
102
+ ach: {
103
+ routing_number: "123456789",
104
+ account_number: "123456789"
105
+ },
106
+ wire: {
107
+ routing_number: "123456789",
108
+ account_number: "123456789"
109
+ },
110
+ rtp: {
111
+ routing_number: "123456789",
112
+ account_number: "123456789"
113
+ },
114
+ beneficiary: {
115
+ name: "BlindPay, Inc.",
116
+ address_line_1: "8 The Green, #19364",
117
+ address_line_2: "Dover, DE 19901"
118
+ },
119
+ receiving_bank: {
120
+ name: "Column NA - Brex",
121
+ address_line_1: "1 Letterman Drive, Building A, Suite A4-700",
122
+ address_line_2: "San Francisco, CA 94129"
123
+ }
124
+ }
125
+ }
126
+ ],
127
+ pagination: {
128
+ has_more: true,
129
+ next_page: 3,
130
+ prev_page: 1
131
+ }
132
+ };
133
+ fetchMock.mockResponseOnce(JSON.stringify(mockedPayins), {
134
+ headers: { "Content-Type": "application/json" }
135
+ });
136
+ const { data, error } = yield blindpay.payins.list({
137
+ instanceId: "in_000000000000"
138
+ });
139
+ globalExpect(error).toBeNull();
140
+ globalExpect(data).toEqual(mockedPayins);
141
+ }));
142
+ });
143
+ describe("Get payin", () => {
144
+ it("should get a payin", () => __async(null, null, function* () {
145
+ const mockedPayin = {
146
+ receiver_id: "re_000000000000",
147
+ id: "re_000000000000",
148
+ pix_code: "00020101021226790014br.gov.bcb.pix2557brcode.starkinfra.com/v2/bcf07f6c4110454e9fd6f120bab13e835204000053039865802BR5915Blind Pay, Inc.6010Vila Velha62070503***6304BCAB",
149
+ memo_code: "8K45GHBNT6BQ6462",
150
+ clabe: "014027000000000008",
151
+ status: "processing",
152
+ payin_quote_id: "pq_000000000000",
153
+ instance_id: "in_000000000000",
154
+ tracking_transaction: {
155
+ step: "processing",
156
+ status: "failed",
157
+ transaction_hash: "0x123...890",
158
+ completed_at: "2011-10-05T14:48:00.000Z"
159
+ },
160
+ tracking_payment: {
161
+ step: "on_hold",
162
+ provider_name: "blockchain",
163
+ provider_transaction_id: "tx_123456789",
164
+ provider_status: "confirmed",
165
+ estimated_time_of_arrival: "2011-10-05T15:00:00.000Z",
166
+ completed_at: "2011-10-05T14:48:00.000Z"
167
+ },
168
+ tracking_complete: {
169
+ step: "on_hold",
170
+ status: "completed",
171
+ transaction_hash: "0x123...890",
172
+ completed_at: "2011-10-05T14:48:00.000Z"
173
+ },
174
+ tracking_partner_fee: {
175
+ step: "on_hold",
176
+ transaction_hash: "0x123...890",
177
+ completed_at: "2011-10-05T14:48:00.000Z"
178
+ },
179
+ created_at: "2021-01-01T00:00:00Z",
180
+ updated_at: "2021-01-01T00:00:00Z",
181
+ image_url: "https://example.com/image.png",
182
+ first_name: "John",
183
+ last_name: "Doe",
184
+ legal_name: "Company Name Inc.",
185
+ type: "individual",
186
+ payment_method: "pix",
187
+ sender_amount: 5240,
188
+ receiver_amount: 1010,
189
+ token: "USDC",
190
+ partner_fee_amount: 150,
191
+ total_fee_amount: 1.53,
192
+ commercial_quotation: 495,
193
+ blindpay_quotation: 505,
194
+ currency: "BRL",
195
+ billing_fee: 100,
196
+ name: "Wallet Display Name",
197
+ address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
198
+ network: "polygon",
199
+ blindpay_bank_details: {
200
+ routing_number: "121145349",
201
+ account_number: "621327727210181",
202
+ account_type: "Business checking",
203
+ swift_bic_code: "CHASUS33",
204
+ ach: {
205
+ routing_number: "123456789",
206
+ account_number: "123456789"
207
+ },
208
+ wire: {
209
+ routing_number: "123456789",
210
+ account_number: "123456789"
211
+ },
212
+ rtp: {
213
+ routing_number: "123456789",
214
+ account_number: "123456789"
215
+ },
216
+ beneficiary: {
217
+ name: "BlindPay, Inc.",
218
+ address_line_1: "8 The Green, #19364",
219
+ address_line_2: "Dover, DE 19901"
220
+ },
221
+ receiving_bank: {
222
+ name: "Column NA - Brex",
223
+ address_line_1: "1 Letterman Drive, Building A, Suite A4-700",
224
+ address_line_2: "San Francisco, CA 94129"
225
+ }
226
+ }
227
+ };
228
+ fetchMock.mockResponseOnce(JSON.stringify(mockedPayin), {
229
+ headers: { "Content-Type": "application/json" }
230
+ });
231
+ const { data, error } = yield blindpay.payins.get({
232
+ instanceId: "in_000000000000",
233
+ id: "pi_000000000000"
234
+ });
235
+ globalExpect(error).toBeNull();
236
+ globalExpect(data).toEqual(mockedPayin);
237
+ }));
238
+ });
239
+ describe("Get payin track", () => {
240
+ it("should get payin tracking information", () => __async(null, null, function* () {
241
+ const mockedPayinTrack = {
242
+ receiver_id: "re_000000000000",
243
+ id: "re_000000000000",
244
+ pix_code: "00020101021226790014br.gov.bcb.pix2557brcode.starkinfra.com/v2/bcf07f6c4110454e9fd6f120bab13e835204000053039865802BR5915Blind Pay, Inc.6010Vila Velha62070503***6304BCAB",
245
+ memo_code: "8K45GHBNT6BQ6462",
246
+ clabe: "014027000000000008",
247
+ status: "processing",
248
+ payin_quote_id: "pq_000000000000",
249
+ instance_id: "in_000000000000",
250
+ tracking_transaction: {
251
+ step: "processing",
252
+ status: "failed",
253
+ external_id: "12345678",
254
+ completed_at: "2011-10-05T14:48:00.000Z",
255
+ sender_name: "John Doe Smith",
256
+ sender_tax_id: "123.456.789-10",
257
+ sender_bank_code: "00416968",
258
+ sender_account_number: "1234567890",
259
+ trace_number: "1234567890",
260
+ transaction_reference: "1234567890",
261
+ description: "Payment from John Doe Smith"
262
+ },
263
+ tracking_payment: {
264
+ step: "on_hold",
265
+ provider_name: "blockchain",
266
+ completed_at: "2011-10-05T14:48:00.000Z"
267
+ },
268
+ tracking_complete: {
269
+ step: "on_hold",
270
+ transaction_hash: "0x123...890",
271
+ completed_at: "2011-10-05T14:48:00.000Z"
272
+ },
273
+ tracking_partner_fee: {
274
+ step: "on_hold",
275
+ transaction_hash: "0x123...890",
276
+ completed_at: "2011-10-05T14:48:00.000Z"
277
+ },
278
+ created_at: "2021-01-01T00:00:00Z",
279
+ updated_at: "2021-01-01T00:00:00Z",
280
+ image_url: "https://example.com/image.png",
281
+ first_name: "John",
282
+ last_name: "Doe",
283
+ legal_name: "Company Name Inc.",
284
+ type: "individual",
285
+ payment_method: "pix",
286
+ sender_amount: 5240,
287
+ receiver_amount: 1010,
288
+ token: "USDC",
289
+ partner_fee_amount: 150,
290
+ total_fee_amount: 1.53,
291
+ commercial_quotation: 495,
292
+ blindpay_quotation: 505,
293
+ currency: "BRL",
294
+ billing_fee: 100,
295
+ name: "Wallet Display Name",
296
+ address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
297
+ network: "polygon",
298
+ blindpay_bank_details: {
299
+ routing_number: "121145349",
300
+ account_number: "621327727210181",
301
+ account_type: "Business checking",
302
+ swift_bic_code: "CHASUS33",
303
+ ach: {
304
+ routing_number: "123456789",
305
+ account_number: "123456789"
306
+ },
307
+ wire: {
308
+ routing_number: "123456789",
309
+ account_number: "123456789"
310
+ },
311
+ rtp: {
312
+ routing_number: "123456789",
313
+ account_number: "123456789"
314
+ },
315
+ beneficiary: {
316
+ name: "BlindPay, Inc.",
317
+ address_line_1: "8 The Green, #19364",
318
+ address_line_2: "Dover, DE 19901"
319
+ },
320
+ receiving_bank: {
321
+ name: "Column NA - Brex",
322
+ address_line_1: "1 Letterman Drive, Building A, Suite A4-700",
323
+ address_line_2: "San Francisco, CA 94129"
324
+ }
325
+ }
326
+ };
327
+ fetchMock.mockResponseOnce(JSON.stringify(mockedPayinTrack), {
328
+ headers: { "Content-Type": "application/json" }
329
+ });
330
+ const { data, error } = yield blindpay.payins.getTrack({
331
+ id: "pi_000000000000"
332
+ });
333
+ globalExpect(error).toBeNull();
334
+ globalExpect(data).toEqual(mockedPayinTrack);
335
+ }));
336
+ });
337
+ describe("Export payins", () => {
338
+ it("should export payins", () => __async(null, null, function* () {
339
+ const mockedExportPayins = [
340
+ {
341
+ receiver_id: "re_000000000000",
342
+ id: "re_000000000000",
343
+ pix_code: "00020101021226790014br.gov.bcb.pix2557brcode.starkinfra.com/v2/bcf07f6c4110454e9fd6f120bab13e835204000053039865802BR5915Blind Pay, Inc.6010Vila Velha62070503***6304BCAB",
344
+ memo_code: "8K45GHBNT6BQ6462",
345
+ clabe: "014027000000000008",
346
+ status: "processing",
347
+ payin_quote_id: "pq_000000000000",
348
+ instance_id: "in_000000000000",
349
+ tracking_transaction: {
350
+ step: "processing",
351
+ status: "failed",
352
+ transaction_hash: "0x123...890",
353
+ completed_at: "2011-10-05T14:48:00.000Z"
354
+ },
355
+ tracking_payment: {
356
+ step: "on_hold",
357
+ provider_name: "blockchain",
358
+ provider_transaction_id: "tx_123456789",
359
+ provider_status: "confirmed",
360
+ estimated_time_of_arrival: "2011-10-05T15:00:00.000Z",
361
+ completed_at: "2011-10-05T14:48:00.000Z"
362
+ },
363
+ tracking_complete: {
364
+ step: "on_hold",
365
+ status: "completed",
366
+ transaction_hash: "0x123...890",
367
+ completed_at: "2011-10-05T14:48:00.000Z"
368
+ },
369
+ tracking_partner_fee: {
370
+ step: "on_hold",
371
+ transaction_hash: "0x123...890",
372
+ completed_at: "2011-10-05T14:48:00.000Z"
373
+ },
374
+ created_at: "2021-01-01T00:00:00Z",
375
+ updated_at: "2021-01-01T00:00:00Z",
376
+ image_url: "https://example.com/image.png",
377
+ first_name: "John",
378
+ last_name: "Doe",
379
+ legal_name: "Company Name Inc.",
380
+ type: "individual",
381
+ payment_method: "pix",
382
+ sender_amount: 5240,
383
+ receiver_amount: 1010,
384
+ token: "USDC",
385
+ partner_fee_amount: 150,
386
+ total_fee_amount: 1.53,
387
+ commercial_quotation: 495,
388
+ blindpay_quotation: 505,
389
+ currency: "BRL",
390
+ billing_fee: 100,
391
+ name: "Wallet Display Name",
392
+ address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
393
+ network: "polygon",
394
+ blindpay_bank_details: {
395
+ routing_number: "121145349",
396
+ account_number: "621327727210181",
397
+ account_type: "Business checking",
398
+ swift_bic_code: "CHASUS33",
399
+ ach: {
400
+ routing_number: "123456789",
401
+ account_number: "123456789"
402
+ },
403
+ wire: {
404
+ routing_number: "123456789",
405
+ account_number: "123456789"
406
+ },
407
+ rtp: {
408
+ routing_number: "123456789",
409
+ account_number: "123456789"
410
+ },
411
+ beneficiary: {
412
+ name: "BlindPay, Inc.",
413
+ address_line_1: "8 The Green, #19364",
414
+ address_line_2: "Dover, DE 19901"
415
+ },
416
+ receiving_bank: {
417
+ name: "Column NA - Brex",
418
+ address_line_1: "1 Letterman Drive, Building A, Suite A4-700",
419
+ address_line_2: "San Francisco, CA 94129"
420
+ }
421
+ }
422
+ }
423
+ ];
424
+ fetchMock.mockResponseOnce(JSON.stringify(mockedExportPayins), {
425
+ headers: { "Content-Type": "application/json" }
426
+ });
427
+ const { data, error } = yield blindpay.payins.export({
428
+ instanceId: "in_000000000000",
429
+ params: { status: "processing" }
430
+ });
431
+ globalExpect(error).toBeNull();
432
+ globalExpect(data).toEqual(mockedExportPayins);
433
+ }));
434
+ });
435
+ describe("Create EVM payin", () => {
436
+ it("should create an EVM payin", () => __async(null, null, function* () {
437
+ const mockedEvmPayin = {
438
+ id: "pi_000000000000",
439
+ status: "processing",
440
+ pix_code: "00020101021226790014br.gov.bcb.pix2557brcode.starkinfra.com/v2/bcf07f6c4110454e9fd6f120bab13e835204000053039865802BR5915Blind Pay, Inc.6010Vila Velha62070503***6304BCAB",
441
+ memo_code: "8K45GHBNT6BQ6462",
442
+ clabe: "014027000000000008",
443
+ tracking_complete: {
444
+ step: "on_hold",
445
+ status: "completed",
446
+ transaction_hash: "0x123...890",
447
+ completed_at: "2011-10-05T14:48:00.000Z"
448
+ },
449
+ tracking_payment: {
450
+ step: "on_hold",
451
+ provider_name: "blockchain",
452
+ provider_transaction_id: "tx_123456789",
453
+ provider_status: "confirmed",
454
+ estimated_time_of_arrival: "2011-10-05T15:00:00.000Z",
455
+ completed_at: "2011-10-05T14:48:00.000Z"
456
+ },
457
+ tracking_transaction: {
458
+ step: "processing",
459
+ status: "failed",
460
+ transaction_hash: "0x123...890",
461
+ completed_at: "2011-10-05T14:48:00.000Z"
462
+ },
463
+ tracking_partner_fee: {
464
+ step: "on_hold",
465
+ transaction_hash: "0x123...890",
466
+ completed_at: "2011-10-05T14:48:00.000Z"
467
+ },
468
+ blindpay_bank_details: {
469
+ routing_number: "121145349",
470
+ account_number: "621327727210181",
471
+ account_type: "Business checking",
472
+ swift_bic_code: "CHASUS33",
473
+ ach: {
474
+ routing_number: "123456789",
475
+ account_number: "123456789"
476
+ },
477
+ wire: {
478
+ routing_number: "123456789",
479
+ account_number: "123456789"
480
+ },
481
+ rtp: {
482
+ routing_number: "123456789",
483
+ account_number: "123456789"
484
+ },
485
+ beneficiary: {
486
+ name: "BlindPay, Inc.",
487
+ address_line_1: "8 The Green, #19364",
488
+ address_line_2: "Dover, DE 19901"
489
+ },
490
+ receiving_bank: {
491
+ name: "Column NA - Brex",
492
+ address_line_1: "1 Letterman Drive, Building A, Suite A4-700",
493
+ address_line_2: "San Francisco, CA 94129"
494
+ }
495
+ },
496
+ receiver_id: "re_000000000000",
497
+ receiver_amount: 1010
498
+ };
499
+ fetchMock.mockResponseOnce(JSON.stringify(mockedEvmPayin), {
500
+ headers: { "Content-Type": "application/json" }
501
+ });
502
+ const { data, error } = yield blindpay.payins.createEvm({
503
+ instanceId: "in_000000000000",
504
+ payin_quote_id: "pq_000000000000"
505
+ });
506
+ globalExpect(error).toBeNull();
507
+ globalExpect(data).toEqual(mockedEvmPayin);
508
+ }));
509
+ });
510
+ });
511
+ }
512
+ });
513
+ export default require_payins_test();
@@ -0,0 +1,45 @@
1
+ import { I as InternalApiClient, g as CurrencyType, S as StablecoinToken, B as BlindpayApiResponse, h as Currency } from '../../api-client-Cw2mNJeR.mjs';
2
+
3
+ type CreatePayinQuoteInput = {
4
+ instanceId: string;
5
+ blockchain_wallet_id: string;
6
+ currency_type: CurrencyType;
7
+ payment_method: "ach" | "wire" | "pix" | "spei";
8
+ request_amount: number;
9
+ token: StablecoinToken;
10
+ cover_fees: boolean;
11
+ partner_fee_id: string | null;
12
+ payer_rules: {
13
+ pix_allowed_tax_ids: string[];
14
+ };
15
+ };
16
+ type CreatePayinQuoteResponse = {
17
+ id: string;
18
+ expires_at: number;
19
+ commercial_quotation: number;
20
+ blindpay_quotation: number;
21
+ receiver_amount: number;
22
+ sender_amount: number;
23
+ partner_fee_amount: number | null;
24
+ flat_fee: number | null;
25
+ };
26
+ type GetPayinFxRateInput = {
27
+ instanceId: string;
28
+ currency_type: CurrencyType;
29
+ from: Currency;
30
+ to: Currency;
31
+ request_amount: number;
32
+ };
33
+ type GetPayinFxRateResponse = {
34
+ commercial_quotation: number;
35
+ blindpay_quotation: number;
36
+ result_amount: number;
37
+ instance_flat_fee: number;
38
+ instance_percentage_fee: number;
39
+ };
40
+ declare function createPayinQuotesResource(client: InternalApiClient): {
41
+ create({ instanceId, ...data }: CreatePayinQuoteInput): Promise<BlindpayApiResponse<CreatePayinQuoteResponse>>;
42
+ getFxRate({ instanceId, ...data }: GetPayinFxRateInput): Promise<BlindpayApiResponse<GetPayinFxRateResponse>>;
43
+ };
44
+
45
+ export { type CreatePayinQuoteInput, type CreatePayinQuoteResponse, type GetPayinFxRateInput, type GetPayinFxRateResponse, createPayinQuotesResource };
@@ -0,0 +1,45 @@
1
+ import { I as InternalApiClient, g as CurrencyType, S as StablecoinToken, B as BlindpayApiResponse, h as Currency } from '../../api-client-Cw2mNJeR.js';
2
+
3
+ type CreatePayinQuoteInput = {
4
+ instanceId: string;
5
+ blockchain_wallet_id: string;
6
+ currency_type: CurrencyType;
7
+ payment_method: "ach" | "wire" | "pix" | "spei";
8
+ request_amount: number;
9
+ token: StablecoinToken;
10
+ cover_fees: boolean;
11
+ partner_fee_id: string | null;
12
+ payer_rules: {
13
+ pix_allowed_tax_ids: string[];
14
+ };
15
+ };
16
+ type CreatePayinQuoteResponse = {
17
+ id: string;
18
+ expires_at: number;
19
+ commercial_quotation: number;
20
+ blindpay_quotation: number;
21
+ receiver_amount: number;
22
+ sender_amount: number;
23
+ partner_fee_amount: number | null;
24
+ flat_fee: number | null;
25
+ };
26
+ type GetPayinFxRateInput = {
27
+ instanceId: string;
28
+ currency_type: CurrencyType;
29
+ from: Currency;
30
+ to: Currency;
31
+ request_amount: number;
32
+ };
33
+ type GetPayinFxRateResponse = {
34
+ commercial_quotation: number;
35
+ blindpay_quotation: number;
36
+ result_amount: number;
37
+ instance_flat_fee: number;
38
+ instance_percentage_fee: number;
39
+ };
40
+ declare function createPayinQuotesResource(client: InternalApiClient): {
41
+ create({ instanceId, ...data }: CreatePayinQuoteInput): Promise<BlindpayApiResponse<CreatePayinQuoteResponse>>;
42
+ getFxRate({ instanceId, ...data }: GetPayinFxRateInput): Promise<BlindpayApiResponse<GetPayinFxRateResponse>>;
43
+ };
44
+
45
+ export { type CreatePayinQuoteInput, type CreatePayinQuoteResponse, type GetPayinFxRateInput, type GetPayinFxRateResponse, createPayinQuotesResource };
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __objRest = (source, exclude) => {
9
+ var target = {};
10
+ for (var prop in source)
11
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
12
+ target[prop] = source[prop];
13
+ if (source != null && __getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(source)) {
15
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
16
+ target[prop] = source[prop];
17
+ }
18
+ return target;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, { get: all[name], enumerable: true });
23
+ };
24
+ var __copyProps = (to, from, except, desc) => {
25
+ if (from && typeof from === "object" || typeof from === "function") {
26
+ for (let key of __getOwnPropNames(from))
27
+ if (!__hasOwnProp.call(to, key) && key !== except)
28
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
+ }
30
+ return to;
31
+ };
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+
34
+ // src/resources/payins/quotes.ts
35
+ var quotes_exports = {};
36
+ __export(quotes_exports, {
37
+ createPayinQuotesResource: () => createPayinQuotesResource
38
+ });
39
+ module.exports = __toCommonJS(quotes_exports);
40
+ function createPayinQuotesResource(client) {
41
+ return {
42
+ create(_a) {
43
+ var _b = _a, {
44
+ instanceId
45
+ } = _b, data = __objRest(_b, [
46
+ "instanceId"
47
+ ]);
48
+ return client.post(`/instances/${instanceId}/payin-quotes`, data);
49
+ },
50
+ getFxRate(_c) {
51
+ var _d = _c, {
52
+ instanceId
53
+ } = _d, data = __objRest(_d, [
54
+ "instanceId"
55
+ ]);
56
+ return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
57
+ }
58
+ };
59
+ }
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ createPayinQuotesResource
63
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ createPayinQuotesResource,
3
+ init_quotes
4
+ } from "../../chunk-M6IYYMRW.mjs";
5
+ import "../../chunk-OBKEW4AQ.mjs";
6
+ init_quotes();
7
+ export {
8
+ createPayinQuotesResource
9
+ };