import { type Result } from '@synonymdev/result';
export declare function setEventListener(callback: (eventData: string) => void): Promise<Result<void>>;
export declare function removeEventListener(): Promise<Result<void>>;
export declare function auth(url: string, secretKey: string): Promise<Result<string[]>>;
export type Capability = {
    path: string;
    permission: string;
};
export type PubkyAuthDetails = {
    relay: string;
    capabilities: Capability[];
    secret: string;
};
export declare function parseAuthUrl(url: string): Promise<Result<PubkyAuthDetails>>;
export declare function publish(recordName: string, recordContent: string, secretKey: string): Promise<Result<string[]>>;
export interface ITxt {
    cache_flush: boolean;
    class: string;
    name: string;
    rdata: {
        strings: string[];
        type: string;
    };
    ttl: number;
}
export interface IDNSPacket {
    signed_packet: string;
    public_key: string;
    signature: string;
    timestamp: number;
    last_seen: number;
    dns_packet: string;
    records: ITxt[];
}
export declare function resolve(publicKey: string): Promise<Result<IDNSPacket>>;
export declare function getSignupToken(homeserverPubky: string, adminPassword: string): Promise<Result<string>>;
export declare function signUp(secretKey: string, homeserver: string, signupToken?: string): Promise<Result<SessionInfo>>;
export declare function republishHomeserver(secretKey: string, homeserver: string): Promise<Result<string>>;
export declare function signIn(secretKey: string): Promise<Result<SessionInfo>>;
export declare function signOut(secretKey: string): Promise<Result<string[]>>;
export declare function get(url: string): Promise<Result<string>>;
export declare function put(url: string, content: Object): Promise<Result<string[]>>;
export declare function publishHttps(recordName: string, target: string, secretKey: string): Promise<Result<string[]>>;
export interface IHttpsRecord {
    name: string;
    class: string;
    ttl: number;
    priority: number;
    target: string;
    port?: number;
    alpn?: string[];
}
export interface IHttpsResolveResult {
    public_key: string;
    https_records: IHttpsRecord[];
}
export declare function resolveHttps(publicKey: string): Promise<Result<IHttpsResolveResult>>;
export declare function list(url: string): Promise<Result<string[]>>;
export declare function deleteFile(url: string): Promise<Result<string[]>>;
export interface SessionInfo {
    pubky: string;
    capabilities: string[];
}
export declare function session(pubky: string): Promise<Result<SessionInfo>>;
export interface IPublicKeyInfo {
    public_key: string;
    uri: string;
}
export interface IGenerateSecretKey extends IPublicKeyInfo {
    secret_key: string;
}
export declare function generateSecretKey(): Promise<Result<IGenerateSecretKey>>;
export declare function getPublicKeyFromSecretKey(secretKey: string): Promise<Result<IPublicKeyInfo>>;
export declare function createRecoveryFile(secretKey: string, passphrase: string): Promise<Result<string>>;
export declare function decryptRecoveryFile(recoveryFile: string, passphrase: string): Promise<Result<string>>;
export declare function getHomeserver(pubky: string): Promise<Result<string>>;
export declare function generateMnemonicPhrase(): Promise<Result<string>>;
export interface IMnemonicKeypair extends IGenerateSecretKey {
    mnemonic?: string;
}
export declare function mnemonicPhraseToKeypair(mnemonicPhrase: string): Promise<Result<IMnemonicKeypair>>;
export declare function generateMnemonicPhraseAndKeypair(): Promise<Result<IMnemonicKeypair>>;
export declare function validateMnemonicPhrase(mnemonicPhrase: string): Promise<Result<boolean>>;
//# sourceMappingURL=index.d.ts.map