@crossmint/wallets-sdk 0.20.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/__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 +35 -35
- package/dist/api/gen/types.gen.d.ts +35 -35
- package/dist/api/index.cjs +4 -4
- package/dist/api/index.js +3 -3
- package/dist/chains/chains.cjs +6 -5
- package/dist/chains/chains.d.cts +1 -1
- package/dist/chains/chains.d.ts +1 -1
- package/dist/chains/chains.js +5 -4
- package/dist/chains/definitions/tempo.cjs +7 -0
- package/dist/chains/definitions/tempo.d.cts +39 -0
- package/dist/chains/definitions/tempo.d.ts +39 -0
- package/dist/chains/definitions/tempo.js +7 -0
- package/dist/chains/definitions/tempoTestnet.cjs +2 -2
- package/dist/chains/definitions/tempoTestnet.d.cts +1 -5
- package/dist/chains/definitions/tempoTestnet.d.ts +1 -5
- package/dist/chains/definitions/tempoTestnet.js +1 -1
- package/dist/{chunk-KVYY4QDB.cjs → chunk-3ASKCQJN.cjs} +18 -18
- package/dist/{chunk-AZQFMK3I.js → chunk-3G4P2NHM.js} +2 -2
- package/dist/{chunk-GWLAO3PX.js → chunk-3KEY2NLC.js} +1 -1
- package/dist/{chunk-YDFIY5ER.js → chunk-3SYMIYEW.js} +5 -5
- package/dist/{chunk-6LVFMXDR.cjs → chunk-3WF7K4KF.cjs} +23 -23
- package/dist/chunk-7USEVMTW.cjs +21 -0
- package/dist/{chunk-RJY4GT2D.cjs → chunk-AEGU53OM.cjs} +6 -6
- package/dist/{chunk-MUIINXJY.js → chunk-AYE7XUR2.js} +4 -4
- package/dist/{chunk-IAZHXIFV.js → chunk-DENEF27X.js} +3 -3
- package/dist/{chunk-2APY4BUJ.js → chunk-DPZIHSN7.js} +4 -4
- package/dist/{chunk-DF3SZX2E.js → chunk-DZ6MCPD3.js} +1 -1
- package/dist/{chunk-NN2NBBTN.cjs → chunk-F7L2TZ3I.cjs} +1 -5
- package/dist/{chunk-WBTM7E5O.js → chunk-FGGGBNUF.js} +10 -3
- package/dist/{chunk-GEHZRAAJ.cjs → chunk-H3XAAMD3.cjs} +13 -6
- package/dist/{chunk-TQKCX7VN.cjs → chunk-HH3MM7IJ.cjs} +1 -1
- package/dist/{chunk-24DGWV3E.js → chunk-IBV7DELQ.js} +3 -3
- package/dist/{chunk-SAZ76VGQ.js → chunk-J45OIOTF.js} +2 -2
- package/dist/{chunk-AXQLP7Z6.js → chunk-JWMQALLN.js} +1 -5
- package/dist/{chunk-MZBMV54C.js → chunk-KD6N62YZ.js} +2 -2
- package/dist/{chunk-GXEWWYHT.cjs → chunk-KN3AKBVY.cjs} +6 -6
- package/dist/{chunk-XM4Y4HS5.cjs → chunk-LONKAMXJ.cjs} +6 -6
- package/dist/{chunk-2XDIXELO.cjs → chunk-LPR7BODP.cjs} +6 -6
- package/dist/chunk-MMISP35W.js +21 -0
- package/dist/{chunk-ZLPFQ56Q.cjs → chunk-NFV5K2D2.cjs} +12 -12
- package/dist/{chunk-BQN5PNZK.js → chunk-NPTNXK47.js} +1 -1
- package/dist/{chunk-TNASR6QE.cjs → chunk-O42BRSEX.cjs} +9 -9
- package/dist/{chunk-4ID6ZK4A.cjs → chunk-SJSXTTSY.cjs} +44 -44
- package/dist/{chunk-VKXKQ5YI.cjs → chunk-TC6ITDWV.cjs} +3 -3
- package/dist/{chunk-ZKWJY2VO.js → chunk-TPW2OJIB.js} +2 -2
- package/dist/{chunk-7OW5LYR6.js → chunk-TYRXXYHP.js} +2 -2
- package/dist/{chunk-6S7BKBVM.cjs → chunk-XMVAZ7EW.cjs} +7 -7
- package/dist/{chunk-7EXE5FZJ.js → chunk-XTKNO44C.js} +2 -2
- package/dist/{chunk-SEV3UBGK.cjs → chunk-Y35UJFTB.cjs} +23 -23
- package/dist/{chunk-PRNZJUHI.cjs → chunk-ZZLEVK2P.cjs} +9 -9
- package/dist/index.cjs +18 -17
- package/dist/index.js +17 -16
- 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 +15 -14
- package/dist/sdk.js +14 -13
- package/dist/signers/index.cjs +8 -8
- package/dist/signers/index.js +7 -7
- package/dist/signers/non-custodial/index.cjs +7 -7
- package/dist/signers/non-custodial/index.js +8 -8
- 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 +11 -10
- package/dist/wallets/__tests__/test-helpers.js +10 -9
- package/dist/wallets/evm.cjs +12 -11
- package/dist/wallets/evm.js +11 -10
- package/dist/wallets/solana.cjs +12 -11
- package/dist/wallets/solana.js +11 -10
- package/dist/wallets/stellar.cjs +12 -11
- package/dist/wallets/stellar.js +11 -10
- package/dist/wallets/wallet-factory.cjs +13 -12
- package/dist/wallets/wallet-factory.js +12 -11
- package/dist/wallets/wallet.cjs +11 -10
- package/dist/wallets/wallet.js +10 -9
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3ASKCQJNcjs = require('./chunk-3ASKCQJN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkH3XAAMD3cjs = require('./chunk-H3XAAMD3.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -21,10 +21,10 @@ var _chunkGEHZRAAJcjs = require('./chunk-GEHZRAAJ.cjs');
|
|
|
21
21
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkTC6ITDWVcjs = require('./chunk-TC6ITDWV.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkHH3MM7IJcjs = require('./chunk-HH3MM7IJ.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -73,7 +73,7 @@ var Wallet = class {
|
|
|
73
73
|
}
|
|
74
74
|
balances(tokens) {
|
|
75
75
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
76
|
-
|
|
76
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.balances.start");
|
|
77
77
|
const resolvedChain = this.resolveChainForEnvironment();
|
|
78
78
|
let nativeToken;
|
|
79
79
|
switch (this.chain) {
|
|
@@ -93,16 +93,16 @@ var Wallet = class {
|
|
|
93
93
|
tokens: allTokens
|
|
94
94
|
});
|
|
95
95
|
if ("error" in response) {
|
|
96
|
-
|
|
96
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.balances.error", { error: response });
|
|
97
97
|
throw new Error(`Failed to get balances for wallet: ${JSON.stringify(response.message)}`);
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.balances.success");
|
|
100
100
|
return this.transformBalanceResponse(response, nativeToken, tokens);
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
stagingFund(amount, chain) {
|
|
104
104
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
105
|
-
|
|
105
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.stagingFund.start", {
|
|
106
106
|
amount,
|
|
107
107
|
chain: chain != null ? chain : this.chain
|
|
108
108
|
});
|
|
@@ -114,12 +114,12 @@ var Wallet = class {
|
|
|
114
114
|
chain: chain != null ? chain : this.chain
|
|
115
115
|
});
|
|
116
116
|
if ("error" in response) {
|
|
117
|
-
|
|
117
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.stagingFund.error", {
|
|
118
118
|
error: response
|
|
119
119
|
});
|
|
120
120
|
throw new Error(`Failed to fund wallet: ${JSON.stringify(response.message)}`);
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.stagingFund.success");
|
|
123
123
|
return response;
|
|
124
124
|
});
|
|
125
125
|
}
|
|
@@ -244,7 +244,7 @@ var Wallet = class {
|
|
|
244
244
|
const resolvedChain = this.resolveChainForEnvironment();
|
|
245
245
|
const recipient = toRecipientLocator(to);
|
|
246
246
|
const tokenLocator = toTokenLocator(token, resolvedChain);
|
|
247
|
-
|
|
247
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.send.start", _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
248
248
|
recipient,
|
|
249
249
|
token: tokenLocator,
|
|
250
250
|
amount
|
|
@@ -256,7 +256,7 @@ var Wallet = class {
|
|
|
256
256
|
}, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {}), (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {});
|
|
257
257
|
const transactionCreationResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).send(this.walletLocator, tokenLocator, sendParams);
|
|
258
258
|
if ("message" in transactionCreationResponse) {
|
|
259
|
-
|
|
259
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.send.error", {
|
|
260
260
|
error: transactionCreationResponse
|
|
261
261
|
});
|
|
262
262
|
throw new (0, _chunkXC2V34TScjs.TransactionNotCreatedError)(
|
|
@@ -264,7 +264,7 @@ var Wallet = class {
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
if (options == null ? void 0 : options.experimental_prepareOnly) {
|
|
267
|
-
|
|
267
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.send.prepared", {
|
|
268
268
|
transactionId: transactionCreationResponse.id
|
|
269
269
|
});
|
|
270
270
|
return {
|
|
@@ -274,7 +274,7 @@ var Wallet = class {
|
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
const result = yield this.approveTransactionAndWait(transactionCreationResponse.id);
|
|
277
|
-
|
|
277
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.send.success", {
|
|
278
278
|
transactionId: transactionCreationResponse.id,
|
|
279
279
|
hash: result.hash
|
|
280
280
|
});
|
|
@@ -302,7 +302,7 @@ var Wallet = class {
|
|
|
302
302
|
}
|
|
303
303
|
approve(params) {
|
|
304
304
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
305
|
-
|
|
305
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.approve.start", {
|
|
306
306
|
transactionId: params.transactionId,
|
|
307
307
|
signatureId: params.signatureId
|
|
308
308
|
});
|
|
@@ -311,19 +311,19 @@ var Wallet = class {
|
|
|
311
311
|
params.transactionId,
|
|
312
312
|
params.options
|
|
313
313
|
);
|
|
314
|
-
|
|
314
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.approve.success", {
|
|
315
315
|
transactionId: params.transactionId
|
|
316
316
|
});
|
|
317
317
|
return result;
|
|
318
318
|
}
|
|
319
319
|
if (params.signatureId != null) {
|
|
320
320
|
const result = yield this.approveSignatureAndWait(params.signatureId, params.options);
|
|
321
|
-
|
|
321
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.approve.success", {
|
|
322
322
|
signatureId: params.signatureId
|
|
323
323
|
});
|
|
324
324
|
return result;
|
|
325
325
|
}
|
|
326
|
-
|
|
326
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.approve.error", {
|
|
327
327
|
error: "Either transactionId or signatureId must be provided"
|
|
328
328
|
});
|
|
329
329
|
throw new Error("Either transactionId or signatureId must be provided");
|
|
@@ -332,39 +332,39 @@ var Wallet = class {
|
|
|
332
332
|
addDelegatedSigner(params) {
|
|
333
333
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
334
334
|
var _a, _b, _c;
|
|
335
|
-
|
|
335
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.addDelegatedSigner.start");
|
|
336
336
|
const response = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).registerSigner(this.walletLocator, {
|
|
337
337
|
signer: params.signer,
|
|
338
338
|
chain: this.chain === "solana" || this.chain === "stellar" ? void 0 : this.chain
|
|
339
339
|
});
|
|
340
340
|
if ("error" in response) {
|
|
341
|
-
|
|
341
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
342
342
|
error: response
|
|
343
343
|
});
|
|
344
344
|
throw new Error(`Failed to register signer: ${JSON.stringify(response.message)}`);
|
|
345
345
|
}
|
|
346
346
|
if (this.chain === "solana" || this.chain === "stellar") {
|
|
347
347
|
if (!("transaction" in response) || response.transaction == null) {
|
|
348
|
-
|
|
348
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
349
349
|
error: "Expected transaction in response for Solana/Stellar chain"
|
|
350
350
|
});
|
|
351
351
|
throw new Error("Expected transaction in response for Solana/Stellar chain");
|
|
352
352
|
}
|
|
353
353
|
const transactionId = response.transaction.id;
|
|
354
354
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
355
|
-
|
|
355
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
|
|
356
356
|
transactionId
|
|
357
357
|
});
|
|
358
358
|
return { transactionId };
|
|
359
359
|
}
|
|
360
360
|
yield this.approveTransactionAndWait(transactionId);
|
|
361
|
-
|
|
361
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
362
362
|
transactionId
|
|
363
363
|
});
|
|
364
364
|
return void 0;
|
|
365
365
|
}
|
|
366
366
|
if (!("chains" in response)) {
|
|
367
|
-
|
|
367
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
368
368
|
error: "Expected chains in response for EVM chain"
|
|
369
369
|
});
|
|
370
370
|
throw new Error("Expected chains in response for EVM chain");
|
|
@@ -372,42 +372,42 @@ var Wallet = class {
|
|
|
372
372
|
const chainResponse = (_b = response.chains) == null ? void 0 : _b[this.chain];
|
|
373
373
|
if ((_c = params.options) == null ? void 0 : _c.experimental_prepareOnly) {
|
|
374
374
|
const signatureId = (chainResponse == null ? void 0 : chainResponse.status) !== "success" ? chainResponse == null ? void 0 : chainResponse.id : void 0;
|
|
375
|
-
|
|
375
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
|
|
376
376
|
signatureId
|
|
377
377
|
});
|
|
378
378
|
return { signatureId };
|
|
379
379
|
}
|
|
380
380
|
if ((chainResponse == null ? void 0 : chainResponse.status) === "awaiting-approval") {
|
|
381
381
|
yield this.approveSignatureAndWait(chainResponse.id);
|
|
382
|
-
|
|
382
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
383
383
|
signatureId: chainResponse.id
|
|
384
384
|
});
|
|
385
385
|
return void 0;
|
|
386
386
|
}
|
|
387
387
|
if ((chainResponse == null ? void 0 : chainResponse.status) === "pending") {
|
|
388
388
|
yield this.waitForSignature(chainResponse.id);
|
|
389
|
-
|
|
389
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
390
390
|
signatureId: chainResponse.id
|
|
391
391
|
});
|
|
392
392
|
return void 0;
|
|
393
393
|
}
|
|
394
|
-
|
|
394
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.addDelegatedSigner.success");
|
|
395
395
|
return void 0;
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
delegatedSigners() {
|
|
399
399
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
400
400
|
var _a, _b, _c;
|
|
401
|
-
|
|
401
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.delegatedSigners.start");
|
|
402
402
|
const walletResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getWallet(this.walletLocator);
|
|
403
403
|
if ("error" in walletResponse) {
|
|
404
|
-
|
|
404
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.delegatedSigners.error", {
|
|
405
405
|
error: walletResponse
|
|
406
406
|
});
|
|
407
407
|
throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(walletResponse));
|
|
408
408
|
}
|
|
409
409
|
if (walletResponse.type !== "smart" || walletResponse.chainType !== "evm" && walletResponse.chainType !== "solana" && walletResponse.chainType !== "stellar") {
|
|
410
|
-
|
|
410
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("wallet.delegatedSigners.error", {
|
|
411
411
|
error: `Wallet type ${walletResponse.type} not supported`
|
|
412
412
|
});
|
|
413
413
|
throw new (0, _chunkXC2V34TScjs.WalletTypeNotSupportedError)(`Wallet type ${walletResponse.type} not supported`);
|
|
@@ -419,7 +419,7 @@ var Wallet = class {
|
|
|
419
419
|
signer: `external-wallet:${address}`
|
|
420
420
|
};
|
|
421
421
|
})) != null ? _c : [];
|
|
422
|
-
|
|
422
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.delegatedSigners.success", {
|
|
423
423
|
count: signers.length
|
|
424
424
|
});
|
|
425
425
|
return signers;
|
|
@@ -447,7 +447,7 @@ var Wallet = class {
|
|
|
447
447
|
}
|
|
448
448
|
preAuthIfNeeded() {
|
|
449
449
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
450
|
-
if (this.signer instanceof
|
|
450
|
+
if (this.signer instanceof _chunk3ASKCQJNcjs.NonCustodialSigner) {
|
|
451
451
|
yield this.signer.ensureAuthenticated();
|
|
452
452
|
}
|
|
453
453
|
});
|
|
@@ -456,7 +456,7 @@ var Wallet = class {
|
|
|
456
456
|
return this.chain === "solana";
|
|
457
457
|
}
|
|
458
458
|
resolveChainForEnvironment() {
|
|
459
|
-
const resolvedChain =
|
|
459
|
+
const resolvedChain = _chunkH3XAAMD3cjs.validateChainForEnvironment.call(void 0, this.chain, _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).environment);
|
|
460
460
|
if (resolvedChain !== this.chain) {
|
|
461
461
|
this.chain = resolvedChain;
|
|
462
462
|
}
|
|
@@ -557,7 +557,7 @@ var Wallet = class {
|
|
|
557
557
|
}
|
|
558
558
|
executeApproveTransactionWithErrorHandling(transactionId, approvals) {
|
|
559
559
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
560
|
-
|
|
560
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.approve: submitting approval to API", { transactionId });
|
|
561
561
|
const approvedTransaction = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).approveTransaction(this.walletLocator, transactionId, {
|
|
562
562
|
approvals
|
|
563
563
|
});
|
|
@@ -582,7 +582,7 @@ var Wallet = class {
|
|
|
582
582
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
583
583
|
let signatureResponse = null;
|
|
584
584
|
do {
|
|
585
|
-
yield new Promise((resolve) => setTimeout(resolve,
|
|
585
|
+
yield new Promise((resolve) => setTimeout(resolve, _chunkHH3MM7IJcjs.STATUS_POLLING_INTERVAL_MS));
|
|
586
586
|
signatureResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getSignature(this.walletLocator, signatureId);
|
|
587
587
|
if ("error" in signatureResponse) {
|
|
588
588
|
throw new (0, _chunkXC2V34TScjs.SignatureNotAvailableError)(JSON.stringify(signatureResponse));
|
|
@@ -604,10 +604,10 @@ var Wallet = class {
|
|
|
604
604
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, arguments, function* (transactionId, timeoutMs = 6e4, {
|
|
605
605
|
backoffMultiplier = 1.1,
|
|
606
606
|
maxBackoffMs = 2e3,
|
|
607
|
-
initialBackoffMs =
|
|
607
|
+
initialBackoffMs = _chunkHH3MM7IJcjs.STATUS_POLLING_INTERVAL_MS
|
|
608
608
|
} = {}) {
|
|
609
609
|
var _a;
|
|
610
|
-
|
|
610
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallet.approve: waiting for transaction confirmation", { transactionId, timeoutMs });
|
|
611
611
|
const startTime = Date.now();
|
|
612
612
|
let transactionResponse;
|
|
613
613
|
do {
|
|
@@ -656,7 +656,7 @@ _options = new WeakMap();
|
|
|
656
656
|
_apiClient = new WeakMap();
|
|
657
657
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
658
658
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
659
|
-
logger:
|
|
659
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
660
660
|
methodName: "wallet.balances",
|
|
661
661
|
buildContext(thisArg) {
|
|
662
662
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -665,7 +665,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
665
665
|
], Wallet.prototype, "balances", 1);
|
|
666
666
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
667
667
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
668
|
-
logger:
|
|
668
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
669
669
|
methodName: "wallet.stagingFund",
|
|
670
670
|
buildContext(thisArg) {
|
|
671
671
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -674,7 +674,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
674
674
|
], Wallet.prototype, "stagingFund", 1);
|
|
675
675
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
676
676
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
677
|
-
logger:
|
|
677
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
678
678
|
methodName: "wallet.send",
|
|
679
679
|
buildContext(thisArg) {
|
|
680
680
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -683,7 +683,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
683
683
|
], Wallet.prototype, "send", 1);
|
|
684
684
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
685
685
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
686
|
-
logger:
|
|
686
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
687
687
|
methodName: "wallet.approve",
|
|
688
688
|
buildContext(thisArg) {
|
|
689
689
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -692,7 +692,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
692
692
|
], Wallet.prototype, "approve", 1);
|
|
693
693
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
694
694
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
695
|
-
logger:
|
|
695
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
696
696
|
methodName: "wallet.addDelegatedSigner",
|
|
697
697
|
buildContext(thisArg) {
|
|
698
698
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -701,7 +701,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
701
701
|
], Wallet.prototype, "addDelegatedSigner", 1);
|
|
702
702
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
703
703
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
704
|
-
logger:
|
|
704
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
705
705
|
methodName: "wallet.delegatedSigners",
|
|
706
706
|
buildContext(thisArg) {
|
|
707
707
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkHH3MM7IJcjs = require('./chunk-HH3MM7IJ.cjs');
|
|
5
5
|
|
|
6
6
|
// src/logger/init.ts
|
|
7
7
|
|
|
@@ -20,8 +20,8 @@ function initWalletsLogger(apiKey) {
|
|
|
20
20
|
}
|
|
21
21
|
const { environment, projectId } = validationResult;
|
|
22
22
|
walletsLogger.init({
|
|
23
|
-
packageName:
|
|
24
|
-
packageVersion:
|
|
23
|
+
packageName: _chunkHH3MM7IJcjs.SDK_NAME,
|
|
24
|
+
packageVersion: _chunkHH3MM7IJcjs.SDK_VERSION,
|
|
25
25
|
environment,
|
|
26
26
|
projectId,
|
|
27
27
|
platform
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_EVENT_OPTIONS,
|
|
3
3
|
NonCustodialSigner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3KEY2NLC.js";
|
|
5
5
|
import {
|
|
6
6
|
walletsLogger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DZ6MCPD3.js";
|
|
8
8
|
import {
|
|
9
9
|
__async
|
|
10
10
|
} from "./chunk-ASE2FXWP.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Wallet
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DPZIHSN7.js";
|
|
4
4
|
import {
|
|
5
5
|
TransactionNotCreatedError
|
|
6
6
|
} from "./chunk-SGINWAB6.js";
|
|
7
7
|
import {
|
|
8
8
|
walletsLogger
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DZ6MCPD3.js";
|
|
10
10
|
import {
|
|
11
11
|
__async,
|
|
12
12
|
__decorateClass
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkY35UJFTBcjs = require('./chunk-Y35UJFTB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkNFV5K2D2cjs = require('./chunk-NFV5K2D2.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkTC6ITDWVcjs = require('./chunk-TC6ITDWV.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
|
+
_chunkTC6ITDWVcjs.initWalletsLogger.call(void 0, crossmint.apiKey);
|
|
20
|
+
const apiClient = new (0, _chunkNFV5K2D2cjs.ApiClient)(crossmint);
|
|
21
|
+
this.walletFactory = new (0, _chunkY35UJFTBcjs.WalletFactory)(apiClient);
|
|
22
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("wallets.sdk.initialized");
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Initialize the Wallets SDK
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_EVENT_OPTIONS,
|
|
3
3
|
NonCustodialSigner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3KEY2NLC.js";
|
|
5
5
|
import {
|
|
6
6
|
walletsLogger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DZ6MCPD3.js";
|
|
8
8
|
import {
|
|
9
9
|
__async
|
|
10
10
|
} from "./chunk-ASE2FXWP.js";
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
var _chunkRBHGZDDXcjs = require('./chunk-RBHGZDDX.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkSJSXTTSYcjs = require('./chunk-SJSXTTSY.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkLONKAMXJcjs = require('./chunk-LONKAMXJ.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkH3XAAMD3cjs = require('./chunk-H3XAAMD3.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkTC6ITDWVcjs = require('./chunk-TC6ITDWV.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -36,45 +36,45 @@ var WalletFactory = class {
|
|
|
36
36
|
getOrCreateWallet(args) {
|
|
37
37
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
38
38
|
if (this.apiClient.isServerSide) {
|
|
39
|
-
|
|
39
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("walletFactory.getOrCreateWallet.error", {
|
|
40
40
|
error: "getOrCreateWallet can only be called from client-side code"
|
|
41
41
|
});
|
|
42
42
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)(
|
|
43
43
|
"getOrCreateWallet can only be called from client-side code.\n- Make sure you're running this in the browser (or another client environment), not on your server.\n- Use your Crossmint Client API Key (not a server key)."
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain:
|
|
46
|
+
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain: _chunkH3XAAMD3cjs.validateChainForEnvironment.call(void 0, args.chain, this.apiClient.environment) });
|
|
47
47
|
const locator = this.getWalletLocator(args);
|
|
48
|
-
|
|
48
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("walletFactory.getOrCreateWallet.start");
|
|
49
49
|
const existingWallet = yield this.apiClient.getWallet(locator);
|
|
50
50
|
if (existingWallet != null && !("error" in existingWallet)) {
|
|
51
|
-
|
|
51
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("walletFactory.getOrCreateWallet.existing", {
|
|
52
52
|
address: existingWallet.address
|
|
53
53
|
});
|
|
54
54
|
return this.createWalletInstance(existingWallet, args);
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("walletFactory.getOrCreateWallet.creating");
|
|
57
57
|
return this.createWalletInternal(args);
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
getWallet(walletLocator, args) {
|
|
61
61
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
62
62
|
if (!this.apiClient.isServerSide) {
|
|
63
|
-
|
|
63
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("walletFactory.getWallet.error", {
|
|
64
64
|
error: "getWallet is not supported on client side"
|
|
65
65
|
});
|
|
66
66
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)("getWallet is not supported on client side, use getOrCreateWallet instead");
|
|
67
67
|
}
|
|
68
|
-
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain:
|
|
69
|
-
|
|
68
|
+
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain: _chunkH3XAAMD3cjs.validateChainForEnvironment.call(void 0, args.chain, this.apiClient.environment) });
|
|
69
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("walletFactory.getWallet.start");
|
|
70
70
|
const existingWallet = yield this.apiClient.getWallet(walletLocator);
|
|
71
71
|
if ("error" in existingWallet) {
|
|
72
|
-
|
|
72
|
+
_chunkTC6ITDWVcjs.walletsLogger.warn("walletFactory.getWallet.notFound", {
|
|
73
73
|
error: existingWallet.error
|
|
74
74
|
});
|
|
75
75
|
throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(existingWallet));
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("walletFactory.getWallet.success", {
|
|
78
78
|
address: existingWallet.address
|
|
79
79
|
});
|
|
80
80
|
return this.createWalletInstance(existingWallet, args);
|
|
@@ -82,7 +82,7 @@ var WalletFactory = class {
|
|
|
82
82
|
}
|
|
83
83
|
createWallet(args) {
|
|
84
84
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
85
|
-
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain:
|
|
85
|
+
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain: _chunkH3XAAMD3cjs.validateChainForEnvironment.call(void 0, args.chain, this.apiClient.environment) });
|
|
86
86
|
return this.createWalletInternal(args);
|
|
87
87
|
});
|
|
88
88
|
}
|
|
@@ -90,7 +90,7 @@ var WalletFactory = class {
|
|
|
90
90
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
91
91
|
var _a, _b, _c, _d, _e;
|
|
92
92
|
yield (_c = (_b = (_a = args.options) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onWalletCreationStart) == null ? void 0 : _c.call(_b);
|
|
93
|
-
|
|
93
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("walletFactory.createWallet.start");
|
|
94
94
|
this.mutateSignerFromCustomAuth(args, true);
|
|
95
95
|
const adminSigner = args.signer.type === "passkey" ? yield this.createPasskeyAdminSigner(args.signer) : args.signer;
|
|
96
96
|
const walletResponse = yield this.apiClient.createWallet({
|
|
@@ -103,12 +103,12 @@ var WalletFactory = class {
|
|
|
103
103
|
alias: (_e = args.alias) != null ? _e : void 0
|
|
104
104
|
});
|
|
105
105
|
if ("error" in walletResponse) {
|
|
106
|
-
|
|
106
|
+
_chunkTC6ITDWVcjs.walletsLogger.error("walletFactory.createWallet.error", {
|
|
107
107
|
error: walletResponse.error
|
|
108
108
|
});
|
|
109
109
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)(JSON.stringify(walletResponse));
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("walletFactory.createWallet.success", {
|
|
112
112
|
address: walletResponse.address
|
|
113
113
|
});
|
|
114
114
|
return this.createWalletInstance(walletResponse, args);
|
|
@@ -117,12 +117,12 @@ var WalletFactory = class {
|
|
|
117
117
|
createWalletInstance(walletResponse, args) {
|
|
118
118
|
this.validateExistingWalletConfig(walletResponse, args);
|
|
119
119
|
const signerConfig = this.toInternalSignerConfig(walletResponse, args.signer, args.options);
|
|
120
|
-
return new (0,
|
|
120
|
+
return new (0, _chunkSJSXTTSYcjs.Wallet)(
|
|
121
121
|
{
|
|
122
122
|
chain: args.chain,
|
|
123
123
|
address: walletResponse.address,
|
|
124
124
|
owner: walletResponse.owner,
|
|
125
|
-
signer:
|
|
125
|
+
signer: _chunkLONKAMXJcjs.assembleSigner.call(void 0, args.chain, signerConfig),
|
|
126
126
|
options: args.options,
|
|
127
127
|
alias: args.alias
|
|
128
128
|
},
|
|
@@ -301,7 +301,7 @@ var WalletFactory = class {
|
|
|
301
301
|
};
|
|
302
302
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
303
303
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
304
|
-
logger:
|
|
304
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
305
305
|
methodName: "walletFactory.getOrCreateWallet",
|
|
306
306
|
buildContext(_thisArg, args) {
|
|
307
307
|
const walletArgs = args[0];
|
|
@@ -311,7 +311,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
311
311
|
], WalletFactory.prototype, "getOrCreateWallet", 1);
|
|
312
312
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
313
313
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
314
|
-
logger:
|
|
314
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
315
315
|
methodName: "walletFactory.getWallet",
|
|
316
316
|
buildContext(_thisArg, args) {
|
|
317
317
|
const walletLocator = args[0];
|
|
@@ -322,7 +322,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
322
322
|
], WalletFactory.prototype, "getWallet", 1);
|
|
323
323
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
324
324
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
325
|
-
logger:
|
|
325
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
326
326
|
methodName: "walletFactory.createWallet",
|
|
327
327
|
buildContext(_thisArg, args) {
|
|
328
328
|
const walletArgs = args[0];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSJSXTTSYcjs = require('./chunk-SJSXTTSY.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTC6ITDWVcjs = require('./chunk-TC6ITDWV.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
14
14
|
|
|
15
15
|
// src/wallets/stellar.ts
|
|
16
16
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
17
|
-
var _StellarWallet = class _StellarWallet extends
|
|
17
|
+
var _StellarWallet = class _StellarWallet extends _chunkSJSXTTSYcjs.Wallet {
|
|
18
18
|
constructor(wallet) {
|
|
19
19
|
super(
|
|
20
20
|
{
|
|
@@ -22,10 +22,10 @@ var _StellarWallet = class _StellarWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
22
22
|
address: wallet.address,
|
|
23
23
|
owner: wallet.owner,
|
|
24
24
|
signer: wallet.signer,
|
|
25
|
-
options:
|
|
25
|
+
options: _chunkSJSXTTSYcjs.Wallet.getOptions(wallet),
|
|
26
26
|
alias: wallet.alias
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
_chunkSJSXTTSYcjs.Wallet.getApiClient(wallet)
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
static from(wallet) {
|
|
@@ -37,11 +37,11 @@ var _StellarWallet = class _StellarWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
37
37
|
sendTransaction(params) {
|
|
38
38
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
39
39
|
var _a;
|
|
40
|
-
|
|
40
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("stellarWallet.sendTransaction.start");
|
|
41
41
|
yield this.preAuthIfNeeded();
|
|
42
42
|
const createdTransaction = yield this.createTransaction(params);
|
|
43
43
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
44
|
-
|
|
44
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("stellarWallet.sendTransaction.prepared", {
|
|
45
45
|
transactionId: createdTransaction.id
|
|
46
46
|
});
|
|
47
47
|
return {
|
|
@@ -52,7 +52,7 @@ var _StellarWallet = class _StellarWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
52
52
|
}
|
|
53
53
|
const options = {};
|
|
54
54
|
const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
|
|
55
|
-
|
|
55
|
+
_chunkTC6ITDWVcjs.walletsLogger.info("stellarWallet.sendTransaction.success", {
|
|
56
56
|
transactionId: createdTransaction.id,
|
|
57
57
|
hash: result.hash
|
|
58
58
|
});
|
|
@@ -96,7 +96,7 @@ var _StellarWallet = class _StellarWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
96
96
|
};
|
|
97
97
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
98
98
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
99
|
-
logger:
|
|
99
|
+
logger: _chunkTC6ITDWVcjs.walletsLogger,
|
|
100
100
|
methodName: "stellarWallet.sendTransaction",
|
|
101
101
|
buildContext(thisArg) {
|
|
102
102
|
return { chain: thisArg.chain, address: thisArg.address };
|