@crossmint/wallets-sdk 0.18.15 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/__tests__/test-utils.cjs +5 -5
- package/dist/api/__tests__/test-utils.js +3 -3
- package/dist/api/client.cjs +4 -4
- package/dist/api/client.js +3 -3
- package/dist/api/gen/types.gen.d.cts +8 -0
- package/dist/api/gen/types.gen.d.ts +8 -0
- package/dist/api/index.cjs +5 -5
- package/dist/api/index.js +4 -4
- package/dist/chains/chains.cjs +15 -3
- package/dist/chains/chains.d.cts +15 -1
- package/dist/chains/chains.d.ts +15 -1
- package/dist/chains/chains.js +16 -4
- package/dist/chains/definitions/tempoTestnet.cjs +2 -2
- package/dist/chains/definitions/tempoTestnet.d.cts +4 -4
- package/dist/chains/definitions/tempoTestnet.d.ts +4 -4
- package/dist/chains/definitions/tempoTestnet.js +1 -1
- package/dist/{chunk-5YX2BE4I.js → chunk-24DGWV3E.js} +10 -5
- package/dist/{chunk-OOVNMAQF.js → chunk-2APY4BUJ.js} +74 -24
- package/dist/{chunk-PRQOFWLH.cjs → chunk-2XDIXELO.cjs} +12 -3
- package/dist/{chunk-PADJ2CIV.cjs → chunk-4ID6ZK4A.cjs} +96 -46
- package/dist/{chunk-JDAWNKQ7.cjs → chunk-6LVFMXDR.cjs} +29 -24
- package/dist/{chunk-AUNZEGWS.cjs → chunk-6S7BKBVM.cjs} +7 -7
- package/dist/{chunk-SCU5YLUT.js → chunk-7EXE5FZJ.js} +10 -1
- package/dist/{chunk-WQDGFD34.js → chunk-7OW5LYR6.js} +2 -2
- package/dist/{chunk-IZJUOXOZ.js → chunk-AXQLP7Z6.js} +4 -4
- package/dist/{chunk-PHIXNAMT.js → chunk-AZQFMK3I.js} +10 -1
- package/dist/{chunk-CJWHHO4B.js → chunk-BQN5PNZK.js} +1 -1
- package/dist/{chunk-LFUXRLJR.js → chunk-DF3SZX2E.js} +1 -1
- package/dist/{chunk-OWRKZD7H.cjs → chunk-GEHZRAAJ.cjs} +69 -3
- package/dist/{chunk-VM6OLXBS.js → chunk-GWLAO3PX.js} +32 -9
- package/dist/{chunk-77HEKAFB.cjs → chunk-GXEWWYHT.cjs} +12 -3
- package/dist/{chunk-GSDBCRGH.js → chunk-IAZHXIFV.js} +3 -3
- package/dist/{chunk-BMXG52BZ.cjs → chunk-KVYY4QDB.cjs} +36 -13
- package/dist/{chunk-ZM437XPQ.js → chunk-MUIINXJY.js} +16 -4
- package/dist/{chunk-YZOPFNY3.js → chunk-MZBMV54C.js} +2 -2
- package/dist/{chunk-6H6ZBJC2.cjs → chunk-NN2NBBTN.cjs} +4 -4
- package/dist/{chunk-AKJOFUXU.cjs → chunk-PRNZJUHI.cjs} +9 -9
- package/dist/{chunk-AKAJ7UHQ.cjs → chunk-RJY4GT2D.cjs} +12 -3
- package/dist/{chunk-TOTOITTM.js → chunk-SAZ76VGQ.js} +2 -2
- package/dist/{chunk-QCTTQ4XE.cjs → chunk-SEV3UBGK.cjs} +32 -20
- package/dist/{chunk-OTI3LX45.cjs → chunk-TNASR6QE.cjs} +9 -9
- package/dist/{chunk-PJTTM5QQ.cjs → chunk-TQKCX7VN.cjs} +1 -1
- package/dist/{chunk-WMUNQJYD.cjs → chunk-VKXKQ5YI.cjs} +3 -3
- package/dist/{chunk-XVFUAZJY.js → chunk-WBTM7E5O.js} +69 -3
- package/dist/{chunk-YT64AZL6.cjs → chunk-XM4Y4HS5.cjs} +6 -6
- package/dist/{chunk-V65OBC5I.js → chunk-YDFIY5ER.js} +3 -3
- package/dist/{chunk-4ZFP3ST7.js → chunk-ZKWJY2VO.js} +10 -1
- package/dist/{chunk-NFQT5TFO.cjs → chunk-ZLPFQ56Q.cjs} +12 -12
- package/dist/index.cjs +18 -18
- package/dist/index.js +17 -17
- package/dist/logger/index.cjs +3 -3
- package/dist/logger/index.js +2 -2
- package/dist/logger/init.cjs +3 -3
- package/dist/logger/init.js +2 -2
- package/dist/sdk.cjs +18 -13
- package/dist/sdk.js +17 -12
- package/dist/signers/index.cjs +8 -8
- package/dist/signers/index.d.cts +1 -1
- package/dist/signers/index.d.ts +1 -1
- package/dist/signers/index.js +7 -7
- package/dist/signers/non-custodial/index.cjs +7 -7
- package/dist/signers/non-custodial/index.js +6 -6
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-evm-signer.js +4 -4
- package/dist/signers/non-custodial/ncs-signer.cjs +4 -4
- package/dist/signers/non-custodial/ncs-signer.js +3 -3
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-solana-signer.js +4 -4
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-stellar-signer.js +4 -4
- package/dist/utils/constants.cjs +2 -2
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/__tests__/test-helpers.cjs +15 -8
- package/dist/wallets/__tests__/test-helpers.d.cts +2 -1
- package/dist/wallets/__tests__/test-helpers.d.ts +2 -1
- package/dist/wallets/__tests__/test-helpers.js +14 -7
- package/dist/wallets/evm.cjs +12 -12
- package/dist/wallets/evm.d.cts +20 -0
- package/dist/wallets/evm.d.ts +20 -0
- package/dist/wallets/evm.js +11 -11
- package/dist/wallets/solana.cjs +14 -9
- package/dist/wallets/solana.d.cts +6 -1
- package/dist/wallets/solana.d.ts +6 -1
- package/dist/wallets/solana.js +13 -8
- package/dist/wallets/stellar.cjs +14 -9
- package/dist/wallets/stellar.d.cts +6 -1
- package/dist/wallets/stellar.d.ts +6 -1
- package/dist/wallets/stellar.js +13 -8
- package/dist/wallets/types.d.cts +6 -2
- package/dist/wallets/types.d.ts +6 -2
- package/dist/wallets/wallet-factory.cjs +15 -10
- package/dist/wallets/wallet-factory.d.cts +1 -0
- package/dist/wallets/wallet-factory.d.ts +1 -0
- package/dist/wallets/wallet-factory.js +14 -9
- package/dist/wallets/wallet.cjs +13 -8
- package/dist/wallets/wallet.d.cts +7 -2
- package/dist/wallets/wallet.d.ts +7 -2
- package/dist/wallets/wallet.js +12 -7
- package/package.json +7 -7
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkKVYY4QDBcjs = require('./chunk-KVYY4QDB.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkVKXKQ5YIcjs = require('./chunk-VKXKQ5YI.cjs');
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
8
11
|
|
|
9
12
|
// src/signers/non-custodial/ncs-stellar-signer.ts
|
|
10
|
-
var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends
|
|
13
|
+
var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkKVYY4QDBcjs.NonCustodialSigner {
|
|
11
14
|
constructor(config) {
|
|
12
15
|
super(config);
|
|
13
16
|
}
|
|
@@ -21,6 +24,8 @@ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkB
|
|
|
21
24
|
var _a;
|
|
22
25
|
yield this.handleAuthRequired();
|
|
23
26
|
const jwt = this.getJwtOrThrow();
|
|
27
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("sign: sending request", { keyType: "ed25519" });
|
|
28
|
+
const startTime = Date.now();
|
|
24
29
|
const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
|
|
25
30
|
event: "request:sign",
|
|
26
31
|
responseEvent: "response:sign",
|
|
@@ -35,7 +40,11 @@ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkB
|
|
|
35
40
|
encoding: "base64"
|
|
36
41
|
}
|
|
37
42
|
},
|
|
38
|
-
options:
|
|
43
|
+
options: _chunkKVYY4QDBcjs.DEFAULT_EVENT_OPTIONS
|
|
44
|
+
});
|
|
45
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("sign: response received", {
|
|
46
|
+
status: res == null ? void 0 : res.status,
|
|
47
|
+
durationMs: Date.now() - startTime
|
|
39
48
|
});
|
|
40
49
|
if ((res == null ? void 0 : res.status) === "error") {
|
|
41
50
|
throw new Error(res.error);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKVYY4QDBcjs = require('./chunk-KVYY4QDB.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkGEHZRAAJcjs = require('./chunk-GEHZRAAJ.cjs');
|
|
4
7
|
|
|
5
8
|
|
|
6
9
|
|
|
@@ -18,10 +21,10 @@ var _chunkBMXG52BZcjs = require('./chunk-BMXG52BZ.cjs');
|
|
|
18
21
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
19
22
|
|
|
20
23
|
|
|
21
|
-
var
|
|
24
|
+
var _chunkVKXKQ5YIcjs = require('./chunk-VKXKQ5YI.cjs');
|
|
22
25
|
|
|
23
26
|
|
|
24
|
-
var
|
|
27
|
+
var _chunkTQKCX7VNcjs = require('./chunk-TQKCX7VN.cjs');
|
|
25
28
|
|
|
26
29
|
|
|
27
30
|
|
|
@@ -70,7 +73,8 @@ var Wallet = class {
|
|
|
70
73
|
}
|
|
71
74
|
balances(tokens) {
|
|
72
75
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
73
|
-
|
|
76
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.balances.start");
|
|
77
|
+
const resolvedChain = this.resolveChainForEnvironment();
|
|
74
78
|
let nativeToken;
|
|
75
79
|
switch (this.chain) {
|
|
76
80
|
case "solana":
|
|
@@ -85,20 +89,23 @@ var Wallet = class {
|
|
|
85
89
|
}
|
|
86
90
|
const allTokens = [nativeToken, "usdc", ...tokens != null ? tokens : []];
|
|
87
91
|
const response = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getBalance(this.address, {
|
|
88
|
-
chains: [
|
|
92
|
+
chains: [resolvedChain],
|
|
89
93
|
tokens: allTokens
|
|
90
94
|
});
|
|
91
95
|
if ("error" in response) {
|
|
92
|
-
|
|
96
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.balances.error", { error: response });
|
|
93
97
|
throw new Error(`Failed to get balances for wallet: ${JSON.stringify(response.message)}`);
|
|
94
98
|
}
|
|
95
|
-
|
|
99
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.balances.success");
|
|
96
100
|
return this.transformBalanceResponse(response, nativeToken, tokens);
|
|
97
101
|
});
|
|
98
102
|
}
|
|
99
103
|
stagingFund(amount, chain) {
|
|
100
104
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
101
|
-
|
|
105
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.stagingFund.start", {
|
|
106
|
+
amount,
|
|
107
|
+
chain: chain != null ? chain : this.chain
|
|
108
|
+
});
|
|
102
109
|
const response = yield this.apiClient.fundWallet(this.address, {
|
|
103
110
|
amount,
|
|
104
111
|
token: "usdxm",
|
|
@@ -107,10 +114,12 @@ var Wallet = class {
|
|
|
107
114
|
chain: chain != null ? chain : this.chain
|
|
108
115
|
});
|
|
109
116
|
if ("error" in response) {
|
|
110
|
-
|
|
117
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.stagingFund.error", {
|
|
118
|
+
error: response
|
|
119
|
+
});
|
|
111
120
|
throw new Error(`Failed to fund wallet: ${JSON.stringify(response.message)}`);
|
|
112
121
|
}
|
|
113
|
-
|
|
122
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.stagingFund.success");
|
|
114
123
|
return response;
|
|
115
124
|
});
|
|
116
125
|
}
|
|
@@ -128,7 +137,9 @@ var Wallet = class {
|
|
|
128
137
|
} else if (this.chain === "stellar" && chainData != null && "contractId" in chainData) {
|
|
129
138
|
chainSpecificField = { contractId: chainData.contractId };
|
|
130
139
|
} else if (chainData != null && "contractAddress" in chainData) {
|
|
131
|
-
chainSpecificField = {
|
|
140
|
+
chainSpecificField = {
|
|
141
|
+
contractAddress: chainData.contractAddress
|
|
142
|
+
};
|
|
132
143
|
}
|
|
133
144
|
return _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
134
145
|
symbol: (_b = tokenData.symbol) != null ? _b : "",
|
|
@@ -220,7 +231,8 @@ var Wallet = class {
|
|
|
220
231
|
*/
|
|
221
232
|
experimental_activity() {
|
|
222
233
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
223
|
-
const
|
|
234
|
+
const resolvedChain = this.resolveChainForEnvironment();
|
|
235
|
+
const response = yield this.apiClient.experimental_activity(this.walletLocator, { chain: resolvedChain });
|
|
224
236
|
if ("error" in response) {
|
|
225
237
|
throw new Error(`Failed to get activity: ${JSON.stringify(response.message)}`);
|
|
226
238
|
}
|
|
@@ -229,23 +241,32 @@ var Wallet = class {
|
|
|
229
241
|
}
|
|
230
242
|
send(to, token, amount, options) {
|
|
231
243
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
244
|
+
const resolvedChain = this.resolveChainForEnvironment();
|
|
232
245
|
const recipient = toRecipientLocator(to);
|
|
233
|
-
const tokenLocator = toTokenLocator(token,
|
|
234
|
-
|
|
246
|
+
const tokenLocator = toTokenLocator(token, resolvedChain);
|
|
247
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.send.start", _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
248
|
+
recipient,
|
|
249
|
+
token: tokenLocator,
|
|
250
|
+
amount
|
|
251
|
+
}, (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {}));
|
|
235
252
|
yield this.preAuthIfNeeded();
|
|
236
|
-
const sendParams = _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
253
|
+
const sendParams = _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
237
254
|
recipient,
|
|
238
255
|
amount
|
|
239
|
-
}, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {});
|
|
256
|
+
}, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {}), (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {});
|
|
240
257
|
const transactionCreationResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).send(this.walletLocator, tokenLocator, sendParams);
|
|
241
258
|
if ("message" in transactionCreationResponse) {
|
|
242
|
-
|
|
259
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.send.error", {
|
|
260
|
+
error: transactionCreationResponse
|
|
261
|
+
});
|
|
243
262
|
throw new (0, _chunkXC2V34TScjs.TransactionNotCreatedError)(
|
|
244
263
|
`Failed to send token: ${JSON.stringify(transactionCreationResponse.message)}`
|
|
245
264
|
);
|
|
246
265
|
}
|
|
247
266
|
if (options == null ? void 0 : options.experimental_prepareOnly) {
|
|
248
|
-
|
|
267
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.send.prepared", {
|
|
268
|
+
transactionId: transactionCreationResponse.id
|
|
269
|
+
});
|
|
249
270
|
return {
|
|
250
271
|
hash: void 0,
|
|
251
272
|
explorerLink: void 0,
|
|
@@ -253,7 +274,7 @@ var Wallet = class {
|
|
|
253
274
|
};
|
|
254
275
|
}
|
|
255
276
|
const result = yield this.approveTransactionAndWait(transactionCreationResponse.id);
|
|
256
|
-
|
|
277
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.send.success", {
|
|
257
278
|
transactionId: transactionCreationResponse.id,
|
|
258
279
|
hash: result.hash
|
|
259
280
|
});
|
|
@@ -281,7 +302,7 @@ var Wallet = class {
|
|
|
281
302
|
}
|
|
282
303
|
approve(params) {
|
|
283
304
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
284
|
-
|
|
305
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.approve.start", {
|
|
285
306
|
transactionId: params.transactionId,
|
|
286
307
|
signatureId: params.signatureId
|
|
287
308
|
});
|
|
@@ -290,15 +311,19 @@ var Wallet = class {
|
|
|
290
311
|
params.transactionId,
|
|
291
312
|
params.options
|
|
292
313
|
);
|
|
293
|
-
|
|
314
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.approve.success", {
|
|
315
|
+
transactionId: params.transactionId
|
|
316
|
+
});
|
|
294
317
|
return result;
|
|
295
318
|
}
|
|
296
319
|
if (params.signatureId != null) {
|
|
297
320
|
const result = yield this.approveSignatureAndWait(params.signatureId, params.options);
|
|
298
|
-
|
|
321
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.approve.success", {
|
|
322
|
+
signatureId: params.signatureId
|
|
323
|
+
});
|
|
299
324
|
return result;
|
|
300
325
|
}
|
|
301
|
-
|
|
326
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.approve.error", {
|
|
302
327
|
error: "Either transactionId or signatureId must be provided"
|
|
303
328
|
});
|
|
304
329
|
throw new Error("Either transactionId or signatureId must be provided");
|
|
@@ -307,33 +332,39 @@ var Wallet = class {
|
|
|
307
332
|
addDelegatedSigner(params) {
|
|
308
333
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
309
334
|
var _a, _b, _c;
|
|
310
|
-
|
|
335
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.addDelegatedSigner.start");
|
|
311
336
|
const response = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).registerSigner(this.walletLocator, {
|
|
312
337
|
signer: params.signer,
|
|
313
338
|
chain: this.chain === "solana" || this.chain === "stellar" ? void 0 : this.chain
|
|
314
339
|
});
|
|
315
340
|
if ("error" in response) {
|
|
316
|
-
|
|
341
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
342
|
+
error: response
|
|
343
|
+
});
|
|
317
344
|
throw new Error(`Failed to register signer: ${JSON.stringify(response.message)}`);
|
|
318
345
|
}
|
|
319
346
|
if (this.chain === "solana" || this.chain === "stellar") {
|
|
320
347
|
if (!("transaction" in response) || response.transaction == null) {
|
|
321
|
-
|
|
348
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
322
349
|
error: "Expected transaction in response for Solana/Stellar chain"
|
|
323
350
|
});
|
|
324
351
|
throw new Error("Expected transaction in response for Solana/Stellar chain");
|
|
325
352
|
}
|
|
326
353
|
const transactionId = response.transaction.id;
|
|
327
354
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
328
|
-
|
|
355
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
|
|
356
|
+
transactionId
|
|
357
|
+
});
|
|
329
358
|
return { transactionId };
|
|
330
359
|
}
|
|
331
360
|
yield this.approveTransactionAndWait(transactionId);
|
|
332
|
-
|
|
361
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
362
|
+
transactionId
|
|
363
|
+
});
|
|
333
364
|
return void 0;
|
|
334
365
|
}
|
|
335
366
|
if (!("chains" in response)) {
|
|
336
|
-
|
|
367
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
337
368
|
error: "Expected chains in response for EVM chain"
|
|
338
369
|
});
|
|
339
370
|
throw new Error("Expected chains in response for EVM chain");
|
|
@@ -341,34 +372,42 @@ var Wallet = class {
|
|
|
341
372
|
const chainResponse = (_b = response.chains) == null ? void 0 : _b[this.chain];
|
|
342
373
|
if ((_c = params.options) == null ? void 0 : _c.experimental_prepareOnly) {
|
|
343
374
|
const signatureId = (chainResponse == null ? void 0 : chainResponse.status) !== "success" ? chainResponse == null ? void 0 : chainResponse.id : void 0;
|
|
344
|
-
|
|
375
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
|
|
376
|
+
signatureId
|
|
377
|
+
});
|
|
345
378
|
return { signatureId };
|
|
346
379
|
}
|
|
347
380
|
if ((chainResponse == null ? void 0 : chainResponse.status) === "awaiting-approval") {
|
|
348
381
|
yield this.approveSignatureAndWait(chainResponse.id);
|
|
349
|
-
|
|
382
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
383
|
+
signatureId: chainResponse.id
|
|
384
|
+
});
|
|
350
385
|
return void 0;
|
|
351
386
|
}
|
|
352
387
|
if ((chainResponse == null ? void 0 : chainResponse.status) === "pending") {
|
|
353
388
|
yield this.waitForSignature(chainResponse.id);
|
|
354
|
-
|
|
389
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
390
|
+
signatureId: chainResponse.id
|
|
391
|
+
});
|
|
355
392
|
return void 0;
|
|
356
393
|
}
|
|
357
|
-
|
|
394
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.addDelegatedSigner.success");
|
|
358
395
|
return void 0;
|
|
359
396
|
});
|
|
360
397
|
}
|
|
361
398
|
delegatedSigners() {
|
|
362
399
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
363
400
|
var _a, _b, _c;
|
|
364
|
-
|
|
401
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.delegatedSigners.start");
|
|
365
402
|
const walletResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getWallet(this.walletLocator);
|
|
366
403
|
if ("error" in walletResponse) {
|
|
367
|
-
|
|
404
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.delegatedSigners.error", {
|
|
405
|
+
error: walletResponse
|
|
406
|
+
});
|
|
368
407
|
throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(walletResponse));
|
|
369
408
|
}
|
|
370
409
|
if (walletResponse.type !== "smart" || walletResponse.chainType !== "evm" && walletResponse.chainType !== "solana" && walletResponse.chainType !== "stellar") {
|
|
371
|
-
|
|
410
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("wallet.delegatedSigners.error", {
|
|
372
411
|
error: `Wallet type ${walletResponse.type} not supported`
|
|
373
412
|
});
|
|
374
413
|
throw new (0, _chunkXC2V34TScjs.WalletTypeNotSupportedError)(`Wallet type ${walletResponse.type} not supported`);
|
|
@@ -380,7 +419,9 @@ var Wallet = class {
|
|
|
380
419
|
signer: `external-wallet:${address}`
|
|
381
420
|
};
|
|
382
421
|
})) != null ? _c : [];
|
|
383
|
-
|
|
422
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.delegatedSigners.success", {
|
|
423
|
+
count: signers.length
|
|
424
|
+
});
|
|
384
425
|
return signers;
|
|
385
426
|
});
|
|
386
427
|
}
|
|
@@ -406,7 +447,7 @@ var Wallet = class {
|
|
|
406
447
|
}
|
|
407
448
|
preAuthIfNeeded() {
|
|
408
449
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
409
|
-
if (this.signer instanceof
|
|
450
|
+
if (this.signer instanceof _chunkKVYY4QDBcjs.NonCustodialSigner) {
|
|
410
451
|
yield this.signer.ensureAuthenticated();
|
|
411
452
|
}
|
|
412
453
|
});
|
|
@@ -414,6 +455,13 @@ var Wallet = class {
|
|
|
414
455
|
get isSolanaWallet() {
|
|
415
456
|
return this.chain === "solana";
|
|
416
457
|
}
|
|
458
|
+
resolveChainForEnvironment() {
|
|
459
|
+
const resolvedChain = _chunkGEHZRAAJcjs.validateChainForEnvironment.call(void 0, this.chain, _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).environment);
|
|
460
|
+
if (resolvedChain !== this.chain) {
|
|
461
|
+
this.chain = resolvedChain;
|
|
462
|
+
}
|
|
463
|
+
return this.chain;
|
|
464
|
+
}
|
|
417
465
|
approveTransactionAndWait(transactionId, options) {
|
|
418
466
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
419
467
|
yield this.approveTransactionInternal(transactionId, options);
|
|
@@ -509,6 +557,7 @@ var Wallet = class {
|
|
|
509
557
|
}
|
|
510
558
|
executeApproveTransactionWithErrorHandling(transactionId, approvals) {
|
|
511
559
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
560
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.approve: submitting approval to API", { transactionId });
|
|
512
561
|
const approvedTransaction = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).approveTransaction(this.walletLocator, transactionId, {
|
|
513
562
|
approvals
|
|
514
563
|
});
|
|
@@ -533,7 +582,7 @@ var Wallet = class {
|
|
|
533
582
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
534
583
|
let signatureResponse = null;
|
|
535
584
|
do {
|
|
536
|
-
yield new Promise((resolve) => setTimeout(resolve,
|
|
585
|
+
yield new Promise((resolve) => setTimeout(resolve, _chunkTQKCX7VNcjs.STATUS_POLLING_INTERVAL_MS));
|
|
537
586
|
signatureResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getSignature(this.walletLocator, signatureId);
|
|
538
587
|
if ("error" in signatureResponse) {
|
|
539
588
|
throw new (0, _chunkXC2V34TScjs.SignatureNotAvailableError)(JSON.stringify(signatureResponse));
|
|
@@ -555,9 +604,10 @@ var Wallet = class {
|
|
|
555
604
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, arguments, function* (transactionId, timeoutMs = 6e4, {
|
|
556
605
|
backoffMultiplier = 1.1,
|
|
557
606
|
maxBackoffMs = 2e3,
|
|
558
|
-
initialBackoffMs =
|
|
607
|
+
initialBackoffMs = _chunkTQKCX7VNcjs.STATUS_POLLING_INTERVAL_MS
|
|
559
608
|
} = {}) {
|
|
560
609
|
var _a;
|
|
610
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallet.approve: waiting for transaction confirmation", { transactionId, timeoutMs });
|
|
561
611
|
const startTime = Date.now();
|
|
562
612
|
let transactionResponse;
|
|
563
613
|
do {
|
|
@@ -606,7 +656,7 @@ _options = new WeakMap();
|
|
|
606
656
|
_apiClient = new WeakMap();
|
|
607
657
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
608
658
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
609
|
-
logger:
|
|
659
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
610
660
|
methodName: "wallet.balances",
|
|
611
661
|
buildContext(thisArg) {
|
|
612
662
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -615,7 +665,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
615
665
|
], Wallet.prototype, "balances", 1);
|
|
616
666
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
617
667
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
618
|
-
logger:
|
|
668
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
619
669
|
methodName: "wallet.stagingFund",
|
|
620
670
|
buildContext(thisArg) {
|
|
621
671
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -624,7 +674,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
624
674
|
], Wallet.prototype, "stagingFund", 1);
|
|
625
675
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
626
676
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
627
|
-
logger:
|
|
677
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
628
678
|
methodName: "wallet.send",
|
|
629
679
|
buildContext(thisArg) {
|
|
630
680
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -633,7 +683,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
633
683
|
], Wallet.prototype, "send", 1);
|
|
634
684
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
635
685
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
636
|
-
logger:
|
|
686
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
637
687
|
methodName: "wallet.approve",
|
|
638
688
|
buildContext(thisArg) {
|
|
639
689
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -642,7 +692,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
642
692
|
], Wallet.prototype, "approve", 1);
|
|
643
693
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
644
694
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
645
|
-
logger:
|
|
695
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
646
696
|
methodName: "wallet.addDelegatedSigner",
|
|
647
697
|
buildContext(thisArg) {
|
|
648
698
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -651,7 +701,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
651
701
|
], Wallet.prototype, "addDelegatedSigner", 1);
|
|
652
702
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
653
703
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
654
|
-
logger:
|
|
704
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
655
705
|
methodName: "wallet.delegatedSigners",
|
|
656
706
|
buildContext(thisArg) {
|
|
657
707
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4ID6ZK4Acjs = require('./chunk-4ID6ZK4A.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunkGEHZRAAJcjs = require('./chunk-GEHZRAAJ.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkVKXKQ5YIcjs = require('./chunk-VKXKQ5YI.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
20
20
|
// src/wallets/evm.ts
|
|
21
21
|
var _viem = require('viem');
|
|
22
22
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
23
|
-
var _EVMWallet = class _EVMWallet extends
|
|
23
|
+
var _EVMWallet = class _EVMWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
24
24
|
constructor(wallet) {
|
|
25
25
|
super(
|
|
26
26
|
{
|
|
@@ -28,10 +28,10 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
28
28
|
address: wallet.address,
|
|
29
29
|
owner: wallet.owner,
|
|
30
30
|
signer: wallet.signer,
|
|
31
|
-
options:
|
|
31
|
+
options: _chunk4ID6ZK4Acjs.Wallet.getOptions(wallet),
|
|
32
32
|
alias: wallet.alias
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
_chunk4ID6ZK4Acjs.Wallet.getApiClient(wallet)
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
static from(wallet) {
|
|
@@ -43,12 +43,12 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
43
43
|
sendTransaction(params) {
|
|
44
44
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
45
45
|
var _a;
|
|
46
|
-
|
|
46
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.sendTransaction.start");
|
|
47
47
|
yield this.preAuthIfNeeded();
|
|
48
48
|
const builtTransaction = this.buildTransaction(params);
|
|
49
49
|
const createdTransaction = yield this.createTransaction(builtTransaction, params.options);
|
|
50
50
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
51
|
-
|
|
51
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.sendTransaction.prepared", {
|
|
52
52
|
transactionId: createdTransaction.id
|
|
53
53
|
});
|
|
54
54
|
return {
|
|
@@ -58,7 +58,7 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
const result = yield this.approveTransactionAndWait(createdTransaction.id);
|
|
61
|
-
|
|
61
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.sendTransaction.success", {
|
|
62
62
|
transactionId: createdTransaction.id,
|
|
63
63
|
hash: result.hash
|
|
64
64
|
});
|
|
@@ -68,7 +68,7 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
68
68
|
signMessage(params) {
|
|
69
69
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
70
70
|
var _a;
|
|
71
|
-
|
|
71
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.signMessage.start");
|
|
72
72
|
yield this.preAuthIfNeeded();
|
|
73
73
|
const signatureCreationResponse = yield this.apiClient.createSignature(this.walletLocator, {
|
|
74
74
|
type: "message",
|
|
@@ -79,11 +79,11 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
if ("error" in signatureCreationResponse) {
|
|
82
|
-
|
|
82
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("evmWallet.signMessage.error", { error: signatureCreationResponse });
|
|
83
83
|
throw new (0, _chunkXC2V34TScjs.SignatureNotCreatedError)(JSON.stringify(signatureCreationResponse));
|
|
84
84
|
}
|
|
85
85
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
86
|
-
|
|
86
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.signMessage.prepared", {
|
|
87
87
|
signatureId: signatureCreationResponse.id
|
|
88
88
|
});
|
|
89
89
|
return {
|
|
@@ -92,23 +92,23 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
95
|
-
|
|
95
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.signMessage.success", { signatureId: signatureCreationResponse.id });
|
|
96
96
|
return result;
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
signTypedData(params) {
|
|
100
100
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
101
101
|
var _a;
|
|
102
|
-
|
|
102
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.signTypedData.start");
|
|
103
103
|
yield this.preAuthIfNeeded();
|
|
104
104
|
const { domain, message, primaryType, types, chain } = params;
|
|
105
105
|
if (!domain || !message || !types || !chain) {
|
|
106
|
-
|
|
106
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("evmWallet.signTypedData.error", { error: "Invalid typed data" });
|
|
107
107
|
throw new (0, _chunkXC2V34TScjs.InvalidTypedDataError)("Invalid typed data");
|
|
108
108
|
}
|
|
109
109
|
const { name, version, chainId, verifyingContract, salt } = domain;
|
|
110
110
|
if (!name || !version || !chainId || !verifyingContract) {
|
|
111
|
-
|
|
111
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("evmWallet.signTypedData.error", { error: "Invalid typed data domain" });
|
|
112
112
|
throw new (0, _chunkXC2V34TScjs.InvalidTypedDataError)("Invalid typed data domain");
|
|
113
113
|
}
|
|
114
114
|
const signatureCreationResponse = yield this.apiClient.createSignature(this.walletLocator, {
|
|
@@ -131,11 +131,11 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
if ("error" in signatureCreationResponse) {
|
|
134
|
-
|
|
134
|
+
_chunkVKXKQ5YIcjs.walletsLogger.error("evmWallet.signTypedData.error", { error: signatureCreationResponse });
|
|
135
135
|
throw new (0, _chunkXC2V34TScjs.SignatureNotCreatedError)(JSON.stringify(signatureCreationResponse));
|
|
136
136
|
}
|
|
137
137
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
138
|
-
|
|
138
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.signTypedData.prepared", {
|
|
139
139
|
signatureId: signatureCreationResponse.id
|
|
140
140
|
});
|
|
141
141
|
return {
|
|
@@ -144,15 +144,20 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
147
|
-
|
|
147
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("evmWallet.signTypedData.success", { signatureId: signatureCreationResponse.id });
|
|
148
148
|
return result;
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Get a Viem public client instance configured for this wallet's chain.
|
|
153
|
+
* @param params - Optional transport configuration
|
|
154
|
+
* @returns A Viem public client
|
|
155
|
+
*/
|
|
151
156
|
getViemClient(params) {
|
|
152
157
|
var _a;
|
|
153
158
|
return _viem.createPublicClient.call(void 0, {
|
|
154
159
|
transport: (_a = params == null ? void 0 : params.transport) != null ? _a : _viem.http.call(void 0, ),
|
|
155
|
-
chain:
|
|
160
|
+
chain: _chunkGEHZRAAJcjs.toViemChain.call(void 0, this.chain)
|
|
156
161
|
});
|
|
157
162
|
}
|
|
158
163
|
createTransaction(transaction, options) {
|
|
@@ -200,7 +205,7 @@ var _EVMWallet = class _EVMWallet extends _chunkPADJ2CIVcjs.Wallet {
|
|
|
200
205
|
};
|
|
201
206
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
202
207
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
203
|
-
logger:
|
|
208
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
204
209
|
methodName: "evmWallet.sendTransaction",
|
|
205
210
|
buildContext(thisArg) {
|
|
206
211
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -209,7 +214,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
209
214
|
], _EVMWallet.prototype, "sendTransaction", 1);
|
|
210
215
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
211
216
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
212
|
-
logger:
|
|
217
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
213
218
|
methodName: "evmWallet.signMessage",
|
|
214
219
|
buildContext(thisArg) {
|
|
215
220
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -218,7 +223,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
218
223
|
], _EVMWallet.prototype, "signMessage", 1);
|
|
219
224
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
220
225
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
221
|
-
logger:
|
|
226
|
+
logger: _chunkVKXKQ5YIcjs.walletsLogger,
|
|
222
227
|
methodName: "evmWallet.signTypedData",
|
|
223
228
|
buildContext(thisArg) {
|
|
224
229
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSEV3UBGKcjs = require('./chunk-SEV3UBGK.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZLPFQ56Qcjs = require('./chunk-ZLPFQ56Q.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkVKXKQ5YIcjs = require('./chunk-VKXKQ5YI.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
@@ -16,10 +16,10 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
16
16
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
17
17
|
var CrossmintWallets = class _CrossmintWallets {
|
|
18
18
|
constructor(crossmint) {
|
|
19
|
-
|
|
20
|
-
const apiClient = new (0,
|
|
21
|
-
this.walletFactory = new (0,
|
|
22
|
-
|
|
19
|
+
_chunkVKXKQ5YIcjs.initWalletsLogger.call(void 0, crossmint.apiKey);
|
|
20
|
+
const apiClient = new (0, _chunkZLPFQ56Qcjs.ApiClient)(crossmint);
|
|
21
|
+
this.walletFactory = new (0, _chunkSEV3UBGKcjs.WalletFactory)(apiClient);
|
|
22
|
+
_chunkVKXKQ5YIcjs.walletsLogger.info("wallets.sdk.initialized");
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Initialize the Wallets SDK
|