import { AbstractSQLite } from "./AbstractSQLite"; import { SQLiteDriver } from "../drivers/SQLiteDriver"; import { SandBox } from "./SandBox"; import { Cloneable } from "../../dto/Cloneable"; import { DBDocument } from "./DocumentDAL"; export declare abstract class DBIdentity implements Cloneable { clone(): any; certs: any[]; signed: { idty: { pubkey: string; uid: string; buid: string; sig: string; member: string; wasMember: string; }; block_number: number; block_hash: string; sig: string; }[]; revoked: boolean; currentMSN: null; currentINN: null; buid: string; member: boolean; kick: boolean; leaving: boolean | null; wasMember: boolean; pubkey: string; uid: string; sig: string; revocation_sig: string | null; hash: string; written: boolean; wotb_id: number | null; revoked_on: number | null; expires_on: number; getTargetHash(): string; json(): { pubkey: string; uids: { uid: string; meta: { timestamp: string; }; revoked: boolean; revoked_on: number; revocation_sig: string | null; self: string; others: any[]; }[]; signed: any[]; }; static copyFromExisting(idty: DBIdentity): ExistingDBIdentity; } export declare class NewDBIdentity extends DBIdentity { pubkey: string; sig: string; buid: string; uid: string; hash: string; revoked: boolean; currentMSN: null; currentINN: null; member: boolean; kick: boolean; leaving: boolean; wasMember: boolean; revocation_sig: null; written: boolean; wotb_id: null; revoked_on: null; expires_on: number; constructor(pubkey: string, sig: string, buid: string, uid: string, hash: string); } export declare class ExistingDBIdentity extends DBIdentity { constructor(idty: DBIdentity); } export interface DBSandboxIdentity extends DBDocument { certsCount: number; ref_block: number; } export declare class IdentityDAL extends AbstractSQLite { constructor(driver: SQLiteDriver); init(): Promise; revokeIdentity(pubkey: string): Promise; removeUnWrittenWithPubkey(pubkey: string): Promise; removeUnWrittenWithUID(uid: string): Promise; setRevoked(pubkey: string): Promise; getByHash(hash: string): Promise; saveIdentity(idty: DBIdentity): Promise; deleteByHash(hash: string): Promise; getToRevoke(): Promise; getPendingIdentities(): Promise; searchThoseMatching(search: string): Promise; trimExpiredIdentities(medianTime: number): Promise; /************************** * SANDBOX STUFF */ getSandboxIdentities(): Promise; sandbox: SandBox; getSandboxRoom(): Promise; setSandboxSize(maxSize: number): void; }