import type { SubstrateApp } from '@zondax/ledger-substrate'; import type { TransportType } from '@pezkuwi/hw-ledger-transports/types'; import type { AccountOptions, LedgerAddress, LedgerSignature, LedgerVersion } from './types.js'; import { ledgerApps } from './defaults.js'; export { packageInfo } from './packageInfo.js'; type Chain = keyof typeof ledgerApps; /** * @name Ledger * * @description * Legacy wrapper for a ledger app - * - it connects automatically on use, creating an underlying interface as required * - Promises reject with errors (unwrapped errors from @zondax/ledger-substrate) * @deprecated Use LedgerGeneric for up to date integration with ledger */ export declare class Ledger { #private; constructor(transport: TransportType, chain: Chain); /** * Returns the address associated with a specific account & address offset. Optionally * asks for on-device confirmation */ getAddress(confirm?: boolean, accountOffset?: number, addressOffset?: number, { account, addressIndex, change }?: Partial): Promise; /** * Returns the version of the Ledger application on the device */ getVersion(): Promise; /** * Signs a transaction on the Ledger device */ sign(message: Uint8Array, accountOffset?: number, addressOffset?: number, options?: Partial): Promise; /** * Signs a message (non-transactional) on the Ledger device */ signRaw(message: Uint8Array, accountOffset?: number, addressOffset?: number, options?: Partial): Promise; /** * @internal * * Returns a created SubstrateApp to perform operations against. Generally * this is only used internally, to ensure consistent bahavior. */ withApp(fn: (app: SubstrateApp) => Promise): Promise; }