Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@ledgerhq/hw-app-icon

LedgerHQ307Apache-2.01.3.1TypeScript support: included

Ledger Hardware Wallet ICON Application API

Ledger, LedgerWallet, icx, Icon, NanoS, Blue, Hardware Wallet

readme

@ledgerhq/hw-app-icon

Ledger Hardware Wallet Icon JavaScript bindings.

API

Table of Contents

Icx

ICON API

Parameters

  • transport Transport

Examples

import Icx from "@ledgerhq/hw-app-icx";
const icx = new Icx(transport)

getAddress

Returns public key and ICON address for a given BIP 32 path.

Parameters
  • path string a path in BIP 32 format
  • boolDisplay (optional, default false)
  • boolChaincode (optional, default true)
Examples
icx.getAddress("44'/4801368'/0'", true, true).then(o => o.address)

Returns Promise<{publicKey: string, address: string, chainCode: string?}> an object with a publickey(hexa string), address(string) and (optionally) chaincode(hexa string)

signTransaction

Signs a transaction and returns signed message given the raw transaction and the BIP 32 path of the account to sign

Parameters
  • path string a path in BIP 32 format
  • rawTxAscii string raw transaction data to sign in ASCII string format
Examples
icx.signTransaction("44'/4801368'/0'",
    "icx_sendTransaction.fee.0x2386f26fc10000." +
    "from.hxc9ecad30b05a0650a337452fce031e0c60eacc3a.nonce.0x3." +
    "to.hx4c5101add2caa6a920420cf951f7dd7c7df6ca24.value.0xde0b6b3a7640000")
  .then(result => ...)

Returns Promise<{signedRawTxBase64: string, hashHex: string}> an object with a base64 encoded signature and hash in hexa string

getAppConfiguration

Returns the application configurations such as versions.

Returns Promise<{majorVersion: number, minorVersion: number, patchVersion: number}> major/minor/patch versions of Icon application

changelog

@ledgerhq/hw-app-icon

1.3.1

Patch Changes

1.3.1-next.0

Patch Changes

1.3.0

Minor Changes

1.3.0-next.0

Minor Changes

1.2.0

Minor Changes

1.2.0-next.0

Minor Changes

1.1.2

Patch Changes

1.1.2-next.0

Patch Changes

1.1.1

Patch Changes

1.1.1-next.0

Patch Changes

1.1.0

Minor Changes

1.1.0-next.0

Minor Changes