Skip to content

Release 1.2.0

Compare
Choose a tag to compare
@Firaenix Firaenix released this 12 Nov 06:32
· 193 commits to master since this release
2897b49

Features:

  • Tx.getOutpoints() - Returns a Uint8Array[] with all of the outpoints from the TxIns on the Transaction
  • No longer requires Rust nightly to build
  • Extended Transaction Format (TX+)
    • Adds optional fields to TxIn

      • satoshis: Option<u64>
        • txin.getSatoshis()
        • Satoshis field on TxIn makes it easy to do calculations and signing for transactions that get passed around without having to consult a UTXO store. If you serialise the Tx to JSON or toCompactBytes() (CBOR), it adds the extra fields when available.
      • unlocking_script: Option<Script>
        • txin.getUnlockingScriptBytes()
        • Unlocking Script field on TxIn allows you to pass around partially signed transactions without having to continually change the script sig. This field will automatically be prepended to the script_sig when calling .toBytes() or .toHex() to enable a convenient way to export the transaction to Bitcoin network format.
    • Adds convenience methods for querying Total Satoshis in and Total Satoshis out

      • Tx.satoshisIn() - Returns the total amount of satoshis in the Inputs. If any of the inputs have no specified satoshis, method returns null
      • Tx.satoshisOut() - Returns the total amount of satoshis in the Outputs.
    • Adds ability to match specific TxIns and TxOuts based on a Match Criteria

      • Tx.matchInput() - Returns index of the first input that matches the given criteria
      • Tx.matchOutput() - Returns index of the first output that matches the given criteria
      • Tx.matchInputs() - Returns all indices of inputs that match the given criteria
      • Tx.matchOutputs() - Returns all indices of outputs that match the given criteria

Breaking Changes:

  • Change all references of getPublicKey to toPublicKey
  • ECIESCiphertext: Change extractCiphertext to getCiphertext
  • ECIESCiphertext: Change extractHMAC to getHMAC

Bug Fixes:

  • Fix Safari 14 not supporting BigUint64Array
  • Fix OP_PUSHDATA trying to read more bytes than necessary