dposlib.ark.ldgr
This module contains functions to interoperate with Ledger hard wallet.
parseBip44Path
def parseBip44Path(path)
Parse a BIP44 derivation path.
Arguments:
pathstr - the derivation path.
Returns:
bytes- parsed bip44 path.
getPublicKey
def getPublicKey(path=None, debug=False)
Compute the public key associated to a derivation path.
Arguments:
pathstr - derivation path.debugbool - flag to activate debug messages from ledger key.
Returns:
hex- secp256k1-compressed publicKey.
signMessage
def signMessage(msg, path=None, schnorr=True, debug=False)
Compute schnorr or ecdsa signature of msg according to derivation path.
Arguments:
msgstr or bytes - message to sign.pathstr - derivation path.schnorrbool - use schnorr signature if True else ecdsa.debugbool - flag to activate debug messages from ledger key.
Returns:
hex- message signature.
signTransaction
def signTransaction(tx, path=None, schnorr=True, debug=False)
Append sender public key and signature into transaction according to derivation path.
Arguments:
txdposlib.ark.tx.Transaction - transaction.pathstr - derivation path.schnorrbool - use schnorr signature if True else ecdsa.debugbool - flag to activate debug messages from ledger key.
Returns:
hex- transaction signature. Signature is also added to transaction object assignatureitem.