UNPKG

alchemy-sdk

Version:
728 lines (719 loc) 30.2 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var hash = require('@ethersproject/hash'); var bytes = require('@ethersproject/bytes'); var units = require('@ethersproject/units'); require('@ethersproject/bignumber'); var abi = require('@ethersproject/abi'); const version$1 = "logger/5.7.0"; let _permanentCensorErrors = false; let _censorErrors = false; const LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 }; let _logLevel = LogLevels["default"]; let _globalLogger = null; function _checkNormalize() { try { const missing = []; // Make sure all forms of normalization are supported ["NFD", "NFC", "NFKD", "NFKC"].forEach((form) => { try { if ("test".normalize(form) !== "test") { throw new Error("bad normalize"); } ; } catch (error) { missing.push(form); } }); if (missing.length) { throw new Error("missing " + missing.join(", ")); } if (String.fromCharCode(0xe9).normalize("NFD") !== String.fromCharCode(0x65, 0x0301)) { throw new Error("broken implementation"); } } catch (error) { return error.message; } return null; } const _normalizeError = _checkNormalize(); var LogLevel; (function (LogLevel) { LogLevel["DEBUG"] = "DEBUG"; LogLevel["INFO"] = "INFO"; LogLevel["WARNING"] = "WARNING"; LogLevel["ERROR"] = "ERROR"; LogLevel["OFF"] = "OFF"; })(LogLevel || (LogLevel = {})); var ErrorCode; (function (ErrorCode) { /////////////////// // Generic Errors // Unknown Error ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR"; // Not Implemented ErrorCode["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED"; // Unsupported Operation // - operation ErrorCode["UNSUPPORTED_OPERATION"] = "UNSUPPORTED_OPERATION"; // Network Error (i.e. Ethereum Network, such as an invalid chain ID) // - event ("noNetwork" is not re-thrown in provider.ready; otherwise thrown) ErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR"; // Some sort of bad response from the server ErrorCode["SERVER_ERROR"] = "SERVER_ERROR"; // Timeout ErrorCode["TIMEOUT"] = "TIMEOUT"; /////////////////// // Operational Errors // Buffer Overrun ErrorCode["BUFFER_OVERRUN"] = "BUFFER_OVERRUN"; // Numeric Fault // - operation: the operation being executed // - fault: the reason this faulted ErrorCode["NUMERIC_FAULT"] = "NUMERIC_FAULT"; /////////////////// // Argument Errors // Missing new operator to an object // - name: The name of the class ErrorCode["MISSING_NEW"] = "MISSING_NEW"; // Invalid argument (e.g. value is incompatible with type) to a function: // - argument: The argument name that was invalid // - value: The value of the argument ErrorCode["INVALID_ARGUMENT"] = "INVALID_ARGUMENT"; // Missing argument to a function: // - count: The number of arguments received // - expectedCount: The number of arguments expected ErrorCode["MISSING_ARGUMENT"] = "MISSING_ARGUMENT"; // Too many arguments // - count: The number of arguments received // - expectedCount: The number of arguments expected ErrorCode["UNEXPECTED_ARGUMENT"] = "UNEXPECTED_ARGUMENT"; /////////////////// // Blockchain Errors // Call exception // - transaction: the transaction // - address?: the contract address // - args?: The arguments passed into the function // - method?: The Solidity method signature // - errorSignature?: The EIP848 error signature // - errorArgs?: The EIP848 error parameters // - reason: The reason (only for EIP848 "Error(string)") ErrorCode["CALL_EXCEPTION"] = "CALL_EXCEPTION"; // Insufficient funds (< value + gasLimit * gasPrice) // - transaction: the transaction attempted ErrorCode["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS"; // Nonce has already been used // - transaction: the transaction attempted ErrorCode["NONCE_EXPIRED"] = "NONCE_EXPIRED"; // The replacement fee for the transaction is too low // - transaction: the transaction attempted ErrorCode["REPLACEMENT_UNDERPRICED"] = "REPLACEMENT_UNDERPRICED"; // The gas limit could not be estimated // - transaction: the transaction passed to estimateGas ErrorCode["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT"; // The transaction was replaced by one with a higher gas price // - reason: "cancelled", "replaced" or "repriced" // - cancelled: true if reason == "cancelled" or reason == "replaced") // - hash: original transaction hash // - replacement: the full TransactionsResponse for the replacement // - receipt: the receipt of the replacement ErrorCode["TRANSACTION_REPLACED"] = "TRANSACTION_REPLACED"; /////////////////// // Interaction Errors // The user rejected the action, such as signing a message or sending // a transaction ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; })(ErrorCode || (ErrorCode = {})); const HEX = "0123456789abcdef"; class Logger { constructor(version) { Object.defineProperty(this, "version", { enumerable: true, value: version, writable: false }); } _log(logLevel, args) { const level = logLevel.toLowerCase(); if (LogLevels[level] == null) { this.throwArgumentError("invalid log level name", "logLevel", logLevel); } if (_logLevel > LogLevels[level]) { return; } console.log.apply(console, args); } debug(...args) { this._log(Logger.levels.DEBUG, args); } info(...args) { this._log(Logger.levels.INFO, args); } warn(...args) { this._log(Logger.levels.WARNING, args); } makeError(message, code, params) { // Errors are being censored if (_censorErrors) { return this.makeError("censored error", code, {}); } if (!code) { code = Logger.errors.UNKNOWN_ERROR; } if (!params) { params = {}; } const messageDetails = []; Object.keys(params).forEach((key) => { const value = params[key]; try { if (value instanceof Uint8Array) { let hex = ""; for (let i = 0; i < value.length; i++) { hex += HEX[value[i] >> 4]; hex += HEX[value[i] & 0x0f]; } messageDetails.push(key + "=Uint8Array(0x" + hex + ")"); } else { messageDetails.push(key + "=" + JSON.stringify(value)); } } catch (error) { messageDetails.push(key + "=" + JSON.stringify(params[key].toString())); } }); messageDetails.push(`code=${code}`); messageDetails.push(`version=${this.version}`); const reason = message; let url = ""; switch (code) { case ErrorCode.NUMERIC_FAULT: { url = "NUMERIC_FAULT"; const fault = message; switch (fault) { case "overflow": case "underflow": case "division-by-zero": url += "-" + fault; break; case "negative-power": case "negative-width": url += "-unsupported"; break; case "unbound-bitwise-result": url += "-unbound-result"; break; } break; } case ErrorCode.CALL_EXCEPTION: case ErrorCode.INSUFFICIENT_FUNDS: case ErrorCode.MISSING_NEW: case ErrorCode.NONCE_EXPIRED: case ErrorCode.REPLACEMENT_UNDERPRICED: case ErrorCode.TRANSACTION_REPLACED: case ErrorCode.UNPREDICTABLE_GAS_LIMIT: url = code; break; } if (url) { message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; } if (messageDetails.length) { message += " (" + messageDetails.join(", ") + ")"; } // @TODO: Any?? const error = new Error(message); error.reason = reason; error.code = code; Object.keys(params).forEach(function (key) { error[key] = params[key]; }); return error; } throwError(message, code, params) { throw this.makeError(message, code, params); } throwArgumentError(message, name, value) { return this.throwError(message, Logger.errors.INVALID_ARGUMENT, { argument: name, value: value }); } assert(condition, message, code, params) { if (!!condition) { return; } this.throwError(message, code, params); } assertArgument(condition, message, name, value) { if (!!condition) { return; } this.throwArgumentError(message, name, value); } checkNormalize(message) { if (_normalizeError) { this.throwError("platform missing String.prototype.normalize", Logger.errors.UNSUPPORTED_OPERATION, { operation: "String.prototype.normalize", form: _normalizeError }); } } checkSafeUint53(value, message) { if (typeof (value) !== "number") { return; } if (message == null) { message = "value not safe"; } if (value < 0 || value >= 0x1fffffffffffff) { this.throwError(message, Logger.errors.NUMERIC_FAULT, { operation: "checkSafeInteger", fault: "out-of-safe-range", value: value }); } if (value % 1) { this.throwError(message, Logger.errors.NUMERIC_FAULT, { operation: "checkSafeInteger", fault: "non-integer", value: value }); } } checkArgumentCount(count, expectedCount, message) { if (message) { message = ": " + message; } else { message = ""; } if (count < expectedCount) { this.throwError("missing argument" + message, Logger.errors.MISSING_ARGUMENT, { count: count, expectedCount: expectedCount }); } if (count > expectedCount) { this.throwError("too many arguments" + message, Logger.errors.UNEXPECTED_ARGUMENT, { count: count, expectedCount: expectedCount }); } } checkNew(target, kind) { if (target === Object || target == null) { this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); } } checkAbstract(target, kind) { if (target === kind) { this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" }); } else if (target === Object || target == null) { this.throwError("missing new", Logger.errors.MISSING_NEW, { name: kind.name }); } } static globalLogger() { if (!_globalLogger) { _globalLogger = new Logger(version$1); } return _globalLogger; } static setCensorship(censorship, permanent) { if (!censorship && permanent) { this.globalLogger().throwError("cannot permanently disable censorship", Logger.errors.UNSUPPORTED_OPERATION, { operation: "setCensorship" }); } if (_permanentCensorErrors) { if (!censorship) { return; } this.globalLogger().throwError("error censorship permanent", Logger.errors.UNSUPPORTED_OPERATION, { operation: "setCensorship" }); } _censorErrors = !!censorship; _permanentCensorErrors = !!permanent; } static setLogLevel(logLevel) { const level = LogLevels[logLevel.toLowerCase()]; if (level == null) { Logger.globalLogger().warn("invalid log level - " + logLevel); return; } _logLevel = level; } static from(version) { return new Logger(version); } } Logger.errors = ErrorCode; Logger.levels = LogLevel; const version = "strings/5.7.0"; const logger = new Logger(version); /////////////////////////////// var UnicodeNormalizationForm; (function (UnicodeNormalizationForm) { UnicodeNormalizationForm["current"] = ""; UnicodeNormalizationForm["NFC"] = "NFC"; UnicodeNormalizationForm["NFD"] = "NFD"; UnicodeNormalizationForm["NFKC"] = "NFKC"; UnicodeNormalizationForm["NFKD"] = "NFKD"; })(UnicodeNormalizationForm || (UnicodeNormalizationForm = {})); var Utf8ErrorReason; (function (Utf8ErrorReason) { // A continuation byte was present where there was nothing to continue // - offset = the index the codepoint began in Utf8ErrorReason["UNEXPECTED_CONTINUE"] = "unexpected continuation byte"; // An invalid (non-continuation) byte to start a UTF-8 codepoint was found // - offset = the index the codepoint began in Utf8ErrorReason["BAD_PREFIX"] = "bad codepoint prefix"; // The string is too short to process the expected codepoint // - offset = the index the codepoint began in Utf8ErrorReason["OVERRUN"] = "string overrun"; // A missing continuation byte was expected but not found // - offset = the index the continuation byte was expected at Utf8ErrorReason["MISSING_CONTINUE"] = "missing continuation byte"; // The computed code point is outside the range for UTF-8 // - offset = start of this codepoint // - badCodepoint = the computed codepoint; outside the UTF-8 range Utf8ErrorReason["OUT_OF_RANGE"] = "out of UTF-8 range"; // UTF-8 strings may not contain UTF-16 surrogate pairs // - offset = start of this codepoint // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range Utf8ErrorReason["UTF16_SURROGATE"] = "UTF-16 surrogate"; // The string is an overlong representation // - offset = start of this codepoint // - badCodepoint = the computed codepoint; already bounds checked Utf8ErrorReason["OVERLONG"] = "overlong representation"; })(Utf8ErrorReason || (Utf8ErrorReason = {})); function errorFunc(reason, offset, bytes, output, badCodepoint) { return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, "bytes", bytes); } function ignoreFunc(reason, offset, bytes, output, badCodepoint) { // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) { let i = 0; for (let o = offset + 1; o < bytes.length; o++) { if (bytes[o] >> 6 !== 0x02) { break; } i++; } return i; } // This byte runs us past the end of the string, so just jump to the end // (but the first byte was read already read and therefore skipped) if (reason === Utf8ErrorReason.OVERRUN) { return bytes.length - offset - 1; } // Nothing to skip return 0; } function replaceFunc(reason, offset, bytes, output, badCodepoint) { // Overlong representations are otherwise "valid" code points; just non-deistingtished if (reason === Utf8ErrorReason.OVERLONG) { output.push(badCodepoint); return 0; } // Put the replacement character into the output output.push(0xfffd); // Otherwise, process as if ignoring errors return ignoreFunc(reason, offset, bytes); } // Common error handing strategies const Utf8ErrorFuncs = Object.freeze({ error: errorFunc, ignore: ignoreFunc, replace: replaceFunc }); // http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499 function getUtf8CodePoints(bytes$1, onError) { if (onError == null) { onError = Utf8ErrorFuncs.error; } bytes$1 = bytes.arrayify(bytes$1); const result = []; let i = 0; // Invalid bytes are ignored while (i < bytes$1.length) { const c = bytes$1[i++]; // 0xxx xxxx if (c >> 7 === 0) { result.push(c); continue; } // Multibyte; how many bytes left for this character? let extraLength = null; let overlongMask = null; // 110x xxxx 10xx xxxx if ((c & 0xe0) === 0xc0) { extraLength = 1; overlongMask = 0x7f; // 1110 xxxx 10xx xxxx 10xx xxxx } else if ((c & 0xf0) === 0xe0) { extraLength = 2; overlongMask = 0x7ff; // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx } else if ((c & 0xf8) === 0xf0) { extraLength = 3; overlongMask = 0xffff; } else { if ((c & 0xc0) === 0x80) { i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes$1, result); } else { i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes$1, result); } continue; } // Do we have enough bytes in our data? if (i - 1 + extraLength >= bytes$1.length) { i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes$1, result); continue; } // Remove the length prefix from the char let res = c & ((1 << (8 - extraLength - 1)) - 1); for (let j = 0; j < extraLength; j++) { let nextChar = bytes$1[i]; // Invalid continuation byte if ((nextChar & 0xc0) != 0x80) { i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes$1, result); res = null; break; } res = (res << 6) | (nextChar & 0x3f); i++; } // See above loop for invalid continuation byte if (res === null) { continue; } // Maximum code point if (res > 0x10ffff) { i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes$1, result, res); continue; } // Reserved for UTF-16 surrogate halves if (res >= 0xd800 && res <= 0xdfff) { i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes$1, result, res); continue; } // Check for overlong sequences (more bytes than needed) if (res <= overlongMask) { i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes$1, result, res); continue; } result.push(res); } return result; } // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) { if (form != UnicodeNormalizationForm.current) { logger.checkNormalize(); str = str.normalize(form); } let result = []; for (let i = 0; i < str.length; i++) { const c = str.charCodeAt(i); if (c < 0x80) { result.push(c); } else if (c < 0x800) { result.push((c >> 6) | 0xc0); result.push((c & 0x3f) | 0x80); } else if ((c & 0xfc00) == 0xd800) { i++; const c2 = str.charCodeAt(i); if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) { throw new Error("invalid utf-8 string"); } // Surrogate Pair const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); result.push((pair >> 18) | 0xf0); result.push(((pair >> 12) & 0x3f) | 0x80); result.push(((pair >> 6) & 0x3f) | 0x80); result.push((pair & 0x3f) | 0x80); } else { result.push((c >> 12) | 0xe0); result.push(((c >> 6) & 0x3f) | 0x80); result.push((c & 0x3f) | 0x80); } } return bytes.arrayify(result); } function _toUtf8String(codePoints) { return codePoints.map((codePoint) => { if (codePoint <= 0xffff) { return String.fromCharCode(codePoint); } codePoint -= 0x10000; return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00)); }).join(""); } function toUtf8String(bytes, onError) { return _toUtf8String(getUtf8CodePoints(bytes, onError)); } function bytes2(data) { if ((data.length % 4) !== 0) { throw new Error("bad data"); } let result = []; for (let i = 0; i < data.length; i += 4) { result.push(parseInt(data.substring(i, i + 4), 16)); } return result; } function createTable(data, func) { if (!func) { func = function (value) { return [parseInt(value, 16)]; }; } let lo = 0; let result = {}; data.split(",").forEach((pair) => { let comps = pair.split(":"); lo += parseInt(comps[0], 16); result[lo] = func(comps[1]); }); return result; } function createRangeTable(data) { let hi = 0; return data.split(",").map((v) => { let comps = v.split("-"); if (comps.length === 1) { comps[1] = "0"; } else if (comps[1] === "") { comps[1] = "1"; } let lo = hi + parseInt(comps[0], 16); hi = parseInt(comps[1], 16); return { l: lo, h: hi }; }); } createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"); // @TODO: Make this relative... "ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((v) => parseInt(v, 16)); createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"); createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"); createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D", bytes2); createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001"); Object.defineProperty(exports, 'dnsEncode', { enumerable: true, get: function () { return hash.dnsEncode; } }); Object.defineProperty(exports, 'hashMessage', { enumerable: true, get: function () { return hash.hashMessage; } }); Object.defineProperty(exports, 'id', { enumerable: true, get: function () { return hash.id; } }); Object.defineProperty(exports, 'isValidName', { enumerable: true, get: function () { return hash.isValidName; } }); Object.defineProperty(exports, 'namehash', { enumerable: true, get: function () { return hash.namehash; } }); Object.defineProperty(exports, 'arrayify', { enumerable: true, get: function () { return bytes.arrayify; } }); Object.defineProperty(exports, 'concat', { enumerable: true, get: function () { return bytes.concat; } }); Object.defineProperty(exports, 'hexConcat', { enumerable: true, get: function () { return bytes.hexConcat; } }); Object.defineProperty(exports, 'hexDataLength', { enumerable: true, get: function () { return bytes.hexDataLength; } }); Object.defineProperty(exports, 'hexDataSlice', { enumerable: true, get: function () { return bytes.hexDataSlice; } }); Object.defineProperty(exports, 'hexStripZeros', { enumerable: true, get: function () { return bytes.hexStripZeros; } }); Object.defineProperty(exports, 'hexValue', { enumerable: true, get: function () { return bytes.hexValue; } }); Object.defineProperty(exports, 'hexZeroPad', { enumerable: true, get: function () { return bytes.hexZeroPad; } }); Object.defineProperty(exports, 'hexlify', { enumerable: true, get: function () { return bytes.hexlify; } }); Object.defineProperty(exports, 'isBytes', { enumerable: true, get: function () { return bytes.isBytes; } }); Object.defineProperty(exports, 'isBytesLike', { enumerable: true, get: function () { return bytes.isBytesLike; } }); Object.defineProperty(exports, 'isHexString', { enumerable: true, get: function () { return bytes.isHexString; } }); Object.defineProperty(exports, 'joinSignature', { enumerable: true, get: function () { return bytes.joinSignature; } }); Object.defineProperty(exports, 'splitSignature', { enumerable: true, get: function () { return bytes.splitSignature; } }); Object.defineProperty(exports, 'stripZeros', { enumerable: true, get: function () { return bytes.stripZeros; } }); Object.defineProperty(exports, 'zeroPad', { enumerable: true, get: function () { return bytes.zeroPad; } }); Object.defineProperty(exports, 'formatEther', { enumerable: true, get: function () { return units.formatEther; } }); Object.defineProperty(exports, 'formatUnits', { enumerable: true, get: function () { return units.formatUnits; } }); Object.defineProperty(exports, 'parseEther', { enumerable: true, get: function () { return units.parseEther; } }); Object.defineProperty(exports, 'parseUnits', { enumerable: true, get: function () { return units.parseUnits; } }); Object.defineProperty(exports, 'Interface', { enumerable: true, get: function () { return abi.Interface; } }); exports.toUtf8Bytes = toUtf8Bytes; exports.toUtf8String = toUtf8String; //# sourceMappingURL=utils.js.map