@blindpay/node 3.3.0 → 3.4.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-Cu0yYexQ.d.ts → api-client-Bklw4zQi.d.ts} +1 -1
- package/dist/{api-client-DV5jG52T.d.mts → api-client-BlkRiojB.d.mts} +1 -1
- package/dist/{chunk-JOHWDSDM.mjs → chunk-VWWGGMMT.mjs} +5 -5
- package/dist/{index.d-yOiKSwHO.d.ts → index.d-Gvol1faW.d.mts} +244 -1
- package/dist/{index.d-yOiKSwHO.d.mts → index.d-Gvol1faW.d.ts} +244 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/index.mjs +5 -5
- package/dist/resources/api-keys/api-keys.test.js +1 -1
- package/dist/resources/api-keys/api-keys.test.mjs +2 -2
- package/dist/resources/api-keys/index.d.mts +2 -2
- package/dist/resources/api-keys/index.d.ts +2 -2
- package/dist/resources/available/available.test.js +1 -1
- package/dist/resources/available/available.test.mjs +2 -2
- package/dist/resources/available/index.d.mts +2 -2
- package/dist/resources/available/index.d.ts +2 -2
- package/dist/resources/bank-accounts/bank-accounts.test.js +1 -1
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +2 -2
- package/dist/resources/bank-accounts/index.d.mts +9 -3
- package/dist/resources/bank-accounts/index.d.ts +9 -3
- package/dist/resources/fees/fees.test.js +1 -1
- package/dist/resources/fees/fees.test.mjs +2 -2
- package/dist/resources/fees/index.d.mts +2 -2
- package/dist/resources/fees/index.d.ts +2 -2
- package/dist/resources/instances/index.d.mts +3 -2
- package/dist/resources/instances/index.d.ts +3 -2
- package/dist/resources/instances/instances.test.js +1 -1
- package/dist/resources/instances/instances.test.mjs +2 -2
- package/dist/resources/partner-fees/index.d.mts +2 -2
- package/dist/resources/partner-fees/index.d.ts +2 -2
- package/dist/resources/partner-fees/partner-fees.test.js +1 -1
- package/dist/resources/partner-fees/partner-fees.test.mjs +2 -2
- package/dist/resources/payins/index.d.mts +2 -2
- package/dist/resources/payins/index.d.ts +2 -2
- package/dist/resources/payins/payins-quotes.test.js +1 -1
- package/dist/resources/payins/payins-quotes.test.mjs +2 -2
- package/dist/resources/payins/payins.test.js +1 -1
- package/dist/resources/payins/payins.test.mjs +2 -2
- package/dist/resources/payins/quotes.d.mts +2 -2
- package/dist/resources/payins/quotes.d.ts +2 -2
- package/dist/resources/payouts/index.d.mts +2 -2
- package/dist/resources/payouts/index.d.ts +2 -2
- package/dist/resources/payouts/payouts.test.js +1 -1
- package/dist/resources/payouts/payouts.test.mjs +2 -2
- package/dist/resources/quotes/index.d.mts +2 -2
- package/dist/resources/quotes/index.d.ts +2 -2
- package/dist/resources/quotes/quotes.test.js +1 -1
- package/dist/resources/quotes/quotes.test.mjs +2 -2
- package/dist/resources/receivers/index.d.mts +90 -10
- package/dist/resources/receivers/index.d.ts +90 -10
- package/dist/resources/receivers/receivers.test.js +93 -1
- package/dist/resources/receivers/receivers.test.mjs +94 -2
- package/dist/resources/terms-of-service/index.d.mts +2 -2
- package/dist/resources/terms-of-service/index.d.ts +2 -2
- package/dist/resources/terms-of-service/terms-of-service.test.js +1 -1
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +2 -2
- package/dist/resources/transfers/index.d.mts +2 -2
- package/dist/resources/transfers/index.d.ts +2 -2
- package/dist/resources/transfers/transfers.test.js +1 -1
- package/dist/resources/transfers/transfers.test.mjs +2 -2
- package/dist/resources/upload/index.d.mts +1 -1
- package/dist/resources/upload/index.d.ts +1 -1
- package/dist/resources/upload/upload.test.js +1 -1
- package/dist/resources/upload/upload.test.mjs +2 -2
- package/dist/resources/virtual-accounts/index.d.mts +13 -4
- package/dist/resources/virtual-accounts/index.d.ts +13 -4
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +61 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +62 -2
- package/dist/resources/wallets/blockchain.d.mts +2 -2
- package/dist/resources/wallets/blockchain.d.ts +2 -2
- package/dist/resources/wallets/blockchain.test.js +1 -1
- package/dist/resources/wallets/blockchain.test.mjs +2 -2
- package/dist/resources/wallets/custodial.d.mts +2 -2
- package/dist/resources/wallets/custodial.d.ts +2 -2
- package/dist/resources/wallets/custodial.test.js +1 -1
- package/dist/resources/wallets/custodial.test.mjs +2 -2
- package/dist/resources/wallets/offramp.d.mts +11 -8
- package/dist/resources/wallets/offramp.d.ts +11 -8
- package/dist/resources/wallets/offramp.test.js +21 -1
- package/dist/resources/wallets/offramp.test.mjs +22 -2
- package/dist/resources/webhooks/index.d.mts +2 -2
- package/dist/resources/webhooks/index.d.ts +2 -2
- package/dist/resources/webhooks/webhooks.test.js +1 -1
- package/dist/resources/webhooks/webhooks.test.mjs +2 -2
- package/package.json +1 -1
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-VWWGGMMT.mjs";
|
|
12
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-KMU6V4LW.mjs";
|
|
14
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
15
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
16
15
|
import "../../chunk-ISHZTBAN.mjs";
|
|
17
16
|
import "../../chunk-UDRMLZWT.mjs";
|
|
18
17
|
import "../../chunk-LEPGLH7Q.mjs";
|
|
18
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
19
19
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
20
|
import "../../chunk-F5Z45GCA.mjs";
|
|
21
21
|
import "../../chunk-TBTA7A2P.mjs";
|
|
@@ -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.4.1";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-VWWGGMMT.mjs";
|
|
12
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-KMU6V4LW.mjs";
|
|
14
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
15
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
16
15
|
import "../../chunk-ISHZTBAN.mjs";
|
|
17
16
|
import "../../chunk-UDRMLZWT.mjs";
|
|
18
17
|
import "../../chunk-LEPGLH7Q.mjs";
|
|
18
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
19
19
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
20
|
import "../../chunk-F5Z45GCA.mjs";
|
|
21
21
|
import "../../chunk-TBTA7A2P.mjs";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse, S as StablecoinToken, N as Network } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse, S as StablecoinToken, N as Network } from '../../index.d-Gvol1faW.mjs';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-BlkRiojB.mjs';
|
|
3
3
|
|
|
4
|
-
type BankingPartner = "jpmorgan" | "citi" | "hsbc";
|
|
4
|
+
type BankingPartner = "jpmorgan" | "citi" | "hsbc" | "cfsb";
|
|
5
|
+
type SoleProprietorDocType = "master_service_agreement" | "salary_slip" | "bank_statement";
|
|
5
6
|
type VirtualAccount = {
|
|
6
7
|
id: string;
|
|
7
8
|
banking_partner: BankingPartner;
|
|
@@ -20,6 +21,7 @@ type VirtualAccount = {
|
|
|
20
21
|
account_number: string;
|
|
21
22
|
};
|
|
22
23
|
swift_bic_code: string;
|
|
24
|
+
swift_account_number?: string | null;
|
|
23
25
|
account_type: string;
|
|
24
26
|
beneficiary: {
|
|
25
27
|
name: string;
|
|
@@ -31,6 +33,11 @@ type VirtualAccount = {
|
|
|
31
33
|
address_line_1: string;
|
|
32
34
|
address_line_2: string;
|
|
33
35
|
};
|
|
36
|
+
swift_receiving_bank?: {
|
|
37
|
+
name: string | null;
|
|
38
|
+
address_line_1: string | null;
|
|
39
|
+
address_line_2: string | null;
|
|
40
|
+
} | null;
|
|
34
41
|
};
|
|
35
42
|
token: StablecoinToken;
|
|
36
43
|
blockchain_wallet_id: string;
|
|
@@ -47,6 +54,8 @@ type CreateVirtualAccountInput = {
|
|
|
47
54
|
token: StablecoinToken;
|
|
48
55
|
blockchain_wallet_id: string;
|
|
49
56
|
signed_agreement_id?: string | null;
|
|
57
|
+
sole_proprietor_doc_type?: SoleProprietorDocType | null;
|
|
58
|
+
sole_proprietor_doc_file?: string | null;
|
|
50
59
|
};
|
|
51
60
|
type CreateVirtualAccountResponse = VirtualAccount;
|
|
52
61
|
type GetVirtualAccountInput = {
|
|
@@ -67,4 +76,4 @@ declare function createVirtualAccountsResource(instanceId: string, client: Inter
|
|
|
67
76
|
update({ receiver_id, id, ...data }: UpdateVirtualAccountInput): Promise<BlindpayApiResponse<void>>;
|
|
68
77
|
};
|
|
69
78
|
|
|
70
|
-
export { type BankingPartner, type CreateVirtualAccountInput, type CreateVirtualAccountResponse, type GetVirtualAccountInput, type GetVirtualAccountResponse, type ListVirtualAccountsInput, type ListVirtualAccountsResponse, type UpdateVirtualAccountInput, type VirtualAccount, createVirtualAccountsResource };
|
|
79
|
+
export { type BankingPartner, type CreateVirtualAccountInput, type CreateVirtualAccountResponse, type GetVirtualAccountInput, type GetVirtualAccountResponse, type ListVirtualAccountsInput, type ListVirtualAccountsResponse, type SoleProprietorDocType, type UpdateVirtualAccountInput, type VirtualAccount, createVirtualAccountsResource };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse, S as StablecoinToken, N as Network } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse, S as StablecoinToken, N as Network } from '../../index.d-Gvol1faW.js';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-Bklw4zQi.js';
|
|
3
3
|
|
|
4
|
-
type BankingPartner = "jpmorgan" | "citi" | "hsbc";
|
|
4
|
+
type BankingPartner = "jpmorgan" | "citi" | "hsbc" | "cfsb";
|
|
5
|
+
type SoleProprietorDocType = "master_service_agreement" | "salary_slip" | "bank_statement";
|
|
5
6
|
type VirtualAccount = {
|
|
6
7
|
id: string;
|
|
7
8
|
banking_partner: BankingPartner;
|
|
@@ -20,6 +21,7 @@ type VirtualAccount = {
|
|
|
20
21
|
account_number: string;
|
|
21
22
|
};
|
|
22
23
|
swift_bic_code: string;
|
|
24
|
+
swift_account_number?: string | null;
|
|
23
25
|
account_type: string;
|
|
24
26
|
beneficiary: {
|
|
25
27
|
name: string;
|
|
@@ -31,6 +33,11 @@ type VirtualAccount = {
|
|
|
31
33
|
address_line_1: string;
|
|
32
34
|
address_line_2: string;
|
|
33
35
|
};
|
|
36
|
+
swift_receiving_bank?: {
|
|
37
|
+
name: string | null;
|
|
38
|
+
address_line_1: string | null;
|
|
39
|
+
address_line_2: string | null;
|
|
40
|
+
} | null;
|
|
34
41
|
};
|
|
35
42
|
token: StablecoinToken;
|
|
36
43
|
blockchain_wallet_id: string;
|
|
@@ -47,6 +54,8 @@ type CreateVirtualAccountInput = {
|
|
|
47
54
|
token: StablecoinToken;
|
|
48
55
|
blockchain_wallet_id: string;
|
|
49
56
|
signed_agreement_id?: string | null;
|
|
57
|
+
sole_proprietor_doc_type?: SoleProprietorDocType | null;
|
|
58
|
+
sole_proprietor_doc_file?: string | null;
|
|
50
59
|
};
|
|
51
60
|
type CreateVirtualAccountResponse = VirtualAccount;
|
|
52
61
|
type GetVirtualAccountInput = {
|
|
@@ -67,4 +76,4 @@ declare function createVirtualAccountsResource(instanceId: string, client: Inter
|
|
|
67
76
|
update({ receiver_id, id, ...data }: UpdateVirtualAccountInput): Promise<BlindpayApiResponse<void>>;
|
|
68
77
|
};
|
|
69
78
|
|
|
70
|
-
export { type BankingPartner, type CreateVirtualAccountInput, type CreateVirtualAccountResponse, type GetVirtualAccountInput, type GetVirtualAccountResponse, type ListVirtualAccountsInput, type ListVirtualAccountsResponse, type UpdateVirtualAccountInput, type VirtualAccount, createVirtualAccountsResource };
|
|
79
|
+
export { type BankingPartner, type CreateVirtualAccountInput, type CreateVirtualAccountResponse, type GetVirtualAccountInput, type GetVirtualAccountResponse, type ListVirtualAccountsInput, type ListVirtualAccountsResponse, type SoleProprietorDocType, type UpdateVirtualAccountInput, type VirtualAccount, createVirtualAccountsResource };
|
|
@@ -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.4.1";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -19699,6 +19699,66 @@ describe("Virtual accounts", () => {
|
|
|
19699
19699
|
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
19700
19700
|
}));
|
|
19701
19701
|
});
|
|
19702
|
+
describe("Create virtual account with cfsb banking partner", () => {
|
|
19703
|
+
it("should create a virtual account with cfsb and sole proprietor docs", () => __async(null, null, function* () {
|
|
19704
|
+
const mockedVirtualAccount = {
|
|
19705
|
+
id: "va_000000000002",
|
|
19706
|
+
banking_partner: "cfsb",
|
|
19707
|
+
kyc_status: "verifying",
|
|
19708
|
+
us: {
|
|
19709
|
+
ach: {
|
|
19710
|
+
routing_number: "123456789",
|
|
19711
|
+
account_number: "123456789"
|
|
19712
|
+
},
|
|
19713
|
+
wire: {
|
|
19714
|
+
routing_number: "123456789",
|
|
19715
|
+
account_number: "123456789"
|
|
19716
|
+
},
|
|
19717
|
+
rtp: {
|
|
19718
|
+
routing_number: "123456789",
|
|
19719
|
+
account_number: "123456789"
|
|
19720
|
+
},
|
|
19721
|
+
swift_bic_code: "TCCLGB3L",
|
|
19722
|
+
swift_account_number: "GB50TCCL04140449730892",
|
|
19723
|
+
account_type: "Business checking",
|
|
19724
|
+
beneficiary: {
|
|
19725
|
+
name: "Receiver Name",
|
|
19726
|
+
address_line_1: "8 The Green, #19364",
|
|
19727
|
+
address_line_2: "Dover, DE 19901"
|
|
19728
|
+
},
|
|
19729
|
+
receiving_bank: {
|
|
19730
|
+
name: "CFSB",
|
|
19731
|
+
address_line_1: "100 Main St",
|
|
19732
|
+
address_line_2: "Suite 200"
|
|
19733
|
+
},
|
|
19734
|
+
swift_receiving_bank: {
|
|
19735
|
+
name: "CFSB International",
|
|
19736
|
+
address_line_1: "100 Main St",
|
|
19737
|
+
address_line_2: null
|
|
19738
|
+
}
|
|
19739
|
+
},
|
|
19740
|
+
token: "USDC",
|
|
19741
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
19742
|
+
blockchain_wallet: {
|
|
19743
|
+
network: "base",
|
|
19744
|
+
address: "0x1234567890123456789012345678901234567890"
|
|
19745
|
+
}
|
|
19746
|
+
};
|
|
19747
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
|
|
19748
|
+
headers: { "Content-Type": "application/json" }
|
|
19749
|
+
});
|
|
19750
|
+
const { data, error } = yield blindpay.virtualAccounts.create({
|
|
19751
|
+
receiver_id: "re_000000000000",
|
|
19752
|
+
banking_partner: "cfsb",
|
|
19753
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
19754
|
+
token: "USDC",
|
|
19755
|
+
sole_proprietor_doc_type: "master_service_agreement",
|
|
19756
|
+
sole_proprietor_doc_file: "https://example.com/document.pdf"
|
|
19757
|
+
});
|
|
19758
|
+
globalExpect(error).toBeNull();
|
|
19759
|
+
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
19760
|
+
}));
|
|
19761
|
+
});
|
|
19702
19762
|
describe("Update virtual account", () => {
|
|
19703
19763
|
it("should update a virtual account", () => __async(null, null, function* () {
|
|
19704
19764
|
fetchMock.mockResponseOnce(JSON.stringify(null), {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-VWWGGMMT.mjs";
|
|
12
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-KMU6V4LW.mjs";
|
|
14
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
15
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
16
15
|
import "../../chunk-ISHZTBAN.mjs";
|
|
17
16
|
import "../../chunk-UDRMLZWT.mjs";
|
|
18
17
|
import "../../chunk-LEPGLH7Q.mjs";
|
|
18
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
19
19
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
20
|
import "../../chunk-F5Z45GCA.mjs";
|
|
21
21
|
import "../../chunk-TBTA7A2P.mjs";
|
|
@@ -227,6 +227,66 @@ var require_virtual_accounts_test = __commonJS({
|
|
|
227
227
|
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
228
228
|
}));
|
|
229
229
|
});
|
|
230
|
+
describe("Create virtual account with cfsb banking partner", () => {
|
|
231
|
+
it("should create a virtual account with cfsb and sole proprietor docs", () => __async(null, null, function* () {
|
|
232
|
+
const mockedVirtualAccount = {
|
|
233
|
+
id: "va_000000000002",
|
|
234
|
+
banking_partner: "cfsb",
|
|
235
|
+
kyc_status: "verifying",
|
|
236
|
+
us: {
|
|
237
|
+
ach: {
|
|
238
|
+
routing_number: "123456789",
|
|
239
|
+
account_number: "123456789"
|
|
240
|
+
},
|
|
241
|
+
wire: {
|
|
242
|
+
routing_number: "123456789",
|
|
243
|
+
account_number: "123456789"
|
|
244
|
+
},
|
|
245
|
+
rtp: {
|
|
246
|
+
routing_number: "123456789",
|
|
247
|
+
account_number: "123456789"
|
|
248
|
+
},
|
|
249
|
+
swift_bic_code: "TCCLGB3L",
|
|
250
|
+
swift_account_number: "GB50TCCL04140449730892",
|
|
251
|
+
account_type: "Business checking",
|
|
252
|
+
beneficiary: {
|
|
253
|
+
name: "Receiver Name",
|
|
254
|
+
address_line_1: "8 The Green, #19364",
|
|
255
|
+
address_line_2: "Dover, DE 19901"
|
|
256
|
+
},
|
|
257
|
+
receiving_bank: {
|
|
258
|
+
name: "CFSB",
|
|
259
|
+
address_line_1: "100 Main St",
|
|
260
|
+
address_line_2: "Suite 200"
|
|
261
|
+
},
|
|
262
|
+
swift_receiving_bank: {
|
|
263
|
+
name: "CFSB International",
|
|
264
|
+
address_line_1: "100 Main St",
|
|
265
|
+
address_line_2: null
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
token: "USDC",
|
|
269
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
270
|
+
blockchain_wallet: {
|
|
271
|
+
network: "base",
|
|
272
|
+
address: "0x1234567890123456789012345678901234567890"
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
|
|
276
|
+
headers: { "Content-Type": "application/json" }
|
|
277
|
+
});
|
|
278
|
+
const { data, error } = yield blindpay.virtualAccounts.create({
|
|
279
|
+
receiver_id: "re_000000000000",
|
|
280
|
+
banking_partner: "cfsb",
|
|
281
|
+
blockchain_wallet_id: "bw_000000000000",
|
|
282
|
+
token: "USDC",
|
|
283
|
+
sole_proprietor_doc_type: "master_service_agreement",
|
|
284
|
+
sole_proprietor_doc_file: "https://example.com/document.pdf"
|
|
285
|
+
});
|
|
286
|
+
globalExpect(error).toBeNull();
|
|
287
|
+
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
288
|
+
}));
|
|
289
|
+
});
|
|
230
290
|
describe("Update virtual account", () => {
|
|
231
291
|
it("should update a virtual account", () => __async(null, null, function* () {
|
|
232
292
|
fetchMock.mockResponseOnce(JSON.stringify(null), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse, N as Network } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse, N as Network } from '../../index.d-Gvol1faW.mjs';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-BlkRiojB.mjs';
|
|
3
3
|
|
|
4
4
|
type GetBlockchainWalletMessage = string;
|
|
5
5
|
type GetBlockchainWalletMessageResponse = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse, N as Network } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse, N as Network } from '../../index.d-Gvol1faW.js';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-Bklw4zQi.js';
|
|
3
3
|
|
|
4
4
|
type GetBlockchainWalletMessage = string;
|
|
5
5
|
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 = "3.
|
|
18705
|
+
var version = "3.4.1";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-VWWGGMMT.mjs";
|
|
12
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-KMU6V4LW.mjs";
|
|
14
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
15
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
16
15
|
import "../../chunk-ISHZTBAN.mjs";
|
|
17
16
|
import "../../chunk-UDRMLZWT.mjs";
|
|
18
17
|
import "../../chunk-LEPGLH7Q.mjs";
|
|
18
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
19
19
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
20
|
import "../../chunk-F5Z45GCA.mjs";
|
|
21
21
|
import "../../chunk-TBTA7A2P.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse, N as Network, S as StablecoinToken } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse, N as Network, S as StablecoinToken } from '../../index.d-Gvol1faW.mjs';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-BlkRiojB.mjs';
|
|
3
3
|
|
|
4
4
|
type CustodialWallet = {
|
|
5
5
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse, N as Network, S as StablecoinToken } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse, N as Network, S as StablecoinToken } from '../../index.d-Gvol1faW.js';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-Bklw4zQi.js';
|
|
3
3
|
|
|
4
4
|
type CustodialWallet = {
|
|
5
5
|
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 = "3.
|
|
18705
|
+
var version = "3.4.1";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-VWWGGMMT.mjs";
|
|
12
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-KMU6V4LW.mjs";
|
|
14
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
15
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
16
15
|
import "../../chunk-ISHZTBAN.mjs";
|
|
17
16
|
import "../../chunk-UDRMLZWT.mjs";
|
|
18
17
|
import "../../chunk-LEPGLH7Q.mjs";
|
|
18
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
19
19
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
20
|
import "../../chunk-F5Z45GCA.mjs";
|
|
21
21
|
import "../../chunk-TBTA7A2P.mjs";
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse } from '../../index.d-Gvol1faW.mjs';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-BlkRiojB.mjs';
|
|
3
3
|
|
|
4
|
+
type OfframpWalletNetwork = "tron" | "solana";
|
|
4
5
|
type OfframpWallet = {
|
|
5
6
|
id: string;
|
|
6
7
|
external_id: string;
|
|
7
8
|
instance_id: string;
|
|
8
9
|
receiver_id: string;
|
|
9
10
|
bank_account_id: string;
|
|
10
|
-
network:
|
|
11
|
+
network: OfframpWalletNetwork;
|
|
11
12
|
address: string;
|
|
12
13
|
created_at: string;
|
|
13
14
|
updated_at: string;
|
|
15
|
+
circle_wallet_id?: string | null;
|
|
14
16
|
};
|
|
15
17
|
type ListOfframpWalletsInput = {
|
|
16
18
|
receiver_id: string;
|
|
@@ -20,13 +22,14 @@ type ListOfframpWalletsResponse = OfframpWallet[];
|
|
|
20
22
|
type CreateOfframpWalletInput = {
|
|
21
23
|
receiver_id: string;
|
|
22
24
|
bank_account_id: string;
|
|
23
|
-
external_id
|
|
24
|
-
network:
|
|
25
|
+
external_id?: string | null;
|
|
26
|
+
network: OfframpWalletNetwork;
|
|
25
27
|
};
|
|
26
28
|
type CreateOfframpWalletResponse = {
|
|
27
29
|
id: string;
|
|
28
|
-
external_id
|
|
29
|
-
|
|
30
|
+
external_id?: string | null;
|
|
31
|
+
circle_wallet_id?: string | null;
|
|
32
|
+
network: OfframpWalletNetwork;
|
|
30
33
|
address: string;
|
|
31
34
|
};
|
|
32
35
|
type GetOfframpWalletInput = {
|
|
@@ -41,4 +44,4 @@ declare function createOfframpWalletsResource(instanceId: string, client: Intern
|
|
|
41
44
|
get({ receiver_id, bank_account_id, id, }: GetOfframpWalletInput): Promise<BlindpayApiResponse<GetOfframpWalletResponse>>;
|
|
42
45
|
};
|
|
43
46
|
|
|
44
|
-
export { type CreateOfframpWalletInput, type CreateOfframpWalletResponse, type GetOfframpWalletInput, type GetOfframpWalletResponse, type ListOfframpWalletsInput, type ListOfframpWalletsResponse, type OfframpWallet, createOfframpWalletsResource };
|
|
47
|
+
export { type CreateOfframpWalletInput, type CreateOfframpWalletResponse, type GetOfframpWalletInput, type GetOfframpWalletResponse, type ListOfframpWalletsInput, type ListOfframpWalletsResponse, type OfframpWallet, type OfframpWalletNetwork, createOfframpWalletsResource };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse } from '../../index.d-Gvol1faW.js';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-Bklw4zQi.js';
|
|
3
3
|
|
|
4
|
+
type OfframpWalletNetwork = "tron" | "solana";
|
|
4
5
|
type OfframpWallet = {
|
|
5
6
|
id: string;
|
|
6
7
|
external_id: string;
|
|
7
8
|
instance_id: string;
|
|
8
9
|
receiver_id: string;
|
|
9
10
|
bank_account_id: string;
|
|
10
|
-
network:
|
|
11
|
+
network: OfframpWalletNetwork;
|
|
11
12
|
address: string;
|
|
12
13
|
created_at: string;
|
|
13
14
|
updated_at: string;
|
|
15
|
+
circle_wallet_id?: string | null;
|
|
14
16
|
};
|
|
15
17
|
type ListOfframpWalletsInput = {
|
|
16
18
|
receiver_id: string;
|
|
@@ -20,13 +22,14 @@ type ListOfframpWalletsResponse = OfframpWallet[];
|
|
|
20
22
|
type CreateOfframpWalletInput = {
|
|
21
23
|
receiver_id: string;
|
|
22
24
|
bank_account_id: string;
|
|
23
|
-
external_id
|
|
24
|
-
network:
|
|
25
|
+
external_id?: string | null;
|
|
26
|
+
network: OfframpWalletNetwork;
|
|
25
27
|
};
|
|
26
28
|
type CreateOfframpWalletResponse = {
|
|
27
29
|
id: string;
|
|
28
|
-
external_id
|
|
29
|
-
|
|
30
|
+
external_id?: string | null;
|
|
31
|
+
circle_wallet_id?: string | null;
|
|
32
|
+
network: OfframpWalletNetwork;
|
|
30
33
|
address: string;
|
|
31
34
|
};
|
|
32
35
|
type GetOfframpWalletInput = {
|
|
@@ -41,4 +44,4 @@ declare function createOfframpWalletsResource(instanceId: string, client: Intern
|
|
|
41
44
|
get({ receiver_id, bank_account_id, id, }: GetOfframpWalletInput): Promise<BlindpayApiResponse<GetOfframpWalletResponse>>;
|
|
42
45
|
};
|
|
43
46
|
|
|
44
|
-
export { type CreateOfframpWalletInput, type CreateOfframpWalletResponse, type GetOfframpWalletInput, type GetOfframpWalletResponse, type ListOfframpWalletsInput, type ListOfframpWalletsResponse, type OfframpWallet, createOfframpWalletsResource };
|
|
47
|
+
export { type CreateOfframpWalletInput, type CreateOfframpWalletResponse, type GetOfframpWalletInput, type GetOfframpWalletResponse, type ListOfframpWalletsInput, type ListOfframpWalletsResponse, type OfframpWallet, type OfframpWalletNetwork, createOfframpWalletsResource };
|
|
@@ -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.4.1";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -19560,6 +19560,26 @@ describe("Offramp wallets", () => {
|
|
|
19560
19560
|
globalExpect(data).toEqual(mockedOfframpWallet);
|
|
19561
19561
|
}));
|
|
19562
19562
|
});
|
|
19563
|
+
describe("Create solana offramp wallet", () => {
|
|
19564
|
+
it("should create a solana offramp wallet", () => __async(null, null, function* () {
|
|
19565
|
+
const mockedOfframpWallet = {
|
|
19566
|
+
id: "ow_000000000001",
|
|
19567
|
+
network: "solana",
|
|
19568
|
+
address: "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
|
|
19569
|
+
circle_wallet_id: "01234567-abcd-efgh-ijkl-012345678901"
|
|
19570
|
+
};
|
|
19571
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedOfframpWallet), {
|
|
19572
|
+
headers: { "Content-Type": "application/json" }
|
|
19573
|
+
});
|
|
19574
|
+
const { data, error } = yield blindpay.wallets.offramp.create({
|
|
19575
|
+
network: "solana",
|
|
19576
|
+
receiver_id: "re_000000000000",
|
|
19577
|
+
bank_account_id: "ba_000000000000"
|
|
19578
|
+
});
|
|
19579
|
+
globalExpect(error).toBeNull();
|
|
19580
|
+
globalExpect(data).toEqual(mockedOfframpWallet);
|
|
19581
|
+
}));
|
|
19582
|
+
});
|
|
19563
19583
|
describe("Get offramp wallet", () => {
|
|
19564
19584
|
it("should get an offramp wallet", () => __async(null, null, function* () {
|
|
19565
19585
|
const mockedOfframpWallet = {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-VWWGGMMT.mjs";
|
|
12
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-KMU6V4LW.mjs";
|
|
14
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
15
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
16
15
|
import "../../chunk-ISHZTBAN.mjs";
|
|
17
16
|
import "../../chunk-UDRMLZWT.mjs";
|
|
18
17
|
import "../../chunk-LEPGLH7Q.mjs";
|
|
18
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
19
19
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
20
|
import "../../chunk-F5Z45GCA.mjs";
|
|
21
21
|
import "../../chunk-TBTA7A2P.mjs";
|
|
@@ -88,6 +88,26 @@ var require_offramp_test = __commonJS({
|
|
|
88
88
|
globalExpect(data).toEqual(mockedOfframpWallet);
|
|
89
89
|
}));
|
|
90
90
|
});
|
|
91
|
+
describe("Create solana offramp wallet", () => {
|
|
92
|
+
it("should create a solana offramp wallet", () => __async(null, null, function* () {
|
|
93
|
+
const mockedOfframpWallet = {
|
|
94
|
+
id: "ow_000000000001",
|
|
95
|
+
network: "solana",
|
|
96
|
+
address: "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
|
|
97
|
+
circle_wallet_id: "01234567-abcd-efgh-ijkl-012345678901"
|
|
98
|
+
};
|
|
99
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedOfframpWallet), {
|
|
100
|
+
headers: { "Content-Type": "application/json" }
|
|
101
|
+
});
|
|
102
|
+
const { data, error } = yield blindpay.wallets.offramp.create({
|
|
103
|
+
network: "solana",
|
|
104
|
+
receiver_id: "re_000000000000",
|
|
105
|
+
bank_account_id: "ba_000000000000"
|
|
106
|
+
});
|
|
107
|
+
globalExpect(error).toBeNull();
|
|
108
|
+
globalExpect(data).toEqual(mockedOfframpWallet);
|
|
109
|
+
}));
|
|
110
|
+
});
|
|
91
111
|
describe("Get offramp wallet", () => {
|
|
92
112
|
it("should get an offramp wallet", () => __async(null, null, function* () {
|
|
93
113
|
const mockedOfframpWallet = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse } from '../../index.d-Gvol1faW.mjs';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-BlkRiojB.mjs';
|
|
3
3
|
|
|
4
4
|
type WebhookEvents = "receiver.new" | "receiver.update" | "bankAccount.new" | "payout.new" | "payout.update" | "payout.complete" | "payout.partnerFee" | "blockchainWallet.new" | "payin.new" | "payin.update" | "payin.complete" | "payin.partnerFee" | "tos.accept" | "limitIncrease.new" | "limitIncrease.update" | "virtualAccount.new" | "virtualAccount.complete" | "transfer.new" | "transfer.update" | "transfer.complete" | "wallet.new" | "wallet.inbound";
|
|
5
5
|
type CreateWebhookEndpointInput = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlindpayApiResponse } from '../../index.d-
|
|
2
|
-
import { I as InternalApiClient } from '../../api-client-
|
|
1
|
+
import { B as BlindpayApiResponse } from '../../index.d-Gvol1faW.js';
|
|
2
|
+
import { I as InternalApiClient } from '../../api-client-Bklw4zQi.js';
|
|
3
3
|
|
|
4
4
|
type WebhookEvents = "receiver.new" | "receiver.update" | "bankAccount.new" | "payout.new" | "payout.update" | "payout.complete" | "payout.partnerFee" | "blockchainWallet.new" | "payin.new" | "payin.update" | "payin.complete" | "payin.partnerFee" | "tos.accept" | "limitIncrease.new" | "limitIncrease.update" | "virtualAccount.new" | "virtualAccount.complete" | "transfer.new" | "transfer.update" | "transfer.complete" | "wallet.new" | "wallet.inbound";
|
|
5
5
|
type CreateWebhookEndpointInput = {
|
|
@@ -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.4.1";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-VWWGGMMT.mjs";
|
|
12
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-KMU6V4LW.mjs";
|
|
14
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
15
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
16
15
|
import "../../chunk-ISHZTBAN.mjs";
|
|
17
16
|
import "../../chunk-UDRMLZWT.mjs";
|
|
18
17
|
import "../../chunk-LEPGLH7Q.mjs";
|
|
18
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
19
19
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
20
|
import "../../chunk-F5Z45GCA.mjs";
|
|
21
21
|
import "../../chunk-TBTA7A2P.mjs";
|