UNPKG

hdwallet-signer

Version:

HDkey signer of transaction for BTC, ETH, TRX, FIL, DOT..., also can generate WIF

39 lines (34 loc) 758 B
class TxSigner { /** * * @param {string} privKey */ constructor(privKey) { this.privKey = privKey; } /** * sign TX * @param {string} to * @param {string} value * @param {'slow'|'norm'|'fast'} speed * @returns {Promise<{txid: string, signedTx: string}>} */ async signTx(to, value, speed = "norm") { throw new Error("Not Implemented Method: signTx"); } /** * Generate Token Address by Xpub * @param {*} xpub */ async toAddress(xpub) { throw new Error("Not Implemented Method: toAddress"); } /** * Generate Wallet Import Format / keystore * @returns {Promise<string>} */ async toWIF() { throw new Error("Not Implemented Method: toWIF"); } } module.exports = { TxSigner };