{"version":3,"file":"AnonCredsW3cCredentialProof.mjs","names":[],"sources":["../../../../src/modules/vc/anoncreds-w3c-credential/AnonCredsW3cCredentialProof.ts"],"sourcesContent":["import { IsEnum, IsOptional, IsString } from 'class-validator'\n\nimport { IsUri } from '../../../utils/validators'\n\nexport interface AnonCredsW3cCredentialProofOptions {\n  type: string\n  cryptosuite: string\n  verificationMethod: string\n  proofPurpose: string\n  domain?: string\n  challenge?: string\n  nonce?: string\n  created?: string\n  expires?: string\n  proofValue?: string\n  previousProof?: string\n}\n\n/**\n * AnonCreds W3C compatibility proof model.\n *\n * Represents a `DataIntegrityProof`-shaped wire payload used by the anoncreds W3C credential support,\n * while keeping the credential-specific model separate from true linked-data proof types.\n */\nexport class AnonCredsW3cCredentialProof {\n  public constructor(options: AnonCredsW3cCredentialProofOptions) {\n    if (options) {\n      this.type = options.type\n      this.cryptosuite = options.cryptosuite\n      this.verificationMethod = options.verificationMethod\n      this.proofPurpose = options.proofPurpose\n      this.domain = options.domain\n      this.challenge = options.challenge\n      this.nonce = options.nonce\n      this.created = options.created\n      this.expires = options.expires\n      this.proofValue = options.proofValue\n      this.previousProof = options.previousProof\n    }\n  }\n\n  @IsString()\n  @IsEnum(['DataIntegrityProof'])\n  public type!: string\n\n  @IsString()\n  public cryptosuite!: string\n\n  @IsString()\n  public proofPurpose!: string\n\n  @IsString()\n  public verificationMethod!: string\n\n  @IsUri()\n  @IsOptional()\n  public domain?: string\n\n  @IsString()\n  @IsOptional()\n  public challenge?: string\n\n  @IsString()\n  @IsOptional()\n  public nonce?: string\n\n  @IsString()\n  @IsOptional()\n  public created?: string\n\n  @IsString()\n  @IsOptional()\n  public expires?: string\n\n  @IsString()\n  @IsOptional()\n  public proofValue?: string\n\n  @IsString()\n  @IsOptional()\n  public previousProof?: string\n}\n"],"mappings":";;;;;;;;;;;AAwBA,IAAa,8BAAb,MAAyC;CACvC,YAAmB,SAA6C;EAC9D,IAAI,SAAS;GACX,KAAK,OAAO,QAAQ;GACpB,KAAK,cAAc,QAAQ;GAC3B,KAAK,qBAAqB,QAAQ;GAClC,KAAK,eAAe,QAAQ;GAC5B,KAAK,SAAS,QAAQ;GACtB,KAAK,YAAY,QAAQ;GACzB,KAAK,QAAQ,QAAQ;GACrB,KAAK,UAAU,QAAQ;GACvB,KAAK,UAAU,QAAQ;GACvB,KAAK,aAAa,QAAQ;GAC1B,KAAK,gBAAgB,QAAQ;EAC/B;CACF;AA0CF;;CAxCG,SAAS;CACT,OAAO,CAAC,oBAAoB,CAAC;;;AAG7B,WAAA,CAAA,SAAS,GAAA,mBAAA,eAAA,MAAA,CAAA,GAAA,4BAAA,WAAA,eAAA,KAAA,CAAA;AAGT,WAAA,CAAA,SAAS,GAAA,mBAAA,eAAA,MAAA,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAGT,WAAA,CAAA,SAAS,GAAA,mBAAA,eAAA,MAAA,CAAA,GAAA,4BAAA,WAAA,sBAAA,KAAA,CAAA;;CAGT,MAAM;CACN,WAAW;;;;CAGX,SAAS;CACT,WAAW;;;;CAGX,SAAS;CACT,WAAW;;;;CAGX,SAAS;CACT,WAAW;;;;CAGX,SAAS;CACT,WAAW;;;;CAGX,SAAS;CACT,WAAW;;;;CAGX,SAAS;CACT,WAAW"}