import { Key } from "../core/key"; import { KeyHash } from "../core/key-hash"; import { Operation as OperationType } from "../core/operation"; import { JSONType } from "../utils/json"; interface MemorySigner { sign: (payload: string) => Promise<{ prefixSig: string; }>; publicKey: () => Promise; publicKeyHash: () => Promise; } interface BeaconSigner { getActiveAccount: () => Promise<{ address: KeyHash; publicKey: Key; } | undefined>; requestSignPayload: ({ payload, }: { payload: string; }) => Promise<{ signature: string; } | undefined | null>; } interface CustomSigner { sign: (payload: string) => Promise; publicKey: () => Promise; publicKeyHash: () => Promise; } export declare abstract class DekuSigner { abstract sign(payload: string): Promise; abstract publicKey: () => Promise; abstract publicKeyHash: () => Promise; signOperation(operation: OperationType): Promise; } /** * Converts a memory signer to a deku signer * @param signer a memory signer instanciante by "InMemorySigner" * @returns a deku signer */ export declare const fromMemorySigner: (signer: MemorySigner) => DekuSigner; /** * Converts a beacon signer to a deku signer * @param signer a beacon signer instanciante by "DAppClient" * @returns a deku signer */ export declare const fromBeaconSigner: (signer: BeaconSigner) => DekuSigner; export declare const fromCustomSigner: (signer: CustomSigner) => DekuSigner; export {};