anon-identity
Version:
Decentralized identity framework with DIDs, Verifiable Credentials, and privacy-preserving selective disclosure
59 lines • 3.43 kB
TypeScript
import { IStorageProvider, RevocationList, CredentialSchema, StorageConfig } from '../types';
import { VerifiableCredential } from '../../types';
import { DIDDocument } from '../../types/did';
export declare class BlockchainStorageProvider implements IStorageProvider {
private contractClient;
private cache?;
private ipfsClient?;
private localKeyStore;
private config;
private batchManager;
private initialized;
private initPromise;
constructor(config: StorageConfig);
private initialize;
private doInitialize;
private getCached;
private setCached;
private encrypt;
private decrypt;
storeDID(did: string, document: DIDDocument): Promise<void>;
resolveDID(did: string): Promise<DIDDocument | null>;
listDIDs(owner?: string): Promise<string[]>;
storeCredential(credential: VerifiableCredential): Promise<void>;
getCredential(id: string): Promise<VerifiableCredential | null>;
listCredentials(holder: string): Promise<VerifiableCredential[]>;
deleteCredential(id: string): Promise<void>;
publishRevocation(issuerDID: string, revocationList: RevocationList): Promise<void>;
checkRevocation(issuerDID: string, credentialId: string): Promise<boolean>;
getRevocationList(issuerDID: string): Promise<RevocationList | null>;
private getRevocationListsForIssuer;
storeKeyPair(identifier: string, encryptedKeyPair: string): Promise<void>;
retrieveKeyPair(identifier: string): Promise<string | null>;
deleteKeyPair(identifier: string): Promise<void>;
registerSchema(schema: CredentialSchema): Promise<string>;
getSchema(schemaId: string): Promise<CredentialSchema | null>;
listSchemas(issuerDID?: string): Promise<CredentialSchema[]>;
clear(): Promise<void>;
getStorageStats(): Promise<{
localItems: number;
cacheSize: number;
blockNumber: number;
}>;
storePhoneNumber(userDID: string, phoneNumber: import('../../types').PhoneNumber): Promise<string>;
getPhoneNumber(userDID: string, phoneId: string): Promise<import('../../types').PhoneNumber | null>;
listPhoneNumbers(userDID: string): Promise<import('../../types').PhoneNumber[]>;
updatePhoneNumber(userDID: string, phoneId: string, phoneNumber: Partial<import('../../types').PhoneNumber>): Promise<void>;
deletePhoneNumber(userDID: string, phoneId: string): Promise<void>;
storeAddress(userDID: string, address: import('../../types').Address): Promise<string>;
getAddress(userDID: string, addressId: string): Promise<import('../../types').Address | null>;
listAddresses(userDID: string): Promise<import('../../types').Address[]>;
updateAddress(userDID: string, addressId: string, address: Partial<import('../../types').Address>): Promise<void>;
deleteAddress(userDID: string, addressId: string): Promise<void>;
storeEmailAddress(userDID: string, emailAddress: import('../../types').EmailAddress): Promise<string>;
getEmailAddress(userDID: string, emailId: string): Promise<import('../../types').EmailAddress | null>;
listEmailAddresses(userDID: string): Promise<import('../../types').EmailAddress[]>;
updateEmailAddress(userDID: string, emailId: string, emailAddress: Partial<import('../../types').EmailAddress>): Promise<void>;
deleteEmailAddress(userDID: string, emailId: string): Promise<void>;
}
//# sourceMappingURL=blockchain-storage-provider-lazy.d.ts.map