import { v3 } from "@trustvc/trustvc";

export interface DriverLicense extends v3.OpenAttestationDocument {
  name: string;
  validFrom: string;
  credentialSubject: {
    id: string;
    class: {
      type: string;
      effectiveDate: string;
    }[];
  };
}

export const driverLicense = {
  version: "https://schema.openattestation.com/3.0/schema.json",
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://schemata.openattestation.com/com/openattestation/1.0/DrivingLicenceCredential.json",
    "https://schemata.openattestation.com/com/openattestation/1.0/OpenAttestation.v3.json",
    "https://schemata.openattestation.com/com/openattestation/1.0/CustomContext.json",
  ],
  reference: "SERIAL_NUMBER_123",
  name: "Republic of Singapore Driving Licence",
  issuanceDate: "2010-01-01T19:23:24Z",
  validFrom: "2010-01-01T19:23:24Z",
  issuer: {
    id: "https://example.com",
    name: "DEMO STORE",
  },
  type: ["VerifiableCredential", "DrivingLicenceCredential"],
  credentialSubject: {
    id: "did:example:SERIAL_NUMBER_123",
    class: [
      {
        type: "3",
        effectiveDate: "2010-01-01T19:23:24Z",
      },
      {
        type: "3A",
        effectiveDate: "2010-01-01T19:23:24Z",
      },
    ],
  },
  openAttestationMetadata: {
    template: {
      name: "DRIVER_LICENSE",
      type: "EMBEDDED_RENDERER",
      url: "https://localhost:3000/renderer",
    },
    proof: {
      type: "OpenAttestationProofMethod",
      method: "DID",
      value: "did:ethr:0xE712878f6E8d5d4F9e87E10DA604F9cB564C9a89",
      revocation: {
        type: "NONE",
      },
    },
    identityProof: {
      type: "DNS-DID",
      identifier: "tradetrust.io",
    },
  },
  attachments: [
    {
      fileName: "sample.pdf",
      mimeType: "application/pdf",
      data: "BASE64_ENCODED_FILE",
    },
  ],
  proof: {
    type: "OpenAttestationMerkleProofSignature2018",
    proofPurpose: "assertionMethod",
    targetHash: "28712f6b5a160dcaf311c36c1109803ed54f7eb29d8329f44aa0266c1ec284fe",
    proofs: [],
    merkleRoot: "28712f6b5a160dcaf311c36c1109803ed54f7eb29d8329f44aa0266c1ec284fe",
    salts:
      "W3sidmFsdWUi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