TrezorSigner
These are the TrezorSigner exported functions, TrezorSigner is used to manage and sign transactions using a Trezor hardware wallet. BIP44/BIP84 are supported. P2WPKH, P2WSH, P2PKH, P2SH.
#
backup#
backup()Encrypt to password and backup to local storage for persistence.
#
convertToTrezorFormat#
convertToTrezorFormat()Converts a Syscoin PSBT to Trezor format.
#
createAccount#
createAccount()Create and derive a new account.
#
deriveAccount#
deriveAccount( index )Derive a HD account based on the index number passed in.
#
getAccountNode#
getAccountNode()Returns the TrezorSigner's BIP32 root node.
#
getAccountXpub#
getAccountXpub()Gets the xPub for the account currently in use by the TrezorSigner, useful for public provider look-ups based on xPub accounts.
#
getAddressFromPubKey#
getAddressFromPubKey( pubKey )Takes a public key and gives back a P2WPKH address.
#
getNewChangeAddress#
getNewChangeAddress( skipIncrement )Get new address for sending change to.
#
getNewReceivingAddress#
getNewReceivingAddress( skipIncrement )Get new address for sending coins to.
#
restore#
restore( password )Restore on load from local storage and decrypt data to de-serialize objects.
#
setAccountIndex#
setAccountIndex( accountIndex )Set HD account based on accountIndex number passed in so HD indexes (change/receiving) will be updated accordingly to this account.
#
setLatestIndexesFromXPubTokens#
setLatestIndexesFromXPubTokens( tokens )Sets the change and receiving indexes from xPub tokens passed in, from a back-end provider response.
#
sign#
sign( res )Create signing information based on the TrezorSigner (if set)