@blindpay/node 3.0.0 → 3.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.
- package/dist/{api-client-B7VQkM_4.d.mts → api-client-CIPV5zmo.d.mts} +38 -24
- package/dist/{api-client-B7VQkM_4.d.ts → api-client-CIPV5zmo.d.ts} +38 -24
- package/dist/{chunk-VRA5HP7F.mjs → chunk-E7M4CJKR.mjs} +0 -7
- package/dist/{chunk-WH2VNZE7.mjs → chunk-I4KOWV46.mjs} +8 -8
- package/dist/{chunk-W7NJUABI.mjs → chunk-VGU72ZNI.mjs} +1 -7
- package/dist/{chunk-VBZHAPK7.mjs → chunk-VOB7TMKL.mjs} +1 -9
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -22
- package/dist/index.mjs +8 -8
- package/dist/resources/api-keys/api-keys.test.js +2 -22
- package/dist/resources/api-keys/api-keys.test.mjs +5 -5
- package/dist/resources/api-keys/index.d.mts +1 -1
- package/dist/resources/api-keys/index.d.ts +1 -1
- package/dist/resources/available/available.test.js +2 -22
- package/dist/resources/available/available.test.mjs +5 -5
- package/dist/resources/available/index.d.mts +1 -1
- package/dist/resources/available/index.d.ts +1 -1
- package/dist/resources/bank-accounts/bank-accounts.test.js +2 -22
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +5 -5
- package/dist/resources/bank-accounts/index.d.mts +1 -1
- package/dist/resources/bank-accounts/index.d.ts +1 -1
- package/dist/resources/instances/index.d.mts +1 -1
- package/dist/resources/instances/index.d.ts +1 -1
- package/dist/resources/instances/instances.test.js +2 -22
- package/dist/resources/instances/instances.test.mjs +5 -5
- package/dist/resources/partner-fees/index.d.mts +1 -1
- package/dist/resources/partner-fees/index.d.ts +1 -1
- package/dist/resources/partner-fees/partner-fees.test.js +2 -22
- package/dist/resources/partner-fees/partner-fees.test.mjs +5 -5
- package/dist/resources/payins/index.d.mts +60 -123
- package/dist/resources/payins/index.d.ts +60 -123
- package/dist/resources/payins/index.js +0 -19
- package/dist/resources/payins/index.mjs +1 -1
- package/dist/resources/payins/payins-quotes.test.js +2 -108
- package/dist/resources/payins/payins-quotes.test.mjs +5 -91
- package/dist/resources/payins/payins.test.js +2 -157
- package/dist/resources/payins/payins.test.mjs +5 -140
- package/dist/resources/payins/quotes.d.mts +7 -72
- package/dist/resources/payins/quotes.d.ts +7 -72
- package/dist/resources/payins/quotes.js +0 -7
- package/dist/resources/payins/quotes.mjs +1 -1
- package/dist/resources/payouts/index.d.mts +2 -13
- package/dist/resources/payouts/index.d.ts +2 -13
- package/dist/resources/payouts/index.js +1 -9
- package/dist/resources/payouts/index.mjs +1 -1
- package/dist/resources/payouts/payouts.test.js +2 -148
- package/dist/resources/payouts/payouts.test.mjs +5 -131
- package/dist/resources/quotes/index.d.mts +16 -16
- package/dist/resources/quotes/index.d.ts +16 -16
- package/dist/resources/quotes/quotes.test.js +3 -23
- package/dist/resources/quotes/quotes.test.mjs +6 -6
- package/dist/resources/receivers/index.d.mts +1 -1
- package/dist/resources/receivers/index.d.ts +1 -1
- package/dist/resources/receivers/receivers.test.js +2 -22
- package/dist/resources/receivers/receivers.test.mjs +5 -5
- package/dist/resources/terms-of-service/index.d.mts +1 -1
- package/dist/resources/terms-of-service/index.d.ts +1 -1
- package/dist/resources/terms-of-service/terms-of-service.test.js +2 -22
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +5 -5
- package/dist/resources/virtual-accounts/index.d.mts +1 -1
- package/dist/resources/virtual-accounts/index.d.ts +1 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +2 -22
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +5 -5
- package/dist/resources/wallets/blockchain.d.mts +1 -1
- package/dist/resources/wallets/blockchain.d.ts +1 -1
- package/dist/resources/wallets/blockchain.test.js +2 -22
- package/dist/resources/wallets/blockchain.test.mjs +5 -5
- package/dist/resources/wallets/offramp.d.mts +1 -1
- package/dist/resources/wallets/offramp.d.ts +1 -1
- package/dist/resources/wallets/offramp.test.js +2 -22
- package/dist/resources/wallets/offramp.test.mjs +5 -5
- package/dist/resources/webhooks/index.d.mts +1 -1
- package/dist/resources/webhooks/index.d.ts +1 -1
- package/dist/resources/webhooks/webhooks.test.js +2 -22
- package/dist/resources/webhooks/webhooks.test.mjs +5 -5
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, P as PaginationParams, B as BlindpayApiResponse, T as TransactionStatus,
|
|
1
|
+
import { I as InternalApiClient, P as PaginationParams, B as BlindpayApiResponse, T as TransactionStatus, m as PayoutTrackingTransaction, n as PayoutTrackingPayment, o as PayoutTrackingLiquidity, p as PayoutTrackingComplete, q as PayoutTrackingPartnerFee, N as Network, S as StablecoinToken, i as Currency, r as TransactionDocumentType, R as Rail, C as Country, A as AccountClass, a as BankAccountType, k as PaginationMetadata } from '../../api-client-CIPV5zmo.mjs';
|
|
2
2
|
|
|
3
3
|
type SpeiProtocol = "clabe" | "debitcard" | "phonenum";
|
|
4
4
|
type Payout = {
|
|
@@ -87,8 +87,6 @@ type GetPayoutInput = string;
|
|
|
87
87
|
type GetPayoutResponse = Payout;
|
|
88
88
|
type GetPayoutTrackInput = string;
|
|
89
89
|
type GetPayoutTrackResponse = Payout;
|
|
90
|
-
type ExportPayoutsInput = Pick<PaginationParams, "limit" | "offset">;
|
|
91
|
-
type ExportPayoutsResponse = Payout[];
|
|
92
90
|
type AuthorizeStellarTokenInput = {
|
|
93
91
|
quote_id: string;
|
|
94
92
|
sender_wallet_address: string;
|
|
@@ -127,13 +125,6 @@ type CreateEvmPayoutResponse = {
|
|
|
127
125
|
tracking_liquidity?: PayoutTrackingLiquidity;
|
|
128
126
|
receiver_id: string;
|
|
129
127
|
};
|
|
130
|
-
type AuthorizeSolanaInput = {
|
|
131
|
-
quote_id: string;
|
|
132
|
-
sender_wallet_address: string;
|
|
133
|
-
};
|
|
134
|
-
type AuthorizeSolanaResponse = {
|
|
135
|
-
serialized_transaction: string;
|
|
136
|
-
};
|
|
137
128
|
type CreateSolanaPayoutInput = {
|
|
138
129
|
quote_id: string;
|
|
139
130
|
sender_wallet_address: string;
|
|
@@ -152,14 +143,12 @@ type CreateSolanaPayoutResponse = {
|
|
|
152
143
|
};
|
|
153
144
|
declare function createPayoutsResource(instanceId: string, client: InternalApiClient): {
|
|
154
145
|
list(params?: ListPayoutsInput): Promise<BlindpayApiResponse<ListPayoutsResponse>>;
|
|
155
|
-
export(params?: ExportPayoutsInput): Promise<BlindpayApiResponse<ExportPayoutsResponse>>;
|
|
156
146
|
get(payoutId: GetPayoutInput): Promise<BlindpayApiResponse<GetPayoutResponse>>;
|
|
157
147
|
getTrack(payoutId: GetPayoutTrackInput): Promise<BlindpayApiResponse<GetPayoutTrackResponse>>;
|
|
158
148
|
authorizeStellarToken({ ...data }: AuthorizeStellarTokenInput): Promise<BlindpayApiResponse<AuthorizeStellarTokenResponse>>;
|
|
159
149
|
createStellar({ ...data }: CreateStellarPayoutInput): Promise<BlindpayApiResponse<CreateStellarPayoutResponse>>;
|
|
160
150
|
createEvm({ ...data }: CreateEvmPayoutInput): Promise<BlindpayApiResponse<CreateEvmPayoutResponse>>;
|
|
161
|
-
authorizeSolana({ ...data }: AuthorizeSolanaInput): Promise<BlindpayApiResponse<AuthorizeSolanaResponse>>;
|
|
162
151
|
createSolana({ ...data }: CreateSolanaPayoutInput): Promise<BlindpayApiResponse<CreateSolanaPayoutResponse>>;
|
|
163
152
|
};
|
|
164
153
|
|
|
165
|
-
export { type
|
|
154
|
+
export { type AuthorizeStellarTokenInput, type AuthorizeStellarTokenResponse, type CreateEvmPayoutInput, type CreateEvmPayoutResponse, type CreatePayoutInput, type CreateSolanaPayoutInput, type CreateSolanaPayoutResponse, type CreateStellarPayoutInput, type CreateStellarPayoutResponse, type GetPayoutInput, type GetPayoutResponse, type GetPayoutTrackInput, type GetPayoutTrackResponse, type ListPayoutsInput, type ListPayoutsResponse, type Payout, type SpeiProtocol, createPayoutsResource };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, P as PaginationParams, B as BlindpayApiResponse, T as TransactionStatus,
|
|
1
|
+
import { I as InternalApiClient, P as PaginationParams, B as BlindpayApiResponse, T as TransactionStatus, m as PayoutTrackingTransaction, n as PayoutTrackingPayment, o as PayoutTrackingLiquidity, p as PayoutTrackingComplete, q as PayoutTrackingPartnerFee, N as Network, S as StablecoinToken, i as Currency, r as TransactionDocumentType, R as Rail, C as Country, A as AccountClass, a as BankAccountType, k as PaginationMetadata } from '../../api-client-CIPV5zmo.js';
|
|
2
2
|
|
|
3
3
|
type SpeiProtocol = "clabe" | "debitcard" | "phonenum";
|
|
4
4
|
type Payout = {
|
|
@@ -87,8 +87,6 @@ type GetPayoutInput = string;
|
|
|
87
87
|
type GetPayoutResponse = Payout;
|
|
88
88
|
type GetPayoutTrackInput = string;
|
|
89
89
|
type GetPayoutTrackResponse = Payout;
|
|
90
|
-
type ExportPayoutsInput = Pick<PaginationParams, "limit" | "offset">;
|
|
91
|
-
type ExportPayoutsResponse = Payout[];
|
|
92
90
|
type AuthorizeStellarTokenInput = {
|
|
93
91
|
quote_id: string;
|
|
94
92
|
sender_wallet_address: string;
|
|
@@ -127,13 +125,6 @@ type CreateEvmPayoutResponse = {
|
|
|
127
125
|
tracking_liquidity?: PayoutTrackingLiquidity;
|
|
128
126
|
receiver_id: string;
|
|
129
127
|
};
|
|
130
|
-
type AuthorizeSolanaInput = {
|
|
131
|
-
quote_id: string;
|
|
132
|
-
sender_wallet_address: string;
|
|
133
|
-
};
|
|
134
|
-
type AuthorizeSolanaResponse = {
|
|
135
|
-
serialized_transaction: string;
|
|
136
|
-
};
|
|
137
128
|
type CreateSolanaPayoutInput = {
|
|
138
129
|
quote_id: string;
|
|
139
130
|
sender_wallet_address: string;
|
|
@@ -152,14 +143,12 @@ type CreateSolanaPayoutResponse = {
|
|
|
152
143
|
};
|
|
153
144
|
declare function createPayoutsResource(instanceId: string, client: InternalApiClient): {
|
|
154
145
|
list(params?: ListPayoutsInput): Promise<BlindpayApiResponse<ListPayoutsResponse>>;
|
|
155
|
-
export(params?: ExportPayoutsInput): Promise<BlindpayApiResponse<ExportPayoutsResponse>>;
|
|
156
146
|
get(payoutId: GetPayoutInput): Promise<BlindpayApiResponse<GetPayoutResponse>>;
|
|
157
147
|
getTrack(payoutId: GetPayoutTrackInput): Promise<BlindpayApiResponse<GetPayoutTrackResponse>>;
|
|
158
148
|
authorizeStellarToken({ ...data }: AuthorizeStellarTokenInput): Promise<BlindpayApiResponse<AuthorizeStellarTokenResponse>>;
|
|
159
149
|
createStellar({ ...data }: CreateStellarPayoutInput): Promise<BlindpayApiResponse<CreateStellarPayoutResponse>>;
|
|
160
150
|
createEvm({ ...data }: CreateEvmPayoutInput): Promise<BlindpayApiResponse<CreateEvmPayoutResponse>>;
|
|
161
|
-
authorizeSolana({ ...data }: AuthorizeSolanaInput): Promise<BlindpayApiResponse<AuthorizeSolanaResponse>>;
|
|
162
151
|
createSolana({ ...data }: CreateSolanaPayoutInput): Promise<BlindpayApiResponse<CreateSolanaPayoutResponse>>;
|
|
163
152
|
};
|
|
164
153
|
|
|
165
|
-
export { type
|
|
154
|
+
export { type AuthorizeStellarTokenInput, type AuthorizeStellarTokenResponse, type CreateEvmPayoutInput, type CreateEvmPayoutResponse, type CreatePayoutInput, type CreateSolanaPayoutInput, type CreateSolanaPayoutResponse, type CreateStellarPayoutInput, type CreateStellarPayoutResponse, type GetPayoutInput, type GetPayoutResponse, type GetPayoutTrackInput, type GetPayoutTrackResponse, type ListPayoutsInput, type ListPayoutsResponse, type Payout, type SpeiProtocol, createPayoutsResource };
|
|
@@ -43,10 +43,6 @@ function createPayoutsResource(instanceId, client) {
|
|
|
43
43
|
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
44
44
|
return client.get(`/instances/${instanceId}/payouts${queryParams}`);
|
|
45
45
|
},
|
|
46
|
-
export(params) {
|
|
47
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
48
|
-
return client.get(`/instances/${instanceId}/export/payouts${queryParams}`);
|
|
49
|
-
},
|
|
50
46
|
get(payoutId) {
|
|
51
47
|
return client.get(`/instances/${instanceId}/payouts/${payoutId}`);
|
|
52
48
|
},
|
|
@@ -65,12 +61,8 @@ function createPayoutsResource(instanceId, client) {
|
|
|
65
61
|
var data = __objRest(_c, []);
|
|
66
62
|
return client.post(`/instances/${instanceId}/payouts/evm`, data);
|
|
67
63
|
},
|
|
68
|
-
|
|
64
|
+
createSolana(_d) {
|
|
69
65
|
var data = __objRest(_d, []);
|
|
70
|
-
return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
|
|
71
|
-
},
|
|
72
|
-
createSolana(_e) {
|
|
73
|
-
var data = __objRest(_e, []);
|
|
74
66
|
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
75
67
|
}
|
|
76
68
|
};
|
|
@@ -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 = "3.
|
|
18705
|
+
var version = "3.1.1";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18905,11 +18905,6 @@ function createPayinsResource(instanceId, client) {
|
|
|
18905
18905
|
getTrack(payinId) {
|
|
18906
18906
|
return client.get(`/e/payins/${payinId}`);
|
|
18907
18907
|
},
|
|
18908
|
-
export(_a3) {
|
|
18909
|
-
var params = __objRest(_a3, []);
|
|
18910
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18911
|
-
return client.get(`/instances/${instanceId}/export/payins${queryParams}`);
|
|
18912
|
-
},
|
|
18913
18908
|
createEvm(payin_quote_id) {
|
|
18914
18909
|
return client.post(`/instances/${instanceId}/payins/evm`, {
|
|
18915
18910
|
payin_quote_id
|
|
@@ -18928,13 +18923,6 @@ function createPayinQuotesResource(instanceId, client) {
|
|
|
18928
18923
|
getFxRate(_b) {
|
|
18929
18924
|
var data = __objRest(_b, []);
|
|
18930
18925
|
return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
|
|
18931
|
-
},
|
|
18932
|
-
get(id) {
|
|
18933
|
-
return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
|
|
18934
|
-
},
|
|
18935
|
-
list(params) {
|
|
18936
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18937
|
-
return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
|
|
18938
18926
|
}
|
|
18939
18927
|
};
|
|
18940
18928
|
}
|
|
@@ -18946,10 +18934,6 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18946
18934
|
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18947
18935
|
return client.get(`/instances/${instanceId}/payouts${queryParams}`);
|
|
18948
18936
|
},
|
|
18949
|
-
export(params) {
|
|
18950
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18951
|
-
return client.get(`/instances/${instanceId}/export/payouts${queryParams}`);
|
|
18952
|
-
},
|
|
18953
18937
|
get(payoutId) {
|
|
18954
18938
|
return client.get(`/instances/${instanceId}/payouts/${payoutId}`);
|
|
18955
18939
|
},
|
|
@@ -18968,12 +18952,8 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18968
18952
|
var data = __objRest(_c, []);
|
|
18969
18953
|
return client.post(`/instances/${instanceId}/payouts/evm`, data);
|
|
18970
18954
|
},
|
|
18971
|
-
|
|
18955
|
+
createSolana(_d) {
|
|
18972
18956
|
var data = __objRest(_d, []);
|
|
18973
|
-
return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
|
|
18974
|
-
},
|
|
18975
|
-
createSolana(_e) {
|
|
18976
|
-
var data = __objRest(_e, []);
|
|
18977
18957
|
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
18978
18958
|
}
|
|
18979
18959
|
};
|
|
@@ -19613,116 +19593,6 @@ describe("Payouts", () => {
|
|
|
19613
19593
|
globalExpect(data).toEqual(mockedPayout);
|
|
19614
19594
|
}));
|
|
19615
19595
|
});
|
|
19616
|
-
describe("Export payouts", () => {
|
|
19617
|
-
it("should export payouts", () => __async(null, null, function* () {
|
|
19618
|
-
const mockedExportPayouts = [
|
|
19619
|
-
{
|
|
19620
|
-
receiver_id: "re_000000000000",
|
|
19621
|
-
id: "pa_000000000000",
|
|
19622
|
-
status: "processing",
|
|
19623
|
-
sender_wallet_address: "0x123...890",
|
|
19624
|
-
signed_transaction: "AAA...Zey8y0A",
|
|
19625
|
-
quote_id: "qu_000000000000",
|
|
19626
|
-
instance_id: "in_000000000000",
|
|
19627
|
-
tracking_transaction: {
|
|
19628
|
-
step: "processing",
|
|
19629
|
-
status: "failed",
|
|
19630
|
-
transaction_hash: "0x123...890",
|
|
19631
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19632
|
-
},
|
|
19633
|
-
tracking_payment: {
|
|
19634
|
-
step: "on_hold",
|
|
19635
|
-
provider_name: "blockchain",
|
|
19636
|
-
provider_transaction_id: "0x123...890",
|
|
19637
|
-
provider_status: "canceled",
|
|
19638
|
-
recipient_name: "John Doe",
|
|
19639
|
-
recipient_tax_id: "123.456.789-10",
|
|
19640
|
-
recipient_bank_code: "00416968",
|
|
19641
|
-
recipient_branch_code: "0001",
|
|
19642
|
-
recipient_account_number: "1234567890",
|
|
19643
|
-
recipient_account_type: "checking",
|
|
19644
|
-
estimated_time_of_arrival: "5_min",
|
|
19645
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19646
|
-
},
|
|
19647
|
-
tracking_liquidity: {
|
|
19648
|
-
step: "processing",
|
|
19649
|
-
provider_transaction_id: "0x123...890",
|
|
19650
|
-
provider_status: "deposited",
|
|
19651
|
-
estimated_time_of_arrival: "1_business_day",
|
|
19652
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19653
|
-
},
|
|
19654
|
-
tracking_complete: {
|
|
19655
|
-
step: "on_hold",
|
|
19656
|
-
status: "tokens_refunded",
|
|
19657
|
-
transaction_hash: "0x123...890",
|
|
19658
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19659
|
-
},
|
|
19660
|
-
tracking_partner_fee: {
|
|
19661
|
-
step: "on_hold",
|
|
19662
|
-
transaction_hash: "0x123...890",
|
|
19663
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19664
|
-
},
|
|
19665
|
-
created_at: "2021-01-01T00:00:00Z",
|
|
19666
|
-
updated_at: "2021-01-01T00:00:00Z",
|
|
19667
|
-
image_url: "https://example.com/image.png",
|
|
19668
|
-
first_name: "John",
|
|
19669
|
-
last_name: "Doe",
|
|
19670
|
-
legal_name: "Company Name Inc.",
|
|
19671
|
-
network: "sepolia",
|
|
19672
|
-
token: "USDC",
|
|
19673
|
-
description: "Memo code or description, only works with USD and BRL",
|
|
19674
|
-
sender_amount: 1010,
|
|
19675
|
-
receiver_amount: 5240,
|
|
19676
|
-
partner_fee_amount: 150,
|
|
19677
|
-
commercial_quotation: 495,
|
|
19678
|
-
blindpay_quotation: 485,
|
|
19679
|
-
total_fee_amount: 1.5,
|
|
19680
|
-
receiver_local_amount: 1e3,
|
|
19681
|
-
currency: "BRL",
|
|
19682
|
-
transaction_document_file: "https://example.com/image.png",
|
|
19683
|
-
transaction_document_type: "invoice",
|
|
19684
|
-
transaction_document_id: "1234567890",
|
|
19685
|
-
name: "Bank Account Name",
|
|
19686
|
-
type: "wire",
|
|
19687
|
-
pix_key: "14947677768",
|
|
19688
|
-
account_number: "1001001234",
|
|
19689
|
-
routing_number: "012345678",
|
|
19690
|
-
country: "US",
|
|
19691
|
-
account_class: "individual",
|
|
19692
|
-
address_line_1: "Address line 1",
|
|
19693
|
-
address_line_2: "Address line 2",
|
|
19694
|
-
city: "City",
|
|
19695
|
-
state_province_region: "State/Province/Region",
|
|
19696
|
-
postal_code: "Postal code",
|
|
19697
|
-
account_type: "checking",
|
|
19698
|
-
ach_cop_beneficiary_first_name: "Fernando",
|
|
19699
|
-
ach_cop_bank_account: "12345678",
|
|
19700
|
-
ach_cop_bank_code: "051",
|
|
19701
|
-
ach_cop_beneficiary_last_name: "Guzman Alarc\xF3n",
|
|
19702
|
-
ach_cop_document_id: "1661105408",
|
|
19703
|
-
ach_cop_document_type: "CC",
|
|
19704
|
-
ach_cop_email: "fernando.guzman@gmail.com",
|
|
19705
|
-
beneficiary_name: "Individual full name or business name",
|
|
19706
|
-
spei_clabe: "5482347403740546",
|
|
19707
|
-
spei_protocol: "clabe",
|
|
19708
|
-
spei_institution_code: "40002",
|
|
19709
|
-
swift_beneficiary_country: "MX",
|
|
19710
|
-
swift_code_bic: "123456789",
|
|
19711
|
-
swift_account_holder_name: "John Doe",
|
|
19712
|
-
swift_account_number_iban: "123456789",
|
|
19713
|
-
transfers_account: "BM123123123123",
|
|
19714
|
-
transfers_type: "CVU",
|
|
19715
|
-
has_virtual_account: true
|
|
19716
|
-
}
|
|
19717
|
-
];
|
|
19718
|
-
fetchMock.mockResponseOnce(JSON.stringify(mockedExportPayouts), {
|
|
19719
|
-
headers: { "Content-Type": "application/json" }
|
|
19720
|
-
});
|
|
19721
|
-
const { data, error } = yield blindpay.payouts.export();
|
|
19722
|
-
globalExpect(error).toBeNull();
|
|
19723
|
-
globalExpect(data).toEqual(mockedExportPayouts);
|
|
19724
|
-
}));
|
|
19725
|
-
});
|
|
19726
19596
|
describe("Get payout track", () => {
|
|
19727
19597
|
it("should get payout tracking information", () => __async(null, null, function* () {
|
|
19728
19598
|
const mockedPayoutTrack = {
|
|
@@ -19961,22 +19831,6 @@ describe("Payouts", () => {
|
|
|
19961
19831
|
globalExpect(data).toEqual(mockedEvmPayout);
|
|
19962
19832
|
}));
|
|
19963
19833
|
});
|
|
19964
|
-
describe("Authorize solana", () => {
|
|
19965
|
-
it("should authorize solana transaction", () => __async(null, null, function* () {
|
|
19966
|
-
const mockedAuthorizeSolana = {
|
|
19967
|
-
serialized_transaction: "AAA...Zey8y0A"
|
|
19968
|
-
};
|
|
19969
|
-
fetchMock.mockResponseOnce(JSON.stringify(mockedAuthorizeSolana), {
|
|
19970
|
-
headers: { "Content-Type": "application/json" }
|
|
19971
|
-
});
|
|
19972
|
-
const { data, error } = yield blindpay.payouts.authorizeSolana({
|
|
19973
|
-
quote_id: "qu_000000000000",
|
|
19974
|
-
sender_wallet_address: "0x123...890"
|
|
19975
|
-
});
|
|
19976
|
-
globalExpect(error).toBeNull();
|
|
19977
|
-
globalExpect(data).toEqual(mockedAuthorizeSolana);
|
|
19978
|
-
}));
|
|
19979
|
-
});
|
|
19980
19834
|
describe("Create solana payout", () => {
|
|
19981
19835
|
it("should create a solana payout", () => __async(null, null, function* () {
|
|
19982
19836
|
const mockedSolanaPayout = {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-I4KOWV46.mjs";
|
|
12
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
14
|
import "../../chunk-UC57SCKQ.mjs";
|
|
@@ -17,12 +17,12 @@ import "../../chunk-67XECGMJ.mjs";
|
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
18
|
import "../../chunk-LEPGLH7Q.mjs";
|
|
19
19
|
import "../../chunk-RC5NN5UF.mjs";
|
|
20
|
-
import "../../chunk-
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
20
|
+
import "../../chunk-VGU72ZNI.mjs";
|
|
21
|
+
import "../../chunk-E7M4CJKR.mjs";
|
|
22
|
+
import "../../chunk-VOB7TMKL.mjs";
|
|
23
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
-
import "../../chunk-CPOSU35L.mjs";
|
|
25
24
|
import "../../chunk-U7CKUUO7.mjs";
|
|
25
|
+
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
28
28
|
__async,
|
|
@@ -262,116 +262,6 @@ var require_payouts_test = __commonJS({
|
|
|
262
262
|
globalExpect(data).toEqual(mockedPayout);
|
|
263
263
|
}));
|
|
264
264
|
});
|
|
265
|
-
describe("Export payouts", () => {
|
|
266
|
-
it("should export payouts", () => __async(null, null, function* () {
|
|
267
|
-
const mockedExportPayouts = [
|
|
268
|
-
{
|
|
269
|
-
receiver_id: "re_000000000000",
|
|
270
|
-
id: "pa_000000000000",
|
|
271
|
-
status: "processing",
|
|
272
|
-
sender_wallet_address: "0x123...890",
|
|
273
|
-
signed_transaction: "AAA...Zey8y0A",
|
|
274
|
-
quote_id: "qu_000000000000",
|
|
275
|
-
instance_id: "in_000000000000",
|
|
276
|
-
tracking_transaction: {
|
|
277
|
-
step: "processing",
|
|
278
|
-
status: "failed",
|
|
279
|
-
transaction_hash: "0x123...890",
|
|
280
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
281
|
-
},
|
|
282
|
-
tracking_payment: {
|
|
283
|
-
step: "on_hold",
|
|
284
|
-
provider_name: "blockchain",
|
|
285
|
-
provider_transaction_id: "0x123...890",
|
|
286
|
-
provider_status: "canceled",
|
|
287
|
-
recipient_name: "John Doe",
|
|
288
|
-
recipient_tax_id: "123.456.789-10",
|
|
289
|
-
recipient_bank_code: "00416968",
|
|
290
|
-
recipient_branch_code: "0001",
|
|
291
|
-
recipient_account_number: "1234567890",
|
|
292
|
-
recipient_account_type: "checking",
|
|
293
|
-
estimated_time_of_arrival: "5_min",
|
|
294
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
295
|
-
},
|
|
296
|
-
tracking_liquidity: {
|
|
297
|
-
step: "processing",
|
|
298
|
-
provider_transaction_id: "0x123...890",
|
|
299
|
-
provider_status: "deposited",
|
|
300
|
-
estimated_time_of_arrival: "1_business_day",
|
|
301
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
302
|
-
},
|
|
303
|
-
tracking_complete: {
|
|
304
|
-
step: "on_hold",
|
|
305
|
-
status: "tokens_refunded",
|
|
306
|
-
transaction_hash: "0x123...890",
|
|
307
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
308
|
-
},
|
|
309
|
-
tracking_partner_fee: {
|
|
310
|
-
step: "on_hold",
|
|
311
|
-
transaction_hash: "0x123...890",
|
|
312
|
-
completed_at: "2011-10-05T14:48:00.000Z"
|
|
313
|
-
},
|
|
314
|
-
created_at: "2021-01-01T00:00:00Z",
|
|
315
|
-
updated_at: "2021-01-01T00:00:00Z",
|
|
316
|
-
image_url: "https://example.com/image.png",
|
|
317
|
-
first_name: "John",
|
|
318
|
-
last_name: "Doe",
|
|
319
|
-
legal_name: "Company Name Inc.",
|
|
320
|
-
network: "sepolia",
|
|
321
|
-
token: "USDC",
|
|
322
|
-
description: "Memo code or description, only works with USD and BRL",
|
|
323
|
-
sender_amount: 1010,
|
|
324
|
-
receiver_amount: 5240,
|
|
325
|
-
partner_fee_amount: 150,
|
|
326
|
-
commercial_quotation: 495,
|
|
327
|
-
blindpay_quotation: 485,
|
|
328
|
-
total_fee_amount: 1.5,
|
|
329
|
-
receiver_local_amount: 1e3,
|
|
330
|
-
currency: "BRL",
|
|
331
|
-
transaction_document_file: "https://example.com/image.png",
|
|
332
|
-
transaction_document_type: "invoice",
|
|
333
|
-
transaction_document_id: "1234567890",
|
|
334
|
-
name: "Bank Account Name",
|
|
335
|
-
type: "wire",
|
|
336
|
-
pix_key: "14947677768",
|
|
337
|
-
account_number: "1001001234",
|
|
338
|
-
routing_number: "012345678",
|
|
339
|
-
country: "US",
|
|
340
|
-
account_class: "individual",
|
|
341
|
-
address_line_1: "Address line 1",
|
|
342
|
-
address_line_2: "Address line 2",
|
|
343
|
-
city: "City",
|
|
344
|
-
state_province_region: "State/Province/Region",
|
|
345
|
-
postal_code: "Postal code",
|
|
346
|
-
account_type: "checking",
|
|
347
|
-
ach_cop_beneficiary_first_name: "Fernando",
|
|
348
|
-
ach_cop_bank_account: "12345678",
|
|
349
|
-
ach_cop_bank_code: "051",
|
|
350
|
-
ach_cop_beneficiary_last_name: "Guzman Alarc\xF3n",
|
|
351
|
-
ach_cop_document_id: "1661105408",
|
|
352
|
-
ach_cop_document_type: "CC",
|
|
353
|
-
ach_cop_email: "fernando.guzman@gmail.com",
|
|
354
|
-
beneficiary_name: "Individual full name or business name",
|
|
355
|
-
spei_clabe: "5482347403740546",
|
|
356
|
-
spei_protocol: "clabe",
|
|
357
|
-
spei_institution_code: "40002",
|
|
358
|
-
swift_beneficiary_country: "MX",
|
|
359
|
-
swift_code_bic: "123456789",
|
|
360
|
-
swift_account_holder_name: "John Doe",
|
|
361
|
-
swift_account_number_iban: "123456789",
|
|
362
|
-
transfers_account: "BM123123123123",
|
|
363
|
-
transfers_type: "CVU",
|
|
364
|
-
has_virtual_account: true
|
|
365
|
-
}
|
|
366
|
-
];
|
|
367
|
-
fetchMock.mockResponseOnce(JSON.stringify(mockedExportPayouts), {
|
|
368
|
-
headers: { "Content-Type": "application/json" }
|
|
369
|
-
});
|
|
370
|
-
const { data, error } = yield blindpay.payouts.export();
|
|
371
|
-
globalExpect(error).toBeNull();
|
|
372
|
-
globalExpect(data).toEqual(mockedExportPayouts);
|
|
373
|
-
}));
|
|
374
|
-
});
|
|
375
265
|
describe("Get payout track", () => {
|
|
376
266
|
it("should get payout tracking information", () => __async(null, null, function* () {
|
|
377
267
|
const mockedPayoutTrack = {
|
|
@@ -610,22 +500,6 @@ var require_payouts_test = __commonJS({
|
|
|
610
500
|
globalExpect(data).toEqual(mockedEvmPayout);
|
|
611
501
|
}));
|
|
612
502
|
});
|
|
613
|
-
describe("Authorize solana", () => {
|
|
614
|
-
it("should authorize solana transaction", () => __async(null, null, function* () {
|
|
615
|
-
const mockedAuthorizeSolana = {
|
|
616
|
-
serialized_transaction: "AAA...Zey8y0A"
|
|
617
|
-
};
|
|
618
|
-
fetchMock.mockResponseOnce(JSON.stringify(mockedAuthorizeSolana), {
|
|
619
|
-
headers: { "Content-Type": "application/json" }
|
|
620
|
-
});
|
|
621
|
-
const { data, error } = yield blindpay.payouts.authorizeSolana({
|
|
622
|
-
quote_id: "qu_000000000000",
|
|
623
|
-
sender_wallet_address: "0x123...890"
|
|
624
|
-
});
|
|
625
|
-
globalExpect(error).toBeNull();
|
|
626
|
-
globalExpect(data).toEqual(mockedAuthorizeSolana);
|
|
627
|
-
}));
|
|
628
|
-
});
|
|
629
503
|
describe("Create solana payout", () => {
|
|
630
504
|
it("should create a solana payout", () => __async(null, null, function* () {
|
|
631
505
|
const mockedSolanaPayout = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { I as InternalApiClient,
|
|
1
|
+
import { I as InternalApiClient, l as CurrencyType, N as Network, S as StablecoinToken, r as TransactionDocumentType, B as BlindpayApiResponse, i as Currency } from '../../api-client-CIPV5zmo.mjs';
|
|
2
2
|
|
|
3
3
|
type CreateQuoteInput = {
|
|
4
4
|
bank_account_id: string;
|
|
5
5
|
currency_type: CurrencyType;
|
|
6
|
-
|
|
6
|
+
cover_fees: boolean;
|
|
7
7
|
request_amount: number;
|
|
8
|
+
network: Network;
|
|
8
9
|
token?: StablecoinToken | null;
|
|
9
|
-
cover_fees: boolean | null;
|
|
10
10
|
description?: string | null;
|
|
11
|
-
partner_fee_id
|
|
11
|
+
partner_fee_id?: string | null;
|
|
12
12
|
transaction_document_file: string | null;
|
|
13
|
-
transaction_document_id
|
|
14
|
-
transaction_document_type
|
|
13
|
+
transaction_document_id?: string | null;
|
|
14
|
+
transaction_document_type?: TransactionDocumentType | null;
|
|
15
15
|
};
|
|
16
16
|
type CreateQuoteResponse = {
|
|
17
17
|
id: string;
|
|
@@ -20,33 +20,33 @@ type CreateQuoteResponse = {
|
|
|
20
20
|
blindpay_quotation: number;
|
|
21
21
|
receiver_amount: number;
|
|
22
22
|
sender_amount: number;
|
|
23
|
-
partner_fee_amount
|
|
24
|
-
flat_fee
|
|
25
|
-
contract
|
|
23
|
+
partner_fee_amount?: number | null;
|
|
24
|
+
flat_fee?: number | null;
|
|
25
|
+
contract?: {
|
|
26
26
|
abi: Record<string, unknown>[];
|
|
27
27
|
address: string;
|
|
28
|
-
functionName:
|
|
28
|
+
functionName: "approve";
|
|
29
29
|
blindpayContractAddress: string;
|
|
30
30
|
amount: string;
|
|
31
31
|
network: {
|
|
32
32
|
name: string;
|
|
33
33
|
chainId: number;
|
|
34
34
|
};
|
|
35
|
-
};
|
|
36
|
-
receiver_local_amount
|
|
37
|
-
description
|
|
35
|
+
} | null;
|
|
36
|
+
receiver_local_amount?: number | null;
|
|
37
|
+
description?: string | null;
|
|
38
38
|
};
|
|
39
39
|
type GetFxRateInput = {
|
|
40
40
|
currency_type: CurrencyType;
|
|
41
|
-
from:
|
|
42
|
-
to: Currency
|
|
41
|
+
from: StablecoinToken;
|
|
42
|
+
to: Extract<Currency, "BRL" | "USD" | "MXN" | "COP" | "ARS">;
|
|
43
43
|
request_amount: number;
|
|
44
44
|
};
|
|
45
45
|
type GetFxRateResponse = {
|
|
46
46
|
commercial_quotation: number;
|
|
47
47
|
blindpay_quotation: number;
|
|
48
48
|
result_amount: number;
|
|
49
|
-
instance_flat_fee
|
|
49
|
+
instance_flat_fee?: number | null;
|
|
50
50
|
instance_percentage_fee: number;
|
|
51
51
|
};
|
|
52
52
|
declare function createQuotesResource(instanceId: string, client: InternalApiClient): {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { I as InternalApiClient,
|
|
1
|
+
import { I as InternalApiClient, l as CurrencyType, N as Network, S as StablecoinToken, r as TransactionDocumentType, B as BlindpayApiResponse, i as Currency } from '../../api-client-CIPV5zmo.js';
|
|
2
2
|
|
|
3
3
|
type CreateQuoteInput = {
|
|
4
4
|
bank_account_id: string;
|
|
5
5
|
currency_type: CurrencyType;
|
|
6
|
-
|
|
6
|
+
cover_fees: boolean;
|
|
7
7
|
request_amount: number;
|
|
8
|
+
network: Network;
|
|
8
9
|
token?: StablecoinToken | null;
|
|
9
|
-
cover_fees: boolean | null;
|
|
10
10
|
description?: string | null;
|
|
11
|
-
partner_fee_id
|
|
11
|
+
partner_fee_id?: string | null;
|
|
12
12
|
transaction_document_file: string | null;
|
|
13
|
-
transaction_document_id
|
|
14
|
-
transaction_document_type
|
|
13
|
+
transaction_document_id?: string | null;
|
|
14
|
+
transaction_document_type?: TransactionDocumentType | null;
|
|
15
15
|
};
|
|
16
16
|
type CreateQuoteResponse = {
|
|
17
17
|
id: string;
|
|
@@ -20,33 +20,33 @@ type CreateQuoteResponse = {
|
|
|
20
20
|
blindpay_quotation: number;
|
|
21
21
|
receiver_amount: number;
|
|
22
22
|
sender_amount: number;
|
|
23
|
-
partner_fee_amount
|
|
24
|
-
flat_fee
|
|
25
|
-
contract
|
|
23
|
+
partner_fee_amount?: number | null;
|
|
24
|
+
flat_fee?: number | null;
|
|
25
|
+
contract?: {
|
|
26
26
|
abi: Record<string, unknown>[];
|
|
27
27
|
address: string;
|
|
28
|
-
functionName:
|
|
28
|
+
functionName: "approve";
|
|
29
29
|
blindpayContractAddress: string;
|
|
30
30
|
amount: string;
|
|
31
31
|
network: {
|
|
32
32
|
name: string;
|
|
33
33
|
chainId: number;
|
|
34
34
|
};
|
|
35
|
-
};
|
|
36
|
-
receiver_local_amount
|
|
37
|
-
description
|
|
35
|
+
} | null;
|
|
36
|
+
receiver_local_amount?: number | null;
|
|
37
|
+
description?: string | null;
|
|
38
38
|
};
|
|
39
39
|
type GetFxRateInput = {
|
|
40
40
|
currency_type: CurrencyType;
|
|
41
|
-
from:
|
|
42
|
-
to: Currency
|
|
41
|
+
from: StablecoinToken;
|
|
42
|
+
to: Extract<Currency, "BRL" | "USD" | "MXN" | "COP" | "ARS">;
|
|
43
43
|
request_amount: number;
|
|
44
44
|
};
|
|
45
45
|
type GetFxRateResponse = {
|
|
46
46
|
commercial_quotation: number;
|
|
47
47
|
blindpay_quotation: number;
|
|
48
48
|
result_amount: number;
|
|
49
|
-
instance_flat_fee
|
|
49
|
+
instance_flat_fee?: number | null;
|
|
50
50
|
instance_percentage_fee: number;
|
|
51
51
|
};
|
|
52
52
|
declare function createQuotesResource(instanceId: string, client: InternalApiClient): {
|