Skip to content

Latest commit

 

History

History

ledgerjs-hw-app-iota

Folders and files

README.md

Ledger Github, Ledger Developer Portal, Ledger Developer Discord

ledgerjs-hw-app-iota

@iota/ledgerjs-hw-app-iota is part of the IOTA Rebased SDK, designed specifically for interacting with the IOTA Rebased protocol.

Ledger Hardware Wallet JavaScript bindings for IOTA, based on LedgerJS.

Example

Here is a sample app for Node:

import Transport from '@ledgerhq/hw-transport';
import IotaLedgerClient from '@iota/ledgerjs-hw-app-iota';

const getPublicKey = async () => {
    const iota = new IotaLedgerClient(await Transport.create());
    return await iota.getPublicKey("44'/4218'/0'/0'/0'");
};

const signTransaction = async () => {
    const iota = new IotaLedgerClient(await Transport.create());
    return await iota.signTransaction("44'/4218'/0'/0'/0'", '<transaction contents>');
};

const getVersion = async () => {
    const iota = new IotaLedgerClient(await Transport.create());
    return await iota.getVersion();
};

console.log(await getPublicKey());
console.log(await signTransaction());
console.log(await getVersion());