@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
@@ -6,23 +6,23 @@ import {
6
6
  it
7
7
  } from "../../chunk-GCCHFONX.mjs";
8
8
  import {
9
- Blindpay,
9
+ BlindPay,
10
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";
11
+ } from "../../chunk-YPXYUS2X.mjs";
12
+ import "../../chunk-IZYPRCCV.mjs";
13
+ import "../../chunk-QGNLMN6Z.mjs";
14
+ import "../../chunk-UC57SCKQ.mjs";
15
+ import "../../chunk-TBTA7A2P.mjs";
16
+ import "../../chunk-BONN6PYB.mjs";
17
+ import "../../chunk-5XJJKYXE.mjs";
18
+ import "../../chunk-RC5NN5UF.mjs";
19
+ import "../../chunk-W7NJUABI.mjs";
20
+ import "../../chunk-E7M4CJKR.mjs";
21
+ import "../../chunk-3QQCDR3E.mjs";
22
+ import "../../chunk-LRHWT4JU.mjs";
24
23
  import "../../chunk-QHMIK7U3.mjs";
25
- import "../../chunk-LLWEHHKB.mjs";
24
+ import "../../chunk-64EFLUS3.mjs";
25
+ import "../../chunk-B5T7AQLH.mjs";
26
26
  import {
27
27
  __async,
28
28
  __commonJS
@@ -35,7 +35,7 @@ var require_payins_test = __commonJS({
35
35
  init_client();
36
36
  describe("Payins", () => {
37
37
  afterEach(() => fetchMock.resetMocks());
38
- const blindpay = new Blindpay("test-key");
38
+ const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
39
39
  describe("List payins", () => {
40
40
  it("should list payins", () => __async(null, null, function* () {
41
41
  const mockedPayins = {
@@ -133,9 +133,7 @@ var require_payins_test = __commonJS({
133
133
  fetchMock.mockResponseOnce(JSON.stringify(mockedPayins), {
134
134
  headers: { "Content-Type": "application/json" }
135
135
  });
136
- const { data, error } = yield blindpay.payins.list({
137
- instanceId: "in_000000000000"
138
- });
136
+ const { data, error } = yield blindpay.payins.list();
139
137
  globalExpect(error).toBeNull();
140
138
  globalExpect(data).toEqual(mockedPayins);
141
139
  }));
@@ -228,10 +226,7 @@ var require_payins_test = __commonJS({
228
226
  fetchMock.mockResponseOnce(JSON.stringify(mockedPayin), {
229
227
  headers: { "Content-Type": "application/json" }
230
228
  });
231
- const { data, error } = yield blindpay.payins.get({
232
- instanceId: "in_000000000000",
233
- id: "pi_000000000000"
234
- });
229
+ const { data, error } = yield blindpay.payins.get("pi_000000000000");
235
230
  globalExpect(error).toBeNull();
236
231
  globalExpect(data).toEqual(mockedPayin);
237
232
  }));
@@ -327,9 +322,7 @@ var require_payins_test = __commonJS({
327
322
  fetchMock.mockResponseOnce(JSON.stringify(mockedPayinTrack), {
328
323
  headers: { "Content-Type": "application/json" }
329
324
  });
330
- const { data, error } = yield blindpay.payins.getTrack({
331
- id: "pi_000000000000"
332
- });
325
+ const { data, error } = yield blindpay.payins.getTrack("pi_000000000000");
333
326
  globalExpect(error).toBeNull();
334
327
  globalExpect(data).toEqual(mockedPayinTrack);
335
328
  }));
@@ -425,8 +418,7 @@ var require_payins_test = __commonJS({
425
418
  headers: { "Content-Type": "application/json" }
426
419
  });
427
420
  const { data, error } = yield blindpay.payins.export({
428
- instanceId: "in_000000000000",
429
- params: { status: "processing" }
421
+ status: "processing"
430
422
  });
431
423
  globalExpect(error).toBeNull();
432
424
  globalExpect(data).toEqual(mockedExportPayins);
@@ -499,10 +491,7 @@ var require_payins_test = __commonJS({
499
491
  fetchMock.mockResponseOnce(JSON.stringify(mockedEvmPayin), {
500
492
  headers: { "Content-Type": "application/json" }
501
493
  });
502
- const { data, error } = yield blindpay.payins.createEvm({
503
- instanceId: "in_000000000000",
504
- payin_quote_id: "pq_000000000000"
505
- });
494
+ const { data, error } = yield blindpay.payins.createEvm("pq_000000000000");
506
495
  globalExpect(error).toBeNull();
507
496
  globalExpect(data).toEqual(mockedEvmPayin);
508
497
  }));
@@ -1,7 +1,6 @@
1
1
  import { I as InternalApiClient, g as CurrencyType, S as StablecoinToken, B as BlindpayApiResponse, h as Currency } from '../../api-client-Cw2mNJeR.mjs';
2
2
 
3
3
  type CreatePayinQuoteInput = {
4
- instanceId: string;
5
4
  blockchain_wallet_id: string;
6
5
  currency_type: CurrencyType;
7
6
  payment_method: "ach" | "wire" | "pix" | "spei";
@@ -24,7 +23,6 @@ type CreatePayinQuoteResponse = {
24
23
  flat_fee: number | null;
25
24
  };
26
25
  type GetPayinFxRateInput = {
27
- instanceId: string;
28
26
  currency_type: CurrencyType;
29
27
  from: Currency;
30
28
  to: Currency;
@@ -37,9 +35,9 @@ type GetPayinFxRateResponse = {
37
35
  instance_flat_fee: number;
38
36
  instance_percentage_fee: number;
39
37
  };
40
- declare function createPayinQuotesResource(client: InternalApiClient): {
41
- create({ instanceId, ...data }: CreatePayinQuoteInput): Promise<BlindpayApiResponse<CreatePayinQuoteResponse>>;
42
- getFxRate({ instanceId, ...data }: GetPayinFxRateInput): Promise<BlindpayApiResponse<GetPayinFxRateResponse>>;
38
+ declare function createPayinQuotesResource(instanceId: string, client: InternalApiClient): {
39
+ create({ ...data }: CreatePayinQuoteInput): Promise<BlindpayApiResponse<CreatePayinQuoteResponse>>;
40
+ getFxRate({ ...data }: GetPayinFxRateInput): Promise<BlindpayApiResponse<GetPayinFxRateResponse>>;
43
41
  };
44
42
 
45
43
  export { type CreatePayinQuoteInput, type CreatePayinQuoteResponse, type GetPayinFxRateInput, type GetPayinFxRateResponse, createPayinQuotesResource };
@@ -1,7 +1,6 @@
1
1
  import { I as InternalApiClient, g as CurrencyType, S as StablecoinToken, B as BlindpayApiResponse, h as Currency } from '../../api-client-Cw2mNJeR.js';
2
2
 
3
3
  type CreatePayinQuoteInput = {
4
- instanceId: string;
5
4
  blockchain_wallet_id: string;
6
5
  currency_type: CurrencyType;
7
6
  payment_method: "ach" | "wire" | "pix" | "spei";
@@ -24,7 +23,6 @@ type CreatePayinQuoteResponse = {
24
23
  flat_fee: number | null;
25
24
  };
26
25
  type GetPayinFxRateInput = {
27
- instanceId: string;
28
26
  currency_type: CurrencyType;
29
27
  from: Currency;
30
28
  to: Currency;
@@ -37,9 +35,9 @@ type GetPayinFxRateResponse = {
37
35
  instance_flat_fee: number;
38
36
  instance_percentage_fee: number;
39
37
  };
40
- declare function createPayinQuotesResource(client: InternalApiClient): {
41
- create({ instanceId, ...data }: CreatePayinQuoteInput): Promise<BlindpayApiResponse<CreatePayinQuoteResponse>>;
42
- getFxRate({ instanceId, ...data }: GetPayinFxRateInput): Promise<BlindpayApiResponse<GetPayinFxRateResponse>>;
38
+ declare function createPayinQuotesResource(instanceId: string, client: InternalApiClient): {
39
+ create({ ...data }: CreatePayinQuoteInput): Promise<BlindpayApiResponse<CreatePayinQuoteResponse>>;
40
+ getFxRate({ ...data }: GetPayinFxRateInput): Promise<BlindpayApiResponse<GetPayinFxRateResponse>>;
43
41
  };
44
42
 
45
43
  export { type CreatePayinQuoteInput, type CreatePayinQuoteResponse, type GetPayinFxRateInput, type GetPayinFxRateResponse, createPayinQuotesResource };
@@ -37,22 +37,14 @@ __export(quotes_exports, {
37
37
  createPayinQuotesResource: () => createPayinQuotesResource
38
38
  });
39
39
  module.exports = __toCommonJS(quotes_exports);
40
- function createPayinQuotesResource(client) {
40
+ function createPayinQuotesResource(instanceId, client) {
41
41
  return {
42
42
  create(_a) {
43
- var _b = _a, {
44
- instanceId
45
- } = _b, data = __objRest(_b, [
46
- "instanceId"
47
- ]);
43
+ var data = __objRest(_a, []);
48
44
  return client.post(`/instances/${instanceId}/payin-quotes`, data);
49
45
  },
50
- getFxRate(_c) {
51
- var _d = _c, {
52
- instanceId
53
- } = _d, data = __objRest(_d, [
54
- "instanceId"
55
- ]);
46
+ getFxRate(_b) {
47
+ var data = __objRest(_b, []);
56
48
  return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
57
49
  }
58
50
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPayinQuotesResource,
3
3
  init_quotes
4
- } from "../../chunk-M6IYYMRW.mjs";
4
+ } from "../../chunk-E7M4CJKR.mjs";
5
5
  import "../../chunk-OBKEW4AQ.mjs";
6
6
  init_quotes();
7
7
  export {
@@ -66,18 +66,14 @@ type Payout = {
66
66
  transfers_type: "CVU" | "CBU" | "ALIAS";
67
67
  has_virtual_account: boolean;
68
68
  };
69
- type ListPayoutsInput = {
70
- instanceId: string;
71
- params?: PaginationParams & {
72
- receiver_id?: string;
73
- };
69
+ type ListPayoutsInput = PaginationParams & {
70
+ receiver_id?: string;
74
71
  };
75
72
  type ListPayoutsResponse = {
76
73
  data: Payout[];
77
74
  pagination: PaginationMetadata;
78
75
  };
79
76
  type CreatePayoutInput = {
80
- instanceId: string;
81
77
  receiver_id: string;
82
78
  bank_account_id: string;
83
79
  amount: number;
@@ -87,22 +83,13 @@ type CreatePayoutInput = {
87
83
  network?: Network | null;
88
84
  token?: StablecoinToken | null;
89
85
  };
90
- type GetPayoutInput = {
91
- instanceId: string;
92
- id: string;
93
- };
86
+ type GetPayoutInput = string;
94
87
  type GetPayoutResponse = Payout;
95
- type GetPayoutTrackInput = {
96
- id: string;
97
- };
88
+ type GetPayoutTrackInput = string;
98
89
  type GetPayoutTrackResponse = Payout;
99
- type ExportPayoutsInput = {
100
- instanceId: string;
101
- params?: Pick<PaginationParams, "limit" | "offset">;
102
- };
90
+ type ExportPayoutsInput = Pick<PaginationParams, "limit" | "offset">;
103
91
  type ExportPayoutsResponse = Payout[];
104
92
  type AuthorizeStellarTokenInput = {
105
- instanceId: string;
106
93
  quote_id: string;
107
94
  sender_wallet_address: string;
108
95
  };
@@ -110,7 +97,6 @@ type AuthorizeStellarTokenResponse = {
110
97
  transaction_hash: string;
111
98
  };
112
99
  type CreateStellarPayoutInput = {
113
- instanceId: string;
114
100
  quote_id: string;
115
101
  sender_wallet_address: string;
116
102
  signed_transaction?: string;
@@ -127,7 +113,6 @@ type CreateStellarPayoutResponse = {
127
113
  receiver_id: string;
128
114
  };
129
115
  type CreateEvmPayoutInput = {
130
- instanceId: string;
131
116
  quote_id: string;
132
117
  sender_wallet_address: string;
133
118
  };
@@ -142,14 +127,14 @@ type CreateEvmPayoutResponse = {
142
127
  tracking_liquidity?: TrackingLiquidity;
143
128
  receiver_id: string;
144
129
  };
145
- declare function createPayoutsResource(client: InternalApiClient): {
146
- list({ instanceId, params, }: ListPayoutsInput): Promise<BlindpayApiResponse<ListPayoutsResponse>>;
147
- export({ instanceId, params, }: ExportPayoutsInput): Promise<BlindpayApiResponse<ExportPayoutsResponse>>;
148
- get({ instanceId, id }: GetPayoutInput): Promise<BlindpayApiResponse<GetPayoutResponse>>;
149
- getTrack({ id, }: GetPayoutTrackInput): Promise<BlindpayApiResponse<GetPayoutTrackResponse>>;
150
- authorizeStellarToken({ instanceId, ...data }: AuthorizeStellarTokenInput): Promise<BlindpayApiResponse<AuthorizeStellarTokenResponse>>;
151
- createStellar({ instanceId, ...data }: CreateStellarPayoutInput): Promise<BlindpayApiResponse<CreateStellarPayoutResponse>>;
152
- createEvm({ instanceId, ...data }: CreateEvmPayoutInput): Promise<BlindpayApiResponse<CreateEvmPayoutResponse>>;
130
+ declare function createPayoutsResource(instanceId: string, client: InternalApiClient): {
131
+ list(params?: ListPayoutsInput): Promise<BlindpayApiResponse<ListPayoutsResponse>>;
132
+ export(params?: ExportPayoutsInput): Promise<BlindpayApiResponse<ExportPayoutsResponse>>;
133
+ get(payoutId: GetPayoutInput): Promise<BlindpayApiResponse<GetPayoutResponse>>;
134
+ getTrack(payoutId: GetPayoutTrackInput): Promise<BlindpayApiResponse<GetPayoutTrackResponse>>;
135
+ authorizeStellarToken({ ...data }: AuthorizeStellarTokenInput): Promise<BlindpayApiResponse<AuthorizeStellarTokenResponse>>;
136
+ createStellar({ ...data }: CreateStellarPayoutInput): Promise<BlindpayApiResponse<CreateStellarPayoutResponse>>;
137
+ createEvm({ ...data }: CreateEvmPayoutInput): Promise<BlindpayApiResponse<CreateEvmPayoutResponse>>;
153
138
  };
154
139
 
155
140
  export { type AuthorizeStellarTokenInput, type AuthorizeStellarTokenResponse, type CreateEvmPayoutInput, type CreateEvmPayoutResponse, type CreatePayoutInput, type CreateStellarPayoutInput, type CreateStellarPayoutResponse, type ExportPayoutsInput, type ExportPayoutsResponse, type GetPayoutInput, type GetPayoutResponse, type GetPayoutTrackInput, type GetPayoutTrackResponse, type ListPayoutsInput, type ListPayoutsResponse, type Payout, type SpeiProtocol, createPayoutsResource };
@@ -66,18 +66,14 @@ type Payout = {
66
66
  transfers_type: "CVU" | "CBU" | "ALIAS";
67
67
  has_virtual_account: boolean;
68
68
  };
69
- type ListPayoutsInput = {
70
- instanceId: string;
71
- params?: PaginationParams & {
72
- receiver_id?: string;
73
- };
69
+ type ListPayoutsInput = PaginationParams & {
70
+ receiver_id?: string;
74
71
  };
75
72
  type ListPayoutsResponse = {
76
73
  data: Payout[];
77
74
  pagination: PaginationMetadata;
78
75
  };
79
76
  type CreatePayoutInput = {
80
- instanceId: string;
81
77
  receiver_id: string;
82
78
  bank_account_id: string;
83
79
  amount: number;
@@ -87,22 +83,13 @@ type CreatePayoutInput = {
87
83
  network?: Network | null;
88
84
  token?: StablecoinToken | null;
89
85
  };
90
- type GetPayoutInput = {
91
- instanceId: string;
92
- id: string;
93
- };
86
+ type GetPayoutInput = string;
94
87
  type GetPayoutResponse = Payout;
95
- type GetPayoutTrackInput = {
96
- id: string;
97
- };
88
+ type GetPayoutTrackInput = string;
98
89
  type GetPayoutTrackResponse = Payout;
99
- type ExportPayoutsInput = {
100
- instanceId: string;
101
- params?: Pick<PaginationParams, "limit" | "offset">;
102
- };
90
+ type ExportPayoutsInput = Pick<PaginationParams, "limit" | "offset">;
103
91
  type ExportPayoutsResponse = Payout[];
104
92
  type AuthorizeStellarTokenInput = {
105
- instanceId: string;
106
93
  quote_id: string;
107
94
  sender_wallet_address: string;
108
95
  };
@@ -110,7 +97,6 @@ type AuthorizeStellarTokenResponse = {
110
97
  transaction_hash: string;
111
98
  };
112
99
  type CreateStellarPayoutInput = {
113
- instanceId: string;
114
100
  quote_id: string;
115
101
  sender_wallet_address: string;
116
102
  signed_transaction?: string;
@@ -127,7 +113,6 @@ type CreateStellarPayoutResponse = {
127
113
  receiver_id: string;
128
114
  };
129
115
  type CreateEvmPayoutInput = {
130
- instanceId: string;
131
116
  quote_id: string;
132
117
  sender_wallet_address: string;
133
118
  };
@@ -142,14 +127,14 @@ type CreateEvmPayoutResponse = {
142
127
  tracking_liquidity?: TrackingLiquidity;
143
128
  receiver_id: string;
144
129
  };
145
- declare function createPayoutsResource(client: InternalApiClient): {
146
- list({ instanceId, params, }: ListPayoutsInput): Promise<BlindpayApiResponse<ListPayoutsResponse>>;
147
- export({ instanceId, params, }: ExportPayoutsInput): Promise<BlindpayApiResponse<ExportPayoutsResponse>>;
148
- get({ instanceId, id }: GetPayoutInput): Promise<BlindpayApiResponse<GetPayoutResponse>>;
149
- getTrack({ id, }: GetPayoutTrackInput): Promise<BlindpayApiResponse<GetPayoutTrackResponse>>;
150
- authorizeStellarToken({ instanceId, ...data }: AuthorizeStellarTokenInput): Promise<BlindpayApiResponse<AuthorizeStellarTokenResponse>>;
151
- createStellar({ instanceId, ...data }: CreateStellarPayoutInput): Promise<BlindpayApiResponse<CreateStellarPayoutResponse>>;
152
- createEvm({ instanceId, ...data }: CreateEvmPayoutInput): Promise<BlindpayApiResponse<CreateEvmPayoutResponse>>;
130
+ declare function createPayoutsResource(instanceId: string, client: InternalApiClient): {
131
+ list(params?: ListPayoutsInput): Promise<BlindpayApiResponse<ListPayoutsResponse>>;
132
+ export(params?: ExportPayoutsInput): Promise<BlindpayApiResponse<ExportPayoutsResponse>>;
133
+ get(payoutId: GetPayoutInput): Promise<BlindpayApiResponse<GetPayoutResponse>>;
134
+ getTrack(payoutId: GetPayoutTrackInput): Promise<BlindpayApiResponse<GetPayoutTrackResponse>>;
135
+ authorizeStellarToken({ ...data }: AuthorizeStellarTokenInput): Promise<BlindpayApiResponse<AuthorizeStellarTokenResponse>>;
136
+ createStellar({ ...data }: CreateStellarPayoutInput): Promise<BlindpayApiResponse<CreateStellarPayoutResponse>>;
137
+ createEvm({ ...data }: CreateEvmPayoutInput): Promise<BlindpayApiResponse<CreateEvmPayoutResponse>>;
153
138
  };
154
139
 
155
140
  export { type AuthorizeStellarTokenInput, type AuthorizeStellarTokenResponse, type CreateEvmPayoutInput, type CreateEvmPayoutResponse, type CreatePayoutInput, type CreateStellarPayoutInput, type CreateStellarPayoutResponse, type ExportPayoutsInput, type ExportPayoutsResponse, type GetPayoutInput, type GetPayoutResponse, type GetPayoutTrackInput, type GetPayoutTrackResponse, type ListPayoutsInput, type ListPayoutsResponse, type Payout, type SpeiProtocol, createPayoutsResource };
@@ -37,52 +37,32 @@ __export(payouts_exports, {
37
37
  createPayoutsResource: () => createPayoutsResource
38
38
  });
39
39
  module.exports = __toCommonJS(payouts_exports);
40
- function createPayoutsResource(client) {
40
+ function createPayoutsResource(instanceId, client) {
41
41
  return {
42
- list({
43
- instanceId,
44
- params
45
- }) {
42
+ list(params) {
46
43
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
47
44
  return client.get(`/instances/${instanceId}/payouts${queryParams}`);
48
45
  },
49
- export({
50
- instanceId,
51
- params
52
- }) {
46
+ export(params) {
53
47
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
54
48
  return client.get(`/instances/${instanceId}/export/payouts${queryParams}`);
55
49
  },
56
- get({ instanceId, id }) {
57
- return client.get(`/instances/${instanceId}/payouts/${id}`);
50
+ get(payoutId) {
51
+ return client.get(`/instances/${instanceId}/payouts/${payoutId}`);
58
52
  },
59
- getTrack({
60
- id
61
- }) {
62
- return client.get(`/e/payouts/${id}`);
53
+ getTrack(payoutId) {
54
+ return client.get(`/e/payouts/${payoutId}`);
63
55
  },
64
56
  authorizeStellarToken(_a) {
65
- var _b = _a, {
66
- instanceId
67
- } = _b, data = __objRest(_b, [
68
- "instanceId"
69
- ]);
57
+ var data = __objRest(_a, []);
70
58
  return client.post(`/instances/${instanceId}/payouts/stellar/authorize`, data);
71
59
  },
72
- createStellar(_c) {
73
- var _d = _c, {
74
- instanceId
75
- } = _d, data = __objRest(_d, [
76
- "instanceId"
77
- ]);
60
+ createStellar(_b) {
61
+ var data = __objRest(_b, []);
78
62
  return client.post(`/instances/${instanceId}/payouts/stellar`, data);
79
63
  },
80
- createEvm(_e) {
81
- var _f = _e, {
82
- instanceId
83
- } = _f, data = __objRest(_f, [
84
- "instanceId"
85
- ]);
64
+ createEvm(_c) {
65
+ var data = __objRest(_c, []);
86
66
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
87
67
  }
88
68
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPayoutsResource,
3
3
  init_payouts
4
- } from "../../chunk-HKFAJXJG.mjs";
4
+ } from "../../chunk-3QQCDR3E.mjs";
5
5
  import "../../chunk-OBKEW4AQ.mjs";
6
6
  init_payouts();
7
7
  export {