@fluent-wallet/hw-app-conflux
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

@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}>

Package Sidebar

Install

npm i @fluent-wallet/hw-app-conflux

Weekly Downloads

1

Version

0.0.8

License

Apache-2.0

Unpacked Size

85.1 kB

Total Files

22

Last publish

Collaborators

  • sssensational
  • zctocm
  • rickest
  • iangeliaq
  • confi
  • yqrashawn