import { Issuer } from 'did-jwt-vc';
import { DIDurl, URL } from '../../util/ssi/types';
import { VerifiableCredentialWithType, VCWithTypeType } from '../../util/ssi/vc';
import { DualWalletRequests, DualWalletResponse } from '../../util';
import { Name } from '@wharfkit/antelope';
/**
 * A message that can be sent between two Tonomy identities
 *
 * @inheritdoc signMessageWithRecipient() is a protected alternative constructor. In child classes,
 * a new alternative constructor called signMessage() should be created which returns the child class type.
 * @inheritdoc protected "type" property should be overridden in child classes with the name of the class
 * @inheritdoc if the payload type requires ad-hoc decoding, override the constructor and decode the payload
 *
 * @example see an example of the above in the LoginRequestMessage class
 */
export declare class Message<T extends object = any> extends VerifiableCredentialWithType<T> {
    protected static type: string;
    /**
     * @inheritdoc override me if the payload type requires ad-hoc decoding
     */
    constructor(vc: VCWithTypeType<T>);
    /**
     * Alternative constructor that returns type Message
     *
     * @access protected
     *
     * @param {object} message the message
     * @param {Issuer} issuer the issuer id
     * @param {DIDUrl} recipient the recipient id
     * @param {VerifiableCredentialOptions} options the options
     *
     * @returns a message object
     */
    protected static signMessageWithRecipient<T extends object = object>(message: T, issuer: Issuer, recipient: DIDurl, options?: {
        subject?: URL;
    }): Promise<Message<T>>;
    /**
     * Returns the recipient of the message
     * @returns {DIDur} the message recipient
     */
    getRecipient(): DIDurl;
    /**
     * Returns the sender of the message
     * @returns {DIDur} the message sender
     */
    getSender(): DIDurl;
}
export type AuthenticationMessagePayload = Record<string, never>;
export declare class AuthenticationMessage extends Message<AuthenticationMessagePayload> {
    protected static type: string;
    /**
     * Alternative constructor that returns type AuthenticationMessage
     */
    static signMessageWithoutRecipient<AuthenticationMessagePayload>(message: AuthenticationMessagePayload, issuer: Issuer, options?: {
        subject?: string | undefined;
    }): Promise<AuthenticationMessage>;
}
export type IdentifyMessagePayload = Record<string, never>;
export declare class IdentifyMessage extends Message<IdentifyMessagePayload> {
    protected static type: string;
    /**
     * Alternative constructor that returns type IdentifyMessage
     */
    static signMessage(message: IdentifyMessagePayload, issuer: Issuer, recipient: DIDurl, options?: {
        subject?: URL;
    }): Promise<IdentifyMessage>;
}
export declare class LoginRequestsMessage extends Message<DualWalletRequests> {
    protected static type: string;
    /**
     * @override the Message constructor to decode the payload of type DualWalletRequests
     */
    constructor(vc: Message<DualWalletRequests> | VCWithTypeType<DualWalletRequests>);
    /**
     * Alternative constructor that returns type LoginRequestsMessage
     */
    static signMessage(message: DualWalletRequests, issuer: Issuer, recipient: DIDurl, options?: {
        subject?: URL;
    }): Promise<LoginRequestsMessage>;
    verify(): Promise<boolean>;
}
export declare class LoginRequestResponseMessage extends Message<DualWalletResponse> {
    protected static type: string;
    /**
     * @override the Message constructor to decode the payload of type LoginRequestResponseMessagePayload
     */
    constructor(vc: LoginRequestResponseMessage | Message<DualWalletResponse> | VCWithTypeType<DualWalletResponse>);
    /**
     * Alternative constructor that returns type LoginRequestResponseMessage
     */
    static signMessage(message: DualWalletResponse, issuer: Issuer, recipient: DIDurl, options?: {
        subject?: URL;
    }): Promise<LoginRequestResponseMessage>;
}
export type LinkAuthRequestMessagePayload = {
    contract: Name;
    action: Name;
};
export declare class LinkAuthRequestMessage extends Message<LinkAuthRequestMessagePayload> {
    protected static type: string;
    /**
     * @override the Message constructor to decode the payload of type LinkAuthRequestMessagePayload
     */
    constructor(vc: LinkAuthRequestMessage | Message<LinkAuthRequestMessagePayload> | VCWithTypeType<LinkAuthRequestMessagePayload>);
    /**
     * Alternative constructor that returns type LoginRequestResponseMessage
     */
    static signMessage(message: LinkAuthRequestMessagePayload, issuer: Issuer, recipient: DIDurl, options?: {
        subject?: URL;
    }): Promise<LinkAuthRequestMessage>;
}
export type LinkAuthRequestResponseMessagePayload = {
    requestId: string;
    success: boolean;
};
export declare class LinkAuthRequestResponseMessage extends Message<LinkAuthRequestResponseMessagePayload> {
    protected static type: string;
    /**
     * Alternative constructor that returns type LinkAuthRequestResponseMessage
     */
    static signMessage(message: LinkAuthRequestResponseMessagePayload, issuer: Issuer, recipient: DIDurl, options?: {
        subject?: URL;
    }): Promise<LinkAuthRequestResponseMessage>;
}
//# sourceMappingURL=message.d.ts.map