@tangle-js/ld-proofs
Version:
Linked Data Proofs on the Tangle. Powered by IOTA Identity & IOTA Streams
50 lines (49 loc) • 2.22 kB
TypeScript
import type { IIotaLinkedDataProof } from "./models/IIotaLinkedDataProof";
import type { IJsonAnchoredDocument } from "./models/IJsonAnchoredDocument";
import type { IJsonDocument } from "./models/IJsonDocument";
import type { ILdProofVerificationOptions } from "./models/ILdProofVerificationOptions";
/**
* Linked Data Proof Verifier.
*
* In the future it will also need to verify.
*
*/
export declare class IotaLdProofVerifier {
/**
* Verifies a JSON(-LD) document.
*
* @param doc The JSON(-LD) document.
* @param options The verification options.
* @returns True or false with the verification result.
*/
static verifyJson(doc: IJsonAnchoredDocument | string, options?: ILdProofVerificationOptions): Promise<boolean>;
/**
* Verifies a chain of JSON(-LD) documents ensuring that are anchored to the same channel.
* And in the order implicit in the list.
* @param docs The chain of documents to verify.
* @param options The verification options.
* @returns The global verification result.
*/
static verifyJsonChain(docs: IJsonAnchoredDocument[] | string[], options?: ILdProofVerificationOptions): Promise<boolean>;
/**
* Verifies a list of JSON(-LD) documents using the proof passed as parameter.
* The individual proofs of the events shall be found on the Channel specified.
*
* @param docs The documents.
* @param proof The proof that points to the Channel used for verification.
* @param options The verification options.
* @returns The global result of the verification.
*/
static verifyJsonChainSingleProof(docs: IJsonDocument[] | string[], proof: IIotaLinkedDataProof, options?: ILdProofVerificationOptions): Promise<boolean>;
/**
* Verifies a chain of JSON(LD) documents ensuring that are anchored to the same channel.
* And in the order implicit in the list.
* @param docs The chain of documents to verify.
* @param options The verification options.
* @returns The global verification result.
*/
private static doVerifyChain;
private static doVerifyChainSingleProof;
private static doVerifyDoc;
private static doVerifyChainedDoc;
}