import { EventEmitter } from './emitter.js';
import { EscrowSigner } from './signer.js';
import { NostrStore } from './store.js';
import { EscrowContract } from './contract.js';
import { EscrowClient } from './client.js';
import { NostrSocket } from './socket.js';
import { NostrSub } from './sub.js';
import { EventMessage, SessionConfig } from '../types.js';
import { DraftData, DraftTemplate, MemberData, ProgramQuery, ProposalData, RolePolicy } from '../../types/index.js';
export declare class DraftSession extends EventEmitter<{
    'approve': string;
    'commit': string;
    'confirmed': DraftSession;
    'debug': unknown[];
    'endorse': string;
    'error': Error;
    'full': DraftSession;
    'info': unknown[];
    'join': MemberData;
    'leave': MemberData;
    'members': MemberData[];
    'proposal': ProposalData;
    'ready': DraftSession;
    'reject': [method: string, pub: string, reason: string];
    'roles': RolePolicy[];
    'signatures': string[];
    'terms': Partial<ProposalData>;
    'update': DraftSession;
    'published': string;
}> {
    readonly _opt: SessionConfig;
    readonly _signer: EscrowSigner;
    readonly _socket: NostrSocket;
    readonly _store: NostrStore<DraftData>;
    readonly _sub: NostrSub;
    _agreed: boolean;
    _full: boolean;
    _init: boolean;
    constructor(signer: EscrowSigner, options?: Partial<SessionConfig>);
    get approvals(): string[];
    get is_approved(): boolean;
    get is_confirmed(): boolean;
    get data(): DraftData;
    get members(): MemberData[];
    get opt(): SessionConfig;
    get proposal(): ProposalData;
    get prop_id(): string;
    get pubkey(): string;
    get is_endorsed(): boolean;
    get is_full(): boolean;
    get is_member(): boolean;
    get member_idx(): number | null;
    get membership(): import("../types.js").Membership;
    get is_moderated(): boolean;
    get is_moderator(): boolean;
    get is_ready(): boolean;
    get is_valid(): boolean;
    get roles(): RolePolicy[];
    get signatures(): string[];
    get signer(): EscrowSigner;
    get sub(): NostrSub;
    get terms(): string[];
    get updated_at(): number;
    log: {
        debug: (...s: unknown[]) => void;
        info: (...s: unknown[]) => void;
    };
    _approve(sig: string, created_at?: number): void;
    _approve_handler(msg: EventMessage<string>): void;
    _endorse(sig: string, created_at?: number): void;
    _endorse_handler(msg: EventMessage<string>): void;
    _join(mship: MemberData, policy: RolePolicy, created_at?: number): void;
    _join_handler(msg: EventMessage<MemberData>): void;
    _leave(mship: MemberData, created_at?: number): void;
    _leave_handler(msg: EventMessage<MemberData>): void;
    _terms_handler(msg: EventMessage<Partial<ProposalData>>): void;
    _update_terms(terms: Partial<ProposalData>, created_at?: number): void;
    _update(data: DraftData, created_at?: number): void;
    approve(): void;
    check_member(pubkey: string): boolean;
    check_terms(terms: Partial<ProposalData>): boolean;
    connect(address: string, secret: string): Promise<this>;
    endorse(): void;
    get_policy(pol_id: string): RolePolicy;
    get_program(query: ProgramQuery): import("../../types/index.js").ProgramData;
    get_role(title: string): RolePolicy;
    get_term<K extends keyof ProposalData>(key: K): ProposalData[K];
    has_policy(pol_id: string): boolean;
    has_program(query: ProgramQuery): boolean;
    has_role(title: string): boolean;
    has_term<K extends keyof ProposalData>(key: K): boolean;
    init(address: string, secret: string, template: DraftTemplate | DraftData): Promise<[NostrStore<DraftData>, unknown]>;
    join(policy_id: string, index?: number): void;
    leave(): Promise<unknown> | undefined;
    list(address: string): Promise<{
        id: string;
        updated_at: number;
    }[]>;
    publish(client: EscrowClient): Promise<EscrowContract>;
    refresh(): Promise<unknown>;
    update_terms(terms: Partial<ProposalData>): void;
    toJSON(): DraftData;
    toString(): string;
    verify(): void;
    when_commit(commit_id: string): Promise<unknown>;
}
