Releases: chainside/btcpy
Releases · chainside/btcpy
General fixes
Added
- Method to check whether two
TxIns spend the same output
Fixed
StackData.__str__for display inWitnesses- RBF detection
CoinBaseTxIn.to_jsonin case of SegWit coinbases
Backward compatibility
- No public interface breaking
Better timelocks handling, more consistent interface
Added
TransactionFactoryclass that can instantiate either aTransactionor aSegWitTransactionfrom json, hex or bytesAddressclass now have ato_scriptmethod that generates the corresponding scriptPubKey- More high-level interface to
LocktimeandSequenceclasses - Absolute and relative timelock solvers are now separated and take
Locktime/Sequenceas input so that thespendmethod 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:
TimelockScripthas been renamed toAbsoluteTimelockScriptTransactionnow fails when trying tounhexlifyaSegWitTransactionand vice versaBaseAddresshas been renamed toAddress,AddresstoClassicAddress
Python3.3 compatibility
Fixes
Python3.3 compatibility
Strict mode, serialisation fix, pubkey rare prefixes
Added
- Support for 0x06 and 0x07 pubkey prefixes
- Strict mode
Fixed
StackDataserialisation
Backward compatibility
- many methods that previously expected a
check_networkflag, now expect astrictflag 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 toFalse
Constants segregation and address refactor
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()andto_address()in scripts
Backward compatibility
- The
to_address()method in scripts no longer exists
Bug fixes
Added
__eq__methods onBlockandTransaction- Test vectors
Fixed
- Parsing of 00 as a 1-byte push operation
- Parsing of invalid push operations
TxIn.from_jsonmethod now properly instantiatesCoinBaseScriptSigwhere appropriate- Generic
Scriptsunhexlify method now works as expected (i.e. no identification is performed on the unhexlifying ofScripts,ScriptPubKeys andScriptSigs)
Backward compatibility
- Should not break past usage, apart from usage that for some reason relied on the bugs that are now fixed
Bugfix
Fixed
- Parsing of invalid pushdata ops
Native base58 library
Added
- base58 native implementation
Fixed
- Parsing of peculiar multisig scripts
Backward compatibility
- Does not break past functionalities
Efficient parsing
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
BaseScriptclass now needs to be refactored to use theopcodesmodule:opcode_to_intint_to_opcodeopcode_to_hexhex_to_opcode
0.2.7
Added
CouldNotEncodeexception in codecsforce=Falseoption in network setupcheck_network=Truein address validity check- Notion of compressed public key in
PrivateKeyclass to_wif()method inPrivateKey.jsonextension 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.