Releases: chainside/btcpy
Releases · chainside/btcpy
General fixes
Added
- Method to check whether two
TxIn
s spend the same output
Fixed
StackData.__str__
for display inWitness
es- RBF detection
CoinBaseTxIn.to_json
in case of SegWit coinbases
Backward compatibility
- No public interface breaking
Better timelocks handling, more consistent interface
Added
TransactionFactory
class that can instantiate either aTransaction
or aSegWitTransaction
from json, hex or bytesAddress
class now have ato_script
method that generates the corresponding scriptPubKey- More high-level interface to
Locktime
andSequence
classes - Absolute and relative timelock solvers are now separated and take
Locktime
/Sequence
as input so that thespend
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 toAbsoluteTimelockScript
Transaction
now fails when trying tounhexlify
aSegWitTransaction
and vice versaBaseAddress
has been renamed toAddress
,Address
toClassicAddress
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
StackData
serialisation
Backward compatibility
- many methods that previously expected a
check_network
flag, now expect astrict
flag with the same semantics - some
script_pubkey
s 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 onBlock
andTransaction
- Test vectors
Fixed
- Parsing of 00 as a 1-byte push operation
- Parsing of invalid push operations
TxIn.from_json
method now properly instantiatesCoinBaseScriptSig
where appropriate- Generic
Scripts
unhexlify method now works as expected (i.e. no identification is performed on the unhexlifying ofScript
s,ScriptPubKey
s andScriptSig
s)
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
BaseScript
class now needs to be refactored to use theopcodes
module:opcode_to_int
int_to_opcode
opcode_to_hex
hex_to_opcode
0.2.7
Added
CouldNotEncode
exception in codecsforce=False
option in network setupcheck_network=True
in address validity check- Notion of compressed public key in
PrivateKey
class to_wif()
method inPrivateKey
.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.