I'm stuck between a rock and a hard place right now.
I'm developing an app with react native, and users need to be able to import their wallets via their private keys (and hopefully mnemonic phrases)
However, when I use the eas toolchain to build my app, I run into an issue with the ethers package I was using to do this.
My current code is this:
import * as eth from 'ethers';
export function deriveEthAddressFromPhrase(mnemonic: string): string {
const wallet = eth.Wallet.fromPhrase(mnemonic);
return wallet.address;
}
export function deriveEthAddressFromKey(privateKey: string): string {
const wallet = new eth.Wallet(privateKey.toString().trim());
return wallet.address;
}
How can I do this without the use of ethers?