@blindpay/node 1.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/LICENSE +21 -0
- package/README.md +124 -0
- package/dist/api-client-Cw2mNJeR.d.mts +349 -0
- package/dist/api-client-Cw2mNJeR.d.ts +349 -0
- package/dist/chunk-2DAKB5XK.mjs +212 -0
- package/dist/chunk-3CZJEDS5.mjs +41 -0
- package/dist/chunk-CNNEROQ7.mjs +46 -0
- package/dist/chunk-ES7RXEM7.mjs +245 -0
- package/dist/chunk-GCCHFONX.mjs +17893 -0
- package/dist/chunk-GEDDLCJY.mjs +77 -0
- package/dist/chunk-GNDAATIJ.mjs +35 -0
- package/dist/chunk-HKFAJXJG.mjs +65 -0
- package/dist/chunk-LK3JPQ6I.mjs +49 -0
- package/dist/chunk-LLWEHHKB.mjs +47 -0
- package/dist/chunk-LUDGZPXY.mjs +51 -0
- package/dist/chunk-M6IYYMRW.mjs +35 -0
- package/dist/chunk-OBKEW4AQ.mjs +91 -0
- package/dist/chunk-QHMIK7U3.mjs +24 -0
- package/dist/chunk-QVOSGLUO.mjs +36 -0
- package/dist/chunk-UCAW3RTZ.mjs +47 -0
- package/dist/chunk-VKN2AMCW.mjs +57 -0
- package/dist/index.d.mts +81 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +895 -0
- package/dist/index.mjs +95 -0
- package/dist/magic-string.es-6D2DRE4K.mjs +1325 -0
- package/dist/resources/api-keys/api-keys.test.d.mts +2 -0
- package/dist/resources/api-keys/api-keys.test.d.ts +2 -0
- package/dist/resources/api-keys/api-keys.test.js +19881 -0
- package/dist/resources/api-keys/api-keys.test.mjs +130 -0
- package/dist/resources/api-keys/index.d.mts +45 -0
- package/dist/resources/api-keys/index.d.ts +45 -0
- package/dist/resources/api-keys/index.js +64 -0
- package/dist/resources/api-keys/index.mjs +9 -0
- package/dist/resources/available/available.test.d.mts +2 -0
- package/dist/resources/available/available.test.d.ts +2 -0
- package/dist/resources/available/available.test.js +19877 -0
- package/dist/resources/available/available.test.mjs +122 -0
- package/dist/resources/available/index.d.mts +25 -0
- package/dist/resources/available/index.d.ts +25 -0
- package/dist/resources/available/index.js +39 -0
- package/dist/resources/available/index.mjs +9 -0
- package/dist/resources/bank-accounts/bank-accounts.test.d.mts +2 -0
- package/dist/resources/bank-accounts/bank-accounts.test.d.ts +2 -0
- package/dist/resources/bank-accounts/bank-accounts.test.js +20173 -0
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +418 -0
- package/dist/resources/bank-accounts/index.d.mts +414 -0
- package/dist/resources/bank-accounts/index.d.ts +414 -0
- package/dist/resources/bank-accounts/index.js +227 -0
- package/dist/resources/bank-accounts/index.mjs +9 -0
- package/dist/resources/instances/index.d.mts +42 -0
- package/dist/resources/instances/index.d.ts +42 -0
- package/dist/resources/instances/index.js +75 -0
- package/dist/resources/instances/index.mjs +9 -0
- package/dist/resources/instances/instances.test.d.mts +2 -0
- package/dist/resources/instances/instances.test.d.ts +2 -0
- package/dist/resources/instances/instances.test.js +19873 -0
- package/dist/resources/instances/instances.test.mjs +118 -0
- package/dist/resources/partner-fees/index.d.mts +65 -0
- package/dist/resources/partner-fees/index.d.ts +65 -0
- package/dist/resources/partner-fees/index.js +69 -0
- package/dist/resources/partner-fees/index.mjs +9 -0
- package/dist/resources/partner-fees/partner-fees.test.d.mts +2 -0
- package/dist/resources/partner-fees/partner-fees.test.d.ts +2 -0
- package/dist/resources/partner-fees/partner-fees.test.js +19889 -0
- package/dist/resources/partner-fees/partner-fees.test.mjs +134 -0
- package/dist/resources/payins/index.d.mts +200 -0
- package/dist/resources/payins/index.d.ts +200 -0
- package/dist/resources/payins/index.js +75 -0
- package/dist/resources/payins/index.mjs +9 -0
- package/dist/resources/payins/payins-quotes.test.d.mts +2 -0
- package/dist/resources/payins/payins-quotes.test.d.ts +2 -0
- package/dist/resources/payins/payins-quotes.test.js +19852 -0
- package/dist/resources/payins/payins-quotes.test.mjs +97 -0
- package/dist/resources/payins/payins.test.d.mts +2 -0
- package/dist/resources/payins/payins.test.d.ts +2 -0
- package/dist/resources/payins/payins.test.js +20268 -0
- package/dist/resources/payins/payins.test.mjs +513 -0
- package/dist/resources/payins/quotes.d.mts +45 -0
- package/dist/resources/payins/quotes.d.ts +45 -0
- package/dist/resources/payins/quotes.js +63 -0
- package/dist/resources/payins/quotes.mjs +9 -0
- package/dist/resources/payouts/index.d.mts +155 -0
- package/dist/resources/payouts/index.d.ts +155 -0
- package/dist/resources/payouts/index.js +93 -0
- package/dist/resources/payouts/index.mjs +9 -0
- package/dist/resources/payouts/payouts.test.d.mts +2 -0
- package/dist/resources/payouts/payouts.test.d.ts +2 -0
- package/dist/resources/payouts/payouts.test.js +20346 -0
- package/dist/resources/payouts/payouts.test.mjs +591 -0
- package/dist/resources/quotes/index.d.mts +59 -0
- package/dist/resources/quotes/index.d.ts +59 -0
- package/dist/resources/quotes/index.js +63 -0
- package/dist/resources/quotes/index.mjs +9 -0
- package/dist/resources/quotes/quotes.test.d.mts +2 -0
- package/dist/resources/quotes/quotes.test.d.ts +2 -0
- package/dist/resources/quotes/quotes.test.js +19866 -0
- package/dist/resources/quotes/quotes.test.mjs +111 -0
- package/dist/resources/receivers/index.d.mts +205 -0
- package/dist/resources/receivers/index.d.ts +205 -0
- package/dist/resources/receivers/index.js +85 -0
- package/dist/resources/receivers/index.mjs +9 -0
- package/dist/resources/receivers/receivers.test.d.mts +2 -0
- package/dist/resources/receivers/receivers.test.d.ts +2 -0
- package/dist/resources/receivers/receivers.test.js +20145 -0
- package/dist/resources/receivers/receivers.test.mjs +390 -0
- package/dist/resources/virtual-accounts/index.d.mts +58 -0
- package/dist/resources/virtual-accounts/index.d.ts +58 -0
- package/dist/resources/virtual-accounts/index.js +79 -0
- package/dist/resources/virtual-accounts/index.mjs +9 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.d.mts +2 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.d.ts +2 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +19902 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +147 -0
- package/dist/resources/wallets/blockchain.d.mts +83 -0
- package/dist/resources/wallets/blockchain.d.ts +83 -0
- package/dist/resources/wallets/blockchain.js +105 -0
- package/dist/resources/wallets/blockchain.mjs +9 -0
- package/dist/resources/wallets/blockchain.test.d.mts +2 -0
- package/dist/resources/wallets/blockchain.test.d.ts +2 -0
- package/dist/resources/wallets/blockchain.test.js +19897 -0
- package/dist/resources/wallets/blockchain.test.mjs +142 -0
- package/dist/resources/wallets/offramp.d.mts +46 -0
- package/dist/resources/wallets/offramp.d.ts +46 -0
- package/dist/resources/wallets/offramp.js +77 -0
- package/dist/resources/wallets/offramp.mjs +9 -0
- package/dist/resources/wallets/offramp.test.d.mts +2 -0
- package/dist/resources/wallets/offramp.test.d.ts +2 -0
- package/dist/resources/wallets/offramp.test.js +19872 -0
- package/dist/resources/wallets/offramp.test.mjs +117 -0
- package/dist/resources/webhooks/index.d.mts +49 -0
- package/dist/resources/webhooks/index.d.ts +49 -0
- package/dist/resources/webhooks/index.js +74 -0
- package/dist/resources/webhooks/index.mjs +9 -0
- package/dist/resources/webhooks/webhooks.test.d.mts +2 -0
- package/dist/resources/webhooks/webhooks.test.d.ts +2 -0
- package/dist/resources/webhooks/webhooks.test.js +19878 -0
- package/dist/resources/webhooks/webhooks.test.mjs +123 -0
- package/package.json +65 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import {
|
|
2
|
+
afterEach,
|
|
3
|
+
describe,
|
|
4
|
+
globalExpect,
|
|
5
|
+
init_dist,
|
|
6
|
+
it
|
|
7
|
+
} from "../../chunk-GCCHFONX.mjs";
|
|
8
|
+
import {
|
|
9
|
+
Blindpay,
|
|
10
|
+
init_client
|
|
11
|
+
} from "../../chunk-ES7RXEM7.mjs";
|
|
12
|
+
import "../../chunk-GEDDLCJY.mjs";
|
|
13
|
+
import "../../chunk-LK3JPQ6I.mjs";
|
|
14
|
+
import "../../chunk-CNNEROQ7.mjs";
|
|
15
|
+
import "../../chunk-GNDAATIJ.mjs";
|
|
16
|
+
import "../../chunk-VKN2AMCW.mjs";
|
|
17
|
+
import "../../chunk-LUDGZPXY.mjs";
|
|
18
|
+
import "../../chunk-3CZJEDS5.mjs";
|
|
19
|
+
import "../../chunk-UCAW3RTZ.mjs";
|
|
20
|
+
import "../../chunk-M6IYYMRW.mjs";
|
|
21
|
+
import "../../chunk-HKFAJXJG.mjs";
|
|
22
|
+
import "../../chunk-QVOSGLUO.mjs";
|
|
23
|
+
import "../../chunk-2DAKB5XK.mjs";
|
|
24
|
+
import "../../chunk-QHMIK7U3.mjs";
|
|
25
|
+
import "../../chunk-LLWEHHKB.mjs";
|
|
26
|
+
import {
|
|
27
|
+
__async,
|
|
28
|
+
__commonJS
|
|
29
|
+
} from "../../chunk-OBKEW4AQ.mjs";
|
|
30
|
+
|
|
31
|
+
// src/resources/wallets/blockchain.test.ts
|
|
32
|
+
var require_blockchain_test = __commonJS({
|
|
33
|
+
"src/resources/wallets/blockchain.test.ts"(exports) {
|
|
34
|
+
init_dist();
|
|
35
|
+
init_client();
|
|
36
|
+
describe("Blockchain wallets", () => {
|
|
37
|
+
afterEach(() => fetchMock.resetMocks());
|
|
38
|
+
const blindpay = new Blindpay("test-key");
|
|
39
|
+
describe("Get blockchain wallet message", () => {
|
|
40
|
+
it("should get blockchain wallet message", () => __async(null, null, function* () {
|
|
41
|
+
const mockedMessage = { message: "random" };
|
|
42
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedMessage), {
|
|
43
|
+
headers: { "Content-Type": "application/json" }
|
|
44
|
+
});
|
|
45
|
+
const { data, error } = yield blindpay.wallets.blockchain.getWalletMessage({
|
|
46
|
+
instanceId: "in_000000000000",
|
|
47
|
+
receiverId: "re_000000000000"
|
|
48
|
+
});
|
|
49
|
+
globalExpect(error).toBeNull();
|
|
50
|
+
globalExpect(data).toEqual(mockedMessage);
|
|
51
|
+
}));
|
|
52
|
+
});
|
|
53
|
+
describe("List blockchain wallets", () => {
|
|
54
|
+
it("should list blockchain wallets", () => __async(null, null, function* () {
|
|
55
|
+
const mockedWallets = [
|
|
56
|
+
{
|
|
57
|
+
id: "bw_000000000000",
|
|
58
|
+
name: "Wallet Display Name",
|
|
59
|
+
network: "polygon",
|
|
60
|
+
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
|
|
61
|
+
signature_tx_hash: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
|
|
62
|
+
is_account_abstraction: false,
|
|
63
|
+
receiver_id: "re_000000000000"
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedWallets), {
|
|
67
|
+
headers: { "Content-Type": "application/json" }
|
|
68
|
+
});
|
|
69
|
+
const { data, error } = yield blindpay.wallets.blockchain.list({
|
|
70
|
+
instanceId: "in_000000000000",
|
|
71
|
+
receiverId: "re_000000000000"
|
|
72
|
+
});
|
|
73
|
+
globalExpect(error).toBeNull();
|
|
74
|
+
globalExpect(data).toEqual(mockedWallets);
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
describe("Create blockchain wallet", () => {
|
|
78
|
+
it("should create a blockchain wallet", () => __async(null, null, function* () {
|
|
79
|
+
const mockedWallet = {
|
|
80
|
+
id: "bw_000000000000",
|
|
81
|
+
name: "Wallet Display Name",
|
|
82
|
+
network: "polygon",
|
|
83
|
+
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
|
|
84
|
+
signature_tx_hash: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
|
|
85
|
+
is_account_abstraction: false,
|
|
86
|
+
receiver_id: "re_000000000000"
|
|
87
|
+
};
|
|
88
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedWallet), {
|
|
89
|
+
headers: { "Content-Type": "application/json" }
|
|
90
|
+
});
|
|
91
|
+
const { data, error } = yield blindpay.wallets.blockchain.create({
|
|
92
|
+
instanceId: "in_000000000000",
|
|
93
|
+
receiverId: "re_000000000000",
|
|
94
|
+
name: "Wallet Display Name",
|
|
95
|
+
network: "polygon",
|
|
96
|
+
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C"
|
|
97
|
+
});
|
|
98
|
+
globalExpect(error).toBeNull();
|
|
99
|
+
globalExpect(data).toEqual(mockedWallet);
|
|
100
|
+
}));
|
|
101
|
+
});
|
|
102
|
+
describe("Get blockchain wallet", () => {
|
|
103
|
+
it("should get a blockchain wallet", () => __async(null, null, function* () {
|
|
104
|
+
const mockedWallet = {
|
|
105
|
+
id: "bw_000000000000",
|
|
106
|
+
name: "Wallet Display Name",
|
|
107
|
+
network: "polygon",
|
|
108
|
+
address: "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
|
|
109
|
+
signature_tx_hash: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
|
|
110
|
+
is_account_abstraction: false,
|
|
111
|
+
receiver_id: "re_000000000000"
|
|
112
|
+
};
|
|
113
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedWallet), {
|
|
114
|
+
headers: { "Content-Type": "application/json" }
|
|
115
|
+
});
|
|
116
|
+
const { data, error } = yield blindpay.wallets.blockchain.get({
|
|
117
|
+
instanceId: "in_000000000000",
|
|
118
|
+
receiverId: "re_000000000000",
|
|
119
|
+
id: "bw_000000000000"
|
|
120
|
+
});
|
|
121
|
+
globalExpect(error).toBeNull();
|
|
122
|
+
globalExpect(data).toEqual(mockedWallet);
|
|
123
|
+
}));
|
|
124
|
+
});
|
|
125
|
+
describe("Delete blockchain wallet", () => {
|
|
126
|
+
it("should delete a blockchain wallet", () => __async(null, null, function* () {
|
|
127
|
+
fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
|
|
128
|
+
headers: { "Content-Type": "application/json" }
|
|
129
|
+
});
|
|
130
|
+
const { data, error } = yield blindpay.wallets.blockchain.delete({
|
|
131
|
+
instanceId: "in_000000000000",
|
|
132
|
+
receiverId: "re_000000000000",
|
|
133
|
+
id: "bw_000000000000"
|
|
134
|
+
});
|
|
135
|
+
globalExpect(error).toBeNull();
|
|
136
|
+
globalExpect(data).toEqual({ data: null });
|
|
137
|
+
}));
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
export default require_blockchain_test();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-Cw2mNJeR.mjs';
|
|
2
|
+
|
|
3
|
+
type OfframpWallet = {
|
|
4
|
+
id: string;
|
|
5
|
+
external_id: string;
|
|
6
|
+
instance_id: string;
|
|
7
|
+
receiver_id: string;
|
|
8
|
+
bank_account_id: string;
|
|
9
|
+
network: "tron";
|
|
10
|
+
address: string;
|
|
11
|
+
created_at: string;
|
|
12
|
+
updated_at: string;
|
|
13
|
+
};
|
|
14
|
+
type ListOfframpWalletsInput = {
|
|
15
|
+
instanceId: string;
|
|
16
|
+
receiverId: string;
|
|
17
|
+
bankAccountId: string;
|
|
18
|
+
};
|
|
19
|
+
type ListOfframpWalletsResponse = OfframpWallet[];
|
|
20
|
+
type CreateOfframpWalletInput = {
|
|
21
|
+
receiverId: string;
|
|
22
|
+
instanceId: string;
|
|
23
|
+
bankAccountId: string;
|
|
24
|
+
external_id: string;
|
|
25
|
+
network: "tron";
|
|
26
|
+
};
|
|
27
|
+
type CreateOfframpWalletResponse = {
|
|
28
|
+
id: string;
|
|
29
|
+
external_id: string;
|
|
30
|
+
network: "tron";
|
|
31
|
+
address: string;
|
|
32
|
+
};
|
|
33
|
+
type GetOfframpWalletInput = {
|
|
34
|
+
receiverId: string;
|
|
35
|
+
instanceId: string;
|
|
36
|
+
bankAccountId: string;
|
|
37
|
+
id: string;
|
|
38
|
+
};
|
|
39
|
+
type GetOfframpWalletResponse = OfframpWallet;
|
|
40
|
+
declare function createOfframpWalletsResource(client: InternalApiClient): {
|
|
41
|
+
list({ instanceId, }: ListOfframpWalletsInput): Promise<BlindpayApiResponse<ListOfframpWalletsResponse>>;
|
|
42
|
+
create({ receiverId, instanceId, bankAccountId, ...data }: CreateOfframpWalletInput): Promise<BlindpayApiResponse<CreateOfframpWalletResponse>>;
|
|
43
|
+
get({ receiverId, instanceId, bankAccountId, id, }: GetOfframpWalletInput): Promise<BlindpayApiResponse<GetOfframpWalletResponse>>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { type CreateOfframpWalletInput, type CreateOfframpWalletResponse, type GetOfframpWalletInput, type GetOfframpWalletResponse, type ListOfframpWalletsInput, type ListOfframpWalletsResponse, type OfframpWallet, createOfframpWalletsResource };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-Cw2mNJeR.js';
|
|
2
|
+
|
|
3
|
+
type OfframpWallet = {
|
|
4
|
+
id: string;
|
|
5
|
+
external_id: string;
|
|
6
|
+
instance_id: string;
|
|
7
|
+
receiver_id: string;
|
|
8
|
+
bank_account_id: string;
|
|
9
|
+
network: "tron";
|
|
10
|
+
address: string;
|
|
11
|
+
created_at: string;
|
|
12
|
+
updated_at: string;
|
|
13
|
+
};
|
|
14
|
+
type ListOfframpWalletsInput = {
|
|
15
|
+
instanceId: string;
|
|
16
|
+
receiverId: string;
|
|
17
|
+
bankAccountId: string;
|
|
18
|
+
};
|
|
19
|
+
type ListOfframpWalletsResponse = OfframpWallet[];
|
|
20
|
+
type CreateOfframpWalletInput = {
|
|
21
|
+
receiverId: string;
|
|
22
|
+
instanceId: string;
|
|
23
|
+
bankAccountId: string;
|
|
24
|
+
external_id: string;
|
|
25
|
+
network: "tron";
|
|
26
|
+
};
|
|
27
|
+
type CreateOfframpWalletResponse = {
|
|
28
|
+
id: string;
|
|
29
|
+
external_id: string;
|
|
30
|
+
network: "tron";
|
|
31
|
+
address: string;
|
|
32
|
+
};
|
|
33
|
+
type GetOfframpWalletInput = {
|
|
34
|
+
receiverId: string;
|
|
35
|
+
instanceId: string;
|
|
36
|
+
bankAccountId: string;
|
|
37
|
+
id: string;
|
|
38
|
+
};
|
|
39
|
+
type GetOfframpWalletResponse = OfframpWallet;
|
|
40
|
+
declare function createOfframpWalletsResource(client: InternalApiClient): {
|
|
41
|
+
list({ instanceId, }: ListOfframpWalletsInput): Promise<BlindpayApiResponse<ListOfframpWalletsResponse>>;
|
|
42
|
+
create({ receiverId, instanceId, bankAccountId, ...data }: CreateOfframpWalletInput): Promise<BlindpayApiResponse<CreateOfframpWalletResponse>>;
|
|
43
|
+
get({ receiverId, instanceId, bankAccountId, id, }: GetOfframpWalletInput): Promise<BlindpayApiResponse<GetOfframpWalletResponse>>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { type CreateOfframpWalletInput, type CreateOfframpWalletResponse, type GetOfframpWalletInput, type GetOfframpWalletResponse, type ListOfframpWalletsInput, type ListOfframpWalletsResponse, type OfframpWallet, createOfframpWalletsResource };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __objRest = (source, exclude) => {
|
|
9
|
+
var target = {};
|
|
10
|
+
for (var prop in source)
|
|
11
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
12
|
+
target[prop] = source[prop];
|
|
13
|
+
if (source != null && __getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
15
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
16
|
+
target[prop] = source[prop];
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
+
|
|
34
|
+
// src/resources/wallets/offramp.ts
|
|
35
|
+
var offramp_exports = {};
|
|
36
|
+
__export(offramp_exports, {
|
|
37
|
+
createOfframpWalletsResource: () => createOfframpWalletsResource
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(offramp_exports);
|
|
40
|
+
function createOfframpWalletsResource(client) {
|
|
41
|
+
return {
|
|
42
|
+
list({
|
|
43
|
+
instanceId
|
|
44
|
+
}) {
|
|
45
|
+
return client.get(`/instances/${instanceId}/offramp_wallets`);
|
|
46
|
+
},
|
|
47
|
+
create(_a) {
|
|
48
|
+
var _b = _a, {
|
|
49
|
+
receiverId,
|
|
50
|
+
instanceId,
|
|
51
|
+
bankAccountId
|
|
52
|
+
} = _b, data = __objRest(_b, [
|
|
53
|
+
"receiverId",
|
|
54
|
+
"instanceId",
|
|
55
|
+
"bankAccountId"
|
|
56
|
+
]);
|
|
57
|
+
return client.post(
|
|
58
|
+
`/instances/${instanceId}/receivers/${receiverId}/bank-accounts/${bankAccountId}/offramp_wallets`,
|
|
59
|
+
data
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
get({
|
|
63
|
+
receiverId,
|
|
64
|
+
instanceId,
|
|
65
|
+
bankAccountId,
|
|
66
|
+
id
|
|
67
|
+
}) {
|
|
68
|
+
return client.get(
|
|
69
|
+
`/instances/${instanceId}/receivers/${receiverId}/bank-accounts/${bankAccountId}/offramp_wallets/${id}`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
+
0 && (module.exports = {
|
|
76
|
+
createOfframpWalletsResource
|
|
77
|
+
});
|