{"version":3,"file":"StatusListCredential.mjs","names":[],"sources":["../../src/models/StatusListCredential.ts"],"sourcesContent":["/**\n * StatusList2021 Credential Types\n *\n * Types for managing credential status using StatusList2021 specification.\n * Supports both revocation and suspension purposes.\n *\n * @see https://www.w3.org/TR/vc-status-list/\n */\n\nimport { VC_V2_CONTEXT } from '../constants'\n\n/**\n * Status purposes supported by StatusList2021\n */\nexport type StatusPurpose = 'revocation' | 'suspension'\n\n/**\n * StatusList2021 credential subject\n */\nexport interface StatusListCredentialSubject {\n  /** URI identifying this status list */\n  id: string\n  /** Must be 'StatusList2021' */\n  type: 'StatusList2021'\n  /** Purpose of the status list */\n  statusPurpose: StatusPurpose\n  /** GZIP-compressed, base64url-encoded bitstring */\n  encodedList: string\n}\n\n/**\n * StatusList2021Entry - added to credentials to indicate their status\n */\nexport interface StatusListEntry {\n  /** URI for this status entry */\n  id: string\n  /** Must be 'StatusList2021Entry' */\n  type: 'StatusList2021Entry'\n  /** Purpose (revocation or suspension) */\n  statusPurpose: StatusPurpose\n  /** Index in the status list bitstring */\n  statusListIndex: string\n  /** URL to the status list credential */\n  statusListCredential: string\n}\n\n/**\n * Full StatusList2021Credential structure (unsigned)\n */\nexport interface StatusListCredential {\n  '@context': string[]\n  type: ['VerifiableCredential', 'StatusList2021Credential']\n  id: string\n  issuer: string | { id: string; [key: string]: unknown }\n  validFrom: string\n  credentialSubject: StatusListCredentialSubject\n}\n\n/**\n * Input for creating a new status list\n */\nexport interface CreateStatusListInput {\n  /** Unique identifier for this status list */\n  listId: string\n  /** Purpose of the status list */\n  purpose: StatusPurpose\n  /** Capacity in bits (default: 131072 = 16KB bitstring) */\n  capacity?: number\n  /** DID of the issuer */\n  issuerDid: string\n  /** Base URL where the status list will be hosted */\n  baseUrl: string\n}\n\n/**\n * Default capacity for status lists (16KB = 131072 bits)\n */\nexport const DEFAULT_STATUS_LIST_CAPACITY = 131072\n\n/**\n * StatusList2021 context URL\n */\nexport const STATUS_LIST_2021_CONTEXT = 'https://w3id.org/vc/status-list/2021/v1'\n\n/**\n * Build the contexts array for a StatusList2021Credential\n */\nexport function buildStatusListContexts(): string[] {\n  return [VC_V2_CONTEXT, STATUS_LIST_2021_CONTEXT]\n}\n"],"mappings":";;;;;;;;;;;;;;AA6EA,MAAa,+BAA+B;;;;AAK5C,MAAa,2BAA2B;;;;AAKxC,SAAgB,0BAAoC;AAClD,QAAO,CAAC,eAAe,yBAAyB"}