import { SpeculosTransport } from "../load/speculos"; import { DeviceModelId } from "@ledgerhq/devices"; import { CryptoCurrency } from "@ledgerhq/types-cryptoassets"; import { AxiosResponse } from "axios"; import { Account } from "./enum/Account"; import { Transaction } from "./models/Transaction"; import { Delegate } from "./models/Delegate"; import { Swap } from "./models/Swap"; import { AppInfos } from "./enum/AppInfos"; export type Spec = { currency?: CryptoCurrency; appQuery: { model: DeviceModelId; appName: string; appVersion?: string; }; dependencies?: Dependency[]; onSpeculosDeviceCreated?: (device: Device) => Promise; }; export type Dependency = { name: string; appVersion?: string; }; export type SpeculosDevice = { id: string; port: number; appName?: string; appVersion?: string; dependencies?: Dependency[]; }; export declare function setExchangeDependencies(dependencies: Dependency[]): void; type Specs = { [key: string]: Spec; }; export type Device = { transport: SpeculosTransport; id: string; appPath: string; }; export declare const specs: Specs; export declare function startSpeculos(testName: string, spec: Specs[keyof Specs], wantedApiPort?: number): Promise; export declare function stopSpeculos(deviceId: string | undefined): Promise; export declare function getSpeculosAddress(): string; export declare function drainSpeculosScreenshots(port: number): Buffer[]; export declare function retryAxiosRequest(requestFn: () => Promise>, maxRetries?: number, baseDelay?: number, retryableStatusCodes?: number[]): Promise>; export declare function waitFor(text: string, maxAttempts?: number): Promise; export declare function waitForReviewTransaction(): Promise; export declare function fetchCurrentScreenTexts(speculosApiPort: number): Promise; export declare function getDeviceLabelCoordinates(label: string, speculosApiPort: number): Promise<{ x: number; y: number; }>; export declare function fetchAllEvents(speculosApiPort: number): Promise; export declare const pressUntilTextFound: (targetText: string, strictMatch?: boolean | undefined) => string[] | Promise; export declare function containsSubstringInEvent(targetString: string, events: string[]): boolean; export declare function takeScreenshot(port?: number): Promise; export declare function waitForTimeOut(ms: number): Promise; export declare const removeMemberLedgerSync: () => void | Promise; export declare const activateLedgerSync: () => void | Promise; export declare const activateExpertMode: () => void | Promise; export declare const activateContractData: () => void | Promise; export declare const goToSettings: () => void | Promise; export declare const providePublicKey: () => void | Promise; type DeviceLabelsReturn = { delegateConfirmLabel: string; delegateVerifyLabel: string; receiveConfirmLabel: string; receiveVerifyLabel: string; sendVerifyLabel: string; sendConfirmLabel: string; }; export declare function getDeviceLabels(appInfo: AppInfos): DeviceLabelsReturn; export declare const expectValidAddressDevice: (account: Account, addressDisplayed: string) => void | Promise; export declare function signSendTransaction(tx: Transaction): Promise; export declare function getSendEvents(tx: Transaction): Promise; export declare function signDelegationTransaction(delegatingAccount: Delegate): Promise; export declare function getDelegateEvents(delegatingAccount: Delegate): Promise; export declare const verifyAmountsAndAcceptSwap: (swap: Swap, amount: string) => void | Promise; export declare const verifyAmountsAndAcceptSwapForDifferentSeed: (swap: Swap, amount: string, errorMessage: string | null) => void | Promise; export declare const verifyAmountsAndRejectSwap: (swap: Swap, amount: string) => void | Promise; export declare const exportUfvk: (account: Account) => void | Promise; export declare const shareViewKey: () => void | Promise; export {}; //# sourceMappingURL=speculos.d.ts.map