UNPKG

@govtechsg/open-attestation

Version:
100 lines (99 loc) 5.21 kB
import { OpenAttestationDocument as OpenAttestationDocumentV3 } from "../__generated__/schema.3.0"; import { SchemaId } from "../shared/@types/document"; import { Array as RunTypesArray, Record as RunTypesRecord, Static, String } from "runtypes"; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export interface Salt { value: string; path: string; } /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export declare const ObfuscationMetadata: RunTypesRecord<{ obfuscated: RunTypesArray<import("runtypes").Constraint<String, string, unknown>, false>; }, false>; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export type ObfuscationMetadata = Static<typeof ObfuscationMetadata>; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export declare const VerifiableCredentialWrappedProof: RunTypesRecord<{ type: import("runtypes").Literal<"OpenAttestationMerkleProofSignature2018">; targetHash: String; merkleRoot: String; proofs: RunTypesArray<String, false>; salts: String; privacy: RunTypesRecord<{ obfuscated: RunTypesArray<import("runtypes").Constraint<String, string, unknown>, false>; }, false>; proofPurpose: import("runtypes").Literal<"assertionMethod">; }, false>; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export type VerifiableCredentialWrappedProof = Static<typeof VerifiableCredentialWrappedProof>; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export declare const VerifiableCredentialWrappedProofStrict: import("runtypes").Intersect<[RunTypesRecord<{ type: import("runtypes").Literal<"OpenAttestationMerkleProofSignature2018">; targetHash: String; merkleRoot: String; proofs: RunTypesArray<String, false>; salts: String; privacy: RunTypesRecord<{ obfuscated: RunTypesArray<import("runtypes").Constraint<String, string, unknown>, false>; }, false>; proofPurpose: import("runtypes").Literal<"assertionMethod">; }, false>, RunTypesRecord<{ targetHash: import("runtypes").Constraint<String, string, unknown>; merkleRoot: import("runtypes").Constraint<String, string, unknown>; proofs: RunTypesArray<import("runtypes").Constraint<String, string, unknown>, false>; }, false>]>; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export type VerifiableCredentialWrappedProofStrict = Static<typeof VerifiableCredentialWrappedProofStrict>; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export declare const VerifiableCredentialSignedProof: import("runtypes").Intersect<[RunTypesRecord<{ type: import("runtypes").Literal<"OpenAttestationMerkleProofSignature2018">; targetHash: String; merkleRoot: String; proofs: RunTypesArray<String, false>; salts: String; privacy: RunTypesRecord<{ obfuscated: RunTypesArray<import("runtypes").Constraint<String, string, unknown>, false>; }, false>; proofPurpose: import("runtypes").Literal<"assertionMethod">; }, false>, RunTypesRecord<{ key: String; signature: String; }, false>]>; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export type VerifiableCredentialSignedProof = Static<typeof VerifiableCredentialSignedProof>; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export type WrappedDocument<T extends OpenAttestationDocumentV3 = OpenAttestationDocumentV3> = T & { version: SchemaId.v3; schema?: string; proof: VerifiableCredentialWrappedProof; }; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export type SignedWrappedDocument<T extends OpenAttestationDocumentV3 = OpenAttestationDocumentV3> = WrappedDocument<T> & { proof: VerifiableCredentialSignedProof; }; /** * @deprecated will be removed in the next major release in favour of OpenAttestation v4.0 (more info: https://github.com/Open-Attestation/open-attestation/tree/alpha) */ export * from "../__generated__/schema.3.0";