@arianee/core
The Core class is a TypeScript class that provides an interface for signing messages and transactions on the Ethereum blockchain. It uses the ethers library, which is a popular library for interacting with Ethereum.
Usage
You can instanciante core with :
- Mnemonic
- Passphrase
- PrivateKey
Example :
import { Core } from '@arianee/core';
Core.fromMnemonic(mnemonic);
Core.fromPassPhrase(passphrase);
Core.fromPrivateKey(privateKey);
Core.fromRandom();
The returned instance will have 2 method:
- signMessage(message:string)
- signTransaction(transaction:TransactionLike)
- getAddress():string
If you need to implement core with an external wallet (like metamask), you need to instantiate the class with 2 functions:
import { Core } from '@arianee/core';
const core = new Core(signMessage, signTransaction, getAddress);