UNPKG

@nervosnetwork/ckb-sdk-utils

Version:

Utils module of @nervosnetwork/ckb-sdk-core

24 lines 878 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HexStringWithout0xException = exports.HexStringException = void 0; const tslib_1 = require("tslib"); const ErrorCode_js_1 = (0, tslib_1.__importDefault)(require("./ErrorCode.js")); class HexStringException extends Error { constructor(hex) { super(`${hex} is an invalid hex string`); this.code = ErrorCode_js_1.default.ParameterInvalid; } } exports.HexStringException = HexStringException; class HexStringWithout0xException extends Error { constructor(hex) { super(`Hex string ${hex} should start with 0x`); this.code = ErrorCode_js_1.default.ParameterInvalid; } } exports.HexStringWithout0xException = HexStringWithout0xException; exports.default = { HexStringException, HexStringWithout0xException, }; //# sourceMappingURL=string.js.map