UNPKG

@tangle-js/ld-proofs

Version:

Linked Data Proofs on the Tangle. Powered by IOTA Identity & IOTA Streams

42 lines (41 loc) 1.74 kB
/// <reference types="node" /> import type { IJsonSignedDocument } from "./models/IJsonSignedDocument"; import type { IJsonVerificationOptions } from "./models/IJsonVerificationOptions"; import type { IVerificationOptions } from "./models/IVerificationOptions"; export declare class IotaVerifier { /** * Verifies a Ed25519 signature corresponding to a string message. * * @param message The message to be verified. * @param signatureValue The signature value. * @param options The verification request. * @returns True or false depending on the verification result. */ static verify(message: Buffer, signatureValue: string, options: IVerificationOptions): Promise<boolean>; /** * Verifies a JSON(-LD) document containing a Linked Data Signature. * * @param doc The document to verify. * @param options The verification options. * @returns True or false depending on the verification result. */ static verifyJson(doc: IJsonSignedDocument | string, options?: IJsonVerificationOptions): Promise<boolean>; /** * Verifies a JSON document containing a Linked Data Signature. * * @param doc The document to verify. * @param options The verification options. * @returns True or false depending on the verification result. */ private static doVerifyJson; /** * Verifies a JSON-LD document containing a Linked Data Signature. * * @param doc The document to be verified. * @param options The verification options. * @returns True or false depending on the verifi.cation result. */ private static doVerifyJsonLd; private static verificationMethod; private static verifySignature; }