import { Evidence, Link, Segment } from '@stratumn/js-chainscript'; import { Pagination } from './pagination'; import { Segments } from './segments'; import { SegmentsFilter } from './segmentsFilter'; /** * IStoreClient provides access to the Stratumn Chainscript Store API. * It lets your application store and retrieve Chainscript segments. */ export interface IStoreClient { /** * Returns unstructured information about the store like its name, * description, commit hash, etc. */ info(): Promise; /** * Create a new link in the Chainscript store. * @param link new link that should be stored. * @returns the segment encapsulating this link. */ createLink(link: Link): Promise; /** * Create a collection of links atomically in the Chainscript store. * Will throw an error if any of the links could not be created. * @param links links that should be stored. * @returns the segments encapsulating the input links. */ createLinkBatch(links: Link[]): Promise; /** * Get a segment from its link hash. * @param linkHash hex-encoded link hash. * @returns the segment with its evidences (if any). */ getSegment(linkHash: string): Promise; /** * Find segments that match a set of filters. * @param filters (Optional) segments filtering options. * @param pagination (Optional) pagination options. * @returns a list of segments with pagination details. */ findSegments(filters?: SegmentsFilter, pagination?: Pagination): Promise; /** * List existing map IDs. * @param process (Optional) filter map IDs for this process. * @param pagination (Optional) pagination options. * @returns a list of map IDs (if any). */ getMapIDs(process?: string, pagination?: Pagination): Promise; /** * Add an evidence to a given link. * Evidences are stored inside the segment's meta field. * An evidence is an external proof of existence of the link (for example a * proof of inclusion on the Bitcoin blockchain via a fossilizer). * @param linkHash hex-encoded hash of the link to add evidence to. * @param evidence to add to the link's segment. */ addEvidence(linkHash: string, evidence: Evidence): Promise; } //# sourceMappingURL=client.d.ts.map