bitcoin-seed

1.0.0 • Public • Published

bitcoin-seed

NPM Package GitHub Actions Build

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 Buffers.

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.

Dependencies (1)

Dev Dependencies (3)

Package Sidebar

Install

npm i bitcoin-seed

Weekly Downloads

283

Version

1.0.0

License

MIT

Unpacked Size

7.11 kB

Total Files

4

Last publish

Collaborators

  • jprichardson
  • ryanzim