@polkadot/util-crypto
Advanced tools
Comparing version 11.1.2 to 11.1.3
@@ -34,6 +34,6 @@ import { u8aToU8a } from '@polkadot/util'; | ||
return (value, ipfsCompat) => { | ||
if (!value || typeof value !== 'string') { | ||
throw new Error(`Expected non-null, non-empty ${type} string input`); | ||
if (typeof value !== 'string') { | ||
throw new Error(`Expected ${type} string input`); | ||
} | ||
if (ipfs && ipfsCompat && value[0] !== ipfs) { | ||
else if (ipfs && ipfsCompat && value[0] !== ipfs) { | ||
throw new Error(`Expected ipfs-compatible ${type} to start with '${ipfs}'`); | ||
@@ -40,0 +40,0 @@ } |
@@ -30,2 +30,2 @@ import { blake2b as blake2bJs } from '@noble/hashes/blake2b'; | ||
*/ | ||
export const blake2AsHex = createAsHex(blake2AsU8a); | ||
export const blake2AsHex = /*#__PURE__*/ createAsHex(blake2AsU8a); |
@@ -40,6 +40,6 @@ "use strict"; | ||
return (value, ipfsCompat) => { | ||
if (!value || typeof value !== 'string') { | ||
throw new Error(`Expected non-null, non-empty ${type} string input`); | ||
if (typeof value !== 'string') { | ||
throw new Error(`Expected ${type} string input`); | ||
} | ||
if (ipfs && ipfsCompat && value[0] !== ipfs) { | ||
else if (ipfs && ipfsCompat && value[0] !== ipfs) { | ||
throw new Error(`Expected ipfs-compatible ${type} to start with '${ipfs}'`); | ||
@@ -46,0 +46,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.packageInfo = void 0; | ||
exports.packageInfo = { name: '@polkadot/util-crypto', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '11.1.2' }; | ||
exports.packageInfo = { name: '@polkadot/util-crypto', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '11.1.3' }; |
@@ -31,3 +31,3 @@ import { hmac } from '@noble/hashes/hmac'; | ||
*/ | ||
export const hmacSha256AsU8a = createSha(256); | ||
export const hmacSha256AsU8a = /*#__PURE__*/ createSha(256); | ||
/** | ||
@@ -37,2 +37,2 @@ * @name hmacSha512AsU8a | ||
*/ | ||
export const hmacSha512AsU8a = createSha(512); | ||
export const hmacSha512AsU8a = /*#__PURE__*/ createSha(512); |
@@ -33,2 +33,2 @@ import { keccak_256 as keccak256Js, keccak_512 as keccak512Js } from '@noble/hashes/sha3'; | ||
*/ | ||
export const keccakAsHex = createAsHex(keccakAsU8a); | ||
export const keccakAsHex = /*#__PURE__*/ createAsHex(keccakAsU8a); |
import { secp256k1DeriveHard } from '../secp256k1/deriveHard.js'; | ||
import { secp256k1PairFromSeed } from '../secp256k1/pair/fromSeed.js'; | ||
import { createSeedDeriveFn } from './hdkdDerive.js'; | ||
export const keyHdkdEcdsa = createSeedDeriveFn(secp256k1PairFromSeed, secp256k1DeriveHard); | ||
export const keyHdkdEcdsa = /*#__PURE__*/ createSeedDeriveFn(secp256k1PairFromSeed, secp256k1DeriveHard); |
import { ed25519DeriveHard, ed25519PairFromSeed } from '../ed25519/index.js'; | ||
import { createSeedDeriveFn } from './hdkdDerive.js'; | ||
export const keyHdkdEd25519 = createSeedDeriveFn(ed25519PairFromSeed, ed25519DeriveHard); | ||
export const keyHdkdEd25519 = /*#__PURE__*/ createSeedDeriveFn(ed25519PairFromSeed, ed25519DeriveHard); |
@@ -23,3 +23,3 @@ { | ||
"type": "module", | ||
"version": "11.1.2", | ||
"version": "11.1.3", | ||
"main": "./cjs/index.js", | ||
@@ -733,7 +733,7 @@ "module": "./index.js", | ||
"@noble/secp256k1": "1.7.1", | ||
"@polkadot/networks": "11.1.2", | ||
"@polkadot/util": "11.1.2", | ||
"@polkadot/networks": "11.1.3", | ||
"@polkadot/util": "11.1.3", | ||
"@polkadot/wasm-crypto": "^7.0.3", | ||
"@polkadot/x-bigint": "11.1.2", | ||
"@polkadot/x-randomvalues": "11.1.2", | ||
"@polkadot/x-bigint": "11.1.3", | ||
"@polkadot/x-randomvalues": "11.1.3", | ||
"@scure/base": "1.1.1", | ||
@@ -744,4 +744,4 @@ "tslib": "^2.5.0", | ||
"peerDependencies": { | ||
"@polkadot/util": "11.1.2" | ||
"@polkadot/util": "11.1.3" | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
export const packageInfo = { name: '@polkadot/util-crypto', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '11.1.2' }; | ||
export const packageInfo = { name: '@polkadot/util-crypto', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '11.1.3' }; |
@@ -24,2 +24,2 @@ import { getRandomValues } from '@polkadot/x-randomvalues'; | ||
*/ | ||
export const randomAsHex = createAsHex(randomAsU8a); | ||
export const randomAsHex = /*#__PURE__*/ createAsHex(randomAsU8a); |
import { sr25519DeriveKeypairHard } from '@polkadot/wasm-crypto'; | ||
import { createDeriveFn } from './derive.js'; | ||
export const sr25519DeriveHard = createDeriveFn(sr25519DeriveKeypairHard); | ||
export const sr25519DeriveHard = /*#__PURE__*/ createDeriveFn(sr25519DeriveKeypairHard); |
import { sr25519DeriveKeypairSoft } from '@polkadot/wasm-crypto'; | ||
import { createDeriveFn } from './derive.js'; | ||
export const sr25519DeriveSoft = createDeriveFn(sr25519DeriveKeypairSoft); | ||
export const sr25519DeriveSoft = /*#__PURE__*/ createDeriveFn(sr25519DeriveKeypairSoft); |
@@ -35,2 +35,2 @@ import { hasBigInt, u8aToU8a } from '@polkadot/util'; | ||
*/ | ||
export const xxhashAsHex = createAsHex(xxhashAsU8a); | ||
export const xxhashAsHex = /*#__PURE__*/ createAsHex(xxhashAsU8a); |
Sorry, the diff of this file is too big to display
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
867899
15805
+ Added@polkadot/networks@11.1.3(transitive)
+ Added@polkadot/util@11.1.3(transitive)
+ Added@polkadot/x-bigint@11.1.3(transitive)
+ Added@polkadot/x-global@11.1.3(transitive)
+ Added@polkadot/x-randomvalues@11.1.3(transitive)
+ Added@polkadot/x-textdecoder@11.1.3(transitive)
+ Added@polkadot/x-textencoder@11.1.3(transitive)
- Removed@polkadot/networks@11.1.2(transitive)
- Removed@polkadot/util@11.1.2(transitive)
- Removed@polkadot/x-bigint@11.1.2(transitive)
- Removed@polkadot/x-global@11.1.2(transitive)
- Removed@polkadot/x-randomvalues@11.1.2(transitive)
- Removed@polkadot/x-textdecoder@11.1.2(transitive)
- Removed@polkadot/x-textencoder@11.1.2(transitive)
Updated@polkadot/networks@11.1.3
Updated@polkadot/util@11.1.3
Updated@polkadot/x-bigint@11.1.3