Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/exodusmovement/bitcoin-seed
Generate Bitcoin BIP39 seeds as buffers for control of memory.
https://github.com/exodusmovement/bitcoin-seed
Last synced: 8 days ago
JSON representation
Generate Bitcoin BIP39 seeds as buffers for control of memory.
- Host: GitHub
- URL: https://github.com/exodusmovement/bitcoin-seed
- Owner: ExodusMovement
- License: mit
- Created: 2016-05-05T03:26:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-12T22:58:58.000Z (over 1 year ago)
- Last Synced: 2024-09-24T09:17:33.391Z (about 2 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 4
- Watchers: 33
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
bitcoin-seed
============[![NPM Package](https://img.shields.io/npm/v/bitcoin-seed.svg?style=flat-square)](https://www.npmjs.org/package/bitcoin-seed)
[![GitHub Actions Build](https://img.shields.io/github/workflow/status/ExodusMovement/bitcoin-seed/CI/master?style=flat-square)](https://github.com/ExodusMovement/bitcoin-seed/actions/workflows/ci.yml?query=branch%3Amaster)## API
### `fromRandom({ passphrase, entropyFn })`
Creates a random new `seed` instance with optional `passphrase`. If `entropyFn` is passed, it must return a 16-byte random `Buffer`; `crypto.randomBytes(16)` is used by default.
### `fromEntropy(entropy, passphrase)`
Returns a `seed` for the given raw `Buffer` `entropy` and optional `passphrase`.
### `fromMnemonic(mnemonic, passphrase)`
Returns a `seed` for the given `mnemonic` and optional `passphrase`.
### `fromBuffer(buf)`
Returns `seed` from a `buf` generated by `seed.serialize()`
### `isBitcoinSeed(obj)`
Returns whether `obj` looks like a `seed`; this is just basic duck typing.
### `seed.entropy`
Raw `Buffer` entropy of the `seed`.
### `seed.seed`
Raw `Buffer` of the seed.
### `seed.mnemonicString`
String mnemonic representation of the seed's entropy.
### `seed.destroy()`
Zero-fills all internal `Buffer`s.
### `seed.isDestroyed`
Boolean property indicating whether `seed.destroy()` has been called on this `seed`.
### `seed.serialize()`
Return seed encoded as a serialized `Buffer`, which can be passed to `fromBuffer()` to convert it back to a `seed`.