Skip to content

Instantly share code, notes, and snippets.

@afk11
Last active April 7, 2017 10:57
Show Gist options
  • Save afk11/7da447f0a8c282fc17ab5e713b8b080e to your computer and use it in GitHub Desktop.
Save afk11/7da447f0a8c282fc17ab5e713b8b080e to your computer and use it in GitHub Desktop.

Changelog

Fixed

  • Transaction & block versions are signed integers (#662)

Removed

  • Minimum node version: v0.4 (#750)
  • Removed buffer-equals/buffer-compare (#650)
  • Removed ecdsa.calcPubKeyRecoveryParam(), ecdsa.recoverPubKey() (#456)
  • Removed coin network: Dogecoin (#675)

BC Break

  • Script templates - refactored and moved (#682)
    • Inputs
      • pubKey, pubKeyHash, multisig, and scriptHash, all have bscript.*.input.{check,encode,decode,encodeStack,decodeStack}
      • witnessPubKeyHash and witnessScriptHash have bscript.{witnessPubKeyHash,witnessScriptHash}.input.{check,encodeStack,decodeStack} - no encode/decode since that applies to Script.
    • Outputs
      • pubKey, pubKeyHash, multisig, scriptHash, witnessPubKeyHash, witnessScriptHash, witnessCommitment, all have {check,encode,decode}

Added

  • Add specific type for Satoshis (#629)
  • Add bscript.toStack() and bscript.isPushOnly() (#732)
  • Add constants for script types (#683)
  • Add merkle-lib, coinselect, minimaldata, bitcoin-ops, pushdata-bitcoin (#676)
  • TransactionBuilder() now takes maximumFeeRate, used for sanity checks of the eventual fee (#696)
  • Segregated Witness (#746)
    • Add Transaction.hashForWitnessV0(), Transaction.hasWitnesses(), Transaction.setWitness()
    • Transaction.fromBuffer and toBuffer have serialization support for segregated witness transactions
    • TransactionBuilder.fromTransaction imports a segregated witness transaction
    • TransactionBuilder.sign() has two additional parameters for witness outputs: witnessValue, and witnessScript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment