@blindpay/node 1.0.0 → 1.1.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/LICENSE +1 -1
- package/README.md +24 -37
- package/dist/{chunk-HKFAJXJG.mjs → chunk-3QQCDR3E.mjs} +12 -32
- package/dist/{chunk-LUDGZPXY.mjs → chunk-5XJJKYXE.mjs} +9 -16
- package/dist/chunk-64EFLUS3.mjs +106 -0
- package/dist/chunk-B5T7AQLH.mjs +38 -0
- package/dist/{chunk-VKN2AMCW.mjs → chunk-BONN6PYB.mjs} +12 -30
- package/dist/{chunk-M6IYYMRW.mjs → chunk-E7M4CJKR.mjs} +4 -12
- package/dist/chunk-IZYPRCCV.mjs +82 -0
- package/dist/{chunk-QVOSGLUO.mjs → chunk-LRHWT4JU.mjs} +6 -10
- package/dist/chunk-QGNLMN6Z.mjs +49 -0
- package/dist/{chunk-3CZJEDS5.mjs → chunk-RC5NN5UF.mjs} +5 -14
- package/dist/{chunk-GNDAATIJ.mjs → chunk-TBTA7A2P.mjs} +4 -12
- package/dist/{chunk-CNNEROQ7.mjs → chunk-UC57SCKQ.mjs} +6 -17
- package/dist/{chunk-UCAW3RTZ.mjs → chunk-W7NJUABI.mjs} +12 -20
- package/dist/{chunk-ES7RXEM7.mjs → chunk-YPXYUS2X.mjs} +46 -37
- package/dist/index.d.mts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +237 -435
- package/dist/index.mjs +19 -19
- package/dist/resources/api-keys/api-keys.test.js +238 -445
- package/dist/resources/api-keys/api-keys.test.mjs +19 -28
- package/dist/resources/api-keys/index.d.mts +20 -20
- package/dist/resources/api-keys/index.d.ts +20 -20
- package/dist/resources/api-keys/index.js +6 -10
- package/dist/resources/api-keys/index.mjs +1 -1
- package/dist/resources/available/available.test.js +235 -433
- package/dist/resources/available/available.test.mjs +16 -16
- package/dist/resources/bank-accounts/bank-accounts.test.js +245 -455
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +26 -38
- package/dist/resources/bank-accounts/index.d.mts +22 -145
- package/dist/resources/bank-accounts/index.d.ts +22 -145
- package/dist/resources/bank-accounts/index.js +102 -184
- package/dist/resources/bank-accounts/index.mjs +1 -1
- package/dist/resources/instances/index.d.mts +9 -20
- package/dist/resources/instances/index.d.ts +9 -20
- package/dist/resources/instances/index.js +11 -20
- package/dist/resources/instances/index.mjs +1 -1
- package/dist/resources/instances/instances.test.js +239 -446
- package/dist/resources/instances/instances.test.mjs +20 -29
- package/dist/resources/partner-fees/index.d.mts +8 -18
- package/dist/resources/partner-fees/index.d.ts +8 -18
- package/dist/resources/partner-fees/index.js +5 -14
- package/dist/resources/partner-fees/index.mjs +1 -1
- package/dist/resources/partner-fees/partner-fees.test.js +238 -445
- package/dist/resources/partner-fees/partner-fees.test.mjs +19 -28
- package/dist/resources/payins/index.d.mts +15 -30
- package/dist/resources/payins/index.d.ts +15 -30
- package/dist/resources/payins/index.js +12 -20
- package/dist/resources/payins/index.mjs +1 -1
- package/dist/resources/payins/payins-quotes.test.js +235 -435
- package/dist/resources/payins/payins-quotes.test.mjs +16 -18
- package/dist/resources/payins/payins.test.js +240 -449
- package/dist/resources/payins/payins.test.mjs +21 -32
- package/dist/resources/payins/quotes.d.mts +3 -5
- package/dist/resources/payins/quotes.d.ts +3 -5
- package/dist/resources/payins/quotes.js +4 -12
- package/dist/resources/payins/quotes.mjs +1 -1
- package/dist/resources/payouts/index.d.mts +13 -28
- package/dist/resources/payouts/index.d.ts +13 -28
- package/dist/resources/payouts/index.js +12 -32
- package/dist/resources/payouts/index.mjs +1 -1
- package/dist/resources/payouts/payouts.test.js +239 -449
- package/dist/resources/payouts/payouts.test.mjs +20 -32
- package/dist/resources/quotes/index.d.mts +3 -5
- package/dist/resources/quotes/index.d.ts +3 -5
- package/dist/resources/quotes/index.js +4 -12
- package/dist/resources/quotes/index.mjs +1 -1
- package/dist/resources/quotes/quotes.test.js +235 -435
- package/dist/resources/quotes/quotes.test.mjs +16 -18
- package/dist/resources/receivers/index.d.mts +13 -27
- package/dist/resources/receivers/index.d.ts +13 -27
- package/dist/resources/receivers/index.js +12 -30
- package/dist/resources/receivers/index.mjs +1 -1
- package/dist/resources/receivers/receivers.test.js +241 -452
- package/dist/resources/receivers/receivers.test.mjs +22 -35
- package/dist/resources/virtual-accounts/index.d.mts +7 -12
- package/dist/resources/virtual-accounts/index.d.ts +7 -12
- package/dist/resources/virtual-accounts/index.js +9 -16
- package/dist/resources/virtual-accounts/index.mjs +1 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +238 -441
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +19 -24
- package/dist/resources/wallets/blockchain.d.mts +23 -31
- package/dist/resources/wallets/blockchain.d.ts +23 -31
- package/dist/resources/wallets/blockchain.js +51 -33
- package/dist/resources/wallets/blockchain.mjs +1 -1
- package/dist/resources/wallets/blockchain.test.js +268 -451
- package/dist/resources/wallets/blockchain.test.mjs +49 -34
- package/dist/resources/wallets/offramp.d.mts +10 -13
- package/dist/resources/wallets/offramp.d.ts +10 -13
- package/dist/resources/wallets/offramp.js +14 -14
- package/dist/resources/wallets/offramp.mjs +1 -1
- package/dist/resources/wallets/offramp.test.js +241 -442
- package/dist/resources/wallets/offramp.test.mjs +22 -25
- package/dist/resources/webhooks/index.d.mts +9 -22
- package/dist/resources/webhooks/index.d.ts +9 -22
- package/dist/resources/webhooks/index.js +6 -17
- package/dist/resources/webhooks/index.mjs +1 -1
- package/dist/resources/webhooks/webhooks.test.js +239 -448
- package/dist/resources/webhooks/webhooks.test.mjs +20 -31
- package/package.json +2 -4
- package/dist/chunk-2DAKB5XK.mjs +0 -212
- package/dist/chunk-GEDDLCJY.mjs +0 -77
- package/dist/chunk-LK3JPQ6I.mjs +0 -49
- package/dist/chunk-LLWEHHKB.mjs +0 -47
|
@@ -6,23 +6,23 @@ import {
|
|
|
6
6
|
it
|
|
7
7
|
} from "../../chunk-GCCHFONX.mjs";
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-
|
|
20
|
-
import "../../chunk-
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
23
|
-
import "../../chunk-2DAKB5XK.mjs";
|
|
11
|
+
} from "../../chunk-YPXYUS2X.mjs";
|
|
12
|
+
import "../../chunk-IZYPRCCV.mjs";
|
|
13
|
+
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
15
|
+
import "../../chunk-TBTA7A2P.mjs";
|
|
16
|
+
import "../../chunk-BONN6PYB.mjs";
|
|
17
|
+
import "../../chunk-5XJJKYXE.mjs";
|
|
18
|
+
import "../../chunk-RC5NN5UF.mjs";
|
|
19
|
+
import "../../chunk-W7NJUABI.mjs";
|
|
20
|
+
import "../../chunk-E7M4CJKR.mjs";
|
|
21
|
+
import "../../chunk-3QQCDR3E.mjs";
|
|
22
|
+
import "../../chunk-LRHWT4JU.mjs";
|
|
24
23
|
import "../../chunk-QHMIK7U3.mjs";
|
|
25
|
-
import "../../chunk-
|
|
24
|
+
import "../../chunk-64EFLUS3.mjs";
|
|
25
|
+
import "../../chunk-B5T7AQLH.mjs";
|
|
26
26
|
import {
|
|
27
27
|
__async,
|
|
28
28
|
__commonJS
|
|
@@ -35,15 +35,14 @@ var require_virtual_accounts_test = __commonJS({
|
|
|
35
35
|
init_client();
|
|
36
36
|
describe("Virtual accounts", () => {
|
|
37
37
|
afterEach(() => fetchMock.resetMocks());
|
|
38
|
-
const blindpay = new
|
|
38
|
+
const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
|
|
39
39
|
describe("Update virtual account", () => {
|
|
40
40
|
it("should update a virtual account", () => __async(null, null, function* () {
|
|
41
41
|
fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
|
|
42
42
|
headers: { "Content-Type": "application/json" }
|
|
43
43
|
});
|
|
44
44
|
const { data, error } = yield blindpay.virtualAccounts.update({
|
|
45
|
-
|
|
46
|
-
receiverId: "re_000000000000",
|
|
45
|
+
receiver_id: "re_000000000000",
|
|
47
46
|
blockchain_wallet_id: "bw_000000000000",
|
|
48
47
|
token: "USDC"
|
|
49
48
|
});
|
|
@@ -88,8 +87,7 @@ var require_virtual_accounts_test = __commonJS({
|
|
|
88
87
|
headers: { "Content-Type": "application/json" }
|
|
89
88
|
});
|
|
90
89
|
const { data, error } = yield blindpay.virtualAccounts.create({
|
|
91
|
-
|
|
92
|
-
receiverId: "re_000000000000",
|
|
90
|
+
receiver_id: "re_000000000000",
|
|
93
91
|
blockchain_wallet_id: "bw_000000000000",
|
|
94
92
|
token: "USDC"
|
|
95
93
|
});
|
|
@@ -133,10 +131,7 @@ var require_virtual_accounts_test = __commonJS({
|
|
|
133
131
|
fetchMock.mockResponseOnce(JSON.stringify(mockedVirtualAccount), {
|
|
134
132
|
headers: { "Content-Type": "application/json" }
|
|
135
133
|
});
|
|
136
|
-
const { data, error } = yield blindpay.virtualAccounts.get(
|
|
137
|
-
instanceId: "in_000000000000",
|
|
138
|
-
receiverId: "re_000000000000"
|
|
139
|
-
});
|
|
134
|
+
const { data, error } = yield blindpay.virtualAccounts.get("re_000000000000");
|
|
140
135
|
globalExpect(error).toBeNull();
|
|
141
136
|
globalExpect(data).toEqual(mockedVirtualAccount);
|
|
142
137
|
}));
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-Cw2mNJeR.mjs';
|
|
2
2
|
|
|
3
|
-
type GetBlockchainWalletMessage =
|
|
4
|
-
receiverId: string;
|
|
5
|
-
instanceId: string;
|
|
6
|
-
};
|
|
3
|
+
type GetBlockchainWalletMessage = string;
|
|
7
4
|
type GetBlockchainWalletMessageResponse = {
|
|
8
5
|
message: string;
|
|
9
6
|
};
|
|
10
|
-
type ListBlockchainWalletsInput =
|
|
11
|
-
instanceId: string;
|
|
12
|
-
receiverId: string;
|
|
13
|
-
};
|
|
7
|
+
type ListBlockchainWalletsInput = string;
|
|
14
8
|
type ListBlockchainWalletsResponse = Array<{
|
|
15
9
|
id: string;
|
|
16
10
|
name: string;
|
|
@@ -20,23 +14,24 @@ type ListBlockchainWalletsResponse = Array<{
|
|
|
20
14
|
is_account_abstraction: boolean;
|
|
21
15
|
receiver_id: string;
|
|
22
16
|
}>;
|
|
23
|
-
type
|
|
24
|
-
|
|
25
|
-
receiverId: string;
|
|
17
|
+
type CreateBlockchainWalletWithAddressInput = {
|
|
18
|
+
receiver_id: string;
|
|
26
19
|
name: string;
|
|
27
20
|
network: Network;
|
|
28
21
|
address: string;
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
};
|
|
23
|
+
type CreateBlockchainWalletWithHashInput = {
|
|
24
|
+
receiver_id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
network: Network;
|
|
27
|
+
signature_tx_hash: string;
|
|
31
28
|
};
|
|
32
29
|
type GetBlockchainWalletInput = {
|
|
33
|
-
|
|
34
|
-
receiverId: string;
|
|
30
|
+
receiver_id: string;
|
|
35
31
|
id: string;
|
|
36
32
|
};
|
|
37
33
|
type DeleteBlockchainWalletInput = {
|
|
38
|
-
|
|
39
|
-
receiverId: string;
|
|
34
|
+
receiver_id: string;
|
|
40
35
|
id: string;
|
|
41
36
|
};
|
|
42
37
|
type GetBlockchainWalletResponse = {
|
|
@@ -57,27 +52,24 @@ type CreateBlockchainWalletResponse = {
|
|
|
57
52
|
is_account_abstraction: boolean;
|
|
58
53
|
receiver_id: string;
|
|
59
54
|
};
|
|
60
|
-
type CreateAssetTrustlineInput =
|
|
61
|
-
instanceId: string;
|
|
62
|
-
address: string;
|
|
63
|
-
};
|
|
55
|
+
type CreateAssetTrustlineInput = string;
|
|
64
56
|
type CreateAssetTrustlineResponse = {
|
|
65
57
|
xdr: string;
|
|
66
58
|
};
|
|
67
59
|
type MintUsdbStellarInput = {
|
|
68
|
-
instanceId: string;
|
|
69
60
|
address: string;
|
|
70
61
|
amount: string;
|
|
71
62
|
signedXdr: string;
|
|
72
63
|
};
|
|
73
|
-
declare function createBlockchainWalletsResource(client: InternalApiClient): {
|
|
74
|
-
list(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
64
|
+
declare function createBlockchainWalletsResource(instanceId: string, client: InternalApiClient): {
|
|
65
|
+
list(receiver_id: ListBlockchainWalletsInput): Promise<BlindpayApiResponse<ListBlockchainWalletsResponse>>;
|
|
66
|
+
createWithAddress({ receiver_id, ...data }: CreateBlockchainWalletWithAddressInput): Promise<BlindpayApiResponse<CreateBlockchainWalletResponse>>;
|
|
67
|
+
createWithHash({ receiver_id, ...data }: CreateBlockchainWalletWithHashInput): Promise<BlindpayApiResponse<CreateBlockchainWalletResponse>>;
|
|
68
|
+
getWalletMessage(receiver_id: GetBlockchainWalletMessage): Promise<BlindpayApiResponse<GetBlockchainWalletMessageResponse>>;
|
|
69
|
+
get({ receiver_id, id, }: GetBlockchainWalletInput): Promise<BlindpayApiResponse<GetBlockchainWalletResponse>>;
|
|
70
|
+
delete({ receiver_id, id, }: DeleteBlockchainWalletInput): Promise<BlindpayApiResponse<void>>;
|
|
71
|
+
createAssetTrustline(address: CreateAssetTrustlineInput): Promise<BlindpayApiResponse<CreateAssetTrustlineResponse>>;
|
|
72
|
+
mintUsdbStellar({ ...data }: MintUsdbStellarInput): Promise<BlindpayApiResponse<void>>;
|
|
81
73
|
};
|
|
82
74
|
|
|
83
|
-
export { type CreateAssetTrustlineInput, type CreateAssetTrustlineResponse, type
|
|
75
|
+
export { type CreateAssetTrustlineInput, type CreateAssetTrustlineResponse, type CreateBlockchainWalletResponse, type CreateBlockchainWalletWithAddressInput, type CreateBlockchainWalletWithHashInput, type DeleteBlockchainWalletInput, type GetBlockchainWalletInput, type GetBlockchainWalletMessage, type GetBlockchainWalletMessageResponse, type GetBlockchainWalletResponse, type ListBlockchainWalletsInput, type ListBlockchainWalletsResponse, type MintUsdbStellarInput, createBlockchainWalletsResource };
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-Cw2mNJeR.js';
|
|
2
2
|
|
|
3
|
-
type GetBlockchainWalletMessage =
|
|
4
|
-
receiverId: string;
|
|
5
|
-
instanceId: string;
|
|
6
|
-
};
|
|
3
|
+
type GetBlockchainWalletMessage = string;
|
|
7
4
|
type GetBlockchainWalletMessageResponse = {
|
|
8
5
|
message: string;
|
|
9
6
|
};
|
|
10
|
-
type ListBlockchainWalletsInput =
|
|
11
|
-
instanceId: string;
|
|
12
|
-
receiverId: string;
|
|
13
|
-
};
|
|
7
|
+
type ListBlockchainWalletsInput = string;
|
|
14
8
|
type ListBlockchainWalletsResponse = Array<{
|
|
15
9
|
id: string;
|
|
16
10
|
name: string;
|
|
@@ -20,23 +14,24 @@ type ListBlockchainWalletsResponse = Array<{
|
|
|
20
14
|
is_account_abstraction: boolean;
|
|
21
15
|
receiver_id: string;
|
|
22
16
|
}>;
|
|
23
|
-
type
|
|
24
|
-
|
|
25
|
-
receiverId: string;
|
|
17
|
+
type CreateBlockchainWalletWithAddressInput = {
|
|
18
|
+
receiver_id: string;
|
|
26
19
|
name: string;
|
|
27
20
|
network: Network;
|
|
28
21
|
address: string;
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
};
|
|
23
|
+
type CreateBlockchainWalletWithHashInput = {
|
|
24
|
+
receiver_id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
network: Network;
|
|
27
|
+
signature_tx_hash: string;
|
|
31
28
|
};
|
|
32
29
|
type GetBlockchainWalletInput = {
|
|
33
|
-
|
|
34
|
-
receiverId: string;
|
|
30
|
+
receiver_id: string;
|
|
35
31
|
id: string;
|
|
36
32
|
};
|
|
37
33
|
type DeleteBlockchainWalletInput = {
|
|
38
|
-
|
|
39
|
-
receiverId: string;
|
|
34
|
+
receiver_id: string;
|
|
40
35
|
id: string;
|
|
41
36
|
};
|
|
42
37
|
type GetBlockchainWalletResponse = {
|
|
@@ -57,27 +52,24 @@ type CreateBlockchainWalletResponse = {
|
|
|
57
52
|
is_account_abstraction: boolean;
|
|
58
53
|
receiver_id: string;
|
|
59
54
|
};
|
|
60
|
-
type CreateAssetTrustlineInput =
|
|
61
|
-
instanceId: string;
|
|
62
|
-
address: string;
|
|
63
|
-
};
|
|
55
|
+
type CreateAssetTrustlineInput = string;
|
|
64
56
|
type CreateAssetTrustlineResponse = {
|
|
65
57
|
xdr: string;
|
|
66
58
|
};
|
|
67
59
|
type MintUsdbStellarInput = {
|
|
68
|
-
instanceId: string;
|
|
69
60
|
address: string;
|
|
70
61
|
amount: string;
|
|
71
62
|
signedXdr: string;
|
|
72
63
|
};
|
|
73
|
-
declare function createBlockchainWalletsResource(client: InternalApiClient): {
|
|
74
|
-
list(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
64
|
+
declare function createBlockchainWalletsResource(instanceId: string, client: InternalApiClient): {
|
|
65
|
+
list(receiver_id: ListBlockchainWalletsInput): Promise<BlindpayApiResponse<ListBlockchainWalletsResponse>>;
|
|
66
|
+
createWithAddress({ receiver_id, ...data }: CreateBlockchainWalletWithAddressInput): Promise<BlindpayApiResponse<CreateBlockchainWalletResponse>>;
|
|
67
|
+
createWithHash({ receiver_id, ...data }: CreateBlockchainWalletWithHashInput): Promise<BlindpayApiResponse<CreateBlockchainWalletResponse>>;
|
|
68
|
+
getWalletMessage(receiver_id: GetBlockchainWalletMessage): Promise<BlindpayApiResponse<GetBlockchainWalletMessageResponse>>;
|
|
69
|
+
get({ receiver_id, id, }: GetBlockchainWalletInput): Promise<BlindpayApiResponse<GetBlockchainWalletResponse>>;
|
|
70
|
+
delete({ receiver_id, id, }: DeleteBlockchainWalletInput): Promise<BlindpayApiResponse<void>>;
|
|
71
|
+
createAssetTrustline(address: CreateAssetTrustlineInput): Promise<BlindpayApiResponse<CreateAssetTrustlineResponse>>;
|
|
72
|
+
mintUsdbStellar({ ...data }: MintUsdbStellarInput): Promise<BlindpayApiResponse<void>>;
|
|
81
73
|
};
|
|
82
74
|
|
|
83
|
-
export { type CreateAssetTrustlineInput, type CreateAssetTrustlineResponse, type
|
|
75
|
+
export { type CreateAssetTrustlineInput, type CreateAssetTrustlineResponse, type CreateBlockchainWalletResponse, type CreateBlockchainWalletWithAddressInput, type CreateBlockchainWalletWithHashInput, type DeleteBlockchainWalletInput, type GetBlockchainWalletInput, type GetBlockchainWalletMessage, type GetBlockchainWalletMessageResponse, type GetBlockchainWalletResponse, type ListBlockchainWalletsInput, type ListBlockchainWalletsResponse, type MintUsdbStellarInput, createBlockchainWalletsResource };
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
8
23
|
var __objRest = (source, exclude) => {
|
|
9
24
|
var target = {};
|
|
10
25
|
for (var prop in source)
|
|
@@ -37,64 +52,67 @@ __export(blockchain_exports, {
|
|
|
37
52
|
createBlockchainWalletsResource: () => createBlockchainWalletsResource
|
|
38
53
|
});
|
|
39
54
|
module.exports = __toCommonJS(blockchain_exports);
|
|
40
|
-
function createBlockchainWalletsResource(client) {
|
|
55
|
+
function createBlockchainWalletsResource(instanceId, client) {
|
|
41
56
|
return {
|
|
42
|
-
list({
|
|
43
|
-
instanceId,
|
|
44
|
-
receiverId
|
|
45
|
-
}) {
|
|
57
|
+
list(receiver_id) {
|
|
46
58
|
return client.get(
|
|
47
|
-
`/instances/${instanceId}/receivers/${
|
|
59
|
+
`/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`
|
|
48
60
|
);
|
|
49
61
|
},
|
|
50
|
-
|
|
62
|
+
createWithAddress(_a) {
|
|
51
63
|
var _b = _a, {
|
|
52
|
-
|
|
64
|
+
receiver_id
|
|
53
65
|
} = _b, data = __objRest(_b, [
|
|
54
|
-
"
|
|
66
|
+
"receiver_id"
|
|
55
67
|
]);
|
|
56
|
-
return client.post(
|
|
68
|
+
return client.post(
|
|
69
|
+
`/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`,
|
|
70
|
+
__spreadProps(__spreadValues({}, data), {
|
|
71
|
+
is_account_abstraction: true
|
|
72
|
+
})
|
|
73
|
+
);
|
|
57
74
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
75
|
+
createWithHash(_c) {
|
|
76
|
+
var _d = _c, {
|
|
77
|
+
receiver_id
|
|
78
|
+
} = _d, data = __objRest(_d, [
|
|
79
|
+
"receiver_id"
|
|
80
|
+
]);
|
|
81
|
+
return client.post(
|
|
82
|
+
`/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets`,
|
|
83
|
+
__spreadProps(__spreadValues({}, data), {
|
|
84
|
+
is_account_abstraction: false
|
|
85
|
+
})
|
|
86
|
+
);
|
|
87
|
+
},
|
|
88
|
+
getWalletMessage(receiver_id) {
|
|
62
89
|
return client.get(
|
|
63
|
-
`/instances/${instanceId}/receivers/${
|
|
90
|
+
`/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/sign-message`
|
|
64
91
|
);
|
|
65
92
|
},
|
|
66
93
|
get({
|
|
67
|
-
|
|
68
|
-
receiverId,
|
|
94
|
+
receiver_id,
|
|
69
95
|
id
|
|
70
96
|
}) {
|
|
71
97
|
return client.get(
|
|
72
|
-
`/instances/${instanceId}/receivers/${
|
|
98
|
+
`/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/${id}`
|
|
73
99
|
);
|
|
74
100
|
},
|
|
75
101
|
delete({
|
|
76
|
-
|
|
77
|
-
receiverId,
|
|
102
|
+
receiver_id,
|
|
78
103
|
id
|
|
79
104
|
}) {
|
|
80
105
|
return client.delete(
|
|
81
|
-
`/instances/${instanceId}/receivers/${
|
|
106
|
+
`/instances/${instanceId}/receivers/${receiver_id}/blockchain-wallets/${id}`
|
|
82
107
|
);
|
|
83
108
|
},
|
|
84
|
-
createAssetTrustline(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
"instanceId"
|
|
89
|
-
]);
|
|
90
|
-
return client.post(`/instances/${instanceId}/create-asset-trustline`, data);
|
|
109
|
+
createAssetTrustline(address) {
|
|
110
|
+
return client.post(`/instances/${instanceId}/create-asset-trustline`, {
|
|
111
|
+
address
|
|
112
|
+
});
|
|
91
113
|
},
|
|
92
114
|
mintUsdbStellar(_e) {
|
|
93
|
-
var
|
|
94
|
-
instanceId
|
|
95
|
-
} = _f, data = __objRest(_f, [
|
|
96
|
-
"instanceId"
|
|
97
|
-
]);
|
|
115
|
+
var data = __objRest(_e, []);
|
|
98
116
|
return client.post(`/instances/${instanceId}/mint-usdb-stellar`, data);
|
|
99
117
|
}
|
|
100
118
|
};
|