{
  "version": 3,
  "sources": ["../src/errors.ts"],
  "sourcesContent": ["/**\n * The set of stable error codes this package raises.\n *\n * Branch on `err.code`, not on `err.message`: the codes are part of the\n * public API, the prose is not.\n */\nexport type HpkeErrorCode =\n    'ERR_INVALID_RECIPIENT_KEY'|\n    'ERR_INVALID_KEYPAIR'|\n    'ERR_SMALL_ORDER_KEY'|\n    'ERR_MALFORMED_ENVELOPE'|\n    'ERR_MALFORMED_MESSAGE'|\n    'ERR_INVALID_KEYSIZE'|\n    'ERR_INVALID_AES_KEY'|\n    'ERR_DECRYPT_FAILED'\n\n/**\n * An `Error` carrying a stable `code`. Every throw site in this package\n * raises one of these, so callers can branch on the failure instead of\n * pattern matching on a message.\n *\n * Where a WebCrypto failure is being wrapped, the original is kept on\n * `cause`.\n */\nexport class HpkeError extends Error {\n    readonly code:HpkeErrorCode\n\n    constructor (\n        code:HpkeErrorCode,\n        message:string,\n        opts?:{ cause?:unknown }\n    ) {\n        super(message, opts)\n        this.name = 'HpkeError'\n        this.code = code\n    }\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBO,IAAM,YAAN,cAAwB,MAAM;AAAA,EAxBrC,OAwBqC;AAAA;AAAA;AAAA,EACxB;AAAA,EAET,YACI,MACA,SACA,MACF;AACE,UAAM,SAAS,IAAI;AACnB,SAAK,OAAO;AACZ,SAAK,OAAO;AAAA,EAChB;AACJ;",
  "names": []
}
