@crossmint/wallets-sdk 0.20.0 → 0.20.2
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-WBTM7E5O.js → chunk-2WBSPOWU.js} +10 -3
- package/dist/{chunk-XM4Y4HS5.cjs → chunk-47R3UV3J.cjs} +6 -6
- package/dist/{chunk-SEV3UBGK.cjs → chunk-66UY53KP.cjs} +23 -23
- package/dist/{chunk-PRNZJUHI.cjs → chunk-6FG5QXII.cjs} +9 -9
- package/dist/{chunk-AZQFMK3I.js → chunk-6UMJYMAY.js} +2 -2
- package/dist/{chunk-GXEWWYHT.cjs → chunk-7TT3VUDF.cjs} +6 -6
- package/dist/chunk-7USEVMTW.cjs +21 -0
- package/dist/{chunk-24DGWV3E.js → chunk-A6E67ZZP.js} +3 -3
- package/dist/{chunk-DF3SZX2E.js → chunk-ABMZ3ZVN.js} +1 -1
- package/dist/{chunk-IAZHXIFV.js → chunk-CMBFV325.js} +3 -3
- package/dist/{chunk-NN2NBBTN.cjs → chunk-F7L2TZ3I.cjs} +1 -5
- package/dist/{chunk-2APY4BUJ.js → chunk-FHMKNG62.js} +4 -4
- package/dist/{chunk-ZKWJY2VO.js → chunk-FICVKSXZ.js} +2 -2
- package/dist/{chunk-7OW5LYR6.js → chunk-HXJ3YPAN.js} +2 -2
- package/dist/{chunk-TNASR6QE.cjs → chunk-IDKGJO2G.cjs} +9 -9
- package/dist/{chunk-VKXKQ5YI.cjs → chunk-JREZWZ2S.cjs} +3 -3
- package/dist/{chunk-AXQLP7Z6.js → chunk-JWMQALLN.js} +1 -5
- package/dist/{chunk-MUIINXJY.js → chunk-KQH5ZXJ4.js} +4 -4
- package/dist/chunk-MMISP35W.js +21 -0
- package/dist/{chunk-2XDIXELO.cjs → chunk-MRZXYVQO.cjs} +6 -6
- package/dist/{chunk-6LVFMXDR.cjs → chunk-PM7BGATN.cjs} +23 -23
- package/dist/{chunk-4ID6ZK4A.cjs → chunk-POG76HDD.cjs} +44 -44
- package/dist/{chunk-7EXE5FZJ.js → chunk-PUO4QNXH.js} +2 -2
- package/dist/{chunk-TQKCX7VN.cjs → chunk-R4AW5ADG.cjs} +1 -1
- package/dist/{chunk-6S7BKBVM.cjs → chunk-R6DH4V7S.cjs} +7 -7
- package/dist/{chunk-ZLPFQ56Q.cjs → chunk-RYQI3RXL.cjs} +12 -12
- package/dist/{chunk-YDFIY5ER.js → chunk-T2XUADHW.js} +5 -5
- package/dist/{chunk-BQN5PNZK.js → chunk-TYQ4YIP7.js} +1 -1
- package/dist/{chunk-GWLAO3PX.js → chunk-U3NV7UY7.js} +1 -1
- package/dist/{chunk-MZBMV54C.js → chunk-W7K5E64Q.js} +2 -2
- package/dist/{chunk-GEHZRAAJ.cjs → chunk-WDZY4PP4.cjs} +13 -6
- package/dist/{chunk-RJY4GT2D.cjs → chunk-WHTECI7J.cjs} +6 -6
- package/dist/{chunk-SAZ76VGQ.js → chunk-WWW6IGZ7.js} +2 -2
- package/dist/{chunk-KVYY4QDB.cjs → chunk-ZAX22GSI.cjs} +18 -18
- 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 +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NonCustodialSigner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U3NV7UY7.js";
|
|
4
4
|
import {
|
|
5
5
|
validateChainForEnvironment
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2WBSPOWU.js";
|
|
7
7
|
import {
|
|
8
8
|
InvalidSignerError,
|
|
9
9
|
SignatureFailedError,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
} from "./chunk-SGINWAB6.js";
|
|
22
22
|
import {
|
|
23
23
|
walletsLogger
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ABMZ3ZVN.js";
|
|
25
25
|
import {
|
|
26
26
|
STATUS_POLLING_INTERVAL_MS
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TYQ4YIP7.js";
|
|
28
28
|
import {
|
|
29
29
|
__async,
|
|
30
30
|
__decorateClass,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_EVENT_OPTIONS,
|
|
3
3
|
NonCustodialSigner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U3NV7UY7.js";
|
|
5
5
|
import {
|
|
6
6
|
walletsLogger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ABMZ3ZVN.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-FHMKNG62.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-ABMZ3ZVN.js";
|
|
10
10
|
import {
|
|
11
11
|
__async,
|
|
12
12
|
__decorateClass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPOG76HDDcjs = require('./chunk-POG76HDD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkQ5KNPVYIcjs = require('./chunk-Q5KNPVYI.cjs');
|
|
@@ -9,7 +9,7 @@ var _chunkQ5KNPVYIcjs = require('./chunk-Q5KNPVYI.cjs');
|
|
|
9
9
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkJREZWZ2Scjs = require('./chunk-JREZWZ2S.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
18
18
|
// src/wallets/solana.ts
|
|
19
19
|
var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);
|
|
20
20
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
21
|
-
var _SolanaWallet = class _SolanaWallet extends
|
|
21
|
+
var _SolanaWallet = class _SolanaWallet extends _chunkPOG76HDDcjs.Wallet {
|
|
22
22
|
constructor(wallet) {
|
|
23
23
|
super(
|
|
24
24
|
{
|
|
@@ -26,10 +26,10 @@ var _SolanaWallet = class _SolanaWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
26
26
|
address: wallet.address,
|
|
27
27
|
owner: wallet.owner,
|
|
28
28
|
signer: wallet.signer,
|
|
29
|
-
options:
|
|
29
|
+
options: _chunkPOG76HDDcjs.Wallet.getOptions(wallet),
|
|
30
30
|
alias: wallet.alias
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
_chunkPOG76HDDcjs.Wallet.getApiClient(wallet)
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
static from(wallet) {
|
|
@@ -41,11 +41,11 @@ var _SolanaWallet = class _SolanaWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
41
41
|
sendTransaction(params) {
|
|
42
42
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
43
43
|
var _a, _b;
|
|
44
|
-
|
|
44
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("solanaWallet.sendTransaction.start");
|
|
45
45
|
yield this.preAuthIfNeeded();
|
|
46
46
|
const createdTransaction = yield this.createTransaction(params);
|
|
47
47
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
48
|
-
|
|
48
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("solanaWallet.sendTransaction.prepared", {
|
|
49
49
|
transactionId: createdTransaction.id
|
|
50
50
|
});
|
|
51
51
|
return {
|
|
@@ -69,7 +69,7 @@ var _SolanaWallet = class _SolanaWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
69
69
|
additionalSigners: _additionalSigners
|
|
70
70
|
};
|
|
71
71
|
const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
|
|
72
|
-
|
|
72
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("solanaWallet.sendTransaction.success", {
|
|
73
73
|
transactionId: createdTransaction.id,
|
|
74
74
|
hash: result.hash
|
|
75
75
|
});
|
|
@@ -101,7 +101,7 @@ var _SolanaWallet = class _SolanaWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
101
101
|
};
|
|
102
102
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
103
103
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
104
|
-
logger:
|
|
104
|
+
logger: _chunkJREZWZ2Scjs.walletsLogger,
|
|
105
105
|
methodName: "solanaWallet.sendTransaction",
|
|
106
106
|
buildContext(thisArg) {
|
|
107
107
|
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 _chunkR4AW5ADGcjs = require('./chunk-R4AW5ADG.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: _chunkR4AW5ADGcjs.SDK_NAME,
|
|
24
|
+
packageVersion: _chunkR4AW5ADGcjs.SDK_VERSION,
|
|
25
25
|
environment,
|
|
26
26
|
projectId,
|
|
27
27
|
platform
|
|
@@ -3,11 +3,7 @@ import { defineChain } from "viem";
|
|
|
3
3
|
var tempoTestnet = defineChain({
|
|
4
4
|
id: 42431,
|
|
5
5
|
name: "Tempo Testnet",
|
|
6
|
-
nativeCurrency:
|
|
7
|
-
decimals: 6,
|
|
8
|
-
name: "pathUSD",
|
|
9
|
-
symbol: "pathUSD"
|
|
10
|
-
},
|
|
6
|
+
nativeCurrency: void 0,
|
|
11
7
|
rpcUrls: {
|
|
12
8
|
default: { http: ["https://rpc.moderato.tempo.xyz"] }
|
|
13
9
|
},
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
} from "./chunk-ZP4ZZCIE.js";
|
|
5
5
|
import {
|
|
6
6
|
Wallet
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FHMKNG62.js";
|
|
8
8
|
import {
|
|
9
9
|
assembleSigner
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T2XUADHW.js";
|
|
11
11
|
import {
|
|
12
12
|
validateChainForEnvironment
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2WBSPOWU.js";
|
|
14
14
|
import {
|
|
15
15
|
WalletCreationError,
|
|
16
16
|
WalletNotAvailableError
|
|
17
17
|
} from "./chunk-SGINWAB6.js";
|
|
18
18
|
import {
|
|
19
19
|
walletsLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ABMZ3ZVN.js";
|
|
21
21
|
import {
|
|
22
22
|
__async,
|
|
23
23
|
__decorateClass,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/chains/definitions/tempo.ts
|
|
2
|
+
import { defineChain } from "viem";
|
|
3
|
+
var tempo = defineChain({
|
|
4
|
+
id: 4217,
|
|
5
|
+
name: "Tempo",
|
|
6
|
+
nativeCurrency: void 0,
|
|
7
|
+
rpcUrls: {
|
|
8
|
+
default: { http: ["https://rpc.tempo.xyz"] }
|
|
9
|
+
},
|
|
10
|
+
blockExplorers: {
|
|
11
|
+
default: {
|
|
12
|
+
name: "Tempo Explorer",
|
|
13
|
+
url: "https://explore.mainnet.tempo.xyz"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
testnet: false
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
tempo
|
|
21
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkZAX22GSIcjs = require('./chunk-ZAX22GSI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkJREZWZ2Scjs = require('./chunk-JREZWZ2S.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
11
11
|
|
|
12
12
|
// src/signers/non-custodial/ncs-stellar-signer.ts
|
|
13
|
-
var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends
|
|
13
|
+
var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkZAX22GSIcjs.NonCustodialSigner {
|
|
14
14
|
constructor(config) {
|
|
15
15
|
super(config);
|
|
16
16
|
}
|
|
@@ -24,7 +24,7 @@ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkK
|
|
|
24
24
|
var _a;
|
|
25
25
|
yield this.handleAuthRequired();
|
|
26
26
|
const jwt = this.getJwtOrThrow();
|
|
27
|
-
|
|
27
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("sign: sending request", { keyType: "ed25519" });
|
|
28
28
|
const startTime = Date.now();
|
|
29
29
|
const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
|
|
30
30
|
event: "request:sign",
|
|
@@ -40,9 +40,9 @@ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkK
|
|
|
40
40
|
encoding: "base64"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
options:
|
|
43
|
+
options: _chunkZAX22GSIcjs.DEFAULT_EVENT_OPTIONS
|
|
44
44
|
});
|
|
45
|
-
|
|
45
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("sign: response received", {
|
|
46
46
|
status: res == null ? void 0 : res.status,
|
|
47
47
|
durationMs: Date.now() - startTime
|
|
48
48
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPOG76HDDcjs = require('./chunk-POG76HDD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkWDZY4PP4cjs = require('./chunk-WDZY4PP4.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ var _chunkGEHZRAAJcjs = require('./chunk-GEHZRAAJ.cjs');
|
|
|
11
11
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkJREZWZ2Scjs = require('./chunk-JREZWZ2S.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 _chunkPOG76HDDcjs.Wallet {
|
|
24
24
|
constructor(wallet) {
|
|
25
25
|
super(
|
|
26
26
|
{
|
|
@@ -28,10 +28,10 @@ var _EVMWallet = class _EVMWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
28
28
|
address: wallet.address,
|
|
29
29
|
owner: wallet.owner,
|
|
30
30
|
signer: wallet.signer,
|
|
31
|
-
options:
|
|
31
|
+
options: _chunkPOG76HDDcjs.Wallet.getOptions(wallet),
|
|
32
32
|
alias: wallet.alias
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
_chunkPOG76HDDcjs.Wallet.getApiClient(wallet)
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
static from(wallet) {
|
|
@@ -43,12 +43,12 @@ var _EVMWallet = class _EVMWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
43
43
|
sendTransaction(params) {
|
|
44
44
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
45
45
|
var _a;
|
|
46
|
-
|
|
46
|
+
_chunkJREZWZ2Scjs.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
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("evmWallet.sendTransaction.prepared", {
|
|
52
52
|
transactionId: createdTransaction.id
|
|
53
53
|
});
|
|
54
54
|
return {
|
|
@@ -58,7 +58,7 @@ var _EVMWallet = class _EVMWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
const result = yield this.approveTransactionAndWait(createdTransaction.id);
|
|
61
|
-
|
|
61
|
+
_chunkJREZWZ2Scjs.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 _chunk4ID6ZK4Acjs.Wallet {
|
|
|
68
68
|
signMessage(params) {
|
|
69
69
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
70
70
|
var _a;
|
|
71
|
-
|
|
71
|
+
_chunkJREZWZ2Scjs.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 _chunk4ID6ZK4Acjs.Wallet {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
if ("error" in signatureCreationResponse) {
|
|
82
|
-
|
|
82
|
+
_chunkJREZWZ2Scjs.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
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("evmWallet.signMessage.prepared", {
|
|
87
87
|
signatureId: signatureCreationResponse.id
|
|
88
88
|
});
|
|
89
89
|
return {
|
|
@@ -92,23 +92,23 @@ var _EVMWallet = class _EVMWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
95
|
-
|
|
95
|
+
_chunkJREZWZ2Scjs.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
|
+
_chunkJREZWZ2Scjs.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
|
+
_chunkJREZWZ2Scjs.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
|
+
_chunkJREZWZ2Scjs.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 _chunk4ID6ZK4Acjs.Wallet {
|
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
if ("error" in signatureCreationResponse) {
|
|
134
|
-
|
|
134
|
+
_chunkJREZWZ2Scjs.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
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("evmWallet.signTypedData.prepared", {
|
|
139
139
|
signatureId: signatureCreationResponse.id
|
|
140
140
|
});
|
|
141
141
|
return {
|
|
@@ -144,7 +144,7 @@ var _EVMWallet = class _EVMWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
147
|
-
|
|
147
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("evmWallet.signTypedData.success", { signatureId: signatureCreationResponse.id });
|
|
148
148
|
return result;
|
|
149
149
|
});
|
|
150
150
|
}
|
|
@@ -157,7 +157,7 @@ var _EVMWallet = class _EVMWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
157
157
|
var _a;
|
|
158
158
|
return _viem.createPublicClient.call(void 0, {
|
|
159
159
|
transport: (_a = params == null ? void 0 : params.transport) != null ? _a : _viem.http.call(void 0, ),
|
|
160
|
-
chain:
|
|
160
|
+
chain: _chunkWDZY4PP4cjs.toViemChain.call(void 0, this.chain)
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
createTransaction(transaction, options) {
|
|
@@ -205,7 +205,7 @@ var _EVMWallet = class _EVMWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
205
205
|
};
|
|
206
206
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
207
207
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
208
|
-
logger:
|
|
208
|
+
logger: _chunkJREZWZ2Scjs.walletsLogger,
|
|
209
209
|
methodName: "evmWallet.sendTransaction",
|
|
210
210
|
buildContext(thisArg) {
|
|
211
211
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -214,7 +214,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
214
214
|
], _EVMWallet.prototype, "sendTransaction", 1);
|
|
215
215
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
216
216
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
217
|
-
logger:
|
|
217
|
+
logger: _chunkJREZWZ2Scjs.walletsLogger,
|
|
218
218
|
methodName: "evmWallet.signMessage",
|
|
219
219
|
buildContext(thisArg) {
|
|
220
220
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -223,7 +223,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
223
223
|
], _EVMWallet.prototype, "signMessage", 1);
|
|
224
224
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
225
225
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
226
|
-
logger:
|
|
226
|
+
logger: _chunkJREZWZ2Scjs.walletsLogger,
|
|
227
227
|
methodName: "evmWallet.signTypedData",
|
|
228
228
|
buildContext(thisArg) {
|
|
229
229
|
return { chain: thisArg.chain, address: thisArg.address };
|