@blindpay/node 2.5.0 → 3.1.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-DhY5DFpq.d.mts} +109 -34
- package/dist/{api-client-Drd7alfK.d.ts → api-client-DhY5DFpq.d.ts} +109 -34
- package/dist/{chunk-VRA5HP7F.mjs → chunk-E7M4CJKR.mjs} +0 -7
- package/dist/{chunk-5XJJKYXE.mjs → chunk-LEPGLH7Q.mjs} +20 -10
- package/dist/{chunk-CEJF5Y4K.mjs → chunk-V4V47AUC.mjs} +17 -17
- package/dist/{chunk-W7NJUABI.mjs → chunk-VGU72ZNI.mjs} +1 -7
- package/dist/{chunk-3QQCDR3E.mjs → chunk-VOB7TMKL.mjs} +4 -4
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +25 -27
- package/dist/index.mjs +17 -17
- package/dist/resources/api-keys/api-keys.test.js +25 -27
- package/dist/resources/api-keys/api-keys.test.mjs +7 -7
- 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 +25 -27
- package/dist/resources/available/available.test.mjs +7 -7
- 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 +25 -27
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +7 -7
- 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 +25 -27
- package/dist/resources/instances/instances.test.mjs +7 -7
- 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 +25 -27
- package/dist/resources/partner-fees/partner-fees.test.mjs +7 -7
- package/dist/resources/payins/index.d.mts +61 -148
- package/dist/resources/payins/index.d.ts +61 -148
- package/dist/resources/payins/index.js +0 -19
- package/dist/resources/payins/index.mjs +1 -1
- package/dist/resources/payins/payins-quotes.test.js +25 -113
- package/dist/resources/payins/payins-quotes.test.mjs +7 -93
- package/dist/resources/payins/payins.test.js +113 -163
- package/dist/resources/payins/payins.test.mjs +95 -143
- 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 +34 -20
- package/dist/resources/payouts/index.d.ts +34 -20
- package/dist/resources/payouts/index.js +4 -4
- package/dist/resources/payouts/index.mjs +1 -1
- package/dist/resources/payouts/payouts.test.js +113 -131
- package/dist/resources/payouts/payouts.test.mjs +95 -111
- 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 +26 -28
- package/dist/resources/quotes/quotes.test.mjs +8 -8
- 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 +32 -35
- package/dist/resources/receivers/receivers.test.mjs +14 -15
- 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 +25 -27
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +7 -7
- 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 +144 -46
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +126 -26
- 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 +25 -27
- package/dist/resources/wallets/blockchain.test.mjs +7 -7
- 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 +25 -27
- package/dist/resources/wallets/offramp.test.mjs +7 -7
- 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 +25 -27
- package/dist/resources/webhooks/webhooks.test.mjs +7 -7
- 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.1.0";
|
|
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
|
},
|
|
@@ -18967,6 +18951,10 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18967
18951
|
createEvm(_c) {
|
|
18968
18952
|
var data = __objRest(_c, []);
|
|
18969
18953
|
return client.post(`/instances/${instanceId}/payouts/evm`, data);
|
|
18954
|
+
},
|
|
18955
|
+
createSolana(_d) {
|
|
18956
|
+
var data = __objRest(_d, []);
|
|
18957
|
+
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
18970
18958
|
}
|
|
18971
18959
|
};
|
|
18972
18960
|
}
|
|
@@ -19059,30 +19047,40 @@ function createTermsOfServiceResource(instanceId, client) {
|
|
|
19059
19047
|
// src/resources/virtual-accounts/index.ts
|
|
19060
19048
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19061
19049
|
return {
|
|
19062
|
-
|
|
19050
|
+
list(receiver_id) {
|
|
19051
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19052
|
+
},
|
|
19053
|
+
get({
|
|
19054
|
+
receiver_id,
|
|
19055
|
+
id
|
|
19056
|
+
}) {
|
|
19057
|
+
return client.get(
|
|
19058
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
|
|
19059
|
+
);
|
|
19060
|
+
},
|
|
19061
|
+
create(_a3) {
|
|
19063
19062
|
var _b = _a3, {
|
|
19064
19063
|
receiver_id
|
|
19065
19064
|
} = _b, data = __objRest(_b, [
|
|
19066
19065
|
"receiver_id"
|
|
19067
19066
|
]);
|
|
19068
|
-
return client.
|
|
19067
|
+
return client.post(
|
|
19069
19068
|
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19070
19069
|
data
|
|
19071
19070
|
);
|
|
19072
19071
|
},
|
|
19073
|
-
|
|
19072
|
+
update(_c) {
|
|
19074
19073
|
var _d = _c, {
|
|
19075
|
-
receiver_id
|
|
19074
|
+
receiver_id,
|
|
19075
|
+
id
|
|
19076
19076
|
} = _d, data = __objRest(_d, [
|
|
19077
|
-
"receiver_id"
|
|
19077
|
+
"receiver_id",
|
|
19078
|
+
"id"
|
|
19078
19079
|
]);
|
|
19079
|
-
return client.
|
|
19080
|
-
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19080
|
+
return client.put(
|
|
19081
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
|
|
19081
19082
|
data
|
|
19082
19083
|
);
|
|
19083
|
-
},
|
|
19084
|
-
get(receiver_id) {
|
|
19085
|
-
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19086
19084
|
}
|
|
19087
19085
|
};
|
|
19088
19086
|
}
|
|
@@ -19370,24 +19368,95 @@ var BlindPay = class {
|
|
|
19370
19368
|
describe("Virtual accounts", () => {
|
|
19371
19369
|
afterEach(() => fetchMock.resetMocks());
|
|
19372
19370
|
const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
|
|
19373
|
-
describe("
|
|
19374
|
-
it("should
|
|
19375
|
-
|
|
19371
|
+
describe("List virtual accounts", () => {
|
|
19372
|
+
it("should list virtual accounts", () => __async(null, null, function* () {
|
|
19373
|
+
const mockedVirtualAccounts = [
|
|
19374
|
+
{
|
|
19375
|
+
id: "va_000000000000",
|
|
19376
|
+
banking_partner: "jpmorgan",
|
|
19377
|
+
kyc_status: "approved",
|
|
19378
|
+
us: {
|
|
19379
|
+
ach: {
|
|
19380
|
+
routing_number: "123456789",
|
|
19381
|
+
account_number: "123456789"
|
|
19382
|
+
},
|
|
19383
|
+
wire: {
|
|
19384
|
+
routing_number: "123456789",
|
|
19385
|
+
account_number: "123456789"
|
|
19386
|
+
},
|
|
19387
|
+
rtp: {
|
|
19388
|
+
routing_number: "123456789",
|
|
19389
|
+
account_number: "123456789"
|
|
19390
|
+
},
|
|
19391
|
+
swift_bic_code: "CHASUS33",
|
|
19392
|
+
account_type: "Business checking",
|
|
19393
|
+
beneficiary: {
|
|
19394
|
+
name: "Receiver Name",
|
|
19395
|
+
address_line_1: "8 The Green, #19364",
|
|
19396
|
+
address_line_2: "Dover, DE 19901"
|
|
19397
|
+
},
|
|
19398
|
+
receiving_bank: {
|
|
19399
|
+
name: "JPMorgan Chase",
|
|
19400
|
+
address_line_1: "270 Park Ave",
|
|
19401
|
+
address_line_2: "New York, NY, 10017-2070"
|
|
19402
|
+
}
|
|
19403
|
+
},
|
|
19404
|
+
token: "USDC",
|
|
19405
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
19406
|
+
blockchain_wallet: {
|
|
19407
|
+
network: "base",
|
|
19408
|
+
address: "0x1234567890123456789012345678901234567890"
|
|
19409
|
+
}
|
|
19410
|
+
},
|
|
19411
|
+
{
|
|
19412
|
+
id: "va_000000000001",
|
|
19413
|
+
banking_partner: "citi",
|
|
19414
|
+
kyc_status: "approved",
|
|
19415
|
+
us: {
|
|
19416
|
+
ach: {
|
|
19417
|
+
routing_number: "123456789",
|
|
19418
|
+
account_number: "123456789"
|
|
19419
|
+
},
|
|
19420
|
+
wire: {
|
|
19421
|
+
routing_number: "123456789",
|
|
19422
|
+
account_number: "123456789"
|
|
19423
|
+
},
|
|
19424
|
+
rtp: {
|
|
19425
|
+
routing_number: "123456789",
|
|
19426
|
+
account_number: "123456789"
|
|
19427
|
+
},
|
|
19428
|
+
swift_bic_code: "CHASUS33",
|
|
19429
|
+
account_type: "Business checking",
|
|
19430
|
+
beneficiary: {
|
|
19431
|
+
name: "Receiver Name",
|
|
19432
|
+
address_line_1: "8 The Green, #19364",
|
|
19433
|
+
address_line_2: "Dover, DE 19901"
|
|
19434
|
+
},
|
|
19435
|
+
receiving_bank: {
|
|
19436
|
+
name: "JPMorgan Chase",
|
|
19437
|
+
address_line_1: "270 Park Ave",
|
|
19438
|
+
address_line_2: "New York, NY, 10017-2070"
|
|
19439
|
+
}
|
|
19440
|
+
},
|
|
19441
|
+
token: "USDC",
|
|
19442
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
19443
|
+
blockchain_wallet: null
|
|
19444
|
+
}
|
|
19445
|
+
];
|
|
19446
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccounts), {
|
|
19376
19447
|
headers: { "Content-Type": "application/json" }
|
|
19377
19448
|
});
|
|
19378
|
-
const { data, error } = yield blindpay.virtualAccounts.
|
|
19379
|
-
receiver_id: "re_000000000000",
|
|
19380
|
-
blockchain_wallet_id: "bw_000000000000",
|
|
19381
|
-
token: "USDC"
|
|
19382
|
-
});
|
|
19449
|
+
const { data, error } = yield blindpay.virtualAccounts.list("re_000000000000");
|
|
19383
19450
|
globalExpect(error).toBeNull();
|
|
19384
|
-
globalExpect(data).toEqual(
|
|
19451
|
+
globalExpect(data).toEqual(mockedVirtualAccounts);
|
|
19385
19452
|
}));
|
|
19386
19453
|
});
|
|
19387
|
-
describe("
|
|
19388
|
-
it("should
|
|
19454
|
+
describe("Get virtual account", () => {
|
|
19455
|
+
it("should get a virtual account by id", () => __async(null, null, function* () {
|
|
19389
19456
|
const mockedVirtualAccount = {
|
|
19390
19457
|
id: "va_000000000000",
|
|
19458
|
+
banking_partner: "jpmorgan",
|
|
19459
|
+
kyc_status: "approved",
|
|
19391
19460
|
us: {
|
|
19392
19461
|
ach: {
|
|
19393
19462
|
routing_number: "123456789",
|
|
@@ -19415,24 +19484,29 @@ describe("Virtual accounts", () => {
|
|
|
19415
19484
|
}
|
|
19416
19485
|
},
|
|
19417
19486
|
token: "USDC",
|
|
19418
|
-
blockchain_wallet_id: "bw_000000000000"
|
|
19487
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
19488
|
+
blockchain_wallet: {
|
|
19489
|
+
network: "base",
|
|
19490
|
+
address: "0x1234567890123456789012345678901234567890"
|
|
19491
|
+
}
|
|
19419
19492
|
};
|
|
19420
19493
|
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
|
|
19421
19494
|
headers: { "Content-Type": "application/json" }
|
|
19422
19495
|
});
|
|
19423
|
-
const { data, error } = yield blindpay.virtualAccounts.
|
|
19496
|
+
const { data, error } = yield blindpay.virtualAccounts.get({
|
|
19424
19497
|
receiver_id: "re_000000000000",
|
|
19425
|
-
|
|
19426
|
-
token: "USDC"
|
|
19498
|
+
id: "va_000000000000"
|
|
19427
19499
|
});
|
|
19428
19500
|
globalExpect(error).toBeNull();
|
|
19429
19501
|
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
19430
19502
|
}));
|
|
19431
19503
|
});
|
|
19432
|
-
describe("
|
|
19433
|
-
it("should
|
|
19504
|
+
describe("Create virtual account", () => {
|
|
19505
|
+
it("should create a virtual account", () => __async(null, null, function* () {
|
|
19434
19506
|
const mockedVirtualAccount = {
|
|
19435
19507
|
id: "va_000000000000",
|
|
19508
|
+
banking_partner: "jpmorgan",
|
|
19509
|
+
kyc_status: "approved",
|
|
19436
19510
|
us: {
|
|
19437
19511
|
ach: {
|
|
19438
19512
|
routing_number: "123456789",
|
|
@@ -19460,16 +19534,40 @@ describe("Virtual accounts", () => {
|
|
|
19460
19534
|
}
|
|
19461
19535
|
},
|
|
19462
19536
|
token: "USDC",
|
|
19463
|
-
blockchain_wallet_id: "bw_000000000000"
|
|
19537
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
19538
|
+
blockchain_wallet: {
|
|
19539
|
+
network: "base",
|
|
19540
|
+
address: "0x1234567890123456789012345678901234567890"
|
|
19541
|
+
}
|
|
19464
19542
|
};
|
|
19465
19543
|
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
|
|
19466
19544
|
headers: { "Content-Type": "application/json" }
|
|
19467
19545
|
});
|
|
19468
|
-
const { data, error } = yield blindpay.virtualAccounts.
|
|
19546
|
+
const { data, error } = yield blindpay.virtualAccounts.create({
|
|
19547
|
+
receiver_id: "re_000000000000",
|
|
19548
|
+
banking_partner: "jpmorgan",
|
|
19549
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
19550
|
+
token: "USDC"
|
|
19551
|
+
});
|
|
19469
19552
|
globalExpect(error).toBeNull();
|
|
19470
19553
|
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
19471
19554
|
}));
|
|
19472
19555
|
});
|
|
19556
|
+
describe("Update virtual account", () => {
|
|
19557
|
+
it("should update a virtual account", () => __async(null, null, function* () {
|
|
19558
|
+
fetchMock.mockResponseOnce(JSON.stringify(null), {
|
|
19559
|
+
headers: { "Content-Type": "application/json" }
|
|
19560
|
+
});
|
|
19561
|
+
const { data, error } = yield blindpay.virtualAccounts.update({
|
|
19562
|
+
receiver_id: "re_000000000000",
|
|
19563
|
+
id: "va_000000000000",
|
|
19564
|
+
blockchain_wallet_id: "bw_000000000001",
|
|
19565
|
+
token: "USDT"
|
|
19566
|
+
});
|
|
19567
|
+
globalExpect(error).toBeNull();
|
|
19568
|
+
globalExpect(data).toEqual(null);
|
|
19569
|
+
}));
|
|
19570
|
+
});
|
|
19473
19571
|
});
|
|
19474
19572
|
/*! Bundled license information:
|
|
19475
19573
|
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
11
|
+
} from "../../chunk-V4V47AUC.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-
|
|
18
|
+
import "../../chunk-LEPGLH7Q.mjs";
|
|
19
|
+
import "../../chunk-VGU72ZNI.mjs";
|
|
20
|
+
import "../../chunk-E7M4CJKR.mjs";
|
|
21
|
+
import "../../chunk-VOB7TMKL.mjs";
|
|
20
22
|
import "../../chunk-RC5NN5UF.mjs";
|
|
21
|
-
import "../../chunk-W7NJUABI.mjs";
|
|
22
|
-
import "../../chunk-VRA5HP7F.mjs";
|
|
23
|
-
import "../../chunk-3QQCDR3E.mjs";
|
|
24
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
@@ -37,24 +37,95 @@ var require_virtual_accounts_test = __commonJS({
|
|
|
37
37
|
describe("Virtual accounts", () => {
|
|
38
38
|
afterEach(() => fetchMock.resetMocks());
|
|
39
39
|
const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
|
|
40
|
-
describe("
|
|
41
|
-
it("should
|
|
42
|
-
|
|
40
|
+
describe("List virtual accounts", () => {
|
|
41
|
+
it("should list virtual accounts", () => __async(null, null, function* () {
|
|
42
|
+
const mockedVirtualAccounts = [
|
|
43
|
+
{
|
|
44
|
+
id: "va_000000000000",
|
|
45
|
+
banking_partner: "jpmorgan",
|
|
46
|
+
kyc_status: "approved",
|
|
47
|
+
us: {
|
|
48
|
+
ach: {
|
|
49
|
+
routing_number: "123456789",
|
|
50
|
+
account_number: "123456789"
|
|
51
|
+
},
|
|
52
|
+
wire: {
|
|
53
|
+
routing_number: "123456789",
|
|
54
|
+
account_number: "123456789"
|
|
55
|
+
},
|
|
56
|
+
rtp: {
|
|
57
|
+
routing_number: "123456789",
|
|
58
|
+
account_number: "123456789"
|
|
59
|
+
},
|
|
60
|
+
swift_bic_code: "CHASUS33",
|
|
61
|
+
account_type: "Business checking",
|
|
62
|
+
beneficiary: {
|
|
63
|
+
name: "Receiver Name",
|
|
64
|
+
address_line_1: "8 The Green, #19364",
|
|
65
|
+
address_line_2: "Dover, DE 19901"
|
|
66
|
+
},
|
|
67
|
+
receiving_bank: {
|
|
68
|
+
name: "JPMorgan Chase",
|
|
69
|
+
address_line_1: "270 Park Ave",
|
|
70
|
+
address_line_2: "New York, NY, 10017-2070"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
token: "USDC",
|
|
74
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
75
|
+
blockchain_wallet: {
|
|
76
|
+
network: "base",
|
|
77
|
+
address: "0x1234567890123456789012345678901234567890"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "va_000000000001",
|
|
82
|
+
banking_partner: "citi",
|
|
83
|
+
kyc_status: "approved",
|
|
84
|
+
us: {
|
|
85
|
+
ach: {
|
|
86
|
+
routing_number: "123456789",
|
|
87
|
+
account_number: "123456789"
|
|
88
|
+
},
|
|
89
|
+
wire: {
|
|
90
|
+
routing_number: "123456789",
|
|
91
|
+
account_number: "123456789"
|
|
92
|
+
},
|
|
93
|
+
rtp: {
|
|
94
|
+
routing_number: "123456789",
|
|
95
|
+
account_number: "123456789"
|
|
96
|
+
},
|
|
97
|
+
swift_bic_code: "CHASUS33",
|
|
98
|
+
account_type: "Business checking",
|
|
99
|
+
beneficiary: {
|
|
100
|
+
name: "Receiver Name",
|
|
101
|
+
address_line_1: "8 The Green, #19364",
|
|
102
|
+
address_line_2: "Dover, DE 19901"
|
|
103
|
+
},
|
|
104
|
+
receiving_bank: {
|
|
105
|
+
name: "JPMorgan Chase",
|
|
106
|
+
address_line_1: "270 Park Ave",
|
|
107
|
+
address_line_2: "New York, NY, 10017-2070"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
token: "USDC",
|
|
111
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
112
|
+
blockchain_wallet: null
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccounts), {
|
|
43
116
|
headers: { "Content-Type": "application/json" }
|
|
44
117
|
});
|
|
45
|
-
const { data, error } = yield blindpay.virtualAccounts.
|
|
46
|
-
receiver_id: "re_000000000000",
|
|
47
|
-
blockchain_wallet_id: "bw_000000000000",
|
|
48
|
-
token: "USDC"
|
|
49
|
-
});
|
|
118
|
+
const { data, error } = yield blindpay.virtualAccounts.list("re_000000000000");
|
|
50
119
|
globalExpect(error).toBeNull();
|
|
51
|
-
globalExpect(data).toEqual(
|
|
120
|
+
globalExpect(data).toEqual(mockedVirtualAccounts);
|
|
52
121
|
}));
|
|
53
122
|
});
|
|
54
|
-
describe("
|
|
55
|
-
it("should
|
|
123
|
+
describe("Get virtual account", () => {
|
|
124
|
+
it("should get a virtual account by id", () => __async(null, null, function* () {
|
|
56
125
|
const mockedVirtualAccount = {
|
|
57
126
|
id: "va_000000000000",
|
|
127
|
+
banking_partner: "jpmorgan",
|
|
128
|
+
kyc_status: "approved",
|
|
58
129
|
us: {
|
|
59
130
|
ach: {
|
|
60
131
|
routing_number: "123456789",
|
|
@@ -82,24 +153,29 @@ var require_virtual_accounts_test = __commonJS({
|
|
|
82
153
|
}
|
|
83
154
|
},
|
|
84
155
|
token: "USDC",
|
|
85
|
-
blockchain_wallet_id: "bw_000000000000"
|
|
156
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
157
|
+
blockchain_wallet: {
|
|
158
|
+
network: "base",
|
|
159
|
+
address: "0x1234567890123456789012345678901234567890"
|
|
160
|
+
}
|
|
86
161
|
};
|
|
87
162
|
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
|
|
88
163
|
headers: { "Content-Type": "application/json" }
|
|
89
164
|
});
|
|
90
|
-
const { data, error } = yield blindpay.virtualAccounts.
|
|
165
|
+
const { data, error } = yield blindpay.virtualAccounts.get({
|
|
91
166
|
receiver_id: "re_000000000000",
|
|
92
|
-
|
|
93
|
-
token: "USDC"
|
|
167
|
+
id: "va_000000000000"
|
|
94
168
|
});
|
|
95
169
|
globalExpect(error).toBeNull();
|
|
96
170
|
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
97
171
|
}));
|
|
98
172
|
});
|
|
99
|
-
describe("
|
|
100
|
-
it("should
|
|
173
|
+
describe("Create virtual account", () => {
|
|
174
|
+
it("should create a virtual account", () => __async(null, null, function* () {
|
|
101
175
|
const mockedVirtualAccount = {
|
|
102
176
|
id: "va_000000000000",
|
|
177
|
+
banking_partner: "jpmorgan",
|
|
178
|
+
kyc_status: "approved",
|
|
103
179
|
us: {
|
|
104
180
|
ach: {
|
|
105
181
|
routing_number: "123456789",
|
|
@@ -127,16 +203,40 @@ var require_virtual_accounts_test = __commonJS({
|
|
|
127
203
|
}
|
|
128
204
|
},
|
|
129
205
|
token: "USDC",
|
|
130
|
-
blockchain_wallet_id: "bw_000000000000"
|
|
206
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
207
|
+
blockchain_wallet: {
|
|
208
|
+
network: "base",
|
|
209
|
+
address: "0x1234567890123456789012345678901234567890"
|
|
210
|
+
}
|
|
131
211
|
};
|
|
132
212
|
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
|
|
133
213
|
headers: { "Content-Type": "application/json" }
|
|
134
214
|
});
|
|
135
|
-
const { data, error } = yield blindpay.virtualAccounts.
|
|
215
|
+
const { data, error } = yield blindpay.virtualAccounts.create({
|
|
216
|
+
receiver_id: "re_000000000000",
|
|
217
|
+
banking_partner: "jpmorgan",
|
|
218
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
219
|
+
token: "USDC"
|
|
220
|
+
});
|
|
136
221
|
globalExpect(error).toBeNull();
|
|
137
222
|
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
138
223
|
}));
|
|
139
224
|
});
|
|
225
|
+
describe("Update virtual account", () => {
|
|
226
|
+
it("should update a virtual account", () => __async(null, null, function* () {
|
|
227
|
+
fetchMock.mockResponseOnce(JSON.stringify(null), {
|
|
228
|
+
headers: { "Content-Type": "application/json" }
|
|
229
|
+
});
|
|
230
|
+
const { data, error } = yield blindpay.virtualAccounts.update({
|
|
231
|
+
receiver_id: "re_000000000000",
|
|
232
|
+
id: "va_000000000000",
|
|
233
|
+
blockchain_wallet_id: "bw_000000000001",
|
|
234
|
+
token: "USDT"
|
|
235
|
+
});
|
|
236
|
+
globalExpect(error).toBeNull();
|
|
237
|
+
globalExpect(data).toEqual(null);
|
|
238
|
+
}));
|
|
239
|
+
});
|
|
140
240
|
});
|
|
141
241
|
}
|
|
142
242
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-DhY5DFpq.mjs';
|
|
2
2
|
|
|
3
3
|
type GetBlockchainWalletMessage = string;
|
|
4
4
|
type GetBlockchainWalletMessageResponse = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-DhY5DFpq.js';
|
|
2
2
|
|
|
3
3
|
type GetBlockchainWalletMessage = string;
|
|
4
4
|
type GetBlockchainWalletMessageResponse = {
|
|
@@ -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.1.0";
|
|
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
|
},
|
|
@@ -18967,6 +18951,10 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18967
18951
|
createEvm(_c) {
|
|
18968
18952
|
var data = __objRest(_c, []);
|
|
18969
18953
|
return client.post(`/instances/${instanceId}/payouts/evm`, data);
|
|
18954
|
+
},
|
|
18955
|
+
createSolana(_d) {
|
|
18956
|
+
var data = __objRest(_d, []);
|
|
18957
|
+
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
18970
18958
|
}
|
|
18971
18959
|
};
|
|
18972
18960
|
}
|
|
@@ -19059,30 +19047,40 @@ function createTermsOfServiceResource(instanceId, client) {
|
|
|
19059
19047
|
// src/resources/virtual-accounts/index.ts
|
|
19060
19048
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19061
19049
|
return {
|
|
19062
|
-
|
|
19050
|
+
list(receiver_id) {
|
|
19051
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19052
|
+
},
|
|
19053
|
+
get({
|
|
19054
|
+
receiver_id,
|
|
19055
|
+
id
|
|
19056
|
+
}) {
|
|
19057
|
+
return client.get(
|
|
19058
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
|
|
19059
|
+
);
|
|
19060
|
+
},
|
|
19061
|
+
create(_a3) {
|
|
19063
19062
|
var _b = _a3, {
|
|
19064
19063
|
receiver_id
|
|
19065
19064
|
} = _b, data = __objRest(_b, [
|
|
19066
19065
|
"receiver_id"
|
|
19067
19066
|
]);
|
|
19068
|
-
return client.
|
|
19067
|
+
return client.post(
|
|
19069
19068
|
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19070
19069
|
data
|
|
19071
19070
|
);
|
|
19072
19071
|
},
|
|
19073
|
-
|
|
19072
|
+
update(_c) {
|
|
19074
19073
|
var _d = _c, {
|
|
19075
|
-
receiver_id
|
|
19074
|
+
receiver_id,
|
|
19075
|
+
id
|
|
19076
19076
|
} = _d, data = __objRest(_d, [
|
|
19077
|
-
"receiver_id"
|
|
19077
|
+
"receiver_id",
|
|
19078
|
+
"id"
|
|
19078
19079
|
]);
|
|
19079
|
-
return client.
|
|
19080
|
-
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19080
|
+
return client.put(
|
|
19081
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
|
|
19081
19082
|
data
|
|
19082
19083
|
);
|
|
19083
|
-
},
|
|
19084
|
-
get(receiver_id) {
|
|
19085
|
-
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19086
19084
|
}
|
|
19087
19085
|
};
|
|
19088
19086
|
}
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
11
|
+
} from "../../chunk-V4V47AUC.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-
|
|
18
|
+
import "../../chunk-LEPGLH7Q.mjs";
|
|
19
|
+
import "../../chunk-VGU72ZNI.mjs";
|
|
20
|
+
import "../../chunk-E7M4CJKR.mjs";
|
|
21
|
+
import "../../chunk-VOB7TMKL.mjs";
|
|
20
22
|
import "../../chunk-RC5NN5UF.mjs";
|
|
21
|
-
import "../../chunk-W7NJUABI.mjs";
|
|
22
|
-
import "../../chunk-VRA5HP7F.mjs";
|
|
23
|
-
import "../../chunk-3QQCDR3E.mjs";
|
|
24
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|