web3-errors
Advanced tools
Comparing version 1.1.5-dev.ab1b250.0 to 1.1.5-dev.ac2e180.0
@@ -113,2 +113,3 @@ export declare const ERR_RESPONSE = 100; | ||
export declare const ERR_INVALID_NIBBLE_WIDTH = 1014; | ||
export declare const ERR_INVALID_INTEGER = 1015; | ||
export declare const ERR_VALIDATION = 1100; | ||
@@ -115,0 +116,0 @@ export declare const ERR_CORE_HARDFORK_MISMATCH = 1101; |
@@ -21,3 +21,3 @@ "use strict"; | ||
exports.ERR_INVALID_BYTES = exports.ERR_INVALID_STRING = exports.ERR_ENS_NETWORK_NOT_SYNCED = exports.ERR_ENS_UNSUPPORTED_NETWORK = exports.ERR_ENS_CHECK_INTERFACE_SUPPORT = exports.JSONRPC_ERR_CHAIN_DISCONNECTED = exports.JSONRPC_ERR_DISCONNECTED = exports.JSONRPC_ERR_UNSUPPORTED_METHOD = exports.JSONRPC_ERR_UNAUTHORIZED = exports.JSONRPC_ERR_REJECTED_REQUEST = exports.GENESIS_BLOCK_NUMBER = exports.ERR_INVALID_SIGNATURE = exports.ERR_SIGNATURE_FAILED = exports.ERR_PBKDF2_ITERATIONS = exports.ERR_INVALID_KEYSTORE = exports.ERR_IV_LENGTH = exports.ERR_INVALID_PASSWORD = exports.ERR_KEY_VERSION_UNSUPPORTED = exports.ERR_KEY_DERIVATION_FAIL = exports.ERR_UNSUPPORTED_KDF = exports.ERR_INVALID_PRIVATE_KEY = exports.ERR_PRIVATE_KEY_LENGTH = exports.ERR_WS_PROVIDER = exports.ERR_SUBSCRIPTION = exports.ERR_INVALID_CLIENT = exports.ERR_INVALID_PROVIDER = exports.ERR_PROVIDER = exports.ERR_REQ_ALREADY_SENT = exports.ERR_CONN_PENDING_REQUESTS = exports.ERR_CONN_MAX_ATTEMPTS = exports.ERR_CONN_CLOSE = exports.ERR_CONN_NOT_OPEN = exports.ERR_CONN_TIMEOUT = exports.ERR_CONN_INVALID = exports.ERR_CONN = exports.ERR_TX_GAS_MISMATCH_INNER_ERROR = exports.ERR_TX_MISSING_GAS_INNER_ERROR = exports.ERR_TX_INVALID_PROPERTIES_FOR_TYPE = exports.ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR = exports.ERR_TX_INVALID_RECEIVER = exports.ERR_TX_HARDFORK_MISMATCH = exports.ERR_TX_CHAIN_MISMATCH = exports.ERR_TX_GAS_MISMATCH = exports.ERR_TX_SIGNING = exports.ERR_TX_BLOCK_TIMEOUT = exports.ERR_TX_SEND_TIMEOUT = exports.ERR_TX_NOT_FOUND = exports.ERR_TX_LOCAL_WALLET_NOT_AVAILABLE = exports.ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER = exports.ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL = void 0; | ||
exports.ERR_RPC_NOT_SUPPORTED = exports.ERR_RPC_LIMIT_EXCEEDED = exports.ERR_RPC_UNSUPPORTED_METHOD = exports.ERR_RPC_TRANSACTION_REJECTED = exports.ERR_RPC_UNAVAILABLE_RESOURCE = exports.ERR_RPC_MISSING_RESOURCE = exports.ERR_RPC_INVALID_INPUT = exports.ERR_RPC_INTERNAL_ERROR = exports.ERR_RPC_INVALID_PARAMS = exports.ERR_RPC_INVALID_METHOD = exports.ERR_RPC_INVALID_REQUEST = exports.ERR_RPC_INVALID_JSON = exports.ERR_SCHEMA_FORMAT = exports.ERR_CORE_CHAIN_MISMATCH = exports.ERR_CORE_HARDFORK_MISMATCH = exports.ERR_VALIDATION = exports.ERR_INVALID_NIBBLE_WIDTH = exports.ERR_INVALID_TYPE_ABI = exports.ERR_INVALID_BLOCK = exports.ERR_INVALID_LARGE_VALUE = exports.ERR_INVALID_SIZE = exports.ERR_INVALID_UNSIGNED_INTEGER = exports.ERR_INVALID_BOOLEAN = exports.ERR_INVALID_TYPE = exports.ERR_INVALID_HEX = exports.ERR_INVALID_ADDRESS = exports.ERR_INVALID_UNIT = exports.ERR_INVALID_NUMBER = void 0; | ||
exports.ERR_RPC_NOT_SUPPORTED = exports.ERR_RPC_LIMIT_EXCEEDED = exports.ERR_RPC_UNSUPPORTED_METHOD = exports.ERR_RPC_TRANSACTION_REJECTED = exports.ERR_RPC_UNAVAILABLE_RESOURCE = exports.ERR_RPC_MISSING_RESOURCE = exports.ERR_RPC_INVALID_INPUT = exports.ERR_RPC_INTERNAL_ERROR = exports.ERR_RPC_INVALID_PARAMS = exports.ERR_RPC_INVALID_METHOD = exports.ERR_RPC_INVALID_REQUEST = exports.ERR_RPC_INVALID_JSON = exports.ERR_SCHEMA_FORMAT = exports.ERR_CORE_CHAIN_MISMATCH = exports.ERR_CORE_HARDFORK_MISMATCH = exports.ERR_VALIDATION = exports.ERR_INVALID_INTEGER = exports.ERR_INVALID_NIBBLE_WIDTH = exports.ERR_INVALID_TYPE_ABI = exports.ERR_INVALID_BLOCK = exports.ERR_INVALID_LARGE_VALUE = exports.ERR_INVALID_SIZE = exports.ERR_INVALID_UNSIGNED_INTEGER = exports.ERR_INVALID_BOOLEAN = exports.ERR_INVALID_TYPE = exports.ERR_INVALID_HEX = exports.ERR_INVALID_ADDRESS = exports.ERR_INVALID_UNIT = exports.ERR_INVALID_NUMBER = void 0; | ||
// Response error | ||
@@ -147,2 +147,3 @@ exports.ERR_RESPONSE = 100; | ||
exports.ERR_INVALID_NIBBLE_WIDTH = 1014; | ||
exports.ERR_INVALID_INTEGER = 1015; | ||
// Validation error codes | ||
@@ -149,0 +150,0 @@ exports.ERR_VALIDATION = 1100; |
@@ -22,2 +22,6 @@ import { InvalidValueError } from '../web3_error_base.js'; | ||
} | ||
export declare class InvalidIntegerError extends InvalidValueError { | ||
code: number; | ||
constructor(value: unknown); | ||
} | ||
export declare class HexProcessingError extends InvalidValueError { | ||
@@ -24,0 +28,0 @@ code: number; |
@@ -19,3 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.InvalidTypeAbiInputError = exports.InvalidBlockError = exports.InvalidLargeValueError = exports.InvalidSizeError = exports.InvalidUnsignedIntegerError = exports.InvalidBooleanError = exports.InvalidTypeError = exports.NibbleWidthError = exports.HexProcessingError = exports.InvalidUnitError = exports.InvalidStringError = exports.InvalidAddressError = exports.InvalidNumberError = exports.InvalidBytesError = void 0; | ||
exports.InvalidTypeAbiInputError = exports.InvalidBlockError = exports.InvalidLargeValueError = exports.InvalidSizeError = exports.InvalidUnsignedIntegerError = exports.InvalidBooleanError = exports.InvalidTypeError = exports.NibbleWidthError = exports.HexProcessingError = exports.InvalidIntegerError = exports.InvalidUnitError = exports.InvalidStringError = exports.InvalidAddressError = exports.InvalidNumberError = exports.InvalidBytesError = void 0; | ||
/* eslint-disable max-classes-per-file */ | ||
@@ -59,2 +59,9 @@ const error_codes_js_1 = require("../error_codes.js"); | ||
exports.InvalidUnitError = InvalidUnitError; | ||
class InvalidIntegerError extends web3_error_base_js_1.InvalidValueError { | ||
constructor(value) { | ||
super(value, 'not a valid unit. Must be a positive integer'); | ||
this.code = error_codes_js_1.ERR_INVALID_INTEGER; | ||
} | ||
} | ||
exports.InvalidIntegerError = InvalidIntegerError; | ||
class HexProcessingError extends web3_error_base_js_1.InvalidValueError { | ||
@@ -61,0 +68,0 @@ constructor(value) { |
@@ -141,2 +141,3 @@ /* | ||
export const ERR_INVALID_NIBBLE_WIDTH = 1014; | ||
export const ERR_INVALID_INTEGER = 1015; | ||
// Validation error codes | ||
@@ -143,0 +144,0 @@ export const ERR_VALIDATION = 1100; |
@@ -18,3 +18,3 @@ /* | ||
/* eslint-disable max-classes-per-file */ | ||
import { ERR_INVALID_BYTES, ERR_INVALID_NUMBER, ERR_INVALID_ADDRESS, ERR_INVALID_BLOCK, ERR_INVALID_BOOLEAN, ERR_INVALID_HEX, ERR_INVALID_LARGE_VALUE, ERR_INVALID_NIBBLE_WIDTH, ERR_INVALID_SIZE, ERR_INVALID_STRING, ERR_INVALID_TYPE, ERR_INVALID_TYPE_ABI, ERR_INVALID_UNIT, ERR_INVALID_UNSIGNED_INTEGER, } from '../error_codes.js'; | ||
import { ERR_INVALID_BYTES, ERR_INVALID_NUMBER, ERR_INVALID_ADDRESS, ERR_INVALID_BLOCK, ERR_INVALID_BOOLEAN, ERR_INVALID_HEX, ERR_INVALID_LARGE_VALUE, ERR_INVALID_NIBBLE_WIDTH, ERR_INVALID_SIZE, ERR_INVALID_STRING, ERR_INVALID_TYPE, ERR_INVALID_TYPE_ABI, ERR_INVALID_UNIT, ERR_INVALID_INTEGER, ERR_INVALID_UNSIGNED_INTEGER, } from '../error_codes.js'; | ||
import { InvalidValueError } from '../web3_error_base.js'; | ||
@@ -51,2 +51,8 @@ export class InvalidBytesError extends InvalidValueError { | ||
} | ||
export class InvalidIntegerError extends InvalidValueError { | ||
constructor(value) { | ||
super(value, 'not a valid unit. Must be a positive integer'); | ||
this.code = ERR_INVALID_INTEGER; | ||
} | ||
} | ||
export class HexProcessingError extends InvalidValueError { | ||
@@ -53,0 +59,0 @@ constructor(value) { |
@@ -113,2 +113,3 @@ export declare const ERR_RESPONSE = 100; | ||
export declare const ERR_INVALID_NIBBLE_WIDTH = 1014; | ||
export declare const ERR_INVALID_INTEGER = 1015; | ||
export declare const ERR_VALIDATION = 1100; | ||
@@ -115,0 +116,0 @@ export declare const ERR_CORE_HARDFORK_MISMATCH = 1101; |
@@ -22,2 +22,6 @@ import { InvalidValueError } from '../web3_error_base.js'; | ||
} | ||
export declare class InvalidIntegerError extends InvalidValueError { | ||
code: number; | ||
constructor(value: unknown); | ||
} | ||
export declare class HexProcessingError extends InvalidValueError { | ||
@@ -24,0 +28,0 @@ code: number; |
{ | ||
"name": "web3-errors", | ||
"version": "1.1.5-dev.ab1b250.0+ab1b250", | ||
"version": "1.1.5-dev.ac2e180.0+ac2e180", | ||
"description": "This package has web3 error classes", | ||
@@ -33,3 +33,3 @@ "main": "./lib/commonjs/index.js", | ||
"build:check": "node -e \"require('./lib')\"", | ||
"lint": "eslint --ext .js,.ts .", | ||
"lint": "eslint --cache --cache-strategy content --ext .ts .", | ||
"lint:fix": "eslint --fix --ext .js,.ts .", | ||
@@ -45,3 +45,3 @@ "format": "prettier --write '**/*'", | ||
"dependencies": { | ||
"web3-types": "1.4.1-dev.ab1b250.0+ab1b250" | ||
"web3-types": "1.6.1-dev.ac2e180.0+ac2e180" | ||
}, | ||
@@ -62,3 +62,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "ab1b250624504bff46cfce4bdc87b77c160528ec" | ||
"gitHead": "ac2e180c3db5e734c40f994edc39382542afc289" | ||
} |
@@ -158,2 +158,3 @@ /* | ||
export const ERR_INVALID_NIBBLE_WIDTH = 1014; | ||
export const ERR_INVALID_INTEGER = 1015; | ||
@@ -160,0 +161,0 @@ // Validation error codes |
@@ -34,2 +34,3 @@ /* | ||
ERR_INVALID_UNIT, | ||
ERR_INVALID_INTEGER, | ||
ERR_INVALID_UNSIGNED_INTEGER, | ||
@@ -79,2 +80,11 @@ } from '../error_codes.js'; | ||
export class InvalidIntegerError extends InvalidValueError { | ||
public code = ERR_INVALID_INTEGER; | ||
public constructor(value: unknown) { | ||
super(value, 'not a valid unit. Must be a positive integer'); | ||
} | ||
} | ||
export class HexProcessingError extends InvalidValueError { | ||
@@ -81,0 +91,0 @@ public code = ERR_INVALID_HEX; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
415704
7450