@blindpay/node 3.10.0 → 4.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/{chunk-7PWF4J3Z.mjs → chunk-ECYZLQUR.mjs} +12 -12
- package/dist/{chunk-N4F3FBNB.mjs → chunk-L23IOSI3.mjs} +40 -40
- package/dist/chunk-SLKVEQUY.mjs +76 -0
- package/dist/{chunk-LEPGLH7Q.mjs → chunk-SWTOSLUI.mjs} +10 -10
- package/dist/{chunk-KMU6V4LW.mjs → chunk-TVOMVVOO.mjs} +11 -11
- package/dist/{chunk-FG25JHDX.mjs → chunk-VAVDEV6P.mjs} +14 -14
- package/dist/{chunk-QGNLMN6Z.mjs → chunk-YHI3J2CL.mjs} +7 -7
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +148 -141
- package/dist/index.mjs +12 -12
- package/dist/resources/api-keys/api-keys.test.js +146 -139
- package/dist/resources/api-keys/api-keys.test.mjs +7 -7
- package/dist/resources/available/available.test.js +146 -139
- package/dist/resources/available/available.test.mjs +7 -7
- package/dist/resources/bank-accounts/bank-accounts.test.js +173 -166
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +34 -34
- package/dist/resources/bank-accounts/index.d.mts +29 -29
- package/dist/resources/bank-accounts/index.d.ts +29 -29
- package/dist/resources/bank-accounts/index.js +40 -40
- package/dist/resources/bank-accounts/index.mjs +1 -1
- package/dist/resources/{receivers/receivers.test.js → customers/customers.test.js} +200 -193
- package/dist/resources/{receivers/receivers.test.mjs → customers/customers.test.mjs} +64 -64
- package/dist/resources/{receivers → customers}/index.d.mts +23 -23
- package/dist/resources/{receivers → customers}/index.d.ts +23 -23
- package/dist/resources/{receivers → customers}/index.js +32 -25
- package/dist/resources/customers/index.mjs +9 -0
- package/dist/resources/fees/fees.test.js +146 -139
- package/dist/resources/fees/fees.test.mjs +7 -7
- package/dist/resources/instances/instances.test.js +146 -139
- package/dist/resources/instances/instances.test.mjs +7 -7
- package/dist/resources/partner-fees/partner-fees.test.js +146 -139
- package/dist/resources/partner-fees/partner-fees.test.mjs +7 -7
- package/dist/resources/payins/payins-quotes.test.js +146 -139
- package/dist/resources/payins/payins-quotes.test.mjs +7 -7
- package/dist/resources/payins/payins.test.js +146 -139
- package/dist/resources/payins/payins.test.mjs +7 -7
- package/dist/resources/payouts/payouts.test.js +146 -139
- package/dist/resources/payouts/payouts.test.mjs +7 -7
- package/dist/resources/quotes/quotes.test.js +146 -139
- package/dist/resources/quotes/quotes.test.mjs +7 -7
- package/dist/resources/terms-of-service/terms-of-service.test.js +146 -139
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +7 -7
- package/dist/resources/transfers/transfers.test.js +146 -139
- package/dist/resources/transfers/transfers.test.mjs +7 -7
- package/dist/resources/upload/upload.test.js +146 -139
- package/dist/resources/upload/upload.test.mjs +7 -7
- package/dist/resources/virtual-accounts/index.d.mts +7 -7
- package/dist/resources/virtual-accounts/index.d.ts +7 -7
- package/dist/resources/virtual-accounts/index.js +10 -10
- package/dist/resources/virtual-accounts/index.mjs +1 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +150 -143
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +11 -11
- package/dist/resources/wallets/blockchain.d.mts +13 -13
- package/dist/resources/wallets/blockchain.d.ts +13 -13
- package/dist/resources/wallets/blockchain.js +14 -14
- package/dist/resources/wallets/blockchain.mjs +1 -1
- package/dist/resources/wallets/blockchain.test.js +154 -147
- package/dist/resources/wallets/blockchain.test.mjs +15 -15
- package/dist/resources/wallets/custodial.d.mts +9 -9
- package/dist/resources/wallets/custodial.d.ts +9 -9
- package/dist/resources/wallets/custodial.js +11 -11
- package/dist/resources/wallets/custodial.mjs +1 -1
- package/dist/resources/wallets/custodial.test.js +150 -143
- package/dist/resources/wallets/custodial.test.mjs +11 -11
- package/dist/resources/wallets/offramp.d.mts +7 -7
- package/dist/resources/wallets/offramp.d.ts +7 -7
- package/dist/resources/wallets/offramp.js +7 -7
- package/dist/resources/wallets/offramp.mjs +1 -1
- package/dist/resources/wallets/offramp.test.js +152 -145
- package/dist/resources/wallets/offramp.test.mjs +13 -13
- package/dist/resources/webhooks/webhooks.test.js +146 -139
- package/dist/resources/webhooks/webhooks.test.mjs +7 -7
- package/package.json +1 -1
- package/dist/chunk-YIZJM2GU.mjs +0 -69
- package/dist/resources/receivers/index.mjs +0 -9
- /package/dist/resources/{receivers/receivers.test.d.mts → customers/customers.test.d.mts} +0 -0
- /package/dist/resources/{receivers/receivers.test.d.ts → customers/customers.test.d.ts} +0 -0
|
@@ -8,26 +8,26 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
11
|
+
} from "../../chunk-ECYZLQUR.mjs";
|
|
12
|
+
import "../../chunk-VAVDEV6P.mjs";
|
|
13
|
+
import "../../chunk-TVOMVVOO.mjs";
|
|
14
|
+
import "../../chunk-YHI3J2CL.mjs";
|
|
15
15
|
import "../../chunk-UC57SCKQ.mjs";
|
|
16
16
|
import "../../chunk-ISHZTBAN.mjs";
|
|
17
17
|
import "../../chunk-UDRMLZWT.mjs";
|
|
18
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-SWTOSLUI.mjs";
|
|
19
19
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
20
|
import "../../chunk-F5Z45GCA.mjs";
|
|
21
21
|
import "../../chunk-TBTA7A2P.mjs";
|
|
22
|
-
import "../../chunk-YIZJM2GU.mjs";
|
|
23
22
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
23
|
+
import "../../chunk-SLKVEQUY.mjs";
|
|
24
24
|
import "../../chunk-ALHMJWQN.mjs";
|
|
25
25
|
import "../../chunk-KYOUR4KX.mjs";
|
|
26
26
|
import "../../chunk-RC5NN5UF.mjs";
|
|
27
27
|
import "../../chunk-VGU72ZNI.mjs";
|
|
28
28
|
import "../../chunk-LRHWT4JU.mjs";
|
|
29
29
|
import "../../chunk-WE73MTQL.mjs";
|
|
30
|
-
import "../../chunk-
|
|
30
|
+
import "../../chunk-L23IOSI3.mjs";
|
|
31
31
|
import {
|
|
32
32
|
__async,
|
|
33
33
|
__commonJS
|
|
@@ -62,7 +62,7 @@ var require_blockchain_test = __commonJS({
|
|
|
62
62
|
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
|
|
63
63
|
signature_tx_hash: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
|
|
64
64
|
is_account_abstraction: false,
|
|
65
|
-
|
|
65
|
+
customer_id: "re_000000000000"
|
|
66
66
|
}
|
|
67
67
|
];
|
|
68
68
|
fetchMock.mockResponseOnce(JSON.stringify(mockedWallets), {
|
|
@@ -82,13 +82,13 @@ var require_blockchain_test = __commonJS({
|
|
|
82
82
|
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
|
|
83
83
|
signature_tx_hash: void 0,
|
|
84
84
|
is_account_abstraction: true,
|
|
85
|
-
|
|
85
|
+
customer_id: "re_000000000000"
|
|
86
86
|
};
|
|
87
87
|
fetchMock.mockResponseOnce(JSON.stringify(mockedWallet), {
|
|
88
88
|
headers: { "Content-Type": "application/json" }
|
|
89
89
|
});
|
|
90
90
|
const { data, error } = yield blindpay.wallets.blockchain.createWithAddress({
|
|
91
|
-
|
|
91
|
+
customer_id: "re_000000000000",
|
|
92
92
|
name: "Wallet Display Name",
|
|
93
93
|
network: "polygon",
|
|
94
94
|
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C"
|
|
@@ -106,13 +106,13 @@ var require_blockchain_test = __commonJS({
|
|
|
106
106
|
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
|
|
107
107
|
signature_tx_hash: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
|
|
108
108
|
is_account_abstraction: false,
|
|
109
|
-
|
|
109
|
+
customer_id: "re_000000000000"
|
|
110
110
|
};
|
|
111
111
|
fetchMock.mockResponseOnce(JSON.stringify(mockedWallet), {
|
|
112
112
|
headers: { "Content-Type": "application/json" }
|
|
113
113
|
});
|
|
114
114
|
const { data, error } = yield blindpay.wallets.blockchain.createWithHash({
|
|
115
|
-
|
|
115
|
+
customer_id: "re_000000000000",
|
|
116
116
|
name: "Wallet Display Name",
|
|
117
117
|
network: "polygon",
|
|
118
118
|
signature_tx_hash: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"
|
|
@@ -130,13 +130,13 @@ var require_blockchain_test = __commonJS({
|
|
|
130
130
|
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
|
|
131
131
|
signature_tx_hash: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
|
|
132
132
|
is_account_abstraction: false,
|
|
133
|
-
|
|
133
|
+
customer_id: "re_000000000000"
|
|
134
134
|
};
|
|
135
135
|
fetchMock.mockResponseOnce(JSON.stringify(mockedWallet), {
|
|
136
136
|
headers: { "Content-Type": "application/json" }
|
|
137
137
|
});
|
|
138
138
|
const { data, error } = yield blindpay.wallets.blockchain.get({
|
|
139
|
-
|
|
139
|
+
customer_id: "re_000000000000",
|
|
140
140
|
id: "bw_000000000000"
|
|
141
141
|
});
|
|
142
142
|
globalExpect(error).toBeNull();
|
|
@@ -149,7 +149,7 @@ var require_blockchain_test = __commonJS({
|
|
|
149
149
|
headers: { "Content-Type": "application/json" }
|
|
150
150
|
});
|
|
151
151
|
const { data, error } = yield blindpay.wallets.blockchain.delete({
|
|
152
|
-
|
|
152
|
+
customer_id: "re_000000000000",
|
|
153
153
|
id: "bw_000000000000"
|
|
154
154
|
});
|
|
155
155
|
globalExpect(error).toBeNull();
|
|
@@ -10,7 +10,7 @@ type CustodialWallet = {
|
|
|
10
10
|
created_at: string;
|
|
11
11
|
};
|
|
12
12
|
type CreateCustodialWalletInput = {
|
|
13
|
-
|
|
13
|
+
customer_id: string;
|
|
14
14
|
name: string;
|
|
15
15
|
network: Network;
|
|
16
16
|
external_id?: string | null;
|
|
@@ -19,7 +19,7 @@ type CreateCustodialWalletResponse = CustodialWallet;
|
|
|
19
19
|
type ListCustodialWalletsInput = string;
|
|
20
20
|
type ListCustodialWalletsResponse = CustodialWallet[];
|
|
21
21
|
type GetCustodialWalletInput = {
|
|
22
|
-
|
|
22
|
+
customer_id: string;
|
|
23
23
|
id: string;
|
|
24
24
|
};
|
|
25
25
|
type GetCustodialWalletResponse = CustodialWallet;
|
|
@@ -30,7 +30,7 @@ type WalletTokenBalance = {
|
|
|
30
30
|
amount: number;
|
|
31
31
|
};
|
|
32
32
|
type GetCustodialWalletBalanceInput = {
|
|
33
|
-
|
|
33
|
+
customer_id: string;
|
|
34
34
|
id: string;
|
|
35
35
|
};
|
|
36
36
|
type GetCustodialWalletBalanceResponse = {
|
|
@@ -39,15 +39,15 @@ type GetCustodialWalletBalanceResponse = {
|
|
|
39
39
|
USDB: WalletTokenBalance;
|
|
40
40
|
};
|
|
41
41
|
type DeleteCustodialWalletInput = {
|
|
42
|
-
|
|
42
|
+
customer_id: string;
|
|
43
43
|
id: string;
|
|
44
44
|
};
|
|
45
45
|
declare function createCustodialWalletsResource(instanceId: string, client: InternalApiClient): {
|
|
46
|
-
list(
|
|
47
|
-
get({
|
|
48
|
-
create({
|
|
49
|
-
getBalance({
|
|
50
|
-
delete({
|
|
46
|
+
list(customer_id: ListCustodialWalletsInput): Promise<BlindpayApiResponse<ListCustodialWalletsResponse>>;
|
|
47
|
+
get({ customer_id, id, }: GetCustodialWalletInput): Promise<BlindpayApiResponse<GetCustodialWalletResponse>>;
|
|
48
|
+
create({ customer_id, ...data }: CreateCustodialWalletInput): Promise<BlindpayApiResponse<CreateCustodialWalletResponse>>;
|
|
49
|
+
getBalance({ customer_id, id, }: GetCustodialWalletBalanceInput): Promise<BlindpayApiResponse<GetCustodialWalletBalanceResponse>>;
|
|
50
|
+
delete({ customer_id, id, }: DeleteCustodialWalletInput): Promise<BlindpayApiResponse<{
|
|
51
51
|
success: boolean;
|
|
52
52
|
}>>;
|
|
53
53
|
};
|
|
@@ -10,7 +10,7 @@ type CustodialWallet = {
|
|
|
10
10
|
created_at: string;
|
|
11
11
|
};
|
|
12
12
|
type CreateCustodialWalletInput = {
|
|
13
|
-
|
|
13
|
+
customer_id: string;
|
|
14
14
|
name: string;
|
|
15
15
|
network: Network;
|
|
16
16
|
external_id?: string | null;
|
|
@@ -19,7 +19,7 @@ type CreateCustodialWalletResponse = CustodialWallet;
|
|
|
19
19
|
type ListCustodialWalletsInput = string;
|
|
20
20
|
type ListCustodialWalletsResponse = CustodialWallet[];
|
|
21
21
|
type GetCustodialWalletInput = {
|
|
22
|
-
|
|
22
|
+
customer_id: string;
|
|
23
23
|
id: string;
|
|
24
24
|
};
|
|
25
25
|
type GetCustodialWalletResponse = CustodialWallet;
|
|
@@ -30,7 +30,7 @@ type WalletTokenBalance = {
|
|
|
30
30
|
amount: number;
|
|
31
31
|
};
|
|
32
32
|
type GetCustodialWalletBalanceInput = {
|
|
33
|
-
|
|
33
|
+
customer_id: string;
|
|
34
34
|
id: string;
|
|
35
35
|
};
|
|
36
36
|
type GetCustodialWalletBalanceResponse = {
|
|
@@ -39,15 +39,15 @@ type GetCustodialWalletBalanceResponse = {
|
|
|
39
39
|
USDB: WalletTokenBalance;
|
|
40
40
|
};
|
|
41
41
|
type DeleteCustodialWalletInput = {
|
|
42
|
-
|
|
42
|
+
customer_id: string;
|
|
43
43
|
id: string;
|
|
44
44
|
};
|
|
45
45
|
declare function createCustodialWalletsResource(instanceId: string, client: InternalApiClient): {
|
|
46
|
-
list(
|
|
47
|
-
get({
|
|
48
|
-
create({
|
|
49
|
-
getBalance({
|
|
50
|
-
delete({
|
|
46
|
+
list(customer_id: ListCustodialWalletsInput): Promise<BlindpayApiResponse<ListCustodialWalletsResponse>>;
|
|
47
|
+
get({ customer_id, id, }: GetCustodialWalletInput): Promise<BlindpayApiResponse<GetCustodialWalletResponse>>;
|
|
48
|
+
create({ customer_id, ...data }: CreateCustodialWalletInput): Promise<BlindpayApiResponse<CreateCustodialWalletResponse>>;
|
|
49
|
+
getBalance({ customer_id, id, }: GetCustodialWalletBalanceInput): Promise<BlindpayApiResponse<GetCustodialWalletBalanceResponse>>;
|
|
50
|
+
delete({ customer_id, id, }: DeleteCustodialWalletInput): Promise<BlindpayApiResponse<{
|
|
51
51
|
success: boolean;
|
|
52
52
|
}>>;
|
|
53
53
|
};
|
|
@@ -39,36 +39,36 @@ __export(custodial_exports, {
|
|
|
39
39
|
module.exports = __toCommonJS(custodial_exports);
|
|
40
40
|
function createCustodialWalletsResource(instanceId, client) {
|
|
41
41
|
return {
|
|
42
|
-
list(
|
|
43
|
-
return client.get(`/instances/${instanceId}/
|
|
42
|
+
list(customer_id) {
|
|
43
|
+
return client.get(`/instances/${instanceId}/customers/${customer_id}/wallets`);
|
|
44
44
|
},
|
|
45
45
|
get({
|
|
46
|
-
|
|
46
|
+
customer_id,
|
|
47
47
|
id
|
|
48
48
|
}) {
|
|
49
|
-
return client.get(`/instances/${instanceId}/
|
|
49
|
+
return client.get(`/instances/${instanceId}/customers/${customer_id}/wallets/${id}`);
|
|
50
50
|
},
|
|
51
51
|
create(_a) {
|
|
52
52
|
var _b = _a, {
|
|
53
|
-
|
|
53
|
+
customer_id
|
|
54
54
|
} = _b, data = __objRest(_b, [
|
|
55
|
-
"
|
|
55
|
+
"customer_id"
|
|
56
56
|
]);
|
|
57
|
-
return client.post(`/instances/${instanceId}/
|
|
57
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/wallets`, data);
|
|
58
58
|
},
|
|
59
59
|
getBalance({
|
|
60
|
-
|
|
60
|
+
customer_id,
|
|
61
61
|
id
|
|
62
62
|
}) {
|
|
63
63
|
return client.get(
|
|
64
|
-
`/instances/${instanceId}/
|
|
64
|
+
`/instances/${instanceId}/customers/${customer_id}/wallets/${id}/balance`
|
|
65
65
|
);
|
|
66
66
|
},
|
|
67
67
|
delete({
|
|
68
|
-
|
|
68
|
+
customer_id,
|
|
69
69
|
id
|
|
70
70
|
}) {
|
|
71
|
-
return client.delete(`/instances/${instanceId}/
|
|
71
|
+
return client.delete(`/instances/${instanceId}/customers/${customer_id}/wallets/${id}`);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
}
|