UNPKG

@govtechsg/open-attestation

Version:
40 lines (39 loc) 1.88 kB
import { OpenAttestationHexString, ProofPurpose, SignatureAlgorithm } from "../shared/@types/document"; import { Array as RunTypesArray, Record as RunTypesRecord, 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 var ObfuscationMetadata = RunTypesRecord({ obfuscated: RunTypesArray(OpenAttestationHexString), }); /** * @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 var VerifiableCredentialWrappedProof = RunTypesRecord({ type: SignatureAlgorithm, targetHash: String, merkleRoot: String, proofs: RunTypesArray(String), salts: String, privacy: ObfuscationMetadata, proofPurpose: ProofPurpose, }); /** * @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 var VerifiableCredentialWrappedProofStrict = VerifiableCredentialWrappedProof.And(RunTypesRecord({ targetHash: OpenAttestationHexString, merkleRoot: OpenAttestationHexString, proofs: RunTypesArray(OpenAttestationHexString), })); /** * @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 var VerifiableCredentialSignedProof = VerifiableCredentialWrappedProof.And(RunTypesRecord({ key: String, signature: 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 * from "../__generated__/schema.3.0";