@ethereumjs/util
Advanced tools
Comparing version 8.0.0-beta.2 to 8.0.0-beta.3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isZeroAddress = exports.zeroAddress = exports.importPublic = exports.privateToAddress = exports.privateToPublic = exports.publicToAddress = exports.pubToAddress = exports.isValidPublic = exports.isValidPrivate = exports.generateAddress2 = exports.generateAddress = exports.isValidChecksumAddress = exports.toChecksumAddress = exports.isValidAddress = exports.Account = void 0; | ||
const rlp_1 = require("@ethereumjs/rlp"); | ||
const keccak_1 = require("ethereum-cryptography/keccak"); | ||
const secp256k1_1 = require("ethereum-cryptography/secp256k1"); | ||
const utils_1 = require("ethereum-cryptography/utils"); | ||
const secp256k1_1 = require("ethereum-cryptography/secp256k1"); | ||
const rlp_1 = require("rlp"); | ||
const internal_1 = require("./internal"); | ||
const bytes_1 = require("./bytes"); | ||
const constants_1 = require("./constants"); | ||
const bytes_1 = require("./bytes"); | ||
const helpers_1 = require("./helpers"); | ||
const internal_1 = require("./internal"); | ||
const types_1 = require("./types"); | ||
@@ -13,0 +13,0 @@ const _0n = BigInt(0); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Address = void 0; | ||
const account_1 = require("./account"); | ||
const bytes_1 = require("./bytes"); | ||
const account_1 = require("./account"); | ||
class Address { | ||
@@ -7,0 +7,0 @@ constructor(buf) { |
/// <reference types="node" /> | ||
import { PrefixedHexString, TransformableToArray, TransformableToBuffer, NestedBufferArray, NestedUint8Array } from './types'; | ||
import { NestedBufferArray, NestedUint8Array, PrefixedHexString, TransformableToArray, TransformableToBuffer } from './types'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Converts a `Number` into a hex `String` |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bigIntToUnpaddedBuffer = exports.bigIntToHex = exports.bufArrToArr = exports.arrToBufArr = exports.validateNoLeadingZeroes = exports.baToJSON = exports.toUtf8 = exports.short = exports.addHexPrefix = exports.toUnsigned = exports.fromSigned = exports.bufferToInt = exports.bigIntToBuffer = exports.bufferToBigInt = exports.bufferToHex = exports.toBuffer = exports.unpadHexString = exports.unpadArray = exports.unpadBuffer = exports.setLengthRight = exports.setLengthLeft = exports.zeros = exports.intToBuffer = exports.intToHex = void 0; | ||
const helpers_1 = require("./helpers"); | ||
const internal_1 = require("./internal"); | ||
const helpers_1 = require("./helpers"); | ||
/** | ||
@@ -7,0 +7,0 @@ * Converts a `Number` into a hex `String` |
@@ -28,3 +28,3 @@ /** | ||
*/ | ||
export { isHexPrefixed, stripHexPrefix, padToEven, getBinarySize, arrayContainsArray, toAscii, fromUtf8, fromAscii, getKeys, isHexString, } from './internal'; | ||
export { arrayContainsArray, fromAscii, fromUtf8, getBinarySize, getKeys, isHexPrefixed, isHexString, padToEven, stripHexPrefix, toAscii, } from './internal'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isHexString = exports.getKeys = exports.fromAscii = exports.fromUtf8 = exports.toAscii = exports.arrayContainsArray = exports.getBinarySize = exports.padToEven = exports.stripHexPrefix = exports.isHexPrefixed = void 0; | ||
exports.toAscii = exports.stripHexPrefix = exports.padToEven = exports.isHexString = exports.isHexPrefixed = exports.getKeys = exports.getBinarySize = exports.fromUtf8 = exports.fromAscii = exports.arrayContainsArray = void 0; | ||
/** | ||
@@ -47,12 +47,12 @@ * Constants | ||
var internal_1 = require("./internal"); | ||
Object.defineProperty(exports, "isHexPrefixed", { enumerable: true, get: function () { return internal_1.isHexPrefixed; } }); | ||
Object.defineProperty(exports, "stripHexPrefix", { enumerable: true, get: function () { return internal_1.stripHexPrefix; } }); | ||
Object.defineProperty(exports, "padToEven", { enumerable: true, get: function () { return internal_1.padToEven; } }); | ||
Object.defineProperty(exports, "getBinarySize", { enumerable: true, get: function () { return internal_1.getBinarySize; } }); | ||
Object.defineProperty(exports, "arrayContainsArray", { enumerable: true, get: function () { return internal_1.arrayContainsArray; } }); | ||
Object.defineProperty(exports, "toAscii", { enumerable: true, get: function () { return internal_1.toAscii; } }); | ||
Object.defineProperty(exports, "fromAscii", { enumerable: true, get: function () { return internal_1.fromAscii; } }); | ||
Object.defineProperty(exports, "fromUtf8", { enumerable: true, get: function () { return internal_1.fromUtf8; } }); | ||
Object.defineProperty(exports, "fromAscii", { enumerable: true, get: function () { return internal_1.fromAscii; } }); | ||
Object.defineProperty(exports, "getBinarySize", { enumerable: true, get: function () { return internal_1.getBinarySize; } }); | ||
Object.defineProperty(exports, "getKeys", { enumerable: true, get: function () { return internal_1.getKeys; } }); | ||
Object.defineProperty(exports, "isHexPrefixed", { enumerable: true, get: function () { return internal_1.isHexPrefixed; } }); | ||
Object.defineProperty(exports, "isHexString", { enumerable: true, get: function () { return internal_1.isHexString; } }); | ||
Object.defineProperty(exports, "padToEven", { enumerable: true, get: function () { return internal_1.padToEven; } }); | ||
Object.defineProperty(exports, "stripHexPrefix", { enumerable: true, get: function () { return internal_1.stripHexPrefix; } }); | ||
Object.defineProperty(exports, "toAscii", { enumerable: true, get: function () { return internal_1.toAscii; } }); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isTruthy = exports.isFalsy = exports.toType = exports.TypeOutput = void 0; | ||
const bytes_1 = require("./bytes"); | ||
const internal_1 = require("./internal"); | ||
const bytes_1 = require("./bytes"); | ||
/** | ||
@@ -7,0 +7,0 @@ * Type output options |
102
package.json
{ | ||
"name": "@ethereumjs/util", | ||
"version": "8.0.0-beta.2", | ||
"version": "8.0.0-beta.3", | ||
"description": "A collection of utility functions for Ethereum", | ||
"license": "MPL-2.0", | ||
"author": "EthereumJS Team", | ||
"keywords": [ | ||
@@ -12,46 +10,6 @@ "ethereum", | ||
], | ||
"engines": { | ||
"node": ">=10.0.0" | ||
"homepage": "https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util#readme", | ||
"bugs": { | ||
"url": "https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+util%22" | ||
}, | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "../../config/cli/ts-build.sh", | ||
"prepublishOnly": "../../config/cli/prepublish.sh", | ||
"clean": "../../config/cli/clean-package.sh", | ||
"coverage": "../../config/cli/coverage.sh", | ||
"docs:build": "npx typedoc --options typedoc.js", | ||
"lint": "../../config/cli/lint.sh", | ||
"lint:fix": "../../config/cli/lint-fix.sh", | ||
"tape": "tape -r ts-node/register", | ||
"test": "npm run test:node && npm run test:browser", | ||
"test:browser": "karma start karma.conf.js", | ||
"test:node": "npm run tape -- test/*.spec.ts", | ||
"tsc": "../../config/cli/ts-compile.sh" | ||
}, | ||
"dependencies": { | ||
"ethereum-cryptography": "^1.1.2", | ||
"rlp": "4.0.0-beta.2" | ||
}, | ||
"devDependencies": { | ||
"@types/bn.js": "^5.1.0", | ||
"@types/node": "^16.11.7", | ||
"@types/secp256k1": "^4.0.1", | ||
"@types/tape": "^4.13.2", | ||
"eslint": "^6.8.0", | ||
"karma": "^6.3.2", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-firefox-launcher": "^2.1.0", | ||
"karma-tap": "^4.2.0", | ||
"karma-typescript": "^5.5.3", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.0.5", | ||
"tape": "^4.10.1", | ||
"ts-node": "^10.2.1", | ||
"typescript": "^4.4.2" | ||
}, | ||
"repository": { | ||
@@ -61,6 +19,4 @@ "type": "git", | ||
}, | ||
"homepage": "https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util#readme", | ||
"bugs": { | ||
"url": "https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+util%22" | ||
}, | ||
"license": "MPL-2.0", | ||
"author": "EthereumJS Team", | ||
"contributors": [ | ||
@@ -109,3 +65,47 @@ { | ||
} | ||
] | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"scripts": { | ||
"build": "../../config/cli/ts-build.sh", | ||
"clean": "../../config/cli/clean-package.sh", | ||
"coverage": "../../config/cli/coverage.sh", | ||
"docs:build": "npx typedoc --options typedoc.js", | ||
"lint": "../../config/cli/lint.sh", | ||
"lint:diff": "../../config/cli/lint-diff.sh", | ||
"lint:fix": "../../config/cli/lint-fix.sh", | ||
"prepublishOnly": "../../config/cli/prepublish.sh", | ||
"tape": "tape -r ts-node/register", | ||
"test": "npm run test:node && npm run test:browser", | ||
"test:browser": "karma start karma.conf.js", | ||
"test:node": "npm run tape -- test/*.spec.ts", | ||
"tsc": "../../config/cli/ts-compile.sh" | ||
}, | ||
"dependencies": { | ||
"@ethereumjs/rlp": "^4.0.0-beta.2", | ||
"ethereum-cryptography": "^1.1.2" | ||
}, | ||
"devDependencies": { | ||
"@types/bn.js": "^5.1.0", | ||
"@types/node": "^16.11.7", | ||
"@types/secp256k1": "^4.0.1", | ||
"@types/tape": "^4.13.2", | ||
"eslint": "^6.8.0", | ||
"karma": "^6.3.2", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-firefox-launcher": "^2.1.0", | ||
"karma-tap": "^4.2.0", | ||
"karma-typescript": "^5.5.3", | ||
"nyc": "^15.1.0", | ||
"tape": "^4.10.1", | ||
"ts-node": "^10.2.1", | ||
"typescript": "^4.4.2" | ||
}, | ||
"engines": { | ||
"node": ">=10.0.0" | ||
} | ||
} |
@@ -24,3 +24,2 @@ # @ethereumjs/util | ||
assert.ok(unpadBuffer(Buffer.from('000000006600', 'hex')).equals(Buffer.from('6600', 'hex'))) | ||
``` | ||
@@ -27,0 +26,0 @@ |
@@ -0,7 +1,6 @@ | ||
import { RLP } from '@ethereumjs/rlp' | ||
import { keccak256 } from 'ethereum-cryptography/keccak' | ||
import { Point, utils } from 'ethereum-cryptography/secp256k1' | ||
import { bytesToHex } from 'ethereum-cryptography/utils' | ||
import { Point, utils } from 'ethereum-cryptography/secp256k1' | ||
import { RLP } from 'rlp' | ||
import { stripHexPrefix } from './internal' | ||
import { KECCAK256_RLP, KECCAK256_NULL } from './constants' | ||
import { | ||
@@ -16,3 +15,5 @@ arrToBufArr, | ||
} from './bytes' | ||
import { assertIsString, assertIsHexString, assertIsBuffer } from './helpers' | ||
import { KECCAK256_NULL, KECCAK256_RLP } from './constants' | ||
import { assertIsBuffer, assertIsHexString, assertIsString } from './helpers' | ||
import { stripHexPrefix } from './internal' | ||
import { BigIntLike, BufferLike, isTruthy } from './types' | ||
@@ -19,0 +20,0 @@ |
@@ -1,9 +0,9 @@ | ||
import { toBuffer, zeros, bigIntToBuffer, bufferToBigInt } from './bytes' | ||
import { | ||
generateAddress, | ||
generateAddress2, | ||
isValidAddress, | ||
privateToAddress, | ||
pubToAddress, | ||
privateToAddress, | ||
generateAddress, | ||
generateAddress2, | ||
} from './account' | ||
import { bigIntToBuffer, bufferToBigInt, toBuffer, zeros } from './bytes' | ||
@@ -10,0 +10,0 @@ export class Address { |
@@ -1,10 +0,10 @@ | ||
import { stripHexPrefix, padToEven, isHexString, isHexPrefixed } from './internal' | ||
import { assertIsArray, assertIsBuffer, assertIsHexString } from './helpers' | ||
import { isHexPrefixed, isHexString, padToEven, stripHexPrefix } from './internal' | ||
import { | ||
NestedBufferArray, | ||
NestedUint8Array, | ||
PrefixedHexString, | ||
TransformableToArray, | ||
TransformableToBuffer, | ||
NestedBufferArray, | ||
NestedUint8Array, | ||
} from './types' | ||
import { assertIsBuffer, assertIsArray, assertIsHexString } from './helpers' | ||
@@ -11,0 +11,0 @@ /** |
@@ -35,12 +35,12 @@ /** | ||
export { | ||
isHexPrefixed, | ||
stripHexPrefix, | ||
padToEven, | ||
getBinarySize, | ||
arrayContainsArray, | ||
toAscii, | ||
fromAscii, | ||
fromUtf8, | ||
fromAscii, | ||
getBinarySize, | ||
getKeys, | ||
isHexPrefixed, | ||
isHexString, | ||
padToEven, | ||
stripHexPrefix, | ||
toAscii, | ||
} from './internal' |
import { keccak256 } from 'ethereum-cryptography/keccak' | ||
import { signSync, recoverPublicKey } from 'ethereum-cryptography/secp256k1' | ||
import { toBuffer, setLengthLeft, bufferToHex, bufferToInt, bufferToBigInt } from './bytes' | ||
import { recoverPublicKey, signSync } from 'ethereum-cryptography/secp256k1' | ||
import { bufferToBigInt, bufferToHex, bufferToInt, setLengthLeft, toBuffer } from './bytes' | ||
import { SECP256K1_ORDER, SECP256K1_ORDER_DIV_2 } from './constants' | ||
@@ -5,0 +6,0 @@ import { assertIsBuffer } from './helpers' |
@@ -0,4 +1,4 @@ | ||
import { Address } from './address' | ||
import { bufferToBigInt, bufferToHex, toBuffer, ToBufferInputTypes } from './bytes' | ||
import { isHexString } from './internal' | ||
import { Address } from './address' | ||
import { toBuffer, ToBufferInputTypes, bufferToBigInt, bufferToHex } from './bytes' | ||
@@ -5,0 +5,0 @@ /* |
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
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
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
177463
14
101
+ Added@ethereumjs/rlp@4.0.1(transitive)
- Removedrlp@4.0.0-beta.2
- Removedrlp@4.0.0-beta.2(transitive)