@canton-network/core-rpc-errors 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["errorCodes"],"mappings":";;;;;AAOO,IAAM,eAAA,GAAkB,CAAC,OAAA,KAA4B;AACxD,EAAA,MAAM,QAAA,GAAW;AAAA,IACb,CAACA,oBAAA,CAAW,GAAA,CAAI,KAAK,GAAG,GAAA;AAAA,IACxB,CAACA,oBAAA,CAAW,GAAA,CAAI,cAAc,GAAG,GAAA;AAAA,IACjC,CAACA,oBAAA,CAAW,GAAA,CAAI,cAAc,GAAG,GAAA;AAAA,IACjC,CAACA,oBAAA,CAAW,GAAA,CAAI,aAAa,GAAG,GAAA;AAAA,IAChC,CAACA,oBAAA,CAAW,GAAA,CAAI,YAAY,GAAG,GAAA;AAAA,IAC/B,CAACA,oBAAA,CAAW,QAAA,CAAS,YAAY,GAAG,GAAA;AAAA,IACpC,CAACA,oBAAA,CAAW,GAAA,CAAI,QAAQ,GAAG;AAAA,GAC/B;AAEA,EAAA,OAAO,QAAA,CAAS,OAAO,CAAA,IAAK,GAAA;AAChC","file":"index.cjs","sourcesContent":["// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { errorCodes } from '@metamask/rpc-errors'\n\nexport { rpcErrors, providerErrors, JsonRpcError } from '@metamask/rpc-errors'\n\nexport const toHttpErrorCode = (rpcCode: number): number => {\n const errorMap = {\n [errorCodes.rpc.parse]: 400,\n [errorCodes.rpc.invalidRequest]: 400,\n [errorCodes.rpc.methodNotFound]: 404,\n [errorCodes.rpc.invalidParams]: 400,\n [errorCodes.rpc.invalidInput]: 400,\n [errorCodes.provider.unauthorized]: 401,\n [errorCodes.rpc.internal]: 500,\n }\n\n return errorMap[rpcCode] || 500\n}\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["errorCodes"],"mappings":";;;;;AAOO,IAAM,eAAA,GAAkB,CAAC,OAAA,KAA4B;AACxD,EAAA,MAAM,QAAA,GAAW;AAAA,IACb,CAACA,oBAAA,CAAW,GAAA,CAAI,KAAK,GAAG,GAAA;AAAA,IACxB,CAACA,oBAAA,CAAW,GAAA,CAAI,cAAc,GAAG,GAAA;AAAA,IACjC,CAACA,oBAAA,CAAW,GAAA,CAAI,cAAc,GAAG,GAAA;AAAA,IACjC,CAACA,oBAAA,CAAW,GAAA,CAAI,aAAa,GAAG,GAAA;AAAA,IAChC,CAACA,oBAAA,CAAW,GAAA,CAAI,YAAY,GAAG,GAAA;AAAA,IAC/B,CAACA,oBAAA,CAAW,QAAA,CAAS,YAAY,GAAG,GAAA;AAAA,IACpC,CAACA,oBAAA,CAAW,GAAA,CAAI,QAAQ,GAAG;AAAA,GAC/B;AAEA,EAAA,OAAO,QAAA,CAAS,OAAO,CAAA,IAAK,GAAA;AAChC","file":"index.cjs","sourcesContent":["// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { errorCodes } from '@metamask/rpc-errors'\n\nexport { rpcErrors, providerErrors, JsonRpcError } from '@metamask/rpc-errors'\n\nexport const toHttpErrorCode = (rpcCode: number): number => {\n const errorMap = {\n [errorCodes.rpc.parse]: 400,\n [errorCodes.rpc.invalidRequest]: 400,\n [errorCodes.rpc.methodNotFound]: 404,\n [errorCodes.rpc.invalidParams]: 400,\n [errorCodes.rpc.invalidInput]: 400,\n [errorCodes.provider.unauthorized]: 401,\n [errorCodes.rpc.internal]: 500,\n }\n\n return errorMap[rpcCode] || 500\n}\n"]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;AAOO,IAAM,eAAA,GAAkB,CAAC,OAAA,KAA4B;AACxD,EAAA,MAAM,QAAA,GAAW;AAAA,IACb,CAAC,UAAA,CAAW,GAAA,CAAI,KAAK,GAAG,GAAA;AAAA,IACxB,CAAC,UAAA,CAAW,GAAA,CAAI,cAAc,GAAG,GAAA;AAAA,IACjC,CAAC,UAAA,CAAW,GAAA,CAAI,cAAc,GAAG,GAAA;AAAA,IACjC,CAAC,UAAA,CAAW,GAAA,CAAI,aAAa,GAAG,GAAA;AAAA,IAChC,CAAC,UAAA,CAAW,GAAA,CAAI,YAAY,GAAG,GAAA;AAAA,IAC/B,CAAC,UAAA,CAAW,QAAA,CAAS,YAAY,GAAG,GAAA;AAAA,IACpC,CAAC,UAAA,CAAW,GAAA,CAAI,QAAQ,GAAG;AAAA,GAC/B;AAEA,EAAA,OAAO,QAAA,CAAS,OAAO,CAAA,IAAK,GAAA;AAChC","file":"index.js","sourcesContent":["// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { errorCodes } from '@metamask/rpc-errors'\n\nexport { rpcErrors, providerErrors, JsonRpcError } from '@metamask/rpc-errors'\n\nexport const toHttpErrorCode = (rpcCode: number): number => {\n const errorMap = {\n [errorCodes.rpc.parse]: 400,\n [errorCodes.rpc.invalidRequest]: 400,\n [errorCodes.rpc.methodNotFound]: 404,\n [errorCodes.rpc.invalidParams]: 400,\n [errorCodes.rpc.invalidInput]: 400,\n [errorCodes.provider.unauthorized]: 401,\n [errorCodes.rpc.internal]: 500,\n }\n\n return errorMap[rpcCode] || 500\n}\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;AAOO,IAAM,eAAA,GAAkB,CAAC,OAAA,KAA4B;AACxD,EAAA,MAAM,QAAA,GAAW;AAAA,IACb,CAAC,UAAA,CAAW,GAAA,CAAI,KAAK,GAAG,GAAA;AAAA,IACxB,CAAC,UAAA,CAAW,GAAA,CAAI,cAAc,GAAG,GAAA;AAAA,IACjC,CAAC,UAAA,CAAW,GAAA,CAAI,cAAc,GAAG,GAAA;AAAA,IACjC,CAAC,UAAA,CAAW,GAAA,CAAI,aAAa,GAAG,GAAA;AAAA,IAChC,CAAC,UAAA,CAAW,GAAA,CAAI,YAAY,GAAG,GAAA;AAAA,IAC/B,CAAC,UAAA,CAAW,QAAA,CAAS,YAAY,GAAG,GAAA;AAAA,IACpC,CAAC,UAAA,CAAW,GAAA,CAAI,QAAQ,GAAG;AAAA,GAC/B;AAEA,EAAA,OAAO,QAAA,CAAS,OAAO,CAAA,IAAK,GAAA;AAChC","file":"index.js","sourcesContent":["// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { errorCodes } from '@metamask/rpc-errors'\n\nexport { rpcErrors, providerErrors, JsonRpcError } from '@metamask/rpc-errors'\n\nexport const toHttpErrorCode = (rpcCode: number): number => {\n const errorMap = {\n [errorCodes.rpc.parse]: 400,\n [errorCodes.rpc.invalidRequest]: 400,\n [errorCodes.rpc.methodNotFound]: 404,\n [errorCodes.rpc.invalidParams]: 400,\n [errorCodes.rpc.invalidInput]: 400,\n [errorCodes.provider.unauthorized]: 401,\n [errorCodes.rpc.internal]: 500,\n }\n\n return errorMap[rpcCode] || 500\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canton-network/core-rpc-errors",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "type": "module",
5
5
  "description": "Wrapper for JSON-RPC error objects",
6
6
  "author": "Alex Matson <alex.matson@digitalasset.com>",