import { Connect, Identity, Inboxes, Messages, type SpaceStorageEntry } from '@graphprotocol/hypergraph';
import type { Mapping } from '@graphprotocol/typesync/Mapping';
import { type ReactNode } from 'react';
import type { Address } from 'viem';
export type HypergraphAppCtx = {
    logout(): void;
    setIdentity(identity: Connect.PrivateAppIdentity): void;
    invitations: Array<Messages.Invitation>;
    createSpace(params: Readonly<{
        name: string;
        smartSessionClient?: Connect.SmartSessionClient;
    }>): Promise<string>;
    getSmartSessionClient(): Promise<Connect.SmartSessionClient>;
    createSpaceInbox(params: Readonly<{
        space: SpaceStorageEntry;
        isPublic: boolean;
        authPolicy: Inboxes.InboxSenderAuthPolicy;
    }>): Promise<unknown>;
    getLatestSpaceInboxMessages(params: Readonly<{
        spaceId: string;
        inboxId: string;
    }>): Promise<unknown>;
    listPublicSpaceInboxes(params: Readonly<{
        spaceId: string;
    }>): Promise<readonly Messages.SpaceInboxPublic[]>;
    getSpaceInbox(params: Readonly<{
        spaceId: string;
        inboxId: string;
    }>): Promise<Messages.SpaceInboxPublic>;
    sendSpaceInboxMessage(params: Readonly<{
        message: string;
        spaceId: string;
        inboxId: string;
        encryptionPublicKey: string;
        signaturePrivateKey: string | null;
        authorAccountAddress: string | null;
    }>): Promise<unknown>;
    createAccountInbox(params: Readonly<{
        isPublic: boolean;
        authPolicy: Inboxes.InboxSenderAuthPolicy;
    }>): Promise<unknown>;
    getLatestAccountInboxMessages(params: Readonly<{
        accountAddress: string;
        inboxId: string;
    }>): Promise<unknown>;
    getOwnAccountInboxes(): Promise<unknown>;
    listPublicAccountInboxes(params: Readonly<{
        accountAddress: string;
    }>): Promise<readonly Messages.AccountInboxPublic[]>;
    getAccountInbox(params: Readonly<{
        accountAddress: string;
        inboxId: string;
    }>): Promise<Messages.AccountInboxPublic>;
    sendAccountInboxMessage(params: Readonly<{
        message: string;
        accountAddress: string;
        inboxId: string;
        encryptionPublicKey: string;
        signaturePrivateKey: string | null;
        authorAccountAddress: string | null;
    }>): Promise<unknown>;
    listSpaces(): void;
    listInvitations(): void;
    acceptInvitation(params: Readonly<{
        invitation: Messages.Invitation;
    }>): Promise<unknown>;
    subscribeToSpace(params: Readonly<{
        spaceId: string;
    }>): void;
    inviteToSpace(params: Readonly<{
        space: SpaceStorageEntry;
        invitee: {
            accountAddress: Address;
        };
    }>): Promise<unknown>;
    getVerifiedIdentity(accountAddress: string, publicKey: string | null, appId: string | null): Promise<{
        accountAddress: string;
        encryptionPublicKey: string;
        signaturePublicKey: string;
    }>;
    isConnecting: boolean;
    isLoadingSpaces: Record<string, boolean>;
    ensureSpaceInbox(params: {
        spaceId: string;
        isPublic?: boolean;
        authPolicy?: Inboxes.InboxSenderAuthPolicy;
        index?: number;
    }): Promise<string>;
    redirectToConnect(params: {
        storage: Identity.Storage;
        successUrl: string;
        connectUrl: string;
        redirectFn: (url: URL) => void;
    }): void;
    processConnectAuthSuccess(params: {
        storage: Identity.Storage;
        ciphertext: string;
        nonce: string;
    }): void;
};
export declare const HypergraphAppContext: import("react").Context<HypergraphAppCtx>;
export declare function useHypergraphApp(): HypergraphAppCtx;
export declare function useHypergraphAuth(): {
    authenticated: boolean;
    identity: Connect.PrivateAppIdentity | null;
};
export type HypergraphAppProviderProps = Readonly<{
    storage?: Identity.Storage;
    syncServerUri?: string;
    chainId?: number;
    children: ReactNode;
    mapping: Mapping;
    appId: string;
}>;
export declare function HypergraphAppProvider({ storage, syncServerUri, chainId, appId, children, mapping, }: HypergraphAppProviderProps): import("react/jsx-runtime").JSX.Element | null;
//# sourceMappingURL=HypergraphAppContext.d.ts.map