crossbario / autobahn-python

@@ -63,9 +63,9 @@
Loading
63 63
        Logic adapted from https://github.com/satoshilabs/slips/blob/master/slip-0010/testvectors.py. """
64 64
65 65
    Q = int.from_bytes(private_key, byteorder='big') * BIP32_CURVE.generator
66 -
    xstr = Q.x().to_bytes(32, byteorder='big')
66 +
    xstr = int(Q.x()).to_bytes(32, byteorder='big')
67 67
    parity = Q.y() & 1
68 -
    return (2 + parity).to_bytes(1, byteorder='big') + xstr
68 +
    return int(2 + parity).to_bytes(1, byteorder='big') + xstr
69 69
70 70
71 71
def derive_bip32childkey(parent_key, parent_chain_code, i):
@@ -87,7 +87,7 @@
Loading
87 87
        b = int.from_bytes(parent_key, byteorder='big')
88 88
        key = (a + b) % BIP32_CURVE.order
89 89
        if a < BIP32_CURVE.order and key != 0:
90 -
            key = key.to_bytes(32, byteorder='big')
90 +
            key = int(key).to_bytes(32, byteorder='big')
91 91
            break
92 92
        d = b'\x01' + h[32:] + struct.pack('>L', i)
93 93
@@ -103,7 +103,7 @@
Loading
103 103
def b58xprv(parent_fingerprint, private_key, chain, depth, childnr):
104 104
    """ Private key b58 serialization format. """
105 105
106 -
    raw = (b'\x04\x88\xad\xe4' + bytes(chr(depth), 'utf-8') + parent_fingerprint + childnr.to_bytes(
106 +
    raw = (b'\x04\x88\xad\xe4' + bytes(chr(depth), 'utf-8') + parent_fingerprint + int(childnr).to_bytes(
107 107
        4, byteorder='big') + chain + b'\x00' + private_key)
108 108
109 109
    return b58encode_check(raw)
@@ -112,7 +112,7 @@
Loading
112 112
def b58xpub(parent_fingerprint, public_key, chain, depth, childnr):
113 113
    """ Public key b58 serialization format. """
114 114
115 -
    raw = (b'\x04\x88\xb2\x1e' + bytes(chr(depth), 'utf-8') + parent_fingerprint + childnr.to_bytes(
115 +
    raw = (b'\x04\x88\xb2\x1e' + bytes(chr(depth), 'utf-8') + parent_fingerprint + int(childnr).to_bytes(
116 116
        4, byteorder='big') + chain + public_key)
117 117
118 118
    return b58encode_check(raw)

@@ -24,4 +24,4 @@
Loading
24 24
#
25 25
###############################################################################
26 26
27 -
__version__ = '20.12.1'
27 +
__version__ = '20.12.2'
Files Coverage
autobahn 57.70%
Project Totals (72 files) 57.70%
Untitled
Untitled

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading