@ledgerhq/hw-app-elrond

Ledger Hardware Wallet Elrond Application API

Usage no npm install needed!

<script type="module">
  import ledgerhqHwAppElrond from 'https://cdn.skypack.dev/@ledgerhq/hw-app-elrond';
</script>

README

Github, Ledger Devs Slack

@ledgerhq/hw-app-elrond

Ledger Hardware Wallet Elrond JavaScript bindings.

API

Table of Contents

getAppConfiguration

Get Elrond app configuration.

Examples

const result = await elrond.getAppConfiguration();
const { contractData, accountIndex, addressIndex, version } = result;

Returns Promise<{contractData: (string | number), accountIndex: (string | number), addressIndex: (string | number), version: string}> an object with a contractData, accountIndex, addressIndex, version

getAddress

Get Elrond address for a given BIP 32 path.

Parameters

  • path string a path in BIP 32 format
  • display boolean? optionally enable or not the display

Examples

const result = await elrond.getAddress("44'/508'/0'/0'/0'");
const { address, returnCode } = result;

Returns Promise<{address: string}> an object with a address

setAddress

Set Elrond address for a given BIP 32 path.

Parameters

  • path string a path in BIP 32 format
  • display boolean? optionally enable or not the display

Examples

const result = await elrond.setAddress("44'/508'/0'/0/0");
result : Buffer;

Returns any an object with a address

signTransaction

Sign Elrond transaction for a given BIP 32 path.

Parameters

  • path string a path in BIP 32 format
  • message string string with an unsigned transaction
  • usingHash boolean boolean wich indicate if transaction is hash or raw

Returns Promise<string> a signature for transaction

getAppConfiguration

Get Elrond app configuration.

Examples

const result = await elrond.getAppConfiguration();
const { contractData, accountIndex, addressIndex, version } = result;

Returns Promise<{version: string}> an object with a contractData, accountIndex, addressIndex, version