UNPKG

@tmawallet/sdk

Version:
26 lines 980 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TMAWalletEVM = void 0; const ethers_1 = require("ethers"); const ethers_signer_1 = require("../ethers-signer"); const TMAWallet_AbstractWallet_1 = require("./TMAWallet.AbstractWallet"); class TMAWalletEVM extends TMAWallet_AbstractWallet_1.TMAWAlletAbstractWallet { client; constructor(client) { super(client, 'evm'); this.client = client; } async getAddressFromPrivateKey(privateKey) { const signingKey = new ethers_1.ethers.SigningKey(privateKey); const address = (0, ethers_1.computeAddress)(signingKey.publicKey); return address; } getEthersSigner(provider) { if (!this.client.bundle) { throw new Error('Client bundle does not exist'); } return new ethers_signer_1.TMAWalletSigner(this.client, provider); } } exports.TMAWalletEVM = TMAWalletEVM; //# sourceMappingURL=TMAWallet.EVM.js.map