New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@augurproject/utils

Package Overview
Dependencies
Maintainers
6
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@augurproject/utils - npm Package Compare versions

Comparing version 2.1.13-beta.2 to 2.1.13

build/binary-search.d.ts

1

build/abi-decode-bytes.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiDecodeBytes = void 0;
const byte_array_to_utf8_string_1 = require("./byte-array-to-utf8-string");

@@ -4,0 +5,0 @@ const remove_trailing_zeros_1 = require("./remove-trailing-zeros");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiDecodeData = void 0;
let rawDecode = require("ethereumjs-abi").rawDecode;

@@ -4,0 +5,0 @@ const format_abi_raw_decoded_data_array_1 = require("./format-abi-raw-decoded-data-array");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiDecodeRpcResponse = void 0;
const abi_decode_data_1 = require("./abi-decode-data");

@@ -4,0 +5,0 @@ function abiDecodeRpcResponse(responseType, abiEncodedRpcResponse) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiDecodeShortStringAsInt256 = void 0;
const remove_trailing_zeros_1 = require("./remove-trailing-zeros");

@@ -4,0 +5,0 @@ const strip_0x_prefix_1 = require("./strip-0x-prefix");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiEncodeBytes = void 0;
let rawEncode = require("ethereumjs-abi").rawEncode;

@@ -4,0 +5,0 @@ const remove_trailing_zeros_1 = require("./remove-trailing-zeros");

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiEncodeData = void 0;
const ethereumjsAbi = __importStar(require("ethereumjs-abi"));

@@ -11,0 +24,0 @@ // ABI-encode the 'data' field in a transaction payload

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiEncodeInt256 = void 0;
let rawEncode = require("ethereumjs-abi").rawEncode;

@@ -4,0 +5,0 @@ function abiEncodeInt256(value) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiEncodeShortStringAsInt256 = void 0;
const pad_right_1 = require("./pad-right");

@@ -4,0 +5,0 @@ const hex_1 = require("./hex");

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.abiEncodeTransactionPayload = void 0;
const ethereumjsAbi = __importStar(require("ethereumjs-abi"));

@@ -11,0 +24,0 @@ const abi_encode_data_1 = require("./abi-encode-data");

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.bignum = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -8,0 +9,0 @@ const is_hex_1 = require("./is-hex");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.byteArrayToHexString = void 0;
const strip_0x_prefix_1 = require("./strip-0x-prefix");

@@ -4,0 +5,0 @@ function byteArrayToHexString(b) {

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.byteArrayToUtf8String = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -8,0 +9,0 @@ const strip_0x_prefix_1 = require("./strip-0x-prefix");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.chunk = void 0;
function chunk(totalLength, chunkLength) {

@@ -4,0 +5,0 @@ chunkLength = chunkLength || 64;

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.configFromEnvvars = exports.mergeConfig = exports.validConfigOrDie = exports.isValidConfig = exports.printConfig = exports.serializeConfig = exports.sanitizeConfig = exports.DEFAULT_SDK_CONFIGURATION = exports.deepCopy = exports.bool = void 0;
const deepmerge_1 = __importDefault(require("deepmerge"));

@@ -8,0 +9,0 @@ const path_1 = __importDefault(require("path"));

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isDevNetworkId = exports.NetworkId = exports.DEFAULT_TRADE_INTERVAL = exports.UINT256_MAX_VALUE = exports.INT256_MAX_VALUE = exports.INT256_MIN_VALUE = exports.BYTES_32 = exports.FXP_ONE = exports.QUINTILLION = exports.TWO = exports.ONE = exports.ZERO = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -8,0 +9,0 @@ exports.ZERO = new bignumber_js_1.default(0);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertAttoValueToDisplayValue = exports.convertDisplayValuetoAttoValue = exports.convertPayoutNumeratorsToStrings = exports.convertDisplayPriceToOnChainPrice = exports.convertOnChainPriceToDisplayPrice = exports.convertDisplayAmountToOnChainAmount = exports.convertOnChainAmountToDisplayAmount = exports.tickSizeToNumTickWithDisplayPrices = exports.numTicksToTickSizeWithDisplayPrices = exports.numTicksToTickSize = void 0;
const constants_1 = require("./constants");

@@ -4,0 +5,0 @@ function numTicksToTickSize(numTicks, minPrice, maxPrice) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.encodeNumberAsBase10String = void 0;
const bignum_1 = require("./bignum");

@@ -4,0 +5,0 @@ function encodeNumberAsBase10String(n, isWrapped = false) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.encodeNumberAsJSNumber = void 0;
const bignum_1 = require("./bignum");

@@ -4,0 +5,0 @@ function encodeNumberAsJSNumber(s, isWrapped = false) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractIPFSUrl = exports.IPFSHashVersion = void 0;
var IPFSHashVersion;

@@ -4,0 +5,0 @@ (function (IPFSHashVersion) {

4

build/extract-ipfs-url.test.js

@@ -16,3 +16,3 @@ "use strict";

version: extract_ipfs_url_1.IPFSHashVersion.CIDv1,
url: '.ipfs.cf-ipfs.com'
url: 'https://cf-ipfs.com/ipfs'
});

@@ -31,3 +31,3 @@ });

version: extract_ipfs_url_1.IPFSHashVersion.CIDv1,
url: '.ipfs.dweb.link'
url: 'https://dweb.link/ipfs'
});

@@ -34,0 +34,0 @@ });

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.fix = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -8,0 +9,0 @@ const bignum_1 = require("./bignum");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatAbiRawDecodedDataArray = void 0;
const format_abi_raw_decoded_data_1 = require("./format-abi-raw-decoded-data");

@@ -4,0 +5,0 @@ function formatAbiRawDecodedDataArray(dataInputTypes, decodedDataArray) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatAbiRawDecodedData = void 0;
const format_ethereum_address_1 = require("./format-ethereum-address");

@@ -4,0 +5,0 @@ const hex_1 = require("./hex");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatEthereumAddress = void 0;
const hex_1 = require("./hex");

@@ -4,0 +5,0 @@ const strip_0x_prefix_1 = require("./strip-0x-prefix");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatInt256 = void 0;
const pad_left_1 = require("./pad-left");

@@ -4,0 +5,0 @@ const hex_1 = require("./hex");

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getGasStation = void 0;
const axios_1 = __importDefault(require("axios"));

@@ -8,0 +9,0 @@ const constants_1 = require("./constants");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.chunkRange = void 0;
function* chunkRange(start, end, chunk) {

@@ -4,0 +5,0 @@ for (; start <= end; start += chunk) {

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.stringTo32ByteHex = exports.hex = exports.padHex = exports.prefixHex = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -8,0 +9,0 @@ const abi_encode_bytes_1 = require("./abi-encode-bytes");

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -9,2 +16,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -16,70 +24,70 @@ bignumber_js_1.default.config({

exports.version = '2.1.4';
__export(require("./constants"));
__exportStar(require("./constants"), exports);
var unroll_array_1 = require("./unroll-array");
exports.unrollArray = unroll_array_1.unrollArray;
Object.defineProperty(exports, "unrollArray", { enumerable: true, get: function () { return unroll_array_1.unrollArray; } });
var byte_array_to_utf8_string_1 = require("./byte-array-to-utf8-string");
exports.byteArrayToUtf8String = byte_array_to_utf8_string_1.byteArrayToUtf8String;
Object.defineProperty(exports, "byteArrayToUtf8String", { enumerable: true, get: function () { return byte_array_to_utf8_string_1.byteArrayToUtf8String; } });
var byte_array_to_hex_string_1 = require("./byte-array-to-hex-string");
exports.byteArrayToHexString = byte_array_to_hex_string_1.byteArrayToHexString;
Object.defineProperty(exports, "byteArrayToHexString", { enumerable: true, get: function () { return byte_array_to_hex_string_1.byteArrayToHexString; } });
var abi_encode_short_string_as_int256_1 = require("./abi-encode-short-string-as-int256");
exports.abiEncodeShortStringAsInt256 = abi_encode_short_string_as_int256_1.abiEncodeShortStringAsInt256;
Object.defineProperty(exports, "abiEncodeShortStringAsInt256", { enumerable: true, get: function () { return abi_encode_short_string_as_int256_1.abiEncodeShortStringAsInt256; } });
var abi_decode_short_string_as_int256_1 = require("./abi-decode-short-string-as-int256");
exports.abiDecodeShortStringAsInt256 = abi_decode_short_string_as_int256_1.abiDecodeShortStringAsInt256;
Object.defineProperty(exports, "abiDecodeShortStringAsInt256", { enumerable: true, get: function () { return abi_decode_short_string_as_int256_1.abiDecodeShortStringAsInt256; } });
var abi_encode_bytes_1 = require("./abi-encode-bytes");
exports.abiEncodeBytes = abi_encode_bytes_1.abiEncodeBytes;
Object.defineProperty(exports, "abiEncodeBytes", { enumerable: true, get: function () { return abi_encode_bytes_1.abiEncodeBytes; } });
var abi_decode_bytes_1 = require("./abi-decode-bytes");
exports.abiDecodeBytes = abi_decode_bytes_1.abiDecodeBytes;
Object.defineProperty(exports, "abiDecodeBytes", { enumerable: true, get: function () { return abi_decode_bytes_1.abiDecodeBytes; } });
var unfork_1 = require("./unfork");
exports.unfork = unfork_1.unfork;
Object.defineProperty(exports, "unfork", { enumerable: true, get: function () { return unfork_1.unfork; } });
var is_hex_1 = require("./is-hex");
exports.isHex = is_hex_1.isHex;
Object.defineProperty(exports, "isHex", { enumerable: true, get: function () { return is_hex_1.isHex; } });
var format_int256_1 = require("./format-int256");
exports.formatInt256 = format_int256_1.formatInt256;
Object.defineProperty(exports, "formatInt256", { enumerable: true, get: function () { return format_int256_1.formatInt256; } });
var format_ethereum_address_1 = require("./format-ethereum-address");
exports.formatEthereumAddress = format_ethereum_address_1.formatEthereumAddress;
Object.defineProperty(exports, "formatEthereumAddress", { enumerable: true, get: function () { return format_ethereum_address_1.formatEthereumAddress; } });
var strip_0x_prefix_1 = require("./strip-0x-prefix");
exports.strip0xPrefix = strip_0x_prefix_1.strip0xPrefix;
Object.defineProperty(exports, "strip0xPrefix", { enumerable: true, get: function () { return strip_0x_prefix_1.strip0xPrefix; } });
var hex_1 = require("./hex");
exports.prefixHex = hex_1.prefixHex;
Object.defineProperty(exports, "prefixHex", { enumerable: true, get: function () { return hex_1.prefixHex; } });
var bignum_1 = require("./bignum");
exports.bignum = bignum_1.bignum;
Object.defineProperty(exports, "bignum", { enumerable: true, get: function () { return bignum_1.bignum; } });
var fix_1 = require("./fix");
exports.fix = fix_1.fix;
Object.defineProperty(exports, "fix", { enumerable: true, get: function () { return fix_1.fix; } });
var unfix_1 = require("./unfix");
exports.unfix = unfix_1.unfix;
Object.defineProperty(exports, "unfix", { enumerable: true, get: function () { return unfix_1.unfix; } });
var unfix_signed_1 = require("./unfix-signed");
exports.unfixSigned = unfix_signed_1.unfixSigned;
Object.defineProperty(exports, "unfixSigned", { enumerable: true, get: function () { return unfix_signed_1.unfixSigned; } });
var encode_number_as_base10_string_1 = require("./encode-number-as-base10-string");
exports.encodeNumberAsBase10String = encode_number_as_base10_string_1.encodeNumberAsBase10String;
Object.defineProperty(exports, "encodeNumberAsBase10String", { enumerable: true, get: function () { return encode_number_as_base10_string_1.encodeNumberAsBase10String; } });
var encode_number_as_js_number_1 = require("./encode-number-as-js-number");
exports.encodeNumberAsJSNumber = encode_number_as_js_number_1.encodeNumberAsJSNumber;
Object.defineProperty(exports, "encodeNumberAsJSNumber", { enumerable: true, get: function () { return encode_number_as_js_number_1.encodeNumberAsJSNumber; } });
var pad_right_1 = require("./pad-right");
exports.padRight = pad_right_1.padRight;
Object.defineProperty(exports, "padRight", { enumerable: true, get: function () { return pad_right_1.padRight; } });
var pad_left_1 = require("./pad-left");
exports.padLeft = pad_left_1.padLeft;
Object.defineProperty(exports, "padLeft", { enumerable: true, get: function () { return pad_left_1.padLeft; } });
var abi_encode_int256_1 = require("./abi-encode-int256");
exports.abiEncodeInt256 = abi_encode_int256_1.abiEncodeInt256;
Object.defineProperty(exports, "abiEncodeInt256", { enumerable: true, get: function () { return abi_encode_int256_1.abiEncodeInt256; } });
var abi_encode_data_1 = require("./abi-encode-data");
exports.abiEncodeData = abi_encode_data_1.abiEncodeData;
Object.defineProperty(exports, "abiEncodeData", { enumerable: true, get: function () { return abi_encode_data_1.abiEncodeData; } });
var abi_encode_transaction_payload_1 = require("./abi-encode-transaction-payload");
exports.abiEncodeTransactionPayload = abi_encode_transaction_payload_1.abiEncodeTransactionPayload;
Object.defineProperty(exports, "abiEncodeTransactionPayload", { enumerable: true, get: function () { return abi_encode_transaction_payload_1.abiEncodeTransactionPayload; } });
var abi_decode_data_1 = require("./abi-decode-data");
exports.abiDecodeData = abi_decode_data_1.abiDecodeData;
Object.defineProperty(exports, "abiDecodeData", { enumerable: true, get: function () { return abi_decode_data_1.abiDecodeData; } });
var abi_decode_rpc_response_1 = require("./abi-decode-rpc-response");
exports.abiDecodeRpcResponse = abi_decode_rpc_response_1.abiDecodeRpcResponse;
Object.defineProperty(exports, "abiDecodeRpcResponse", { enumerable: true, get: function () { return abi_decode_rpc_response_1.abiDecodeRpcResponse; } });
var format_abi_raw_decoded_data_array_1 = require("./format-abi-raw-decoded-data-array");
exports.formatAbiRawDecodedDataArray = format_abi_raw_decoded_data_array_1.formatAbiRawDecodedDataArray;
Object.defineProperty(exports, "formatAbiRawDecodedDataArray", { enumerable: true, get: function () { return format_abi_raw_decoded_data_array_1.formatAbiRawDecodedDataArray; } });
var format_abi_raw_decoded_data_1 = require("./format-abi-raw-decoded-data");
exports.formatAbiRawDecodedData = format_abi_raw_decoded_data_1.formatAbiRawDecodedData;
Object.defineProperty(exports, "formatAbiRawDecodedData", { enumerable: true, get: function () { return format_abi_raw_decoded_data_1.formatAbiRawDecodedData; } });
var generators_1 = require("./generators");
exports.chunkRange = generators_1.chunkRange;
Object.defineProperty(exports, "chunkRange", { enumerable: true, get: function () { return generators_1.chunkRange; } });
var serialize_1 = require("./serialize");
exports.serialize = serialize_1.serialize;
__export(require("./hex"));
__export(require("./logger"));
__export(require("./repeat"));
__export(require("./configuration"));
__export(require("./conversions"));
__export(require("./gasStation"));
__export(require("./extract-ipfs-url"));
Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return serialize_1.serialize; } });
__exportStar(require("./hex"), exports);
__exportStar(require("./logger"), exports);
__exportStar(require("./repeat"), exports);
__exportStar(require("./configuration"), exports);
__exportStar(require("./conversions"), exports);
__exportStar(require("./gasStation"), exports);
__exportStar(require("./extract-ipfs-url"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isHex = void 0;
function isHex(str) {
if (str && str.constructor === String) {
if (str && typeof str === "string") {
if (str.slice(0, 1) === "-" && str.length > 1) {

@@ -6,0 +7,0 @@ return /^[0-9A-F]+$/i.test(str.slice(1));

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.logger = exports.LoggerLevels = void 0;
const StandardLogger_1 = require("./StandardLogger");

@@ -4,0 +5,0 @@ const logger_1 = require("./logger");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Logger = void 0;
const index_1 = require("./index");

@@ -4,0 +5,0 @@ class Logger {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StandardLogger = void 0;
class StandardLogger {

@@ -4,0 +5,0 @@ error(...err) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.padLeft = void 0;
const chunk_1 = require("./chunk");

@@ -4,0 +5,0 @@ const hex_1 = require("./hex");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.padRight = void 0;
const chunk_1 = require("./chunk");

@@ -4,0 +5,0 @@ const strip_0x_prefix_1 = require("./strip-0x-prefix");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeTrailingZeros = void 0;
function removeTrailingZeros(h, isUtf8 = false) {

@@ -4,0 +5,0 @@ let hex = h.toString();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.repeat = void 0;
function repeat(thing, times) {

@@ -4,0 +5,0 @@ const things = [];

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.serialize = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -22,7 +23,7 @@ const abi_encode_int256_1 = require("./abi-encode-int256");

// input is a base-10 javascript number
if (x.constructor === Number) {
if (typeof x === "number") {
serialized = abi_encode_int256_1.abiEncodeInt256(new bignumber_js_1.default(x, 10).toFixed());
// input is a utf8 or hex string
}
else if (x.constructor === String) {
else if (typeof x === "string") {
// negative hex

@@ -29,0 +30,0 @@ if (x.slice(0, 1) === "-") {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.strip0xPrefix = void 0;
const is_hex_1 = require("./is-hex");

@@ -4,0 +5,0 @@ function strip0xPrefix(str) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.unfixSigned = void 0;
const hex_1 = require("./hex");

@@ -4,0 +5,0 @@ const unfix_1 = require("./unfix");

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.unfix = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -8,0 +9,0 @@ const bignum_1 = require("./bignum");

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.unfork = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -8,0 +9,0 @@ const bignum_1 = require("./bignum");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.unrollArray = void 0;
const encode_number_as_base10_string_1 = require("./encode-number-as-base10-string");

@@ -4,0 +5,0 @@ const hex_1 = require("./hex");

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.wrap = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));

@@ -8,0 +9,0 @@ const bignum_1 = require("./bignum");

{
"name": "@augurproject/utils",
"version": "2.1.13-beta.2",
"version": "2.1.13",
"description": "Grab bag of formatting and ABI encoding/decoding functions",

@@ -20,3 +20,3 @@ "author": "The Augur Developers <team@augur.net>",

"ts-jest": "24.0.2",
"typescript": "3.8.3"
"typescript": "3.9.7"
},

@@ -26,3 +26,3 @@ "publishConfig": {

},
"gitHead": "6c937aed23debd52c882218527d1f544666927a6"
"gitHead": "3df4c197bf462f099184c18d88ac72f2316f6fbb"
}

@@ -20,3 +20,3 @@ import {

version: IPFSHashVersion.CIDv1,
url: '.ipfs.cf-ipfs.com'
url: 'https://cf-ipfs.com/ipfs'
});

@@ -37,3 +37,3 @@ });

version: IPFSHashVersion.CIDv1,
url: '.ipfs.dweb.link'
url: 'https://dweb.link/ipfs'
});

@@ -40,0 +40,0 @@ });

export function isHex(str) {
if (str && str.constructor === String) {
if (str && typeof str === "string") {
if (str.slice(0, 1) === "-" && str.length > 1) {

@@ -4,0 +4,0 @@ return /^[0-9A-F]+$/i.test(str.slice(1));

@@ -18,7 +18,7 @@ import BigNumber from "bignumber.js";

// input is a base-10 javascript number
if (x.constructor === Number) {
if (typeof x === "number") {
serialized = abiEncodeInt256(new BigNumber(x, 10).toFixed());
// input is a utf8 or hex string
} else if (x.constructor === String) {
} else if (typeof x === "string") {

@@ -25,0 +25,0 @@ // negative 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

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

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

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

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

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc