UNPKG

@aeternity/aepp-sdk

Version:

SDK for the æternity blockchain

42 lines (41 loc) 1.46 kB
import type Transport from '@ledgerhq/hw-transport'; import AccountLedger from './Ledger.js'; import { Encoded } from '../utils/encoder.js'; import AccountBaseFactory from './BaseFactory.js'; interface AppConfiguration { version: string; } /** * A factory class that generates instances of AccountLedger based on provided transport. * @category account */ export default class AccountLedgerFactory extends AccountBaseFactory { #private; readonly transport: Transport; /** * @param transport - Connection to Ledger to use */ constructor(transport: Transport); _enableExperimentalLedgerAppSupport: boolean; /** * It throws an exception if Aeternity app on Ledger has an incompatible version, not opened or * not installed. */ ensureReady(): Promise<void>; /** * @returns the version of Aeternity app installed on Ledger wallet */ getAppConfiguration(): Promise<AppConfiguration>; /** * Get `ak_`-prefixed address for a given account index. * @param accountIndex - Index of account * @param verify - Ask user to confirm address by showing it on the device screen */ getAddress(accountIndex: number, verify?: boolean): Promise<Encoded.AccountAddress>; /** * Get an instance of AccountLedger for a given account index. * @param accountIndex - Index of account */ initialize(accountIndex: number): Promise<AccountLedger>; } export {};