ledger/blue.py
def derivation_path_to_apdu_data(path: List[int]) -> bytes:
    '''Convert a deriation path (as a list of integers) to a apdu data blob'''
    indices_blob = bytearray()

    if len(path) > 10:
        raise ValueError('Only 10 derivations allowed on Ledger')

    # convert each one into a BE number
    for index in path:
        indices_blob.extend(rutils.i2be_padded(index, 4))

    # we length prefix it with the number of derivations
    len_prefix = bytes([len(path)])
    return len_prefix + indices_blob
Convert a deriation path (as a list of integers) to a apdu data blob
Convert a deriation path (as a list of integers) to a apdu data blob
Convert a deriation path ( as a list of integers ) to a apdu data blob
def derivation_path_to_apdu_data(path: List[int]) -> bytes:
    indices_blob = bytearray()
    if len(path) > 10:
        raise ValueError('Only 10 derivations allowed on Ledger')
    for index in path:
        indices_blob.extend(rutils.i2be_padded(index, 4))
    len_prefix = bytes([len(path)])
    return len_prefix + indices_blob
def derivation_path_to_apdu_data ( path : List [ int ] ) -> bytes : indices_blob = bytearray ( ) if len ( path ) > 10 : raise ValueError ( 'Only 10 derivations allowed on Ledger' ) for index in path : indices_blob . extend ( rutils . i2be_padded ( index , 4 ) ) len_prefix = bytes ( [ len ( path ) ] ) return len_prefix + indices_blob
Convert a deriation path (as a list of integers) to a apdu data blob
Convert a deriation path ( as a list of integers ) to a apdu data blob
'''Convert a deriation path (as a list of integers) to a apdu data blob''' # convert each one into a BE number # we length prefix it with the number of derivations
path
List[int]