import type { Client } from '@web3-storage/w3up-client';
import type { Database } from '@fireproof/core';
import { ConnectIPFSParams } from './connect-ipfs';
import { DatabaseConnectIPFS } from './connect-ipfs-helpers';
type ClockSpaceDoc = {
    type: 'clock-space';
    clockName: `_clock/${string}/${string}`;
    with: `did:${string}:${string}`;
    accountSpace: `did:${string}:${string}`;
    issuer: `did:key:${string}`;
    created: number;
    name: string;
    email: `${string}@${string}` | null;
    ua: string;
    schema: string;
};
type SpaceDelegationDoc = {
    _id: `delegation/${string}/${string}`;
    type: 'member-delegation';
    audience: `did:key:${string}`;
    with: `did:${string}:${string}`;
    schema: string;
    status: 'pending' | 'applied';
    delegation?: Uint8Array;
};
export declare class AccountConnectIPFS extends DatabaseConnectIPFS {
    accountDb: Database;
    client: Client | null;
    email: `${string}@${string}` | null;
    constructor();
    accountEmail(): Promise<`${string}@${string}` | undefined>;
    authorize(email: `${string}@${string}`): Promise<void>;
    initializeClient(): Promise<void>;
    authorizedClient(): Promise<Client>;
    clockSpaceDIDForDb(): `did:${string}:${string}`;
    connectClient(): Promise<Client>;
    bestSpace(client: Client): import("@web3-storage/w3up-client/dist/src/space").Space | undefined;
    encodeSpaceName(params: ConnectIPFSParams): `_clock/${string}/${string}`;
    authorizedClockSpace(params: ConnectIPFSParams): Promise<`did:${string}:${string}`>;
    createNewSpace(params: ConnectIPFSParams): Promise<`did:${string}:${string}`>;
    joinExistingSpace(doc: ClockSpaceDoc): Promise<`did:${string}:${string}`>;
    joinSchema(schema: string, agentDID: `did:key:${string}`): Promise<void>;
    waitForAccess(clockDoc: ClockSpaceDoc, agentDID: `did:key:${string}`): Promise<unknown>;
    applyDelegation(doc: SpaceDelegationDoc): Promise<void>;
    serviceAccessRequests(): Promise<() => void>;
    delegateAccess(clockDoc: ClockSpaceDoc | SpaceDelegationDoc, memberDid: `did:key:${string}`): Promise<void>;
}
export {};
