@trezor/connect
Version:
High-level javascript interface for Trezor hardware wallet.
15 lines • 1.65 kB
TypeScript
import { Messages } from '@trezor/transport';
import type { Device } from './Device';
export type PromptCallback<T> = (response: T | null, error?: Error) => void;
export declare const cancelPrompt: (device: Device, expectResponse?: boolean) => Promise<{
readonly success: false;
readonly error: "session not found";
}> | import("@trezor/transport/lib/types").AsyncResultWithTypedError<import("@trezor/protobuf").MessageFromTrezor, "session not found" | "Network request failed" | "Wrong result type." | "other call in progress" | "Malformed protocol format" | "device disconnected during action" | "unexpected error" | "Aborted by timeout" | "Aborted by signal" | "This transport can not be used in this environment" | "device not found" | "Unable to open device" | "A transfer error has occurred."> | import("@trezor/transport/lib/types").AsyncResultWithTypedError<undefined, "session not found" | "Network request failed" | "Wrong result type." | "other call in progress" | "Malformed protocol format" | "device disconnected during action" | "unexpected error" | "Aborted by timeout" | "Aborted by signal" | "This transport can not be used in this environment" | "device not found" | "Unable to open device" | "A transfer error has occurred.">;
export declare const promptPassphrase: (device: Device) => Promise<{
value: string;
passphraseOnDevice?: boolean;
save?: boolean;
}>;
export declare const promptPin: (device: Device, type?: Messages.PinMatrixRequestType) => Promise<string>;
export declare const promptWord: (device: Device, type: Messages.WordRequestType) => Promise<string>;
//# sourceMappingURL=prompts.d.ts.map