@fluent-wallet/hw-app-conflux
v0.1.1
Published
Ledger Hardware Wallet Conflux Application API
Downloads
209
Readme
@fluent-wallet/hw-app-conflux
Ledger Hardware Wallet Conflux JavaScript bindings.
API
Table of Contents
Conflux
Conflux API
Parameters
transport
TransportscrambleKey
(optional, default"conflux_default_scramble_key"
)
Examples
import Cfx from "@fluent-wallet/hw-app-conflux";
const cfx = new Cfx(transport)
getAddress
get Conflux address for a given BIP 32 path.
Parameters
Examples
cfx.getAddress("44'/503'/0'/0/0").then(o => o.publicKey)
Returns Promise<{publicKey: string, address: string, chainCode: string?}> an object with a publicKey, address and (optionally) chainCode
signTransaction
You can sign a transaction and retrieve v, r, s given the raw transaction and the BIP 32 path of the account to sign
Parameters
Examples
cfx.signTransaction("44'/503'/0'/0/0", "0xeb1284561f61b9831e84809410109fc8df283027b6285cc889f5aa624eac1f55843b9aca0081800182040580").then(result => ...)
Returns Promise<{s: string, v: string, r: string}>
signPersonalMessage
You can sign a message and retrieve v, r, s given the message and the BIP 32 path of the account to sign.
Parameters
Examples
cfx.signPersonalMessage("44'/503'/0'/0/0", Buffer.from("test").toString("hex")).then(result => {
console.log(result);
})