Skip to content

Conflux-Chain/hw-app-conflux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@fluent-wallet/hw-app-conflux

Ledger Hardware Wallet Conflux JavaScript bindings.

API

Table of Contents

Conflux

Conflux API

Parameters

  • transport Transport
  • scrambleKey (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);
})

Returns Promise<{v: number, s: string, r: string}>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published