Security Best Practices for bitcoinjs-lib
masterWhen using this library for Bitcoin operations, adhere to these critical security practices to prevent catastrophic fund loss:
- Do not reuse addresses.
- Do not share BIP32 extended public keys ('xpubs'); they are a liability.
- Never use
Math.randomfor any cryptographic purpose. - Verify transactions manually: Always ensure users verify a freshly-decoded human-readable version of their transaction before broadcasting.
- Avoid 'brain wallets': Do not ask users to generate mnemonics manually.
- Verify RNG: Ensure your environment's random number generator is cryptographically secure.