@crossmint/wallets-sdk 0.18.15 → 0.19.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 +4 -4
- package/dist/api/index.js +3 -3
- package/dist/chains/chains.cjs +6 -2
- package/dist/chains/chains.d.cts +3 -1
- package/dist/chains/chains.d.ts +3 -1
- package/dist/chains/chains.js +5 -1
- package/dist/{chunk-5YX2BE4I.js → chunk-57HPJVTI.js} +8 -3
- package/dist/{chunk-PJTTM5QQ.cjs → chunk-5CBGJLA4.cjs} +1 -1
- package/dist/{chunk-YZOPFNY3.js → chunk-6EP3PLGP.js} +2 -2
- package/dist/{chunk-4ZFP3ST7.js → chunk-7EZZGCYI.js} +10 -1
- package/dist/{chunk-ZM437XPQ.js → chunk-7NKX266V.js} +39 -5
- package/dist/{chunk-GSDBCRGH.js → chunk-BBYNVHFR.js} +3 -3
- package/dist/{chunk-NFQT5TFO.cjs → chunk-C5F6IECX.cjs} +12 -12
- package/dist/{chunk-OWRKZD7H.cjs → chunk-DIM3X4IX.cjs} +9 -1
- package/dist/{chunk-QCTTQ4XE.cjs → chunk-EIZVQAZO.cjs} +54 -20
- package/dist/{chunk-V65OBC5I.js → chunk-ETCH6L2Y.js} +3 -3
- package/dist/{chunk-WMUNQJYD.cjs → chunk-FQV77LH4.cjs} +3 -3
- package/dist/{chunk-YT64AZL6.cjs → chunk-JLW3Q65G.cjs} +6 -6
- package/dist/{chunk-AKJOFUXU.cjs → chunk-JZQYCISB.cjs} +9 -9
- package/dist/{chunk-CJWHHO4B.js → chunk-KE6LX37B.js} +1 -1
- package/dist/{chunk-WQDGFD34.js → chunk-L5IMC3NM.js} +2 -2
- package/dist/{chunk-PHIXNAMT.js → chunk-N65K6TUY.js} +10 -1
- package/dist/{chunk-PADJ2CIV.cjs → chunk-NXST74TX.cjs} +80 -43
- package/dist/{chunk-BMXG52BZ.cjs → chunk-REP547HH.cjs} +36 -13
- package/dist/{chunk-LFUXRLJR.js → chunk-S2AKC2CK.js} +1 -1
- package/dist/{chunk-TOTOITTM.js → chunk-SUJQZWLJ.js} +2 -2
- package/dist/{chunk-AUNZEGWS.cjs → chunk-TCNXKNBQ.cjs} +7 -7
- package/dist/{chunk-AKAJ7UHQ.cjs → chunk-VNPL3HFN.cjs} +12 -3
- package/dist/{chunk-77HEKAFB.cjs → chunk-VWENCGQO.cjs} +12 -3
- package/dist/{chunk-VM6OLXBS.js → chunk-W3OYA42M.js} +32 -9
- package/dist/{chunk-OOVNMAQF.js → chunk-XEZBA7I2.js} +58 -21
- package/dist/{chunk-JDAWNKQ7.cjs → chunk-XQSMZXBR.cjs} +28 -23
- package/dist/{chunk-XVFUAZJY.js → chunk-XSMIDXUA.js} +9 -1
- package/dist/{chunk-SCU5YLUT.js → chunk-YF4DYTBM.js} +10 -1
- package/dist/{chunk-PRQOFWLH.cjs → chunk-YFOUZXSM.cjs} +12 -3
- package/dist/{chunk-OTI3LX45.cjs → chunk-YXFIZNFL.cjs} +9 -9
- package/dist/index.cjs +16 -16
- package/dist/index.js +15 -15
- 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 +17 -12
- package/dist/sdk.js +16 -11
- 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 +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 +10 -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 +9 -7
- package/dist/wallets/evm.cjs +10 -10
- package/dist/wallets/evm.d.cts +20 -0
- package/dist/wallets/evm.d.ts +20 -0
- package/dist/wallets/evm.js +9 -9
- package/dist/wallets/solana.cjs +9 -9
- package/dist/wallets/solana.d.cts +5 -0
- package/dist/wallets/solana.d.ts +5 -0
- package/dist/wallets/solana.js +8 -8
- package/dist/wallets/stellar.cjs +9 -9
- package/dist/wallets/stellar.d.cts +5 -0
- package/dist/wallets/stellar.d.ts +5 -0
- package/dist/wallets/stellar.js +8 -8
- package/dist/wallets/types.d.cts +5 -1
- package/dist/wallets/types.d.ts +5 -1
- package/dist/wallets/wallet-factory.cjs +15 -10
- package/dist/wallets/wallet-factory.d.cts +2 -0
- package/dist/wallets/wallet-factory.d.ts +2 -0
- package/dist/wallets/wallet-factory.js +14 -9
- package/dist/wallets/wallet.cjs +8 -8
- package/dist/wallets/wallet.d.cts +6 -2
- package/dist/wallets/wallet.d.ts +6 -2
- package/dist/wallets/wallet.js +7 -7
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkREP547HHcjs = require('./chunk-REP547HH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -18,10 +18,10 @@ var _chunkBMXG52BZcjs = require('./chunk-BMXG52BZ.cjs');
|
|
|
18
18
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkFQV77LH4cjs = require('./chunk-FQV77LH4.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunk5CBGJLA4cjs = require('./chunk-5CBGJLA4.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -70,7 +70,7 @@ var Wallet = class {
|
|
|
70
70
|
}
|
|
71
71
|
balances(tokens) {
|
|
72
72
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
73
|
-
|
|
73
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.balances.start");
|
|
74
74
|
let nativeToken;
|
|
75
75
|
switch (this.chain) {
|
|
76
76
|
case "solana":
|
|
@@ -89,16 +89,19 @@ var Wallet = class {
|
|
|
89
89
|
tokens: allTokens
|
|
90
90
|
});
|
|
91
91
|
if ("error" in response) {
|
|
92
|
-
|
|
92
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.balances.error", { error: response });
|
|
93
93
|
throw new Error(`Failed to get balances for wallet: ${JSON.stringify(response.message)}`);
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.balances.success");
|
|
96
96
|
return this.transformBalanceResponse(response, nativeToken, tokens);
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
stagingFund(amount, chain) {
|
|
100
100
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
101
|
-
|
|
101
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.stagingFund.start", {
|
|
102
|
+
amount,
|
|
103
|
+
chain: chain != null ? chain : this.chain
|
|
104
|
+
});
|
|
102
105
|
const response = yield this.apiClient.fundWallet(this.address, {
|
|
103
106
|
amount,
|
|
104
107
|
token: "usdxm",
|
|
@@ -107,10 +110,12 @@ var Wallet = class {
|
|
|
107
110
|
chain: chain != null ? chain : this.chain
|
|
108
111
|
});
|
|
109
112
|
if ("error" in response) {
|
|
110
|
-
|
|
113
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.stagingFund.error", {
|
|
114
|
+
error: response
|
|
115
|
+
});
|
|
111
116
|
throw new Error(`Failed to fund wallet: ${JSON.stringify(response.message)}`);
|
|
112
117
|
}
|
|
113
|
-
|
|
118
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.stagingFund.success");
|
|
114
119
|
return response;
|
|
115
120
|
});
|
|
116
121
|
}
|
|
@@ -128,7 +133,9 @@ var Wallet = class {
|
|
|
128
133
|
} else if (this.chain === "stellar" && chainData != null && "contractId" in chainData) {
|
|
129
134
|
chainSpecificField = { contractId: chainData.contractId };
|
|
130
135
|
} else if (chainData != null && "contractAddress" in chainData) {
|
|
131
|
-
chainSpecificField = {
|
|
136
|
+
chainSpecificField = {
|
|
137
|
+
contractAddress: chainData.contractAddress
|
|
138
|
+
};
|
|
132
139
|
}
|
|
133
140
|
return _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
134
141
|
symbol: (_b = tokenData.symbol) != null ? _b : "",
|
|
@@ -231,21 +238,29 @@ var Wallet = class {
|
|
|
231
238
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
232
239
|
const recipient = toRecipientLocator(to);
|
|
233
240
|
const tokenLocator = toTokenLocator(token, this.chain);
|
|
234
|
-
|
|
241
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.send.start", _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
242
|
+
recipient,
|
|
243
|
+
token: tokenLocator,
|
|
244
|
+
amount
|
|
245
|
+
}, (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {}));
|
|
235
246
|
yield this.preAuthIfNeeded();
|
|
236
|
-
const sendParams = _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
247
|
+
const sendParams = _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
|
|
237
248
|
recipient,
|
|
238
249
|
amount
|
|
239
|
-
}, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {});
|
|
250
|
+
}, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {}), (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {});
|
|
240
251
|
const transactionCreationResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).send(this.walletLocator, tokenLocator, sendParams);
|
|
241
252
|
if ("message" in transactionCreationResponse) {
|
|
242
|
-
|
|
253
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.send.error", {
|
|
254
|
+
error: transactionCreationResponse
|
|
255
|
+
});
|
|
243
256
|
throw new (0, _chunkXC2V34TScjs.TransactionNotCreatedError)(
|
|
244
257
|
`Failed to send token: ${JSON.stringify(transactionCreationResponse.message)}`
|
|
245
258
|
);
|
|
246
259
|
}
|
|
247
260
|
if (options == null ? void 0 : options.experimental_prepareOnly) {
|
|
248
|
-
|
|
261
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.send.prepared", {
|
|
262
|
+
transactionId: transactionCreationResponse.id
|
|
263
|
+
});
|
|
249
264
|
return {
|
|
250
265
|
hash: void 0,
|
|
251
266
|
explorerLink: void 0,
|
|
@@ -253,7 +268,7 @@ var Wallet = class {
|
|
|
253
268
|
};
|
|
254
269
|
}
|
|
255
270
|
const result = yield this.approveTransactionAndWait(transactionCreationResponse.id);
|
|
256
|
-
|
|
271
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.send.success", {
|
|
257
272
|
transactionId: transactionCreationResponse.id,
|
|
258
273
|
hash: result.hash
|
|
259
274
|
});
|
|
@@ -281,7 +296,7 @@ var Wallet = class {
|
|
|
281
296
|
}
|
|
282
297
|
approve(params) {
|
|
283
298
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
284
|
-
|
|
299
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.approve.start", {
|
|
285
300
|
transactionId: params.transactionId,
|
|
286
301
|
signatureId: params.signatureId
|
|
287
302
|
});
|
|
@@ -290,15 +305,19 @@ var Wallet = class {
|
|
|
290
305
|
params.transactionId,
|
|
291
306
|
params.options
|
|
292
307
|
);
|
|
293
|
-
|
|
308
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.approve.success", {
|
|
309
|
+
transactionId: params.transactionId
|
|
310
|
+
});
|
|
294
311
|
return result;
|
|
295
312
|
}
|
|
296
313
|
if (params.signatureId != null) {
|
|
297
314
|
const result = yield this.approveSignatureAndWait(params.signatureId, params.options);
|
|
298
|
-
|
|
315
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.approve.success", {
|
|
316
|
+
signatureId: params.signatureId
|
|
317
|
+
});
|
|
299
318
|
return result;
|
|
300
319
|
}
|
|
301
|
-
|
|
320
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.approve.error", {
|
|
302
321
|
error: "Either transactionId or signatureId must be provided"
|
|
303
322
|
});
|
|
304
323
|
throw new Error("Either transactionId or signatureId must be provided");
|
|
@@ -307,33 +326,39 @@ var Wallet = class {
|
|
|
307
326
|
addDelegatedSigner(params) {
|
|
308
327
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
309
328
|
var _a, _b, _c;
|
|
310
|
-
|
|
329
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.addDelegatedSigner.start");
|
|
311
330
|
const response = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).registerSigner(this.walletLocator, {
|
|
312
331
|
signer: params.signer,
|
|
313
332
|
chain: this.chain === "solana" || this.chain === "stellar" ? void 0 : this.chain
|
|
314
333
|
});
|
|
315
334
|
if ("error" in response) {
|
|
316
|
-
|
|
335
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
336
|
+
error: response
|
|
337
|
+
});
|
|
317
338
|
throw new Error(`Failed to register signer: ${JSON.stringify(response.message)}`);
|
|
318
339
|
}
|
|
319
340
|
if (this.chain === "solana" || this.chain === "stellar") {
|
|
320
341
|
if (!("transaction" in response) || response.transaction == null) {
|
|
321
|
-
|
|
342
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
322
343
|
error: "Expected transaction in response for Solana/Stellar chain"
|
|
323
344
|
});
|
|
324
345
|
throw new Error("Expected transaction in response for Solana/Stellar chain");
|
|
325
346
|
}
|
|
326
347
|
const transactionId = response.transaction.id;
|
|
327
348
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
328
|
-
|
|
349
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
|
|
350
|
+
transactionId
|
|
351
|
+
});
|
|
329
352
|
return { transactionId };
|
|
330
353
|
}
|
|
331
354
|
yield this.approveTransactionAndWait(transactionId);
|
|
332
|
-
|
|
355
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
356
|
+
transactionId
|
|
357
|
+
});
|
|
333
358
|
return void 0;
|
|
334
359
|
}
|
|
335
360
|
if (!("chains" in response)) {
|
|
336
|
-
|
|
361
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.addDelegatedSigner.error", {
|
|
337
362
|
error: "Expected chains in response for EVM chain"
|
|
338
363
|
});
|
|
339
364
|
throw new Error("Expected chains in response for EVM chain");
|
|
@@ -341,34 +366,42 @@ var Wallet = class {
|
|
|
341
366
|
const chainResponse = (_b = response.chains) == null ? void 0 : _b[this.chain];
|
|
342
367
|
if ((_c = params.options) == null ? void 0 : _c.experimental_prepareOnly) {
|
|
343
368
|
const signatureId = (chainResponse == null ? void 0 : chainResponse.status) !== "success" ? chainResponse == null ? void 0 : chainResponse.id : void 0;
|
|
344
|
-
|
|
369
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.addDelegatedSigner.prepared", {
|
|
370
|
+
signatureId
|
|
371
|
+
});
|
|
345
372
|
return { signatureId };
|
|
346
373
|
}
|
|
347
374
|
if ((chainResponse == null ? void 0 : chainResponse.status) === "awaiting-approval") {
|
|
348
375
|
yield this.approveSignatureAndWait(chainResponse.id);
|
|
349
|
-
|
|
376
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
377
|
+
signatureId: chainResponse.id
|
|
378
|
+
});
|
|
350
379
|
return void 0;
|
|
351
380
|
}
|
|
352
381
|
if ((chainResponse == null ? void 0 : chainResponse.status) === "pending") {
|
|
353
382
|
yield this.waitForSignature(chainResponse.id);
|
|
354
|
-
|
|
383
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.addDelegatedSigner.success", {
|
|
384
|
+
signatureId: chainResponse.id
|
|
385
|
+
});
|
|
355
386
|
return void 0;
|
|
356
387
|
}
|
|
357
|
-
|
|
388
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.addDelegatedSigner.success");
|
|
358
389
|
return void 0;
|
|
359
390
|
});
|
|
360
391
|
}
|
|
361
392
|
delegatedSigners() {
|
|
362
393
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
363
394
|
var _a, _b, _c;
|
|
364
|
-
|
|
395
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.delegatedSigners.start");
|
|
365
396
|
const walletResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getWallet(this.walletLocator);
|
|
366
397
|
if ("error" in walletResponse) {
|
|
367
|
-
|
|
398
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.delegatedSigners.error", {
|
|
399
|
+
error: walletResponse
|
|
400
|
+
});
|
|
368
401
|
throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(walletResponse));
|
|
369
402
|
}
|
|
370
403
|
if (walletResponse.type !== "smart" || walletResponse.chainType !== "evm" && walletResponse.chainType !== "solana" && walletResponse.chainType !== "stellar") {
|
|
371
|
-
|
|
404
|
+
_chunkFQV77LH4cjs.walletsLogger.error("wallet.delegatedSigners.error", {
|
|
372
405
|
error: `Wallet type ${walletResponse.type} not supported`
|
|
373
406
|
});
|
|
374
407
|
throw new (0, _chunkXC2V34TScjs.WalletTypeNotSupportedError)(`Wallet type ${walletResponse.type} not supported`);
|
|
@@ -380,7 +413,9 @@ var Wallet = class {
|
|
|
380
413
|
signer: `external-wallet:${address}`
|
|
381
414
|
};
|
|
382
415
|
})) != null ? _c : [];
|
|
383
|
-
|
|
416
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.delegatedSigners.success", {
|
|
417
|
+
count: signers.length
|
|
418
|
+
});
|
|
384
419
|
return signers;
|
|
385
420
|
});
|
|
386
421
|
}
|
|
@@ -406,7 +441,7 @@ var Wallet = class {
|
|
|
406
441
|
}
|
|
407
442
|
preAuthIfNeeded() {
|
|
408
443
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
409
|
-
if (this.signer instanceof
|
|
444
|
+
if (this.signer instanceof _chunkREP547HHcjs.NonCustodialSigner) {
|
|
410
445
|
yield this.signer.ensureAuthenticated();
|
|
411
446
|
}
|
|
412
447
|
});
|
|
@@ -509,6 +544,7 @@ var Wallet = class {
|
|
|
509
544
|
}
|
|
510
545
|
executeApproveTransactionWithErrorHandling(transactionId, approvals) {
|
|
511
546
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
547
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.approve: submitting approval to API", { transactionId });
|
|
512
548
|
const approvedTransaction = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).approveTransaction(this.walletLocator, transactionId, {
|
|
513
549
|
approvals
|
|
514
550
|
});
|
|
@@ -533,7 +569,7 @@ var Wallet = class {
|
|
|
533
569
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
534
570
|
let signatureResponse = null;
|
|
535
571
|
do {
|
|
536
|
-
yield new Promise((resolve) => setTimeout(resolve,
|
|
572
|
+
yield new Promise((resolve) => setTimeout(resolve, _chunk5CBGJLA4cjs.STATUS_POLLING_INTERVAL_MS));
|
|
537
573
|
signatureResponse = yield _chunkUO2J2ZB2cjs.__privateGet.call(void 0, this, _apiClient).getSignature(this.walletLocator, signatureId);
|
|
538
574
|
if ("error" in signatureResponse) {
|
|
539
575
|
throw new (0, _chunkXC2V34TScjs.SignatureNotAvailableError)(JSON.stringify(signatureResponse));
|
|
@@ -555,9 +591,10 @@ var Wallet = class {
|
|
|
555
591
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, arguments, function* (transactionId, timeoutMs = 6e4, {
|
|
556
592
|
backoffMultiplier = 1.1,
|
|
557
593
|
maxBackoffMs = 2e3,
|
|
558
|
-
initialBackoffMs =
|
|
594
|
+
initialBackoffMs = _chunk5CBGJLA4cjs.STATUS_POLLING_INTERVAL_MS
|
|
559
595
|
} = {}) {
|
|
560
596
|
var _a;
|
|
597
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallet.approve: waiting for transaction confirmation", { transactionId, timeoutMs });
|
|
561
598
|
const startTime = Date.now();
|
|
562
599
|
let transactionResponse;
|
|
563
600
|
do {
|
|
@@ -606,7 +643,7 @@ _options = new WeakMap();
|
|
|
606
643
|
_apiClient = new WeakMap();
|
|
607
644
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
608
645
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
609
|
-
logger:
|
|
646
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
610
647
|
methodName: "wallet.balances",
|
|
611
648
|
buildContext(thisArg) {
|
|
612
649
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -615,7 +652,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
615
652
|
], Wallet.prototype, "balances", 1);
|
|
616
653
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
617
654
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
618
|
-
logger:
|
|
655
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
619
656
|
methodName: "wallet.stagingFund",
|
|
620
657
|
buildContext(thisArg) {
|
|
621
658
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -624,7 +661,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
624
661
|
], Wallet.prototype, "stagingFund", 1);
|
|
625
662
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
626
663
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
627
|
-
logger:
|
|
664
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
628
665
|
methodName: "wallet.send",
|
|
629
666
|
buildContext(thisArg) {
|
|
630
667
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -633,7 +670,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
633
670
|
], Wallet.prototype, "send", 1);
|
|
634
671
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
635
672
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
636
|
-
logger:
|
|
673
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
637
674
|
methodName: "wallet.approve",
|
|
638
675
|
buildContext(thisArg) {
|
|
639
676
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -642,7 +679,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
642
679
|
], Wallet.prototype, "approve", 1);
|
|
643
680
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
644
681
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
645
|
-
logger:
|
|
682
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
646
683
|
methodName: "wallet.addDelegatedSigner",
|
|
647
684
|
buildContext(thisArg) {
|
|
648
685
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -651,7 +688,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
651
688
|
], Wallet.prototype, "addDelegatedSigner", 1);
|
|
652
689
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
653
690
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
654
|
-
logger:
|
|
691
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
655
692
|
methodName: "wallet.delegatedSigners",
|
|
656
693
|
buildContext(thisArg) {
|
|
657
694
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -6,7 +6,7 @@ var _chunk4GFSUI2Icjs = require('./chunk-4GFSUI2I.cjs');
|
|
|
6
6
|
var _chunkRHR6P2KPcjs = require('./chunk-RHR6P2KP.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkFQV77LH4cjs = require('./chunk-FQV77LH4.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -64,7 +64,7 @@ var NonCustodialSigner = class {
|
|
|
64
64
|
}
|
|
65
65
|
initializeTEEConnection() {
|
|
66
66
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
67
|
-
|
|
67
|
+
_chunkFQV77LH4cjs.walletsLogger.info("TEE connection not initialized, initializing now");
|
|
68
68
|
const parsedAPIKey = _commonsdkbase.validateAPIKey.call(void 0, this.config.crossmint.apiKey);
|
|
69
69
|
if (!parsedAPIKey.isValid) {
|
|
70
70
|
throw new Error("Invalid API key");
|
|
@@ -76,7 +76,7 @@ var NonCustodialSigner = class {
|
|
|
76
76
|
if (this.config.clientTEEConnection == null) {
|
|
77
77
|
throw new Error("Failed to initialize TEE connection");
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
_chunkFQV77LH4cjs.walletsLogger.info("TEE connection initialized successfully");
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
handleAuthRequired() {
|
|
@@ -88,6 +88,8 @@ var NonCustodialSigner = class {
|
|
|
88
88
|
`${this.type} signer requires the onAuthRequired callback to handle OTP verification. This callback manages the authentication flow (sending OTP and verifying user input). If using our React/React Native SDK, this is handled automatically by the provider. For other environments, implement: onAuthRequired: (needsAuth, sendEmailWithOtp, verifyOtp, reject) => { /* your UI logic */ }`
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
+
_chunkFQV77LH4cjs.walletsLogger.info("get-status: sending request");
|
|
92
|
+
const startTime = Date.now();
|
|
91
93
|
const signerResponse = yield clientTEEConnection.sendAction({
|
|
92
94
|
event: "request:get-status",
|
|
93
95
|
responseEvent: "response:get-status",
|
|
@@ -99,18 +101,26 @@ var NonCustodialSigner = class {
|
|
|
99
101
|
},
|
|
100
102
|
options: DEFAULT_EVENT_OPTIONS
|
|
101
103
|
});
|
|
104
|
+
const durationMs = Date.now() - startTime;
|
|
102
105
|
if ((signerResponse == null ? void 0 : signerResponse.status) !== "success") {
|
|
106
|
+
_chunkFQV77LH4cjs.walletsLogger.error("get-status: failed", {
|
|
107
|
+
status: signerResponse == null ? void 0 : signerResponse.status,
|
|
108
|
+
error: signerResponse == null ? void 0 : signerResponse.error,
|
|
109
|
+
durationMs
|
|
110
|
+
});
|
|
103
111
|
throw new Error(signerResponse == null ? void 0 : signerResponse.error);
|
|
104
112
|
}
|
|
113
|
+
_chunkFQV77LH4cjs.walletsLogger.info("get-status: response received", {
|
|
114
|
+
signerStatus: signerResponse.signerStatus,
|
|
115
|
+
durationMs
|
|
116
|
+
});
|
|
105
117
|
if (signerResponse.signerStatus === "ready") {
|
|
106
118
|
this._needsAuth = false;
|
|
107
119
|
return;
|
|
108
120
|
} else {
|
|
109
121
|
this._needsAuth = true;
|
|
110
122
|
}
|
|
111
|
-
|
|
112
|
-
_chunkWMUNQJYDcjs.walletsLogger.info("Needs auth", { needsAuth: this._needsAuth });
|
|
113
|
-
_chunkWMUNQJYDcjs.walletsLogger.info("Config onAuthRequired", { onAuthRequired: this.config.onAuthRequired });
|
|
123
|
+
_chunkFQV77LH4cjs.walletsLogger.info("Auth required, initiating OTP flow", { needsAuth: this._needsAuth });
|
|
114
124
|
const { promise, resolve, reject } = this.createAuthPromise();
|
|
115
125
|
this._authPromise = { promise, resolve, reject };
|
|
116
126
|
if (this.config.onAuthRequired) {
|
|
@@ -120,7 +130,7 @@ var NonCustodialSigner = class {
|
|
|
120
130
|
() => this.sendMessageWithOtp(),
|
|
121
131
|
(otp) => this.verifyOtp(otp),
|
|
122
132
|
() => _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
123
|
-
|
|
133
|
+
_chunkFQV77LH4cjs.walletsLogger.info("Auth rejected", { authRejected: true });
|
|
124
134
|
this._needsAuth = false;
|
|
125
135
|
if (this.config.onAuthRequired != null) {
|
|
126
136
|
yield this.config.onAuthRequired(
|
|
@@ -137,14 +147,14 @@ var NonCustodialSigner = class {
|
|
|
137
147
|
})
|
|
138
148
|
);
|
|
139
149
|
} catch (error) {
|
|
140
|
-
|
|
150
|
+
_chunkFQV77LH4cjs.walletsLogger.error("handleAuthRequired error", { error });
|
|
141
151
|
reject(error);
|
|
142
152
|
}
|
|
143
153
|
}
|
|
144
154
|
try {
|
|
145
155
|
yield promise;
|
|
146
156
|
} catch (error) {
|
|
147
|
-
|
|
157
|
+
_chunkFQV77LH4cjs.walletsLogger.error("handleAuthRequired promise error", { error });
|
|
148
158
|
throw error;
|
|
149
159
|
}
|
|
150
160
|
});
|
|
@@ -176,6 +186,8 @@ var NonCustodialSigner = class {
|
|
|
176
186
|
var _a, _b, _c;
|
|
177
187
|
const handshakeParent = yield this.getTEEConnection();
|
|
178
188
|
const authId = this.getAuthId();
|
|
189
|
+
_chunkFQV77LH4cjs.walletsLogger.info("start-onboarding: sending request");
|
|
190
|
+
const startTime = Date.now();
|
|
179
191
|
const response = yield handshakeParent.sendAction({
|
|
180
192
|
event: "request:start-onboarding",
|
|
181
193
|
responseEvent: "response:start-onboarding",
|
|
@@ -188,12 +200,17 @@ var NonCustodialSigner = class {
|
|
|
188
200
|
},
|
|
189
201
|
options: DEFAULT_EVENT_OPTIONS
|
|
190
202
|
});
|
|
203
|
+
const durationMs = Date.now() - startTime;
|
|
204
|
+
_chunkFQV77LH4cjs.walletsLogger.info("start-onboarding: response received", {
|
|
205
|
+
status: response == null ? void 0 : response.status,
|
|
206
|
+
durationMs
|
|
207
|
+
});
|
|
191
208
|
if ((response == null ? void 0 : response.status) === "success" && response.signerStatus === "ready") {
|
|
192
209
|
this._needsAuth = false;
|
|
193
210
|
return;
|
|
194
211
|
}
|
|
195
212
|
if ((response == null ? void 0 : response.status) === "error") {
|
|
196
|
-
|
|
213
|
+
_chunkFQV77LH4cjs.walletsLogger.error("start-onboarding: failed", { error: response.error });
|
|
197
214
|
(_c = this._authPromise) == null ? void 0 : _c.reject(new Error(response.error || "Failed to initiate OTP process."));
|
|
198
215
|
}
|
|
199
216
|
});
|
|
@@ -210,6 +227,8 @@ var NonCustodialSigner = class {
|
|
|
210
227
|
let response;
|
|
211
228
|
try {
|
|
212
229
|
const handshakeParent = yield this.getTEEConnection();
|
|
230
|
+
_chunkFQV77LH4cjs.walletsLogger.info("complete-onboarding: sending request");
|
|
231
|
+
const startTime = Date.now();
|
|
213
232
|
response = yield handshakeParent.sendAction({
|
|
214
233
|
event: "request:complete-onboarding",
|
|
215
234
|
responseEvent: "response:complete-onboarding",
|
|
@@ -224,8 +243,12 @@ var NonCustodialSigner = class {
|
|
|
224
243
|
},
|
|
225
244
|
options: DEFAULT_EVENT_OPTIONS
|
|
226
245
|
});
|
|
246
|
+
_chunkFQV77LH4cjs.walletsLogger.info("complete-onboarding: response received", {
|
|
247
|
+
status: response == null ? void 0 : response.status,
|
|
248
|
+
durationMs: Date.now() - startTime
|
|
249
|
+
});
|
|
227
250
|
} catch (err) {
|
|
228
|
-
|
|
251
|
+
_chunkFQV77LH4cjs.walletsLogger.error("complete-onboarding: error", { error: err });
|
|
229
252
|
this._needsAuth = true;
|
|
230
253
|
(_c = this._authPromise) == null ? void 0 : _c.reject(err);
|
|
231
254
|
throw err;
|
|
@@ -246,7 +269,7 @@ var NonCustodialSigner = class {
|
|
|
246
269
|
(_d = this._authPromise) == null ? void 0 : _d.resolve();
|
|
247
270
|
return;
|
|
248
271
|
}
|
|
249
|
-
|
|
272
|
+
_chunkFQV77LH4cjs.walletsLogger.error("complete-onboarding: OTP validation failed", { status: response == null ? void 0 : response.status });
|
|
250
273
|
this._needsAuth = true;
|
|
251
274
|
const errorMessage = (response == null ? void 0 : response.status) === "error" ? response.error : "Failed to validate encrypted OTP";
|
|
252
275
|
const error = new Error(errorMessage);
|
|
@@ -286,7 +309,7 @@ var NonCustodialSigner = class {
|
|
|
286
309
|
};
|
|
287
310
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
288
311
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
289
|
-
logger:
|
|
312
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
290
313
|
methodName: "handleAuthRequired"
|
|
291
314
|
})
|
|
292
315
|
], NonCustodialSigner.prototype, "handleAuthRequired", 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Wallet
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XEZBA7I2.js";
|
|
4
4
|
import {
|
|
5
5
|
SolanaExternalWalletSigner
|
|
6
6
|
} from "./chunk-PIFD6KNH.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-SGINWAB6.js";
|
|
10
10
|
import {
|
|
11
11
|
walletsLogger
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S2AKC2CK.js";
|
|
13
13
|
import {
|
|
14
14
|
__async,
|
|
15
15
|
__decorateClass
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEIZVQAZOcjs = require('./chunk-EIZVQAZO.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkC5F6IECXcjs = require('./chunk-C5F6IECX.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkFQV77LH4cjs = require('./chunk-FQV77LH4.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
|
+
_chunkFQV77LH4cjs.initWalletsLogger.call(void 0, crossmint.apiKey);
|
|
20
|
+
const apiClient = new (0, _chunkC5F6IECXcjs.ApiClient)(crossmint);
|
|
21
|
+
this.walletFactory = new (0, _chunkEIZVQAZOcjs.WalletFactory)(apiClient);
|
|
22
|
+
_chunkFQV77LH4cjs.walletsLogger.info("wallets.sdk.initialized");
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Initialize the Wallets SDK
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkREP547HHcjs = require('./chunk-REP547HH.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkFQV77LH4cjs = require('./chunk-FQV77LH4.cjs');
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
@@ -9,7 +12,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
9
12
|
// src/signers/non-custodial/ncs-evm-signer.ts
|
|
10
13
|
var _ox = require('ox');
|
|
11
14
|
var _viem = require('viem');
|
|
12
|
-
var EVMNonCustodialSigner = class _EVMNonCustodialSigner extends
|
|
15
|
+
var EVMNonCustodialSigner = class _EVMNonCustodialSigner extends _chunkREP547HHcjs.NonCustodialSigner {
|
|
13
16
|
constructor(config) {
|
|
14
17
|
super(config);
|
|
15
18
|
}
|
|
@@ -31,6 +34,8 @@ var EVMNonCustodialSigner = class _EVMNonCustodialSigner extends _chunkBMXG52BZc
|
|
|
31
34
|
yield this.handleAuthRequired();
|
|
32
35
|
const jwt = this.getJwtOrThrow();
|
|
33
36
|
const hexString = raw.replace("0x", "");
|
|
37
|
+
_chunkFQV77LH4cjs.walletsLogger.info("sign: sending request", { keyType: "secp256k1" });
|
|
38
|
+
const startTime = Date.now();
|
|
34
39
|
const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
|
|
35
40
|
event: "request:sign",
|
|
36
41
|
responseEvent: "response:sign",
|
|
@@ -45,7 +50,11 @@ var EVMNonCustodialSigner = class _EVMNonCustodialSigner extends _chunkBMXG52BZc
|
|
|
45
50
|
encoding: "hex"
|
|
46
51
|
}
|
|
47
52
|
},
|
|
48
|
-
options:
|
|
53
|
+
options: _chunkREP547HHcjs.DEFAULT_EVENT_OPTIONS
|
|
54
|
+
});
|
|
55
|
+
_chunkFQV77LH4cjs.walletsLogger.info("sign: response received", {
|
|
56
|
+
status: res == null ? void 0 : res.status,
|
|
57
|
+
durationMs: Date.now() - startTime
|
|
49
58
|
});
|
|
50
59
|
if ((res == null ? void 0 : res.status) === "error") {
|
|
51
60
|
throw new Error(res.error);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkREP547HHcjs = require('./chunk-REP547HH.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkFQV77LH4cjs = require('./chunk-FQV77LH4.cjs');
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
@@ -9,7 +12,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
9
12
|
// src/signers/non-custodial/ncs-solana-signer.ts
|
|
10
13
|
var _web3js = require('@solana/web3.js');
|
|
11
14
|
var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);
|
|
12
|
-
var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends
|
|
15
|
+
var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkREP547HHcjs.NonCustodialSigner {
|
|
13
16
|
constructor(config) {
|
|
14
17
|
super(config);
|
|
15
18
|
}
|
|
@@ -26,6 +29,8 @@ var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkBMX
|
|
|
26
29
|
const transactionBytes = _bs582.default.decode(transaction);
|
|
27
30
|
const deserializedTransaction = _web3js.VersionedTransaction.deserialize(transactionBytes);
|
|
28
31
|
const messageData = deserializedTransaction.message.serialize();
|
|
32
|
+
_chunkFQV77LH4cjs.walletsLogger.info("sign: sending request", { keyType: "ed25519" });
|
|
33
|
+
const startTime = Date.now();
|
|
29
34
|
const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
|
|
30
35
|
event: "request:sign",
|
|
31
36
|
responseEvent: "response:sign",
|
|
@@ -40,7 +45,11 @@ var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkBMX
|
|
|
40
45
|
encoding: "base58"
|
|
41
46
|
}
|
|
42
47
|
},
|
|
43
|
-
options:
|
|
48
|
+
options: _chunkREP547HHcjs.DEFAULT_EVENT_OPTIONS
|
|
49
|
+
});
|
|
50
|
+
_chunkFQV77LH4cjs.walletsLogger.info("sign: response received", {
|
|
51
|
+
status: res == null ? void 0 : res.status,
|
|
52
|
+
durationMs: Date.now() - startTime
|
|
44
53
|
});
|
|
45
54
|
if ((res == null ? void 0 : res.status) === "error") {
|
|
46
55
|
throw new Error(res.error);
|