@blindpay/node 2.5.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-client-Drd7alfK.d.mts → api-client-B7VQkM_4.d.mts} +94 -33
- package/dist/{api-client-Drd7alfK.d.ts → api-client-B7VQkM_4.d.ts} +94 -33
- package/dist/{chunk-5XJJKYXE.mjs → chunk-LEPGLH7Q.mjs} +20 -10
- package/dist/{chunk-3QQCDR3E.mjs → chunk-VBZHAPK7.mjs} +8 -0
- package/dist/{chunk-CEJF5Y4K.mjs → chunk-WH2VNZE7.mjs} +11 -11
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +29 -11
- package/dist/index.mjs +11 -11
- package/dist/resources/api-keys/api-keys.test.js +29 -11
- 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 +29 -11
- 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 +29 -11
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +5 -5
- package/dist/resources/bank-accounts/index.d.mts +2 -4
- package/dist/resources/bank-accounts/index.d.ts +2 -4
- 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 +29 -11
- 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 +29 -11
- package/dist/resources/partner-fees/partner-fees.test.mjs +5 -5
- package/dist/resources/payins/index.d.mts +9 -33
- package/dist/resources/payins/index.d.ts +9 -33
- package/dist/resources/payins/payins-quotes.test.js +29 -11
- package/dist/resources/payins/payins-quotes.test.mjs +5 -5
- package/dist/resources/payins/payins.test.js +141 -36
- package/dist/resources/payins/payins.test.mjs +117 -30
- package/dist/resources/payins/quotes.d.mts +1 -1
- package/dist/resources/payins/quotes.d.ts +1 -1
- package/dist/resources/payouts/index.d.mts +42 -17
- package/dist/resources/payouts/index.d.ts +42 -17
- package/dist/resources/payouts/index.js +8 -0
- package/dist/resources/payouts/index.mjs +1 -1
- package/dist/resources/payouts/payouts.test.js +139 -11
- package/dist/resources/payouts/payouts.test.mjs +115 -5
- package/dist/resources/quotes/index.d.mts +1 -1
- package/dist/resources/quotes/index.d.ts +1 -1
- package/dist/resources/quotes/quotes.test.js +29 -11
- package/dist/resources/quotes/quotes.test.mjs +5 -5
- package/dist/resources/receivers/index.d.mts +9 -7
- package/dist/resources/receivers/index.d.ts +9 -7
- package/dist/resources/receivers/receivers.test.js +36 -19
- package/dist/resources/receivers/receivers.test.mjs +12 -13
- 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 +29 -11
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +5 -5
- package/dist/resources/virtual-accounts/index.d.mts +22 -7
- package/dist/resources/virtual-accounts/index.d.ts +22 -7
- package/dist/resources/virtual-accounts/index.js +20 -10
- package/dist/resources/virtual-accounts/index.mjs +1 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +148 -30
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +124 -24
- 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 +29 -11
- 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 +29 -11
- 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 +29 -11
- package/dist/resources/webhooks/webhooks.test.mjs +5 -5
- package/package.json +2 -1
|
@@ -18702,7 +18702,7 @@ var import_expect_type = __toESM(require_dist(), 1);
|
|
|
18702
18702
|
var import_svix = require("svix");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "
|
|
18705
|
+
var version = "3.0.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18967,6 +18967,14 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18967
18967
|
createEvm(_c) {
|
|
18968
18968
|
var data = __objRest(_c, []);
|
|
18969
18969
|
return client.post(`/instances/${instanceId}/payouts/evm`, data);
|
|
18970
|
+
},
|
|
18971
|
+
authorizeSolana(_d) {
|
|
18972
|
+
var data = __objRest(_d, []);
|
|
18973
|
+
return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
|
|
18974
|
+
},
|
|
18975
|
+
createSolana(_e) {
|
|
18976
|
+
var data = __objRest(_e, []);
|
|
18977
|
+
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
18970
18978
|
}
|
|
18971
18979
|
};
|
|
18972
18980
|
}
|
|
@@ -19059,30 +19067,40 @@ function createTermsOfServiceResource(instanceId, client) {
|
|
|
19059
19067
|
// src/resources/virtual-accounts/index.ts
|
|
19060
19068
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19061
19069
|
return {
|
|
19062
|
-
|
|
19070
|
+
list(receiver_id) {
|
|
19071
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19072
|
+
},
|
|
19073
|
+
get({
|
|
19074
|
+
receiver_id,
|
|
19075
|
+
id
|
|
19076
|
+
}) {
|
|
19077
|
+
return client.get(
|
|
19078
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
|
|
19079
|
+
);
|
|
19080
|
+
},
|
|
19081
|
+
create(_a3) {
|
|
19063
19082
|
var _b = _a3, {
|
|
19064
19083
|
receiver_id
|
|
19065
19084
|
} = _b, data = __objRest(_b, [
|
|
19066
19085
|
"receiver_id"
|
|
19067
19086
|
]);
|
|
19068
|
-
return client.
|
|
19087
|
+
return client.post(
|
|
19069
19088
|
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19070
19089
|
data
|
|
19071
19090
|
);
|
|
19072
19091
|
},
|
|
19073
|
-
|
|
19092
|
+
update(_c) {
|
|
19074
19093
|
var _d = _c, {
|
|
19075
|
-
receiver_id
|
|
19094
|
+
receiver_id,
|
|
19095
|
+
id
|
|
19076
19096
|
} = _d, data = __objRest(_d, [
|
|
19077
|
-
"receiver_id"
|
|
19097
|
+
"receiver_id",
|
|
19098
|
+
"id"
|
|
19078
19099
|
]);
|
|
19079
|
-
return client.
|
|
19080
|
-
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19100
|
+
return client.put(
|
|
19101
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
|
|
19081
19102
|
data
|
|
19082
19103
|
);
|
|
19083
|
-
},
|
|
19084
|
-
get(receiver_id) {
|
|
19085
|
-
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19086
19104
|
}
|
|
19087
19105
|
};
|
|
19088
19106
|
}
|
|
@@ -19393,6 +19411,12 @@ describe("Payouts", () => {
|
|
|
19393
19411
|
provider_name: "blockchain",
|
|
19394
19412
|
provider_transaction_id: "0x123...890",
|
|
19395
19413
|
provider_status: "canceled",
|
|
19414
|
+
recipient_name: "John Doe",
|
|
19415
|
+
recipient_tax_id: "123.456.789-10",
|
|
19416
|
+
recipient_bank_code: "00416968",
|
|
19417
|
+
recipient_branch_code: "0001",
|
|
19418
|
+
recipient_account_number: "1234567890",
|
|
19419
|
+
recipient_account_type: "checking",
|
|
19396
19420
|
estimated_time_of_arrival: "5_min",
|
|
19397
19421
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19398
19422
|
},
|
|
@@ -19502,6 +19526,12 @@ describe("Payouts", () => {
|
|
|
19502
19526
|
provider_name: "blockchain",
|
|
19503
19527
|
provider_transaction_id: "0x123...890",
|
|
19504
19528
|
provider_status: "canceled",
|
|
19529
|
+
recipient_name: "John Doe",
|
|
19530
|
+
recipient_tax_id: "123.456.789-10",
|
|
19531
|
+
recipient_bank_code: "00416968",
|
|
19532
|
+
recipient_branch_code: "0001",
|
|
19533
|
+
recipient_account_number: "1234567890",
|
|
19534
|
+
recipient_account_type: "checking",
|
|
19505
19535
|
estimated_time_of_arrival: "5_min",
|
|
19506
19536
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19507
19537
|
},
|
|
@@ -19605,6 +19635,12 @@ describe("Payouts", () => {
|
|
|
19605
19635
|
provider_name: "blockchain",
|
|
19606
19636
|
provider_transaction_id: "0x123...890",
|
|
19607
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",
|
|
19608
19644
|
estimated_time_of_arrival: "5_min",
|
|
19609
19645
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19610
19646
|
},
|
|
@@ -19708,6 +19744,12 @@ describe("Payouts", () => {
|
|
|
19708
19744
|
provider_name: "blockchain",
|
|
19709
19745
|
provider_transaction_id: "0x123...890",
|
|
19710
19746
|
provider_status: "canceled",
|
|
19747
|
+
recipient_name: "John Doe",
|
|
19748
|
+
recipient_tax_id: "123.456.789-10",
|
|
19749
|
+
recipient_bank_code: "00416968",
|
|
19750
|
+
recipient_branch_code: "0001",
|
|
19751
|
+
recipient_account_number: "1234567890",
|
|
19752
|
+
recipient_account_type: "checking",
|
|
19711
19753
|
estimated_time_of_arrival: "5_min",
|
|
19712
19754
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19713
19755
|
},
|
|
@@ -19822,6 +19864,12 @@ describe("Payouts", () => {
|
|
|
19822
19864
|
provider_name: "blockchain",
|
|
19823
19865
|
provider_transaction_id: "0x123...890",
|
|
19824
19866
|
provider_status: "canceled",
|
|
19867
|
+
recipient_name: "John Doe",
|
|
19868
|
+
recipient_tax_id: "123.456.789-10",
|
|
19869
|
+
recipient_bank_code: "00416968",
|
|
19870
|
+
recipient_branch_code: "0001",
|
|
19871
|
+
recipient_account_number: "1234567890",
|
|
19872
|
+
recipient_account_type: "checking",
|
|
19825
19873
|
estimated_time_of_arrival: "5_min",
|
|
19826
19874
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19827
19875
|
},
|
|
@@ -19873,6 +19921,12 @@ describe("Payouts", () => {
|
|
|
19873
19921
|
provider_name: "blockchain",
|
|
19874
19922
|
provider_transaction_id: "0x123...890",
|
|
19875
19923
|
provider_status: "canceled",
|
|
19924
|
+
recipient_name: "John Doe",
|
|
19925
|
+
recipient_tax_id: "123.456.789-10",
|
|
19926
|
+
recipient_bank_code: "00416968",
|
|
19927
|
+
recipient_branch_code: "0001",
|
|
19928
|
+
recipient_account_number: "1234567890",
|
|
19929
|
+
recipient_account_type: "checking",
|
|
19876
19930
|
estimated_time_of_arrival: "5_min",
|
|
19877
19931
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19878
19932
|
},
|
|
@@ -19907,6 +19961,80 @@ describe("Payouts", () => {
|
|
|
19907
19961
|
globalExpect(data).toEqual(mockedEvmPayout);
|
|
19908
19962
|
}));
|
|
19909
19963
|
});
|
|
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
|
+
describe("Create solana payout", () => {
|
|
19981
|
+
it("should create a solana payout", () => __async(null, null, function* () {
|
|
19982
|
+
const mockedSolanaPayout = {
|
|
19983
|
+
id: "pa_000000000000",
|
|
19984
|
+
status: "processing",
|
|
19985
|
+
sender_wallet_address: "0x123...890",
|
|
19986
|
+
tracking_complete: {
|
|
19987
|
+
step: "on_hold",
|
|
19988
|
+
status: "tokens_refunded",
|
|
19989
|
+
transaction_hash: "0x123...890",
|
|
19990
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
19991
|
+
},
|
|
19992
|
+
tracking_payment: {
|
|
19993
|
+
step: "on_hold",
|
|
19994
|
+
provider_name: "blockchain",
|
|
19995
|
+
provider_transaction_id: "0x123...890",
|
|
19996
|
+
provider_status: "canceled",
|
|
19997
|
+
recipient_name: "John Doe",
|
|
19998
|
+
recipient_tax_id: "123.456.789-10",
|
|
19999
|
+
recipient_bank_code: "00416968",
|
|
20000
|
+
recipient_branch_code: "0001",
|
|
20001
|
+
recipient_account_number: "1234567890",
|
|
20002
|
+
recipient_account_type: "checking",
|
|
20003
|
+
estimated_time_of_arrival: "5_min",
|
|
20004
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
20005
|
+
},
|
|
20006
|
+
tracking_transaction: {
|
|
20007
|
+
step: "processing",
|
|
20008
|
+
status: "failed",
|
|
20009
|
+
transaction_hash: "0x123...890",
|
|
20010
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
20011
|
+
},
|
|
20012
|
+
tracking_partner_fee: {
|
|
20013
|
+
step: "on_hold",
|
|
20014
|
+
transaction_hash: "0x123...890",
|
|
20015
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
20016
|
+
},
|
|
20017
|
+
tracking_liquidity: {
|
|
20018
|
+
step: "processing",
|
|
20019
|
+
provider_transaction_id: "0x123...890",
|
|
20020
|
+
provider_status: "deposited",
|
|
20021
|
+
estimated_time_of_arrival: "1_business_day",
|
|
20022
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
20023
|
+
},
|
|
20024
|
+
receiver_id: "re_000000000000"
|
|
20025
|
+
};
|
|
20026
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedSolanaPayout), {
|
|
20027
|
+
headers: { "Content-Type": "application/json" }
|
|
20028
|
+
});
|
|
20029
|
+
const { data, error } = yield blindpay.payouts.createSolana({
|
|
20030
|
+
quote_id: "qu_000000000000",
|
|
20031
|
+
sender_wallet_address: "0x123...890",
|
|
20032
|
+
signed_transaction: "AAA...Zey8y0A"
|
|
20033
|
+
});
|
|
20034
|
+
globalExpect(error).toBeNull();
|
|
20035
|
+
globalExpect(data).toEqual(mockedSolanaPayout);
|
|
20036
|
+
}));
|
|
20037
|
+
});
|
|
19910
20038
|
});
|
|
19911
20039
|
/*! Bundled license information:
|
|
19912
20040
|
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
11
|
+
} from "../../chunk-WH2VNZE7.mjs";
|
|
13
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
14
13
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-U7CKUUO7.mjs";
|
|
18
|
+
import "../../chunk-LEPGLH7Q.mjs";
|
|
20
19
|
import "../../chunk-RC5NN5UF.mjs";
|
|
21
20
|
import "../../chunk-W7NJUABI.mjs";
|
|
22
21
|
import "../../chunk-VRA5HP7F.mjs";
|
|
23
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-VBZHAPK7.mjs";
|
|
24
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
25
24
|
import "../../chunk-CPOSU35L.mjs";
|
|
25
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
28
28
|
__async,
|
|
@@ -60,6 +60,12 @@ var require_payouts_test = __commonJS({
|
|
|
60
60
|
provider_name: "blockchain",
|
|
61
61
|
provider_transaction_id: "0x123...890",
|
|
62
62
|
provider_status: "canceled",
|
|
63
|
+
recipient_name: "John Doe",
|
|
64
|
+
recipient_tax_id: "123.456.789-10",
|
|
65
|
+
recipient_bank_code: "00416968",
|
|
66
|
+
recipient_branch_code: "0001",
|
|
67
|
+
recipient_account_number: "1234567890",
|
|
68
|
+
recipient_account_type: "checking",
|
|
63
69
|
estimated_time_of_arrival: "5_min",
|
|
64
70
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
65
71
|
},
|
|
@@ -169,6 +175,12 @@ var require_payouts_test = __commonJS({
|
|
|
169
175
|
provider_name: "blockchain",
|
|
170
176
|
provider_transaction_id: "0x123...890",
|
|
171
177
|
provider_status: "canceled",
|
|
178
|
+
recipient_name: "John Doe",
|
|
179
|
+
recipient_tax_id: "123.456.789-10",
|
|
180
|
+
recipient_bank_code: "00416968",
|
|
181
|
+
recipient_branch_code: "0001",
|
|
182
|
+
recipient_account_number: "1234567890",
|
|
183
|
+
recipient_account_type: "checking",
|
|
172
184
|
estimated_time_of_arrival: "5_min",
|
|
173
185
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
174
186
|
},
|
|
@@ -272,6 +284,12 @@ var require_payouts_test = __commonJS({
|
|
|
272
284
|
provider_name: "blockchain",
|
|
273
285
|
provider_transaction_id: "0x123...890",
|
|
274
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",
|
|
275
293
|
estimated_time_of_arrival: "5_min",
|
|
276
294
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
277
295
|
},
|
|
@@ -375,6 +393,12 @@ var require_payouts_test = __commonJS({
|
|
|
375
393
|
provider_name: "blockchain",
|
|
376
394
|
provider_transaction_id: "0x123...890",
|
|
377
395
|
provider_status: "canceled",
|
|
396
|
+
recipient_name: "John Doe",
|
|
397
|
+
recipient_tax_id: "123.456.789-10",
|
|
398
|
+
recipient_bank_code: "00416968",
|
|
399
|
+
recipient_branch_code: "0001",
|
|
400
|
+
recipient_account_number: "1234567890",
|
|
401
|
+
recipient_account_type: "checking",
|
|
378
402
|
estimated_time_of_arrival: "5_min",
|
|
379
403
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
380
404
|
},
|
|
@@ -489,6 +513,12 @@ var require_payouts_test = __commonJS({
|
|
|
489
513
|
provider_name: "blockchain",
|
|
490
514
|
provider_transaction_id: "0x123...890",
|
|
491
515
|
provider_status: "canceled",
|
|
516
|
+
recipient_name: "John Doe",
|
|
517
|
+
recipient_tax_id: "123.456.789-10",
|
|
518
|
+
recipient_bank_code: "00416968",
|
|
519
|
+
recipient_branch_code: "0001",
|
|
520
|
+
recipient_account_number: "1234567890",
|
|
521
|
+
recipient_account_type: "checking",
|
|
492
522
|
estimated_time_of_arrival: "5_min",
|
|
493
523
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
494
524
|
},
|
|
@@ -540,6 +570,12 @@ var require_payouts_test = __commonJS({
|
|
|
540
570
|
provider_name: "blockchain",
|
|
541
571
|
provider_transaction_id: "0x123...890",
|
|
542
572
|
provider_status: "canceled",
|
|
573
|
+
recipient_name: "John Doe",
|
|
574
|
+
recipient_tax_id: "123.456.789-10",
|
|
575
|
+
recipient_bank_code: "00416968",
|
|
576
|
+
recipient_branch_code: "0001",
|
|
577
|
+
recipient_account_number: "1234567890",
|
|
578
|
+
recipient_account_type: "checking",
|
|
543
579
|
estimated_time_of_arrival: "5_min",
|
|
544
580
|
completed_at: "2011-10-05T14:48:00.000Z"
|
|
545
581
|
},
|
|
@@ -574,6 +610,80 @@ var require_payouts_test = __commonJS({
|
|
|
574
610
|
globalExpect(data).toEqual(mockedEvmPayout);
|
|
575
611
|
}));
|
|
576
612
|
});
|
|
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
|
+
describe("Create solana payout", () => {
|
|
630
|
+
it("should create a solana payout", () => __async(null, null, function* () {
|
|
631
|
+
const mockedSolanaPayout = {
|
|
632
|
+
id: "pa_000000000000",
|
|
633
|
+
status: "processing",
|
|
634
|
+
sender_wallet_address: "0x123...890",
|
|
635
|
+
tracking_complete: {
|
|
636
|
+
step: "on_hold",
|
|
637
|
+
status: "tokens_refunded",
|
|
638
|
+
transaction_hash: "0x123...890",
|
|
639
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
640
|
+
},
|
|
641
|
+
tracking_payment: {
|
|
642
|
+
step: "on_hold",
|
|
643
|
+
provider_name: "blockchain",
|
|
644
|
+
provider_transaction_id: "0x123...890",
|
|
645
|
+
provider_status: "canceled",
|
|
646
|
+
recipient_name: "John Doe",
|
|
647
|
+
recipient_tax_id: "123.456.789-10",
|
|
648
|
+
recipient_bank_code: "00416968",
|
|
649
|
+
recipient_branch_code: "0001",
|
|
650
|
+
recipient_account_number: "1234567890",
|
|
651
|
+
recipient_account_type: "checking",
|
|
652
|
+
estimated_time_of_arrival: "5_min",
|
|
653
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
654
|
+
},
|
|
655
|
+
tracking_transaction: {
|
|
656
|
+
step: "processing",
|
|
657
|
+
status: "failed",
|
|
658
|
+
transaction_hash: "0x123...890",
|
|
659
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
660
|
+
},
|
|
661
|
+
tracking_partner_fee: {
|
|
662
|
+
step: "on_hold",
|
|
663
|
+
transaction_hash: "0x123...890",
|
|
664
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
665
|
+
},
|
|
666
|
+
tracking_liquidity: {
|
|
667
|
+
step: "processing",
|
|
668
|
+
provider_transaction_id: "0x123...890",
|
|
669
|
+
provider_status: "deposited",
|
|
670
|
+
estimated_time_of_arrival: "1_business_day",
|
|
671
|
+
completed_at: "2011-10-05T14:48:00.000Z"
|
|
672
|
+
},
|
|
673
|
+
receiver_id: "re_000000000000"
|
|
674
|
+
};
|
|
675
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedSolanaPayout), {
|
|
676
|
+
headers: { "Content-Type": "application/json" }
|
|
677
|
+
});
|
|
678
|
+
const { data, error } = yield blindpay.payouts.createSolana({
|
|
679
|
+
quote_id: "qu_000000000000",
|
|
680
|
+
sender_wallet_address: "0x123...890",
|
|
681
|
+
signed_transaction: "AAA...Zey8y0A"
|
|
682
|
+
});
|
|
683
|
+
globalExpect(error).toBeNull();
|
|
684
|
+
globalExpect(data).toEqual(mockedSolanaPayout);
|
|
685
|
+
}));
|
|
686
|
+
});
|
|
577
687
|
});
|
|
578
688
|
}
|
|
579
689
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient,
|
|
1
|
+
import { I as InternalApiClient, i as CurrencyType, N as Network, S as StablecoinToken, p as TransactionDocumentType, B as BlindpayApiResponse, j as Currency } from '../../api-client-B7VQkM_4.mjs';
|
|
2
2
|
|
|
3
3
|
type CreateQuoteInput = {
|
|
4
4
|
bank_account_id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient,
|
|
1
|
+
import { I as InternalApiClient, i as CurrencyType, N as Network, S as StablecoinToken, p as TransactionDocumentType, B as BlindpayApiResponse, j as Currency } from '../../api-client-B7VQkM_4.js';
|
|
2
2
|
|
|
3
3
|
type CreateQuoteInput = {
|
|
4
4
|
bank_account_id: string;
|
|
@@ -18702,7 +18702,7 @@ var import_expect_type = __toESM(require_dist(), 1);
|
|
|
18702
18702
|
var import_svix = require("svix");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "
|
|
18705
|
+
var version = "3.0.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18967,6 +18967,14 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18967
18967
|
createEvm(_c) {
|
|
18968
18968
|
var data = __objRest(_c, []);
|
|
18969
18969
|
return client.post(`/instances/${instanceId}/payouts/evm`, data);
|
|
18970
|
+
},
|
|
18971
|
+
authorizeSolana(_d) {
|
|
18972
|
+
var data = __objRest(_d, []);
|
|
18973
|
+
return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
|
|
18974
|
+
},
|
|
18975
|
+
createSolana(_e) {
|
|
18976
|
+
var data = __objRest(_e, []);
|
|
18977
|
+
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
18970
18978
|
}
|
|
18971
18979
|
};
|
|
18972
18980
|
}
|
|
@@ -19059,30 +19067,40 @@ function createTermsOfServiceResource(instanceId, client) {
|
|
|
19059
19067
|
// src/resources/virtual-accounts/index.ts
|
|
19060
19068
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19061
19069
|
return {
|
|
19062
|
-
|
|
19070
|
+
list(receiver_id) {
|
|
19071
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19072
|
+
},
|
|
19073
|
+
get({
|
|
19074
|
+
receiver_id,
|
|
19075
|
+
id
|
|
19076
|
+
}) {
|
|
19077
|
+
return client.get(
|
|
19078
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
|
|
19079
|
+
);
|
|
19080
|
+
},
|
|
19081
|
+
create(_a3) {
|
|
19063
19082
|
var _b = _a3, {
|
|
19064
19083
|
receiver_id
|
|
19065
19084
|
} = _b, data = __objRest(_b, [
|
|
19066
19085
|
"receiver_id"
|
|
19067
19086
|
]);
|
|
19068
|
-
return client.
|
|
19087
|
+
return client.post(
|
|
19069
19088
|
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19070
19089
|
data
|
|
19071
19090
|
);
|
|
19072
19091
|
},
|
|
19073
|
-
|
|
19092
|
+
update(_c) {
|
|
19074
19093
|
var _d = _c, {
|
|
19075
|
-
receiver_id
|
|
19094
|
+
receiver_id,
|
|
19095
|
+
id
|
|
19076
19096
|
} = _d, data = __objRest(_d, [
|
|
19077
|
-
"receiver_id"
|
|
19097
|
+
"receiver_id",
|
|
19098
|
+
"id"
|
|
19078
19099
|
]);
|
|
19079
|
-
return client.
|
|
19080
|
-
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19100
|
+
return client.put(
|
|
19101
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
|
|
19081
19102
|
data
|
|
19082
19103
|
);
|
|
19083
|
-
},
|
|
19084
|
-
get(receiver_id) {
|
|
19085
|
-
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19086
19104
|
}
|
|
19087
19105
|
};
|
|
19088
19106
|
}
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
11
|
+
} from "../../chunk-WH2VNZE7.mjs";
|
|
13
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
14
13
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-U7CKUUO7.mjs";
|
|
18
|
+
import "../../chunk-LEPGLH7Q.mjs";
|
|
20
19
|
import "../../chunk-RC5NN5UF.mjs";
|
|
21
20
|
import "../../chunk-W7NJUABI.mjs";
|
|
22
21
|
import "../../chunk-VRA5HP7F.mjs";
|
|
23
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-VBZHAPK7.mjs";
|
|
24
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
25
24
|
import "../../chunk-CPOSU35L.mjs";
|
|
25
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
28
28
|
__async,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { I as InternalApiClient, B as BlindpayApiResponse, A as AccountClass, C as Country } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse, A as AccountClass, C as Country } from '../../api-client-B7VQkM_4.mjs';
|
|
2
|
+
|
|
3
|
+
type StrictOmit<T, K extends keyof T> = Omit<T, K>;
|
|
2
4
|
|
|
3
5
|
type ProofOfAddressDocType = "UTILITY_BILL" | "BANK_STATEMENT" | "RENTAL_AGREEMENT" | "TAX_DOCUMENT" | "GOVERNMENT_CORRESPONDENCE";
|
|
4
6
|
type PurposeOfTransactions = "business_transactions" | "charitable_donations" | "investment_purposes" | "payments_to_friends_or_family_abroad" | "personal_or_living_expenses" | "protect_wealth" | "purchase_good_and_services" | "receive_payment_for_freelancing" | "receive_salary" | "other";
|
|
@@ -8,8 +10,6 @@ type KycType = "light" | "standard" | "enhanced";
|
|
|
8
10
|
type OwnerRole = "beneficial_controlling" | "beneficial_owner" | "controlling_person";
|
|
9
11
|
type Owner = {
|
|
10
12
|
id: string;
|
|
11
|
-
instance_id: string;
|
|
12
|
-
receiver_id: string;
|
|
13
13
|
role: OwnerRole;
|
|
14
14
|
first_name: string;
|
|
15
15
|
last_name: string;
|
|
@@ -30,6 +30,7 @@ type Owner = {
|
|
|
30
30
|
};
|
|
31
31
|
type IndividualWithStandardKYC = {
|
|
32
32
|
id: string;
|
|
33
|
+
is_tos_accepted: boolean;
|
|
33
34
|
type: Extract<AccountClass, "individual">;
|
|
34
35
|
kyc_type: Extract<KycType, "standard">;
|
|
35
36
|
kyc_status: string;
|
|
@@ -72,6 +73,7 @@ type IndividualWithStandardKYC = {
|
|
|
72
73
|
};
|
|
73
74
|
type IndividualWithEnhancedKYC = {
|
|
74
75
|
id: string;
|
|
76
|
+
is_tos_accepted: boolean;
|
|
75
77
|
type: Extract<AccountClass, "individual">;
|
|
76
78
|
kyc_type: Extract<KycType, "enhanced">;
|
|
77
79
|
kyc_status: string;
|
|
@@ -119,6 +121,8 @@ type IndividualWithEnhancedKYC = {
|
|
|
119
121
|
};
|
|
120
122
|
type BusinessWithStandardKYB = {
|
|
121
123
|
id: string;
|
|
124
|
+
is_tos_accepted: boolean;
|
|
125
|
+
is_fbo: boolean;
|
|
122
126
|
type: Extract<AccountClass, "business">;
|
|
123
127
|
kyc_type: Extract<KycType, "standard">;
|
|
124
128
|
kyc_status: string;
|
|
@@ -226,7 +230,7 @@ type CreateBusinessWithStandardKYBInput = {
|
|
|
226
230
|
formation_date: string;
|
|
227
231
|
incorporation_doc_file: string;
|
|
228
232
|
legal_name: string;
|
|
229
|
-
owners: Owner
|
|
233
|
+
owners: Array<StrictOmit<Owner, "id">>;
|
|
230
234
|
postal_code: string;
|
|
231
235
|
proof_of_address_doc_file: string;
|
|
232
236
|
proof_of_address_doc_type: ProofOfAddressDocType;
|
|
@@ -268,9 +272,7 @@ type UpdateReceiverInput = {
|
|
|
268
272
|
alternate_name?: string;
|
|
269
273
|
formation_date?: string;
|
|
270
274
|
website?: string;
|
|
271
|
-
owners?: Array<
|
|
272
|
-
id: string;
|
|
273
|
-
} & Pick<Owner, "first_name" | "last_name" | "role" | "date_of_birth" | "tax_id" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
|
|
275
|
+
owners?: Array<Pick<Owner, "first_name" | "last_name" | "role" | "date_of_birth" | "tax_id" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
|
|
274
276
|
incorporation_doc_file?: string;
|
|
275
277
|
proof_of_ownership_doc_file?: string;
|
|
276
278
|
source_of_funds_doc_type?: SourceOfFundsDocType;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { I as InternalApiClient, B as BlindpayApiResponse, A as AccountClass, C as Country } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse, A as AccountClass, C as Country } from '../../api-client-B7VQkM_4.js';
|
|
2
|
+
|
|
3
|
+
type StrictOmit<T, K extends keyof T> = Omit<T, K>;
|
|
2
4
|
|
|
3
5
|
type ProofOfAddressDocType = "UTILITY_BILL" | "BANK_STATEMENT" | "RENTAL_AGREEMENT" | "TAX_DOCUMENT" | "GOVERNMENT_CORRESPONDENCE";
|
|
4
6
|
type PurposeOfTransactions = "business_transactions" | "charitable_donations" | "investment_purposes" | "payments_to_friends_or_family_abroad" | "personal_or_living_expenses" | "protect_wealth" | "purchase_good_and_services" | "receive_payment_for_freelancing" | "receive_salary" | "other";
|
|
@@ -8,8 +10,6 @@ type KycType = "light" | "standard" | "enhanced";
|
|
|
8
10
|
type OwnerRole = "beneficial_controlling" | "beneficial_owner" | "controlling_person";
|
|
9
11
|
type Owner = {
|
|
10
12
|
id: string;
|
|
11
|
-
instance_id: string;
|
|
12
|
-
receiver_id: string;
|
|
13
13
|
role: OwnerRole;
|
|
14
14
|
first_name: string;
|
|
15
15
|
last_name: string;
|
|
@@ -30,6 +30,7 @@ type Owner = {
|
|
|
30
30
|
};
|
|
31
31
|
type IndividualWithStandardKYC = {
|
|
32
32
|
id: string;
|
|
33
|
+
is_tos_accepted: boolean;
|
|
33
34
|
type: Extract<AccountClass, "individual">;
|
|
34
35
|
kyc_type: Extract<KycType, "standard">;
|
|
35
36
|
kyc_status: string;
|
|
@@ -72,6 +73,7 @@ type IndividualWithStandardKYC = {
|
|
|
72
73
|
};
|
|
73
74
|
type IndividualWithEnhancedKYC = {
|
|
74
75
|
id: string;
|
|
76
|
+
is_tos_accepted: boolean;
|
|
75
77
|
type: Extract<AccountClass, "individual">;
|
|
76
78
|
kyc_type: Extract<KycType, "enhanced">;
|
|
77
79
|
kyc_status: string;
|
|
@@ -119,6 +121,8 @@ type IndividualWithEnhancedKYC = {
|
|
|
119
121
|
};
|
|
120
122
|
type BusinessWithStandardKYB = {
|
|
121
123
|
id: string;
|
|
124
|
+
is_tos_accepted: boolean;
|
|
125
|
+
is_fbo: boolean;
|
|
122
126
|
type: Extract<AccountClass, "business">;
|
|
123
127
|
kyc_type: Extract<KycType, "standard">;
|
|
124
128
|
kyc_status: string;
|
|
@@ -226,7 +230,7 @@ type CreateBusinessWithStandardKYBInput = {
|
|
|
226
230
|
formation_date: string;
|
|
227
231
|
incorporation_doc_file: string;
|
|
228
232
|
legal_name: string;
|
|
229
|
-
owners: Owner
|
|
233
|
+
owners: Array<StrictOmit<Owner, "id">>;
|
|
230
234
|
postal_code: string;
|
|
231
235
|
proof_of_address_doc_file: string;
|
|
232
236
|
proof_of_address_doc_type: ProofOfAddressDocType;
|
|
@@ -268,9 +272,7 @@ type UpdateReceiverInput = {
|
|
|
268
272
|
alternate_name?: string;
|
|
269
273
|
formation_date?: string;
|
|
270
274
|
website?: string;
|
|
271
|
-
owners?: Array<
|
|
272
|
-
id: string;
|
|
273
|
-
} & Pick<Owner, "first_name" | "last_name" | "role" | "date_of_birth" | "tax_id" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
|
|
275
|
+
owners?: Array<Pick<Owner, "first_name" | "last_name" | "role" | "date_of_birth" | "tax_id" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
|
|
274
276
|
incorporation_doc_file?: string;
|
|
275
277
|
proof_of_ownership_doc_file?: string;
|
|
276
278
|
source_of_funds_doc_type?: SourceOfFundsDocType;
|