import { ECIESService, HexString, Member, PlatformID, TypedIdProviderWrapper } from '@digitaldefiance/ecies-lib'; import { BrightTrustDataRecord } from './brightTrustDataRecord'; export declare class BrightChainBrightTrust { /** * Member ID, uuid */ readonly id: TID; /** * The node owner is the system key pair that is used to sign and verify with BrightTrust members */ private readonly nodeAgent; /** * The name of the BrightTrust */ readonly name: string; /** * BrightTrust members collection, keys may or may not be loaded for a given member */ private readonly _members; /** * Collection of public keys for each member of the BrightTrust. * This may include members not on this node. * Never erase, only add/update. */ private readonly _memberPublicKeysByMemberId; /** * Collection of encrypted documents that this BrightTrust node has taken responsibility for */ private readonly _documentsById; private readonly _sealingService; private readonly _enhancedProvider; constructor(nodeAgent: Member, name: string, id?: string, idProvider?: TypedIdProviderWrapper, eciesService?: ECIESService); /** * Physically add a member to the members collection and key stores * @param member */ protected storeMember(member: Member): void; /** * Returns whether this node has taken responsibility for a given document. * Some nodes may have different responsibilities for different documents, depending on the members using the node. * @param id * @returns */ hasDocument(id: HexString): boolean; /** * Encrypts and adds a document to the BrightTrust. * @param agent The agent whose credentials are used to encrypt the document * @param document The document to be encrypted * @param amongstMembers The members who will be able to decrypt the document * @param sharesRequired The number of members required to decrypt the document * @returns The document record */ addDocument(agent: Member, document: T, amongstMembers: Member[], sharesRequired?: number): Promise>; /** * Ratrieves a document from the BrightTrust using decrypted shares * @param id The document ID * @param memberIds The member IDs that will be used to decrypt the document * @returns */ getDocument(id: HexString, memberIds: HexString[]): Promise; /** * Returns whether the given set of members is sufficient to decrypt the document * @param id * @param members */ canUnlock(id: HexString, members: Member[]): boolean; } //# sourceMappingURL=brightTrust.d.ts.map