@canton-network/core-rpc-errors 1.14.0 → 1.16.0
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.
- package/dist/index.cjs +1 -2
- package/dist/index.js +1 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let _metamask_rpc_errors = require("@metamask/rpc-errors");
|
|
3
|
-
|
|
3
|
+
// src/index.ts
|
|
4
4
|
/** The EIP-1193 and EIP-1474 codes adopted by CIP-103, see https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md */
|
|
5
5
|
const CIP103_ERROR_CODES = /* @__PURE__ */ new Set([...Object.values(_metamask_rpc_errors.errorCodes.rpc), ...Object.values(_metamask_rpc_errors.errorCodes.provider)]);
|
|
6
6
|
function isCip103ErrorCode(code) {
|
|
@@ -37,7 +37,6 @@ const toHttpErrorCode = (rpcCode) => {
|
|
|
37
37
|
[_metamask_rpc_errors.errorCodes.rpc.resourceUnavailable]: 503
|
|
38
38
|
}[rpcCode] || 500;
|
|
39
39
|
};
|
|
40
|
-
//#endregion
|
|
41
40
|
Object.defineProperty(exports, "JsonRpcError", {
|
|
42
41
|
enumerable: true,
|
|
43
42
|
get: function() {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonRpcError, JsonRpcError as JsonRpcError$1, errorCodes, errorCodes as errorCodes$1, getMessageFromCode, getMessageFromCode as getMessageFromCode$1, providerErrors, rpcErrors, serializeError } from "@metamask/rpc-errors";
|
|
2
|
-
|
|
2
|
+
// src/index.ts
|
|
3
3
|
/** The EIP-1193 and EIP-1474 codes adopted by CIP-103, see https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md */
|
|
4
4
|
const CIP103_ERROR_CODES = /* @__PURE__ */ new Set([...Object.values(errorCodes$1.rpc), ...Object.values(errorCodes$1.provider)]);
|
|
5
5
|
function isCip103ErrorCode(code) {
|
|
@@ -36,7 +36,6 @@ const toHttpErrorCode = (rpcCode) => {
|
|
|
36
36
|
[errorCodes$1.rpc.resourceUnavailable]: 503
|
|
37
37
|
}[rpcCode] || 500;
|
|
38
38
|
};
|
|
39
|
-
//#endregion
|
|
40
39
|
export { JsonRpcError, errorCodes, getMessageFromCode, isCip103ErrorCode, providerErrors, rpcErrors, toHttpErrorCode, toJsonRpcError };
|
|
41
40
|
|
|
42
41
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canton-network/core-rpc-errors",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Wrapper for JSON-RPC error objects",
|
|
6
6
|
"author": "Alex Matson <alex.matson@digitalasset.com>",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@vitest/coverage-v8": "^5.0.5",
|
|
31
|
-
"tsdown": "^0.23.
|
|
31
|
+
"tsdown": "^0.23.4",
|
|
32
32
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
33
33
|
"vitest": "^5.0.5"
|
|
34
34
|
},
|