MCPcopy
hub / github.com/petertodd/python-bitcoinlib / b2lx

Function b2lx

bitcoin/core/__init__.py:52–58  ·  view source on GitHub ↗

Convert bytes to a little-endian hex string Lets you show uint256's and uint160's the way the Satoshi codebase shows them.

(b)

Source from the content-addressed store, hash-verified

50 return binascii.unhexlify(h.encode('utf8'))[::-1]
51
52def b2lx(b):
53 """Convert bytes to a little-endian hex string
54
55 Lets you show uint256's and uint160's the way the Satoshi codebase shows
56 them.
57 """
58 return binascii.hexlify(b[::-1]).decode('utf8')
59
60def str_money_value(value):
61 """Convert an integer money value to a fixed point string"""

Callers 15

getblockheaderMethod · 0.90
getblockMethod · 0.90
getrawtransactionMethod · 0.90
gettransactionMethod · 0.90
gettxoutMethod · 0.90
lockunspentMethod · 0.90
__repr__Method · 0.90
getblockMethod · 0.90
getrawtransactionMethod · 0.90
sendrawtransactionMethod · 0.90
spend-p2wpkh.pyFile · 0.90

Calls

no outgoing calls

Tested by 1