Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colored-coins/hdwallet
BIP32 & BIP44 Hierarchical Deterministic Wallet.
https://github.com/colored-coins/hdwallet
Last synced: 2 months ago
JSON representation
BIP32 & BIP44 Hierarchical Deterministic Wallet.
- Host: GitHub
- URL: https://github.com/colored-coins/hdwallet
- Owner: Colored-Coins
- Created: 2015-07-14T14:02:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-03T15:00:21.000Z (about 7 years ago)
- Last Synced: 2024-11-11T20:33:00.860Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 106 KB
- Stars: 16
- Watchers: 9
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hdwallet
[![Build Status](https://travis-ci.org/Colored-Coins/hdwallet.svg?branch=master)](https://travis-ci.org/Colored-Coins/hdwallet) [![Coverage Status](https://coveralls.io/repos/github/Colored-Coins/hdwallet/badge.svg?branch=master)](https://coveralls.io/github/Colored-Coins/hdwallet?branch=master) [![npm version](https://badge.fury.io/js/hdwallet.svg)](http://badge.fury.io/js/hdwallet)[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
### Installation
```sh
$ npm i hdwallet
```### Constructor
```js
var HDWallet = require('hdwallet')var hd = new HDWallet({
settings = settings || {}
redisPort: 'optional',
redisHost: 'optional',
network: 'optional',
mnemonic: 'optional',
privateSeed: 'optional' // deprecated
})
```### API's
```js
HDWallet.encryptPrivateKey(privateWif, password, progressCallback) // BIP38
HDWallet.decryptPrivateKey(encryptedPrivKey, password, network, progressCallback) // BIP38
HDWallet.createNewKey(network, password, progressCallback)
HDWallet.generateMnemonic() // BIP39
HDWallet.validateMnemonic() // BIP39
HDWallet.getInputAddresses(txHex, network)
HDWallet.sign(unsignedTxHex, privateKey)
HDWallet.prototype.init(cb)
HDWallet.prototype.afterRedisInit(cb)
HDWallet.prototype.getKeyPrefix()
HDWallet.prototype.getSavedKey(key, cb)
HDWallet.prototype.getNextAccount(cb)
HDWallet.prototype.setNextAccount(nextAccount)
HDWallet.prototype.registerAddress(address, accountIndex, addressIndex, change)
HDWallet.prototype.setDB(key, value)
HDWallet.prototype.getAddressPrivateKey(address, cb)
HDWallet.prototype.getAddressPath(address, cb)
HDWallet.prototype.discover(cb)
HDWallet.prototype.discoverAccount(accountIndex, cb)
HDWallet.prototype.discoverAddress(accountIndex, addressIndex, interval, cb)
HDWallet.prototype.registerAccount(account)
HDWallet.prototype.getPrivateSeed()
HDWallet.prototype.getMnemonic()
HDWallet.prototype.getPrivateKey(account, addressIndex)
HDWallet.prototype.getPublicKey(account, addressIndex)
HDWallet.prototype.isAddressActive(addresses, cb)
HDWallet.prototype.getAddress(account, addressIndex)
HDWallet.prototype.sign(unsignedTxHex, cb)
```### Testing
```sh
$ mocha
```### License
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)