Beispiel #1
0
 def _pack_proof(proof: TxProof) -> bytes:
     raw = bitcoinx.pack_varint(1)
     raw += bitcoinx.pack_varint(proof.position)
     raw += bitcoinx.pack_varint(len(proof.branch))
     for hash in proof.branch:
         raw += bitcoinx.pack_varbytes(hash)
     return raw
Beispiel #2
0
def test_constants():
    assert CURVE_ORDER == \
        115792089237316195423570985008687907852837564279074904382605163141518161494337
    assert SIGNED_MESSAGE_PREFIX == pack_varbytes(
        'Bitcoin Signed Message:\n'.encode())