Btcpy Versions Save

A Python3 SegWit-compliant library which provides tools to handle Bitcoin data structures in a simple fashion.

0.6.4

5 years ago

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

0.6

5 years ago

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

0.5.1

5 years ago

Fixes

Python3.3 compatibility

0.5

6 years ago

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

0.4

6 years ago

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

0.3.3

6 years ago

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

0.3.2

6 years ago

Fixed

  • Parsing of invalid pushdata ops

0.3.1

6 years ago

Added

  • base58 native implementation

Fixed

  • Parsing of peculiar multisig scripts

Backward compatibility

  • Does not break past functionalities

0.3

6 years ago

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

6 years ago

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.