{
  "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": "4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAwBO,IAAMI,EAAN,cAAwB,KAAM,CAxBrC,MAwBqC,CAAAC,EAAA,kBACxB,KAET,YACIC,EACAC,EACAC,EACF,CACE,MAAMD,EAASC,CAAI,EACnB,KAAK,KAAO,YACZ,KAAK,KAAOF,CAChB,CACJ",
  "names": ["errors_exports", "__export", "HpkeError", "__toCommonJS", "HpkeError", "__name", "code", "message", "opts"]
}
