This pull request introduces significant enhancements to the js-moi-wallet module, simplifying the wallet setup and initialization APIs for a more user-friendly experience.
Changes
The following key changes have been implemented:
constructor: Now, a Wallet instance is created using the private key, serving as both the creation and initialization step.
Wallet.fromMnemonic: Enables the creation of a wallet using a mnemonic and a specified path.
Wallet.fromMnemonicSync: Synchronously creates a wallet using a mnemonic and a path.
Wallet.fromKeystore: Allows the creation of a wallet instance using a provided keystore and password.
Wallet.createRandom: Introduces a method to create a wallet instance using a randomly generated mnemonic.
Wallet.createRandomSync: Provides a synchronous alternative for creating a wallet instance with a randomly generated mnemonic.
These changes collectively simplify the wallet setup process and contribute to a more intuitive and streamlined API structure.
closes #51
Changes include
[ ] Bugfix (non-breaking change that solves an issue)
[X] New feature (non-breaking change that adds functionality)
[x] Breaking change (change that is not backwards-compatible and/or changes current functionality)
Checklist
[X] I have assigned this PR to myself
[X] I have added at least 1 reviewer
[X] I have tested this code
[X] I have updated the README and other relevant documents (guides...)
Simplified Wallet Setup and Initialization
This pull request introduces significant enhancements to the
js-moi-wallet
module, simplifying the wallet setup and initialization APIs for a more user-friendly experience.Changes
The following key changes have been implemented:
constructor
: Now, a Wallet instance is created using the private key, serving as both the creation and initialization step.Wallet.fromMnemonic
: Enables the creation of a wallet using a mnemonic and a specified path.Wallet.fromMnemonicSync
: Synchronously creates a wallet using a mnemonic and a path.Wallet.fromKeystore
: Allows the creation of a wallet instance using a provided keystore and password.Wallet.createRandom
: Introduces a method to create a wallet instance using a randomly generated mnemonic.Wallet.createRandomSync
: Provides a synchronous alternative for creating a wallet instance with a randomly generated mnemonic.These changes collectively simplify the wallet setup process and contribute to a more intuitive and streamlined API structure.
Changes include
Checklist