Skip to content

Commit

Permalink
Add raw bytes data to Address object
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed Jul 30, 2024
1 parent a049c0d commit c081cf8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bitcoinlib/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ def deserialize_address(address, encoding=None, network=None):
'networks': networks,
'checksum': checksum,
'witver': None,
'raw': address_bytes,
}
if encoding == 'bech32' or encoding is None:
try:
Expand All @@ -322,6 +323,7 @@ def deserialize_address(address, encoding=None, network=None):
'networks': networks,
'checksum': addr_bech32_checksum(address),
'witver': witver,
'raw': pkh_incl,
}
except EncodingError as err:
raise EncodingError("Invalid address %s: %s" % (address, err))
Expand Down

0 comments on commit c081cf8

Please sign in to comment.