import { OpenAttestationDocument as OpenAttestationDocumentV3 } from "../__generated__/schema.3.0" ; import { OpenAttestationHexString , ProofPurpose , SchemaId , SignatureAlgorithm } from "../shared/@types/document" ; import { Array as RunTypesArray , Record as RunTypesRecord , Static , String } from "runtypes" ; export interface Salt { value : string ; path : string ; } export const ObfuscationMetadata = RunTypesRecord ( { obfuscated : RunTypesArray ( OpenAttestationHexString ) , } ) ; export type ObfuscationMetadata = Static < typeof ObfuscationMetadata > ; export const VerifiableCredentialWrappedProof = RunTypesRecord ( { type : SignatureAlgorithm , targetHash : String , merkleRoot : String , proofs : RunTypesArray ( String ) , salts : String , privacy : ObfuscationMetadata , proofPurpose : ProofPurpose , } ) ; export type VerifiableCredentialWrappedProof = Static < typeof VerifiableCredentialWrappedProof > ; export const VerifiableCredentialWrappedProofStrict = VerifiableCredentialWrappedProof . And ( RunTypesRecord ( { targetHash : OpenAttestationHexString , merkleRoot : OpenAttestationHexString , proofs : RunTypesArray ( OpenAttestationHexString ) , } ) ) ; export type VerifiableCredentialWrappedProofStrict = Static < typeof VerifiableCredentialWrappedProofStrict > ; export const VerifiableCredentialSignedProof = VerifiableCredentialWrappedProof . And ( RunTypesRecord ( { key : String , signature : String , } ) ) ; export type VerifiableCredentialSignedProof = Static < typeof VerifiableCredentialSignedProof > ; export type WrappedDocument < T extends OpenAttestationDocumentV3 = OpenAttestationDocumentV3 > = T & { version : SchemaId . v3 ; schema ? : string ; proof : VerifiableCredentialWrappedProof ; } ; export type SignedWrappedDocument < T extends OpenAttestationDocumentV3 = OpenAttestationDocumentV3 > = WrappedDocument < T > & { proof : VerifiableCredentialSignedProof ; } ; export * from "../__generated__/schema.3.0" ;