Skip to main content

Class: default

Iota API

Example

import Iota from "@iota/ledgerjs-hw-app-iota";
const iota = new Iota(transport)

Constructors

Constructor

new default(
transport,
scrambleKey?,
verbose?): Iota;

Parameters

ParameterTypeDefault value
transportTransportundefined
scrambleKeystring'default_iota_scramble_key'
verbosebooleanfalse

Returns

Iota

Properties

PropertyType
transportTransport

Methods

getPublicKey()

getPublicKey(path, displayOnDevice?): Promise<GetPublicKeyResult>;

Retrieves the public key associated with a particular BIP32 path from the Ledger app.

Parameters

ParameterTypeDefault valueDescription
pathstringundefinedthe path to retrieve.
displayOnDevicebooleanfalsewhether or not the address should be displayed on the device.

Returns

Promise<GetPublicKeyResult>


signTransaction()

signTransaction(
path,
txn,
options?): Promise<SignTransactionResult>;

Sign a transaction with the key at a BIP32 path.

Parameters

ParameterTypeDescription
pathstringThe path to use when signing the transaction.
txnUint8ArrayThe transaction bytes to sign.
options?{ bcsObjects: Uint8Array[]; }Additional options used for clear signing purposes.
options.bcsObjects?Uint8Array[]-

Returns

Promise<SignTransactionResult>


getVersion()

getVersion(): Promise<GetVersionResult>;

Retrieve the app version on the attached Ledger device.

Returns

Promise<GetVersionResult>