import { IConversionOptions } from "protobufjs"; import { stratumn } from "./proto/chainscript_pb"; /** * Create an evidence from a protobuf object. * @param e protobuf evidence. */ export declare function fromProto(e: stratumn.chainscript.IEvidence): Evidence; /** * Deserialize an evidence. * @param evidenceBytes encoded bytes. * @returns the deserialized evidence. */ export declare function deserialize(evidenceBytes: Uint8Array): Evidence; /** * Convert a plain object to an evidence. * @param e plain object. */ export declare function fromObject(e: any): Evidence; /** * Evidences can be used to externally verify a link's existence at a given * moment in time. * An evidence can be a proof of inclusion in a public blockchain, a timestamp * signed by a trusted authority or anything that you trust to provide an * immutable ordering of your process' steps. */ export declare class Evidence { /** Evidence version. Useful to correctly deserialize proof bytes. */ version: string; /** Identifier of the evidence type. */ backend: string; /** Instance of the backend used. */ provider: string; /** Serialized proof. */ proof: Uint8Array; constructor(version: string, backend: string, provider: string, proof: Uint8Array); /** * Validate that the evidence is well-formed. * The proof is opaque bytes so it isn't validated here. */ validate(): void; /** * Serialize the evidence. * @returns evidence bytes. */ serialize(): Uint8Array; /** * Convert to a plain object. * @argument conversionOpts specify how to convert certain types. * @returns a plain object. */ toObject(conversionOpts?: IConversionOptions): any; } //# sourceMappingURL=evidence.d.ts.map