UNPKG

@ew-did-registry/did-ssi-hub-store

Version:

S3-based implementation of IDidStore

22 lines (21 loc) 757 B
import { IDidStore } from "@ew-did-registry/did-store-interface"; import { CacheClientConfig } from "./cacheCache"; /** * Implements decentralized storage in S3 Bucket */ export declare class DidStore implements IDidStore { private client; constructor(cacheConfig: CacheClientConfig); /** * @param claim stringified content */ save(claim: string): Promise<string>; /** * Looks up content identified by `cid`. If no content found during `timeout`, then `ContentNotFound` error is thrown. * @param cid CID of the content * @param timeout time limit for getting response, milliseconds * @returns stringified content */ get(uri: string): Promise<string>; delete(uri: string): Promise<boolean>; }