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
| Parameter | Type | Default value |
|---|---|---|
transport | Transport | undefined |
scrambleKey | string | 'default_iota_scramble_key' |
verbose | boolean | false |
Returns
Iota
Properties
| Property | Type |
|---|---|
transport | Transport |
Methods
getPublicKey()
getPublicKey(path, displayOnDevice?): Promise<GetPublicKeyResult>;
Retrieves the public key associated with a particular BIP32 path from the Ledger app.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
path | string | undefined | the path to retrieve. |
displayOnDevice | boolean | false | whether 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
| Parameter | Type | Description |
|---|---|---|
path | string | The path to use when signing the transaction. |
txn | Uint8Array | The 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>