@tangle-js/ld-proofs
Version:
Linked Data Proofs on the Tangle. Powered by IOTA Identity & IOTA Streams
36 lines (35 loc) • 1.58 kB
TypeScript
import { IotaAnchoringChannel } from "@tangle-js/anchors";
import type { IotaSigner } from "./iotaSigner";
import type { IIotaLinkedDataProof } from "./models/IIotaLinkedDataProof";
import type { IJsonDocument } from "./models/IJsonDocument";
import type { ILdProofOptions } from "./models/ILdProofOptions";
export declare class IotaLdProofGenerator {
private readonly anchoringChannel;
private readonly signer;
private constructor();
/**
* Creates a new instance of LD Proof Generator.
*
* @param anchoringChannel The anchoring channel to be used.
* @param signer The signer to be used.
* @returns The LD Proof generator.
*/
static create(anchoringChannel: IotaAnchoringChannel, signer: IotaSigner): IotaLdProofGenerator;
/**
* Generates a Linked Data Proof for a JSON(-LD) document by anchoring it to the anchorage provided.
*
* @param doc Document.
* @param options Containing the parameters to be used to generate the proof.
* @returns Linked Data Proof.
*/
generate(doc: string | IJsonDocument, options: ILdProofOptions): Promise<IIotaLinkedDataProof>;
/**
* Generates a chain of Linked Data Proofs for the JSON(-LD) documents passed as parameter.
*
* @param docs The chain of documents.
* @param options The Parameters to be used when generating the chain of proofs.
* @returns The list of Linked Data Proof.
*/
generateChain(docs: string[] | IJsonDocument[], options: ILdProofOptions): Promise<IIotaLinkedDataProof[]>;
private buildLdProof;
}