Bump dev deps (#524)
This commit is contained in:
+2
-2
@@ -44,10 +44,10 @@
|
||||
"test:wasm-crypto:rust": "cd packages/wasm-crypto && RUST_BACKTRACE=full cargo test --release -- --test-threads=1 --nocapture"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.73.19",
|
||||
"@polkadot/dev": "^0.73.24",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"@polkadot/x-randomvalues": "^12.2.1",
|
||||
"@types/node": "^20.1.3",
|
||||
"@types/node": "^20.2.0",
|
||||
"fflate": "^0.7.4"
|
||||
},
|
||||
"resolutions": {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/wasm-util": "7.2.2-1-x",
|
||||
"tslib": "^2.5.0"
|
||||
"tslib": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^12.2.1",
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Wbg } from './wbg.js';
|
||||
* @description
|
||||
* Creates a bridge between the JS and WASM environments.
|
||||
*
|
||||
* For any bridge it is passed an function white is then called internally at the
|
||||
* For any bridge it is passed an function which is then called internally at the
|
||||
* time of initialization. This affectively implements the layer between WASM and
|
||||
* the native environment, providing all the plumbing needed for the Wbg classes.
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { InitFn, InitPromise, InitResult, WasmBaseInstance, WasmImports } f
|
||||
* It will attempt to create a WASM interface first and if this fails or is not available in
|
||||
* the environment, will fallback to attempting to create an ASM.js interface.
|
||||
*/
|
||||
export function createWasmFn <C extends WasmBaseInstance> (root: string, wasmBytes: null | Uint8Array, asmFn: null | ((wbg: WasmImports) => C)): InitFn<C> {
|
||||
export function createWasmFn <C extends WasmBaseInstance> (root: 'crypto', wasmBytes: null | Uint8Array, asmFn: null | ((wbg: WasmImports) => C)): InitFn<C> {
|
||||
return async (wbg: WasmImports): InitPromise<C> => {
|
||||
const result: InitResult<C> = {
|
||||
error: null,
|
||||
|
||||
@@ -35,13 +35,13 @@ export interface BridgeBase<C extends WasmBaseInstance> extends InitResult<C> {
|
||||
resultString (): string;
|
||||
}
|
||||
|
||||
export interface WasmBaseInstance {
|
||||
memory: WasmMemory;
|
||||
|
||||
// wbindgen functions (required and used internally)
|
||||
|
||||
export interface WasmBindGen {
|
||||
__wbindgen_exn_store (a: number): void;
|
||||
__wbindgen_free (a: number, b: number): void;
|
||||
__wbindgen_malloc (a: number): number;
|
||||
__wbindgen_realloc (a: number, b: number, c: number): number;
|
||||
}
|
||||
|
||||
export interface WasmBaseInstance extends WasmBindGen {
|
||||
memory: WasmMemory;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"version": "7.2.2-1-x",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"tslib": "^2.5.0"
|
||||
"tslib": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^12.2.1"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Copyright 2019-2023 @polkadot/wasm-crypto-asmjs authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
exports.asmJsInit = null;
|
||||
const asmJsInit = null;
|
||||
|
||||
exports.asmJsInit = asmJsInit;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"@polkadot/wasm-crypto-asmjs": "7.2.2-1-x",
|
||||
"@polkadot/wasm-crypto-wasm": "7.2.2-1-x",
|
||||
"@polkadot/wasm-util": "7.2.2-1-x",
|
||||
"tslib": "^2.5.0"
|
||||
"tslib": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^12.2.1",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/wasm-util": "7.2.2-1-x",
|
||||
"tslib": "^2.5.0"
|
||||
"tslib": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^12.2.1"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"@polkadot/wasm-crypto-init": "7.2.2-1-x",
|
||||
"@polkadot/wasm-crypto-wasm": "7.2.2-1-x",
|
||||
"@polkadot/wasm-util": "7.2.2-1-x",
|
||||
"tslib": "^2.5.0"
|
||||
"tslib": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^12.2.1",
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
import { assert, u8aToHex } from '@polkadot/util';
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function bip39Generate (wasm) {
|
||||
it('generates a bip39 phrase', () => {
|
||||
const res = wasm.bip39Generate(21);
|
||||
@@ -13,6 +16,9 @@ export function bip39Generate (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function bip39GenerateSubsequent (wasm) {
|
||||
it('generates different subsequent mnemonics', () => {
|
||||
const val1 = wasm.bip39Generate(24);
|
||||
@@ -25,6 +31,9 @@ export function bip39GenerateSubsequent (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function bip39Validate (wasm) {
|
||||
it('validates a created mnemonic', () => {
|
||||
const res = wasm.bip39Validate(wasm.bip39Generate(12));
|
||||
@@ -35,6 +44,9 @@ export function bip39Validate (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function bip39ToEntropy (wasm) {
|
||||
it('creates correct entropy for a known mnemonic', () => {
|
||||
const res = u8aToHex(wasm.bip39ToEntropy('legal winner thank year wave sausage worth useful legal winner thank yellow'));
|
||||
@@ -45,6 +57,9 @@ export function bip39ToEntropy (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function bip39ToMiniSecret (wasm) {
|
||||
it('creates the correct minisecret from a mnemonic', () => {
|
||||
const res = u8aToHex(wasm.bip39ToMiniSecret('legal winner thank year wave sausage worth useful legal winner thank yellow', 'Substrate'));
|
||||
@@ -55,6 +70,9 @@ export function bip39ToMiniSecret (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function bip39ToSeed (wasm) {
|
||||
it('creates the correct seed for a mnemonic', () => {
|
||||
const res = u8aToHex(wasm.bip39ToSeed('seed sock milk update focus rotate barely fade car face mechanic mercy', ''));
|
||||
|
||||
@@ -5,16 +5,25 @@ import crypto from 'crypto';
|
||||
|
||||
import { assert, hexToU8a, stringToU8a, u8aToHex } from '@polkadot/util';
|
||||
|
||||
/** @internal */
|
||||
/**
|
||||
* @internal
|
||||
* @param {*} pair
|
||||
*/
|
||||
function extractKeys (pair) {
|
||||
return [pair, pair.slice(32), pair.slice(0, 32)];
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
/**
|
||||
* @internal
|
||||
* @param {*} wasm
|
||||
*/
|
||||
function randomPair (wasm) {
|
||||
return extractKeys(wasm.ed25519KeypairFromSeed(crypto.randomBytes(32)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function ed25519PairFromSeed (wasm) {
|
||||
it('creates a known pair from a known seed', () => {
|
||||
const [pair, pk, sk] = extractKeys(wasm.ed25519KeypairFromSeed(stringToU8a('12345678901234567890123456789012')));
|
||||
@@ -22,12 +31,15 @@ export function ed25519PairFromSeed (wasm) {
|
||||
// console.log('\tSEC', u8aToHex(sk));
|
||||
// console.log('\tPUB', u8aToHex(pk));
|
||||
|
||||
assert(u8aToHex(sk) === '0x3132333435363738393031323334353637383930313233343536373839303132');
|
||||
assert(u8aToHex(pk) === '0x2f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee');
|
||||
assert(u8aToHex(sk) === '0x3132333435363738393031323334353637383930313233343536373839303132', 'Secretkey does not match');
|
||||
assert(u8aToHex(pk) === '0x2f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee', 'Public key does not match');
|
||||
assert(u8aToHex(pair) === '0x31323334353637383930313233343536373839303132333435363738393031322f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee', 'ERROR: pairFromSeed() does not match');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function ed25519SignAndVerify (wasm) {
|
||||
it('signs and verifies', () => {
|
||||
const [, pk, sk] = randomPair(wasm);
|
||||
@@ -41,6 +53,9 @@ export function ed25519SignAndVerify (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function ed25519VerifyExisting (wasm) {
|
||||
it('verifies a known signature', () => {
|
||||
const isValid = wasm.ed25519Verify(hexToU8a('0x90588f3f512496f2dd40571d162e8182860081c74e2085316e7c4396918f07da412ee029978e4dd714057fe973bd9e7d645148bf7b66680d67c93227cde95202'), stringToU8a('this is a message'), hexToU8a('0x2f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee'));
|
||||
@@ -51,6 +66,9 @@ export function ed25519VerifyExisting (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function ed25519Benchmark (wasm) {
|
||||
it('runs a verification benchamark', () => {
|
||||
const MESSAGE = stringToU8a('this is a message');
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
import { assert, stringToU8a, u8aToHex } from '@polkadot/util';
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function blake2bHash (wasm) {
|
||||
it('creates a known blake2b hash', () => {
|
||||
const hash = u8aToHex(wasm.blake2b(stringToU8a('abc'), new Uint8Array(), 64));
|
||||
@@ -13,6 +16,9 @@ export function blake2bHash (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function hmacSha256 (wasm) {
|
||||
it('creates a known hmacSha256', () => {
|
||||
const hash = u8aToHex(wasm.hmacSha256(stringToU8a('secret'), stringToU8a('some message')));
|
||||
@@ -23,6 +29,9 @@ export function hmacSha256 (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function hmacSha512 (wasm) {
|
||||
it('creates a known hmacSha512', () => {
|
||||
const hash = u8aToHex(wasm.hmacSha512(stringToU8a('secret'), stringToU8a('some message')));
|
||||
@@ -33,6 +42,9 @@ export function hmacSha512 (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function keccak256 (wasm) {
|
||||
it('creates a known keccak256 hash', () => {
|
||||
const hash = u8aToHex(wasm.keccak256(stringToU8a('test value')));
|
||||
@@ -43,6 +55,9 @@ export function keccak256 (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function keccak512 (wasm) {
|
||||
it('creates a known keccak512 hash', () => {
|
||||
const hash = u8aToHex(wasm.keccak512(stringToU8a('test')));
|
||||
@@ -53,6 +68,9 @@ export function keccak512 (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function pbkdf2Hash (wasm) {
|
||||
it('creates a known pbkdf2 hash', () => {
|
||||
const hash = u8aToHex(wasm.pbkdf2(stringToU8a('hello world'), stringToU8a('this is a salt'), 2048));
|
||||
@@ -63,6 +81,9 @@ export function pbkdf2Hash (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function scryptHash (wasm) {
|
||||
it('creates a known scrypt hash', () => {
|
||||
const hash = u8aToHex(wasm.scrypt(stringToU8a('password'), stringToU8a('salt'), 14, 8, 1));
|
||||
@@ -73,6 +94,9 @@ export function scryptHash (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sha256Hash (wasm) {
|
||||
it('creates a known sha256 hash', () => {
|
||||
const hash = u8aToHex(wasm.sha256(stringToU8a('hello world')));
|
||||
@@ -83,6 +107,9 @@ export function sha256Hash (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sha512Hash (wasm) {
|
||||
it('creates a known sha512 hash', () => {
|
||||
const hash = u8aToHex(wasm.sha512(stringToU8a('hello world')));
|
||||
@@ -93,6 +120,9 @@ export function sha512Hash (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function twoxHash (wasm) {
|
||||
it('creates a known twox hash', () => {
|
||||
const hash64 = u8aToHex(wasm.twox(stringToU8a('abc'), 1));
|
||||
|
||||
@@ -23,6 +23,10 @@ export const tests = {
|
||||
vrf
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export async function initRun (name, wasm) {
|
||||
const result = await wasm.waitReady();
|
||||
|
||||
@@ -33,7 +37,12 @@ export async function initRun (name, wasm) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function runAll (name, wasm) {
|
||||
/** @type {string[]} */
|
||||
const failed = [];
|
||||
let count = 0;
|
||||
|
||||
@@ -71,16 +80,22 @@ export function runAll (name, wasm) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function runUnassisted (type, wasm) {
|
||||
console.log(`\n*** ${type}: Running tests`);
|
||||
|
||||
// for these we are pass-through describe and it handlers
|
||||
// @ts-expect-error We are hacking this, so expect TS to be unhappy...
|
||||
globalThis.describe = (name, fn) => {
|
||||
console.log('\n', name);
|
||||
|
||||
fn();
|
||||
};
|
||||
|
||||
// @ts-expect-error We are hacking this, so expect TS to be unhappy...
|
||||
globalThis.it = (name, fn) => {
|
||||
console.log(`\t${name}`);
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
import { assert, hexToU8a, u8aToHex } from '@polkadot/util';
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function secp256k1Compress (wasm) {
|
||||
it('compresses a known publicKey', () => {
|
||||
const pubkey = '0x04b9dc646dd71118e5f7fda681ad9eca36eb3ee96f344f582fbe7b5bcdebb1307763fe926c273235fd979a134076d00fd1683cbd35868cb485d4a3a640e52184af';
|
||||
@@ -14,6 +17,9 @@ export function secp256k1Compress (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function secp256k1Expand (wasm) {
|
||||
it('expands a known compressed key', () => {
|
||||
const pubkey = '0x03b9dc646dd71118e5f7fda681ad9eca36eb3ee96f344f582fbe7b5bcdebb13077';
|
||||
@@ -25,6 +31,9 @@ export function secp256k1Expand (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function secp256k1FromSeed1 (wasm) {
|
||||
it('creates a known pair from seed (1)', () => {
|
||||
const seckey = '0x4380de832af797688026ce24f85204d508243f201650c1a134929e5458b7fbae';
|
||||
@@ -36,6 +45,9 @@ export function secp256k1FromSeed1 (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function secp256k1FromSeed2 (wasm) {
|
||||
it('creates a known pair from seed (2)', () => {
|
||||
// https://github.com/polkadot-js/wasm/issues/307
|
||||
@@ -60,6 +72,9 @@ export function secp256k1FromSeed2 (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function secp256k1Recover (wasm) {
|
||||
it('recovers a publicKey from signature', () => {
|
||||
const sig = '0x7505f2880114da51b3f5d535f8687953c0ab9af4ab81e592eaebebf53b728d2b6dfd9b5bcd70fee412b1f31360e7c2774009305cb84fc50c1d0ff8034dfa5fff';
|
||||
@@ -72,6 +87,9 @@ export function secp256k1Recover (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function secp256k1Sign (wasm) {
|
||||
it('creates a known signature', () => {
|
||||
const sec = '0x4380de832af797688026ce24f85204d508243f201650c1a134929e5458b7fbae';
|
||||
|
||||
@@ -5,16 +5,25 @@ import crypto from 'crypto';
|
||||
|
||||
import { assert, hexToU8a, stringToU8a, u8aToHex } from '@polkadot/util';
|
||||
|
||||
/** @internal */
|
||||
/**
|
||||
* @internal
|
||||
* @param {*} pair
|
||||
*/
|
||||
function extractKeys (pair) {
|
||||
return [pair, pair.slice(64), pair.slice(0, 64)];
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
/**
|
||||
* @internal
|
||||
* @param {*} wasm
|
||||
*/
|
||||
function randomPair (wasm) {
|
||||
return extractKeys(wasm.sr25519KeypairFromSeed(crypto.randomBytes(32)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519PairFromSeed (wasm) {
|
||||
it('creates a known pair from a known seed', () => {
|
||||
const pair = wasm.sr25519KeypairFromSeed(stringToU8a('12345678901234567890123456789012'));
|
||||
@@ -26,6 +35,9 @@ export function sr25519PairFromSeed (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519DevFromSeed (wasm) {
|
||||
it('creates a known development pair', () => {
|
||||
const pair = wasm.sr25519KeypairFromSeed(hexToU8a('0xfac7959dbfe72f052e5a0c3c8d6530f202b02fd8f9f5ca3580ec8deb7797479e'));
|
||||
@@ -37,6 +49,9 @@ export function sr25519DevFromSeed (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519VerifyExisting (wasm) {
|
||||
it('verifies a known signature', () => {
|
||||
const PK = hexToU8a('0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d');
|
||||
@@ -51,6 +66,9 @@ export function sr25519VerifyExisting (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519SignDeterministic (wasm) {
|
||||
it('creates non-deterministic signatures', () => {
|
||||
const [, pk, sk] = randomPair(wasm);
|
||||
@@ -64,6 +82,9 @@ export function sr25519SignDeterministic (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519SignAndVerify (wasm) {
|
||||
it('verifies a created signature', () => {
|
||||
const [, pk, sk] = randomPair(wasm);
|
||||
@@ -77,6 +98,9 @@ export function sr25519SignAndVerify (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519DeriveHard (wasm) {
|
||||
it('derives using a hard path', () => {
|
||||
const [pair] = randomPair(wasm);
|
||||
@@ -85,10 +109,13 @@ export function sr25519DeriveHard (wasm) {
|
||||
// console.log('\tSEC', u8aToHex(derived.slice(0, 64)));
|
||||
// console.log('\tPUB', u8aToHex(derived.slice(64)));
|
||||
|
||||
assert(derived.length === 96);
|
||||
assert(derived.length === 96, 'Derived key length mismatch');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519DeriveHardKnown (wasm) {
|
||||
it('derives a known hard key', () => {
|
||||
const derived = wasm.sr25519DeriveKeypairHard(hexToU8a('0x28b0ae221c6bb06856b287f60d7ea0d98552ea5a16db16956849aa371db3eb51fd190cce74df356432b410bd64682309d6dedb27c76845daf388557cbac3ca3446ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a'), hexToU8a('0x14416c6963650000000000000000000000000000000000000000000000000000'));
|
||||
@@ -101,6 +128,9 @@ export function sr25519DeriveHardKnown (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519DeriveSoft (wasm) {
|
||||
it('derives using a soft path', () => {
|
||||
const [pair] = randomPair(wasm);
|
||||
@@ -109,10 +139,13 @@ export function sr25519DeriveSoft (wasm) {
|
||||
// console.log('\tSEC', u8aToHex(derived.slice(0, 64)));
|
||||
// console.log('\tPUB', u8aToHex(derived.slice(64)));
|
||||
|
||||
assert(derived.length === 96);
|
||||
assert(derived.length === 96, 'Derived key length mismatch');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519DeriveSoftKnown (wasm) {
|
||||
it('derives a known soft key', () => {
|
||||
const derived = wasm.sr25519DeriveKeypairSoft(hexToU8a('0x28b0ae221c6bb06856b287f60d7ea0d98552ea5a16db16956849aa371db3eb51fd190cce74df356432b410bd64682309d6dedb27c76845daf388557cbac3ca3446ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a'), hexToU8a('0x0c666f6f00000000000000000000000000000000000000000000000000000000'));
|
||||
@@ -125,6 +158,9 @@ export function sr25519DeriveSoftKnown (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519DeriveSoftPubkey (wasm) {
|
||||
it('derives a known soft publicKey', () => {
|
||||
const derived = u8aToHex(wasm.sr25519DerivePublicSoft(hexToU8a('0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a'), hexToU8a('0x0c666f6f00000000000000000000000000000000000000000000000000000000')));
|
||||
@@ -135,6 +171,9 @@ export function sr25519DeriveSoftPubkey (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519KeyAgreement (wasm) {
|
||||
it('allows for agreements', () => {
|
||||
const pair1 = wasm.sr25519KeypairFromSeed(hexToU8a('0x3b44c558f9a8f3dc9690d53088558c1ba2529b677e316c6054d1852595b004af'));
|
||||
@@ -154,6 +193,9 @@ export function sr25519KeyAgreement (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function sr25519Benchmark (wasm) {
|
||||
it('runs a verification benchmark', () => {
|
||||
const MESSAGE = stringToU8a('this is a message');
|
||||
|
||||
@@ -5,14 +5,25 @@ import crypto from 'crypto';
|
||||
|
||||
import { assert, stringToU8a, u8aToHex } from '@polkadot/util';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @param {*} pair
|
||||
*/
|
||||
function extractKeys (pair) {
|
||||
return [pair, pair.slice(64), pair.slice(0, 64)];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @param {*} wasm
|
||||
*/
|
||||
function randomPair (wasm) {
|
||||
return extractKeys(wasm.sr25519KeypairFromSeed(crypto.randomBytes(32)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function vrfSignAndVerifyCompat (wasm) {
|
||||
it('can sign and verify (1)', () => {
|
||||
const [, pk, sk] = randomPair(wasm);
|
||||
@@ -26,6 +37,9 @@ export function vrfSignAndVerifyCompat (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function vrfSignAndVerify (wasm) {
|
||||
it('can sign and verify (2)', () => {
|
||||
const [, pk, sk] = randomPair(wasm);
|
||||
@@ -39,6 +53,9 @@ export function vrfSignAndVerify (wasm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} wasm
|
||||
*/
|
||||
export function vrfSignAndVerifyDeterministic (wasm) {
|
||||
it('has non-deterministic outputs', () => {
|
||||
const [,, sk] = randomPair(wasm);
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
// Copyright 2019-2023 @polkadot/wasm-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// NOTE We don't use ts-expect-error here since the build folder may or may
|
||||
// not exist (so the error may or may not be there)
|
||||
//
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore This should only run against the compiled ouput, where this should exist
|
||||
import * as wasm from '../build-deno/mod.ts';
|
||||
import { initRun, tests } from './all/index.js';
|
||||
|
||||
// @ts-expect-error We do a quick-and-dirty, hence "any"
|
||||
declare const globalThis;
|
||||
declare const Deno: {
|
||||
test: (name: string, test: () => unknown) => unknown;
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
// NOTE We don't use ts-expect-error here since the build folder may or may
|
||||
// not exist (so the error may or may not be there)
|
||||
//
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore This should only run against the compiled ouput, where this should exist
|
||||
import * as wasm from '../build/index.js';
|
||||
import { initRun, tests } from './all/index.js';
|
||||
|
||||
@@ -12,7 +17,7 @@ describe('wasm-crypto', (): void => {
|
||||
for (const name of Object.keys(tests)) {
|
||||
describe(name, (): void => {
|
||||
Object
|
||||
.values<(wasm: unknown) => void>(tests[name])
|
||||
.values<(wasm: unknown) => void>(tests[name as keyof typeof tests])
|
||||
.forEach((fn) => fn(wasm));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,14 @@ import path from 'node:path';
|
||||
import process from 'node:process';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
|
||||
// Adjusts the resolver to point to the build output
|
||||
/**
|
||||
* Adjusts the resolver to point to the build output
|
||||
*
|
||||
* @param {*} specifier
|
||||
* @param {*} context
|
||||
* @param {*} nextResolve
|
||||
* @returns {*}
|
||||
*/
|
||||
export function resolve (specifier, context, nextResolve) {
|
||||
if (/^@polkadot\/wasm-/.test(specifier)) {
|
||||
const parts = specifier.split(/[\\/]/);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/test/*.ts"
|
||||
"**/test/**/*"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../wasm-bridge/tsconfig.build.json" },
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./test",
|
||||
"emitDeclarationOnly": false,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": [
|
||||
"**/test/**/*"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../wasm-crypto/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
"version": "7.2.2-1-x",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"tslib": "^2.5.0"
|
||||
"tslib": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^12.2.1"
|
||||
|
||||
@@ -5,12 +5,10 @@
|
||||
|
||||
import { base64Decode } from './base64.js';
|
||||
|
||||
const HELLO_DUAL = 'aGVsbG8gd29ybGQg0J/RgNC40LLQtdGC0YHRgtCy0YPRjiDQvNC4IOS9oOWlvQ==';
|
||||
|
||||
const TESTS = [
|
||||
{
|
||||
// hello world Приветствую ми 你好
|
||||
base64: HELLO_DUAL,
|
||||
base64: 'aGVsbG8gd29ybGQg0J/RgNC40LLQtdGC0YHRgtCy0YPRjiDQvNC4IOS9oOWlvQ==',
|
||||
output: new Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 32, 208, 159, 209, 128, 208, 184, 208, 178, 208, 181, 209, 130, 209, 129, 209, 130, 208, 178, 209, 131, 209, 142, 32, 208, 188, 208, 184, 32, 228, 189, 160, 229, 165, 189])
|
||||
},
|
||||
{
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
// - https://github.com/polkadot-js/api/issues/2963
|
||||
// - https://github.com/101arrowz/fflate/issues/17
|
||||
//
|
||||
// Only tweaks make here are some TS adjustments (we use strict null checks), the code is otherwise as-is with
|
||||
// only the single required function provided (compression is still being done in the build with fflate)
|
||||
// Only tweaks made here are some TS adjustments (we use strict null checks),
|
||||
// the code is otherwise as-is with only the single required function provided
|
||||
// (compression is still being done in the build with fflate)
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/*.spec.ts",
|
||||
],
|
||||
"references": []
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src",
|
||||
"emitDeclarationOnly": false,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": [
|
||||
"**/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../wasm-util/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
+3
-1
@@ -5,9 +5,11 @@
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./packages/wasm-crypto/tsconfig.build.json" },
|
||||
{ "path": "./packages/wasm-crypto/tsconfig.spec.json" },
|
||||
{ "path": "./packages/wasm-crypto-init/tsconfig.build.json" },
|
||||
{ "path": "./packages/wasm-crypto-asmjs/tsconfig.build.json" },
|
||||
{ "path": "./packages/wasm-crypto-wasm/tsconfig.build.json" },
|
||||
{ "path": "./packages/wasm-util/tsconfig.build.json" }
|
||||
{ "path": "./packages/wasm-util/tsconfig.build.json" },
|
||||
{ "path": "./packages/wasm-util/tsconfig.spec.json" }
|
||||
]
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,7 +5,8 @@
|
||||
"composite": false
|
||||
},
|
||||
"include": [
|
||||
"packages/**/src/**/*"
|
||||
"packages/**/src/**/*",
|
||||
"packages/**/test/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**/*"
|
||||
|
||||
@@ -66,21 +66,21 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint-community/eslint-utils@npm:^4.2.0":
|
||||
version: 4.2.0
|
||||
resolution: "@eslint-community/eslint-utils@npm:4.2.0"
|
||||
"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0":
|
||||
version: 4.4.0
|
||||
resolution: "@eslint-community/eslint-utils@npm:4.4.0"
|
||||
dependencies:
|
||||
eslint-visitor-keys: ^3.3.0
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
|
||||
checksum: 82fdd1cc2a5d169def0e665ec790580ef708e7df9c91f20006595dc90e3bd42ec31c8976a2eeccd336286301a72e937c0ddf3ab4b7377d7014997c36333a7d22
|
||||
checksum: cdfe3ae42b4f572cbfb46d20edafe6f36fc5fb52bf2d90875c58aefe226892b9677fef60820e2832caf864a326fe4fc225714c46e8389ccca04d5f9288aabd22
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint-community/regexpp@npm:^4.4.0":
|
||||
version: 4.4.0
|
||||
resolution: "@eslint-community/regexpp@npm:4.4.0"
|
||||
checksum: 2d127af0c752b80e8a782eacfe996a86925d21de92da3ffc6f9e615e701145e44a62e26bdd88bfac2cd76779c39ba8d9875a91046ec5e7e5f23cb647c247ea6a
|
||||
"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.0":
|
||||
version: 4.5.1
|
||||
resolution: "@eslint-community/regexpp@npm:4.5.1"
|
||||
checksum: 6d901166d64998d591fab4db1c2f872981ccd5f6fe066a1ad0a93d4e11855ecae6bfb76660869a469563e8882d4307228cebd41142adb409d182f2966771e57e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -350,34 +350,34 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/dev-test@npm:^0.73.19":
|
||||
version: 0.73.19
|
||||
resolution: "@polkadot/dev-test@npm:0.73.19"
|
||||
"@polkadot/dev-test@npm:^0.73.24":
|
||||
version: 0.73.24
|
||||
resolution: "@polkadot/dev-test@npm:0.73.24"
|
||||
dependencies:
|
||||
jsdom: ^22.0.0
|
||||
tslib: ^2.5.0
|
||||
checksum: 8cf5c56f4440e7391c58493ad35c2a39219b49d931443e6e350774c6ba3d74277a43fa257bf625fc0075abad70c976b1d3b8bf0fd05df0cc203daef8b5fe1a87
|
||||
tslib: ^2.5.1
|
||||
checksum: 88caeafd93afc416f902bc6991de33ef0a9168951120aa52bfb1cbea425e7f8f1c17aa590a89a168fd857a3a40391629e6f28d80dda4d32d12c4658d311b7513
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/dev-ts@npm:^0.73.19":
|
||||
version: 0.73.19
|
||||
resolution: "@polkadot/dev-ts@npm:0.73.19"
|
||||
"@polkadot/dev-ts@npm:^0.73.24":
|
||||
version: 0.73.24
|
||||
resolution: "@polkadot/dev-ts@npm:0.73.24"
|
||||
dependencies:
|
||||
json5: ^2.2.3
|
||||
tslib: ^2.5.0
|
||||
tslib: ^2.5.1
|
||||
typescript: ^5.0.4
|
||||
checksum: 061d2bc69426931a2bbba4671c6b84eef6c6a9216426763107902a0d2fb10fc7c99bfa91502a9faa4ded8c10f3a9c216c2ce04fe96e0094beaf3a5b6db5d2b32
|
||||
checksum: ad8ce09c436629b32cc42b4837330b6f580b8fb4468fa8b806977e95f77bb3490d328f36bab2179e6a2688b4934f78d706105340907ee119d6dd00a71561a3cd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/dev@npm:^0.73.19":
|
||||
version: 0.73.19
|
||||
resolution: "@polkadot/dev@npm:0.73.19"
|
||||
"@polkadot/dev@npm:^0.73.24":
|
||||
version: 0.73.24
|
||||
resolution: "@polkadot/dev@npm:0.73.24"
|
||||
dependencies:
|
||||
"@eslint/js": ^8.40.0
|
||||
"@polkadot/dev-test": ^0.73.19
|
||||
"@polkadot/dev-ts": ^0.73.19
|
||||
"@polkadot/dev-test": ^0.73.24
|
||||
"@polkadot/dev-ts": ^0.73.24
|
||||
"@rollup/plugin-alias": ^5.0.0
|
||||
"@rollup/plugin-commonjs": ^25.0.0
|
||||
"@rollup/plugin-dynamic-import-vars": ^2.0.3
|
||||
@@ -396,7 +396,7 @@ __metadata:
|
||||
eslint-plugin-import: ^2.27.5
|
||||
eslint-plugin-import-newlines: ^1.3.1
|
||||
eslint-plugin-jest: ^27.2.1
|
||||
eslint-plugin-n: ^15.7.0
|
||||
eslint-plugin-n: ^16.0.0
|
||||
eslint-plugin-promise: ^6.1.1
|
||||
eslint-plugin-react: ^7.32.2
|
||||
eslint-plugin-react-hooks: ^4.6.0
|
||||
@@ -404,12 +404,13 @@ __metadata:
|
||||
eslint-plugin-sort-destructure-keys: ^1.5.0
|
||||
gh-pages: ^5.0.0
|
||||
gh-release: ^7.0.2
|
||||
json5: ^2.2.3
|
||||
madge: ^6.0.0
|
||||
rollup: ^3.21.7
|
||||
rollup: ^3.22.0
|
||||
rollup-plugin-cleanup: ^3.2.1
|
||||
tslib: ^2.5.0
|
||||
tslib: ^2.5.1
|
||||
typescript: ^5.0.4
|
||||
webpack: ^5.82.1
|
||||
webpack: ^5.83.1
|
||||
webpack-cli: ^5.1.1
|
||||
webpack-dev-server: ^4.15.0
|
||||
webpack-merge: ^5.8.0
|
||||
@@ -439,7 +440,7 @@ __metadata:
|
||||
polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs
|
||||
polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs
|
||||
polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs
|
||||
checksum: 9d11cc6fe31acaeace30a030c150fec4cb66ea6b6b6884c33ac609c6a46358ab20285145c829988932d410fe5481eed399973d0a1c281be7013cd6c23af59035
|
||||
checksum: 2f511c6e308bb90cf356d9170a08d50f083a431c1d68e2db32c941993a06c9d3e774ce97635f4954a14439866747f6d3fd5ec42e26c92273ebcb42ffaf383cfa
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -465,7 +466,7 @@ __metadata:
|
||||
"@polkadot/util": ^12.2.1
|
||||
"@polkadot/wasm-util": 7.2.2-1-x
|
||||
"@polkadot/x-randomvalues": ^12.2.1
|
||||
tslib: ^2.5.0
|
||||
tslib: ^2.5.1
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
"@polkadot/x-randomvalues": "*"
|
||||
@@ -477,7 +478,7 @@ __metadata:
|
||||
resolution: "@polkadot/wasm-crypto-asmjs@workspace:packages/wasm-crypto-asmjs"
|
||||
dependencies:
|
||||
"@polkadot/util": ^12.2.1
|
||||
tslib: ^2.5.0
|
||||
tslib: ^2.5.1
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
languageName: unknown
|
||||
@@ -493,7 +494,7 @@ __metadata:
|
||||
"@polkadot/wasm-crypto-wasm": 7.2.2-1-x
|
||||
"@polkadot/wasm-util": 7.2.2-1-x
|
||||
"@polkadot/x-randomvalues": ^12.2.1
|
||||
tslib: ^2.5.0
|
||||
tslib: ^2.5.1
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
"@polkadot/x-randomvalues": "*"
|
||||
@@ -506,7 +507,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@polkadot/util": ^12.2.1
|
||||
"@polkadot/wasm-util": 7.2.2-1-x
|
||||
tslib: ^2.5.0
|
||||
tslib: ^2.5.1
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
languageName: unknown
|
||||
@@ -523,7 +524,7 @@ __metadata:
|
||||
"@polkadot/wasm-crypto-wasm": 7.2.2-1-x
|
||||
"@polkadot/wasm-util": 7.2.2-1-x
|
||||
"@polkadot/x-randomvalues": ^12.2.1
|
||||
tslib: ^2.5.0
|
||||
tslib: ^2.5.1
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
"@polkadot/x-randomvalues": "*"
|
||||
@@ -535,7 +536,7 @@ __metadata:
|
||||
resolution: "@polkadot/wasm-util@workspace:packages/wasm-util"
|
||||
dependencies:
|
||||
"@polkadot/util": ^12.2.1
|
||||
tslib: ^2.5.0
|
||||
tslib: ^2.5.1
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
languageName: unknown
|
||||
@@ -881,10 +882,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:*, @types/node@npm:^20.1.3":
|
||||
version: 20.1.3
|
||||
resolution: "@types/node@npm:20.1.3"
|
||||
checksum: abdb593f662a079715b4e9df0c706822e49814dd641fa5a6226ab73fb931cbfc9cfd5df92e09c13dbc90dbc8fce680d29cb735b88899d661481d93e09a8df2be
|
||||
"@types/node@npm:*, @types/node@npm:^20.2.0":
|
||||
version: 20.2.0
|
||||
resolution: "@types/node@npm:20.2.0"
|
||||
checksum: 9b937367448a07482af14e3518125ae531bff99e16d51e0945f4f93dbd7051d8a270811bdeb57f0b52c629fb0c9c401a238a7352dfbc87e26495b6f0f59cbdb6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3091,15 +3092,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-plugin-es@npm:^4.1.0":
|
||||
version: 4.1.0
|
||||
resolution: "eslint-plugin-es@npm:4.1.0"
|
||||
"eslint-plugin-es-x@npm:^6.1.0":
|
||||
version: 6.1.0
|
||||
resolution: "eslint-plugin-es-x@npm:6.1.0"
|
||||
dependencies:
|
||||
eslint-utils: ^2.0.0
|
||||
regexpp: ^3.0.0
|
||||
"@eslint-community/eslint-utils": ^4.1.2
|
||||
"@eslint-community/regexpp": ^4.5.0
|
||||
peerDependencies:
|
||||
eslint: ">=4.19.1"
|
||||
checksum: 26b87a216d3625612b1d3ca8653ac8a1d261046d2a973bb0eb2759070267d2bfb0509051facdeb5ae03dc8dfb51a434be23aff7309a752ca901d637da535677f
|
||||
eslint: ">=8"
|
||||
checksum: b347d34655fef18b20cbc4a9e362b65aa547a3703fff4162342ee987d4804f2607d2e3f21f140b6c005e3b790e09b4a0fabd0b87eb7c89918654fc5d4b2b510c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3165,21 +3166,21 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-plugin-n@npm:^15.7.0":
|
||||
version: 15.7.0
|
||||
resolution: "eslint-plugin-n@npm:15.7.0"
|
||||
"eslint-plugin-n@npm:^16.0.0":
|
||||
version: 16.0.0
|
||||
resolution: "eslint-plugin-n@npm:16.0.0"
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils": ^4.4.0
|
||||
builtins: ^5.0.1
|
||||
eslint-plugin-es: ^4.1.0
|
||||
eslint-utils: ^3.0.0
|
||||
eslint-plugin-es-x: ^6.1.0
|
||||
ignore: ^5.1.1
|
||||
is-core-module: ^2.11.0
|
||||
is-core-module: ^2.12.0
|
||||
minimatch: ^3.1.2
|
||||
resolve: ^1.22.1
|
||||
semver: ^7.3.8
|
||||
resolve: ^1.22.2
|
||||
semver: ^7.5.0
|
||||
peerDependencies:
|
||||
eslint: ">=7.0.0"
|
||||
checksum: cfbcc67e62adf27712afdeadf13223cb9717f95d4af8442056d9d4c97a8b88af76b7969f75deaac26fa98481023d6b7c9e43a28909e7f0468f40b3024b7bcfae
|
||||
checksum: 77bb74747ee021cd33d6027a1e13620a910a05755e42e29b4f810ef52800ae62bd21057c5e7de66dc3b8cbc9bc8332eeea4c9e14ed889284e549278d1520fe3e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3266,33 +3267,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-utils@npm:^2.0.0":
|
||||
version: 2.1.0
|
||||
resolution: "eslint-utils@npm:2.1.0"
|
||||
dependencies:
|
||||
eslint-visitor-keys: ^1.1.0
|
||||
checksum: 27500938f348da42100d9e6ad03ae29b3de19ba757ae1a7f4a087bdcf83ac60949bbb54286492ca61fac1f5f3ac8692dd21537ce6214240bf95ad0122f24d71d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-utils@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "eslint-utils@npm:3.0.0"
|
||||
dependencies:
|
||||
eslint-visitor-keys: ^2.0.0
|
||||
peerDependencies:
|
||||
eslint: ">=5"
|
||||
checksum: 0668fe02f5adab2e5a367eee5089f4c39033af20499df88fe4e6aba2015c20720404d8c3d6349b6f716b08fdf91b9da4e5d5481f265049278099c4c836ccb619
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-visitor-keys@npm:^1.1.0":
|
||||
version: 1.3.0
|
||||
resolution: "eslint-visitor-keys@npm:1.3.0"
|
||||
checksum: 37a19b712f42f4c9027e8ba98c2b06031c17e0c0a4c696cd429bd9ee04eb43889c446f2cd545e1ff51bef9593fcec94ecd2c2ef89129fcbbf3adadbef520376a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-visitor-keys@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "eslint-visitor-keys@npm:2.0.0"
|
||||
@@ -4680,12 +4654,12 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-core-module@npm:^2.11.0, is-core-module@npm:^2.9.0":
|
||||
version: 2.11.0
|
||||
resolution: "is-core-module@npm:2.11.0"
|
||||
"is-core-module@npm:^2.11.0, is-core-module@npm:^2.12.0, is-core-module@npm:^2.9.0":
|
||||
version: 2.12.0
|
||||
resolution: "is-core-module@npm:2.12.0"
|
||||
dependencies:
|
||||
has: ^1.0.3
|
||||
checksum: f96fd490c6b48eb4f6d10ba815c6ef13f410b0ba6f7eb8577af51697de523e5f2cd9de1c441b51d27251bf0e4aebc936545e33a5d26d5d51f28d25698d4a8bab
|
||||
checksum: f7f7eb2ab71fd769ee9fb2385c095d503aa4b5ce0028c04557de03f1e67a87c85e5bac1f215945fc3c955867a139a415a3ec4c4234a0bffdf715232660f440a6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6613,13 +6587,6 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"regexpp@npm:^3.0.0":
|
||||
version: 3.2.0
|
||||
resolution: "regexpp@npm:3.2.0"
|
||||
checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"registry-auth-token@npm:^4.0.0":
|
||||
version: 4.2.1
|
||||
resolution: "registry-auth-token@npm:4.2.1"
|
||||
@@ -6744,16 +6711,16 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@^1.1.6, resolve@^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.1":
|
||||
version: 1.22.1
|
||||
resolution: "resolve@npm:1.22.1"
|
||||
"resolve@^1.1.6, resolve@^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2":
|
||||
version: 1.22.3
|
||||
resolution: "resolve@npm:1.22.3"
|
||||
dependencies:
|
||||
is-core-module: ^2.9.0
|
||||
is-core-module: ^2.12.0
|
||||
path-parse: ^1.0.7
|
||||
supports-preserve-symlinks-flag: ^1.0.0
|
||||
bin:
|
||||
resolve: bin/resolve
|
||||
checksum: 07af5fc1e81aa1d866cbc9e9460fbb67318a10fa3c4deadc35c3ad8a898ee9a71a86a65e4755ac3195e0ea0cfbe201eb323ebe655ce90526fd61917313a34e4e
|
||||
checksum: fb834b81348428cb545ff1b828a72ea28feb5a97c026a1cf40aa1008352c72811ff4d4e71f2035273dc536dcfcae20c13604ba6283c612d70fa0b6e44519c374
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6770,16 +6737,16 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@patch:resolve@^1.1.6#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.21.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.22.1#~builtin<compat/resolve>":
|
||||
version: 1.22.1
|
||||
resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin<compat/resolve>::version=1.22.1&hash=07638b"
|
||||
"resolve@patch:resolve@^1.1.6#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.21.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.22.1#~builtin<compat/resolve>, resolve@patch:resolve@^1.22.2#~builtin<compat/resolve>":
|
||||
version: 1.22.3
|
||||
resolution: "resolve@patch:resolve@npm%3A1.22.3#~builtin<compat/resolve>::version=1.22.3&hash=07638b"
|
||||
dependencies:
|
||||
is-core-module: ^2.9.0
|
||||
is-core-module: ^2.12.0
|
||||
path-parse: ^1.0.7
|
||||
supports-preserve-symlinks-flag: ^1.0.0
|
||||
bin:
|
||||
resolve: bin/resolve
|
||||
checksum: 5656f4d0bedcf8eb52685c1abdf8fbe73a1603bb1160a24d716e27a57f6cecbe2432ff9c89c2bd57542c3a7b9d14b1882b73bfe2e9d7849c9a4c0b8b39f02b8b
|
||||
checksum: ad59734723b596d0891321c951592ed9015a77ce84907f89c9d9307dd0c06e11a67906a3e628c4cae143d3e44898603478af0ddeb2bba3f229a9373efe342665
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6861,9 +6828,9 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup@npm:^3.21.7":
|
||||
version: 3.21.7
|
||||
resolution: "rollup@npm:3.21.7"
|
||||
"rollup@npm:^3.22.0":
|
||||
version: 3.22.0
|
||||
resolution: "rollup@npm:3.22.0"
|
||||
dependencies:
|
||||
fsevents: ~2.3.2
|
||||
dependenciesMeta:
|
||||
@@ -6871,7 +6838,7 @@ fsevents@~2.3.2:
|
||||
optional: true
|
||||
bin:
|
||||
rollup: dist/bin/rollup
|
||||
checksum: 44372a1e6fbd1941d6cb230b2a3de6d86861ca7523792757c9fe1d254ae4cd645f5dae27d93c7b1e02c60945d2eadd8c74a99033bd8328eda84949086330d804
|
||||
checksum: 6da2bfe1eb16714ccd4bf56ca92430309dc71b4492a3c38502f68f645433dcc789fb79f3761fc2269aa0cf20ece7821c4d7c95b860b7343c2ed52ed1c36c9a90
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6879,10 +6846,10 @@ fsevents@~2.3.2:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "root-workspace-0b6124@workspace:."
|
||||
dependencies:
|
||||
"@polkadot/dev": ^0.73.19
|
||||
"@polkadot/dev": ^0.73.24
|
||||
"@polkadot/util": ^12.2.1
|
||||
"@polkadot/x-randomvalues": ^12.2.1
|
||||
"@types/node": ^20.1.3
|
||||
"@types/node": ^20.2.0
|
||||
fflate: ^0.7.4
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@@ -7026,14 +6993,14 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8":
|
||||
version: 7.3.8
|
||||
resolution: "semver@npm:7.3.8"
|
||||
"semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.0":
|
||||
version: 7.5.1
|
||||
resolution: "semver@npm:7.5.1"
|
||||
dependencies:
|
||||
lru-cache: ^6.0.0
|
||||
bin:
|
||||
semver: bin/semver.js
|
||||
checksum: ba9c7cbbf2b7884696523450a61fee1a09930d888b7a8d7579025ad93d459b2d1949ee5bbfeb188b2be5f4ac163544c5e98491ad6152df34154feebc2cc337c1
|
||||
checksum: d16dbedad53c65b086f79524b9ef766bf38670b2395bdad5c957f824dcc566b624988013564f4812bcace3f9d405355c3635e2007396a39d1bffc71cfec4a2fc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7784,10 +7751,10 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:^2.3.1, tslib@npm:^2.5.0":
|
||||
version: 2.5.0
|
||||
resolution: "tslib@npm:2.5.0"
|
||||
checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1
|
||||
"tslib@npm:^2.3.1, tslib@npm:^2.5.0, tslib@npm:^2.5.1":
|
||||
version: 2.5.1
|
||||
resolution: "tslib@npm:2.5.1"
|
||||
checksum: 535e41e956b32d21aeff007a2c74989d1a6bf3fecb2b0141d80e5b9920bf90e23b4f0cd3772704bc03637c762dbdc1a314d75a407dd7189afbe3e83d80df9392
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -8262,9 +8229,9 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"webpack@npm:^5.82.1":
|
||||
version: 5.82.1
|
||||
resolution: "webpack@npm:5.82.1"
|
||||
"webpack@npm:^5.83.1":
|
||||
version: 5.83.1
|
||||
resolution: "webpack@npm:5.83.1"
|
||||
dependencies:
|
||||
"@types/eslint-scope": ^3.7.3
|
||||
"@types/estree": ^1.0.0
|
||||
@@ -8295,7 +8262,7 @@ fsevents@~2.3.2:
|
||||
optional: true
|
||||
bin:
|
||||
webpack: bin/webpack.js
|
||||
checksum: 747ee7ebd238c15249c2652060e3c6ca6d62cc66dcf7e4e2824ecd4875b7ea5e01fce8f4179080a3e84dfdb3c8d0992700444c7c5a05ef47b38c0623d3ac76de
|
||||
checksum: 219d5ef50380bc0fd3702ed17feddf13819d8173b78f7a5b857dc74ac177e63d1f79c050792754411cc088bbc02e0971b989efddadbb8e393cf27d64c0ad9ff8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user