Skip to content

Releases: chainside/btcpy

General fixes

08 Nov 14:06
Compare
Choose a tag to compare
General fixes Pre-release
Pre-release

Added

  • Method to check whether two TxIns spend the same output

Fixed

  • StackData.__str__ for display in Witnesses
  • RBF detection
  • CoinBaseTxIn.to_json in case of SegWit coinbases

Backward compatibility

  • No public interface breaking

Better timelocks handling, more consistent interface

13 Jul 20:34
Compare
Choose a tag to compare

Added

  • TransactionFactory class that can instantiate either a Transaction or a SegWitTransaction from json, hex or bytes
  • Address class now have a to_script method that generates the corresponding scriptPubKey
  • More high-level interface to Locktime and Sequence classes
  • Absolute and relative timelock solvers are now separated and take Locktime/Sequence as input so that the spend method can automatically fill in locktime and sequence numbers in the resulting signed transactions

Fixed

  • Deserialization interface inconsistencies (see #42)

Backward compatibility

The following changes can break backward compatibility:

  • TimelockScript has been renamed to AbsoluteTimelockScript
  • Transaction now fails when trying to unhexlify a SegWitTransaction and vice versa
  • BaseAddress has been renamed to Address, Address to ClassicAddress

Python3.3 compatibility

21 May 12:59
Compare
Choose a tag to compare
Pre-release

Fixes

Python3.3 compatibility

Strict mode, serialisation fix, pubkey rare prefixes

15 May 16:20
Compare
Choose a tag to compare

Added

  • Support for 0x06 and 0x07 pubkey prefixes
  • Strict mode

Fixed

  • StackData serialisation

Backward compatibility

  • many methods that previously expected a check_network flag, now expect a strict flag with the same semantics
  • some script_pubkeys that were previously recognised as 'nonstandard' will now be recognised as the appropriate type if strict is set to False

Constants segregation and address refactor

24 Mar 19:15
Compare
Choose a tag to compare

Added

  • New way to create addresses from scripts
  • Many test vectors on SegWit-over-P2SH address generation
  • All Bitcoin-related constants have been moved to a separate file for better code readability and easier forking by other coins

Fixed

  • Ambiguous semantics between address() and to_address() in scripts

Backward compatibility

  • The to_address() method in scripts no longer exists

Bug fixes

06 Mar 10:54
Compare
Choose a tag to compare
Bug fixes Pre-release
Pre-release

Added

  • __eq__ methods on Block and Transaction
  • Test vectors

Fixed

  • Parsing of 00 as a 1-byte push operation
  • Parsing of invalid push operations
  • TxIn.from_json method now properly instantiates CoinBaseScriptSig where appropriate
  • Generic Scripts unhexlify method now works as expected (i.e. no identification is performed on the unhexlifying of Scripts, ScriptPubKeys and ScriptSigs)

Backward compatibility

  • Should not break past usage, apart from usage that for some reason relied on the bugs that are now fixed

Bugfix

23 Feb 18:08
Compare
Choose a tag to compare
Bugfix Pre-release
Pre-release

Fixed

  • Parsing of invalid pushdata ops

Native base58 library

20 Feb 13:30
Compare
Choose a tag to compare
Native base58 library Pre-release
Pre-release

Added

  • base58 native implementation

Fixed

  • Parsing of peculiar multisig scripts

Backward compatibility

  • Does not break past functionalities

Efficient parsing

09 Feb 18:17
Compare
Choose a tag to compare
Efficient parsing Pre-release
Pre-release

Added

  • Parsing of data structures is now way more efficient
  • Opcodes have been isolated in a separate file and helper methods have been created to deal with them

Fixed

  • Parsing of peculiar scripts no longer crashes (e.g. empy push operations, multisig scripts without public keys)

Backward compatibility

Breaks the following functionality:

  • Any code that used the following static fields of the BaseScript class now needs to be refactored to use the opcodes module:
    • opcode_to_int
    • int_to_opcode
    • opcode_to_hex
    • hex_to_opcode

0.2.7

28 Nov 10:59
Compare
Choose a tag to compare
0.2.7 Pre-release
Pre-release

Added

  • CouldNotEncode exception in codecs
  • force=False option in network setup
  • check_network=True in address validity check
  • Notion of compressed public key in PrivateKey class
  • to_wif() method in PrivateKey
  • .json extension to test vectors
  • Tests for all new features and fixes

Fixed

  • Serialization of OP_1NEGATE
  • Address in script to_json()
  • Conversion to address in P2wshV0Script

Backwards compatibility

Some conversions from private key to public key might change as now PrivateKey remembers if it was created from a WIF format that demanded the generation of a compressed public key.