Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
047840319e | ||
|
|
3fbf0b98c2 | ||
|
|
e6b0411e9c | ||
|
|
6e8199bab7 | ||
|
|
8ca4525570 | ||
|
|
0c3a71145a | ||
|
|
9c1be4f19b | ||
|
|
e5e6bdd814 | ||
|
|
55a3201bd5 | ||
|
|
de2538c18d | ||
|
|
e8dced9fed | ||
|
|
0afe1144d1 | ||
|
|
5a04d67bb2 | ||
|
|
41481c1e3a | ||
|
|
8a8b583f81 | ||
|
|
03c8169cd9 | ||
|
|
f9ee358442 | ||
|
|
ef5cfc728c | ||
|
|
88b8a54018 | ||
|
|
8c666725b2 | ||
|
|
daabdfac45 | ||
|
|
538359fd49 | ||
|
|
df044669e2 | ||
|
|
60374f417a |
31
CHANGELOG.md
31
CHANGELOG.md
@@ -1,5 +1,36 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 13.5.6 Aug 26, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Set pbkdf2Encode rounds to default to 210,000 ([#1983](https://github.com/polkadot-js/common/pull/1983))
|
||||
- Bump @polkadot/wasm deps ([#2002](https://github.com/polkadot-js/common/pull/2002))
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add DENTNet to generic Polkadot app supported chains ([#1942](https://github.com/polkadot-js/common/pull/1942))
|
||||
|
||||
## 13.5.5 Aug 11, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Add ledger support for Mythos ([#1969](https://github.com/polkadot-js/common/pull/1969))
|
||||
|
||||
## 13.5.4 July 28, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Add Creditcoin3 support to Generic Ledger App ([#1985](https://github.com/polkadot-js/common/pull/1985))
|
||||
|
||||
## 13.5.3 July 1, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Update polkadot dependencies ([#1995](https://github.com/polkadot-js/common/pull/1995))
|
||||
- Add Optional Strict Input Checking to u8aToU8a ([#1994](https://github.com/polkadot-js/common/pull/1994))
|
||||
- Update scrypt parameter validation ([#1993](https://github.com/polkadot-js/common/pull/1993))
|
||||
|
||||
## 13.5.2 Jun 17, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
11
CONTRIBUTORS
11
CONTRIBUTORS
@@ -1,14 +1,16 @@
|
||||
1674 Jaco Bump deps (#1912)
|
||||
43 Tarik Gul 13.5.1 (#1988)
|
||||
44 Tarik Gul Set pbkdf2Encode rounds to default to 210,000 (#1983)
|
||||
13 Carlo Sala feat(networks): add zeitgeist Ledger support (#1840)
|
||||
9 Antoine Estienne Add eth uri keyring test (#1291)
|
||||
7 Valentin Fernandez 13.5.2 (#1992)
|
||||
9 Valentin Fernandez Bump `@polkadot/wasm` deps (#2002)
|
||||
6 Amaury Martiny Add tests from Rust (#283)
|
||||
6 Jakub Pánik HydraDX -> Hydration rebrand (#1923)
|
||||
5 Arjun Porwal 13.5.6 (#2004)
|
||||
5 kwingram25 Add BN consts and timeToString (#610)
|
||||
4 Adam Dossa Update Polymesh Genesis Hash (#1193)
|
||||
4 pan add bifrost kusama (#1626)
|
||||
3 Luke Schoen docs: Fix example in readme since we use default imports (#243)
|
||||
3 rajk93 13.5.3 (#1996)
|
||||
2 AndreasGassmann feat(dependencies): remove moment.js (#530)
|
||||
2 Cameron Fairchild Add bittensor details (#1783)
|
||||
2 Gav Wood Fix stake:unstake (#182)
|
||||
@@ -24,7 +26,6 @@
|
||||
1 Alexander Krupenkin Added ECDSA keypair support (#589)
|
||||
1 alexdniep added equilibrium slip44; added equilibrium genesis hash (#984)
|
||||
1 amphineko chore: fix typo in versionDetect messages (#941)
|
||||
1 Arjun Porwal Add input length validation in `scryptFromU8a` function (#1990)
|
||||
1 Axel Chalon Simplify @polkadot/keyring KeyringPair (#419)
|
||||
1 Brad Larson [FIX] Adjust error message (#646)
|
||||
1 Carlos Medeiros add hydradx to knownLedger (#1647)
|
||||
@@ -34,12 +35,14 @@
|
||||
1 Guilane DENGUIR feat(VTB): Added support for VTB blockchain (#1651)
|
||||
1 h4x3rotab Throws an error when signing with a locked keypair (#578)
|
||||
1 Harry Liu Update README.md (#446)
|
||||
1 henrikdent Add DENTNet ledger support (via generic Polkadot app) (#1942)
|
||||
1 Hoon Kim replace plasm genesis with astar (#1397)
|
||||
1 Hussein Ait-Lahcen Add Picasso Genesis Hash (#1261)
|
||||
1 Igor Support genshiro network (#1148)
|
||||
1 Jake Naviasky Add evmToAddress and addressToEvm crypto utils. (#705)
|
||||
1 JesseAbram added check if valid address to docs (#440)
|
||||
1 joe petrowski Add example for multisig address creation (#590)
|
||||
1 José Molina Colmenero Add ledger support for Mythos (#1969)
|
||||
1 kaelnew add ledger support for stafi (#1569)
|
||||
1 Leonardo Custodio Ledger support (#1879)
|
||||
1 Leonardo Razovic feat: add Polimec (#1945)
|
||||
@@ -54,11 +57,11 @@
|
||||
1 peetzweg/ adds `isRiscV` guard function similar to isWasm (#1878)
|
||||
1 qwer951123 Add acala genesis (#1161)
|
||||
1 Radek Bochenek feat: add Liberland support to Generic Ledger App (#1989)
|
||||
1 rajk93 chore: add error handling for secure rng in react native (#1991)
|
||||
1 Raoul Millais Fix yarn add instructions in x-global README (#873)
|
||||
1 Raymond Zhong Add Edgeware ledger app (#1006)
|
||||
1 Reto Trinkler Adding 4 as address type of ss58 for Katal Chain (#639)
|
||||
1 Rocco Musolino remove doc broken link (#697)
|
||||
1 Salina Add Creditcoin3 support to Generic Ledger App (#1985)
|
||||
1 Shamilkhan Add genesis hash for Cere Network (#1806)
|
||||
1 Song Zhou Add in ability to encrypt/decrypt msg with keyring (#1070)
|
||||
1 Thibaut Sardan add hasLedgerSupport prop to networks (#835)
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"versions": {
|
||||
"git": "13.5.2",
|
||||
"npm": "13.5.2"
|
||||
"git": "13.5.6",
|
||||
"npm": "13.5.6"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
@@ -37,7 +37,7 @@
|
||||
"test:one": "polkadot-dev-run-test --env browser"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.83.2",
|
||||
"@polkadot/dev": "^0.83.3",
|
||||
"@types/node": "^22.7.5"
|
||||
},
|
||||
"resolutions": {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"browser": "browser.js",
|
||||
"main": "node.js",
|
||||
"react-native": "react-native.js",
|
||||
@@ -22,7 +22,7 @@
|
||||
"@ledgerhq/hw-transport": "^6.31.4",
|
||||
"@ledgerhq/hw-transport-webhid": "^6.29.4",
|
||||
"@ledgerhq/hw-transport-webusb": "^6.29.4",
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/util": "13.5.6",
|
||||
"tslib": "^2.8.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/hw-ledger-transports": "13.5.2",
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/hw-ledger-transports": "13.5.6",
|
||||
"@polkadot/util": "13.5.6",
|
||||
"@zondax/ledger-substrate": "1.1.1",
|
||||
"tslib": "^2.8.0"
|
||||
}
|
||||
|
||||
@@ -51,10 +51,13 @@ export const prevLedgerRecord: Record<string, string> = {
|
||||
// Any chains moving forward that are supported by the PolkadotGenericApp from ledger will input their names below.
|
||||
export const genericLedgerApps = {
|
||||
bittensor: 'Bittensor',
|
||||
creditcoin3: 'Creditcoin3',
|
||||
dentnet: 'DENTNet',
|
||||
encointer: 'Encointer',
|
||||
frequency: 'Frequency',
|
||||
integritee: 'Integritee',
|
||||
liberland: 'Liberland',
|
||||
mythos: 'Mythos',
|
||||
polimec: 'Polimec',
|
||||
vara: 'Vara'
|
||||
};
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/util-crypto": "13.5.2",
|
||||
"@polkadot/util": "13.5.6",
|
||||
"@polkadot/util-crypto": "13.5.6",
|
||||
"tslib": "^2.8.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/util-crypto": "13.5.2"
|
||||
"@polkadot/util": "13.5.6",
|
||||
"@polkadot/util-crypto": "13.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ describe('keypair', (): void => {
|
||||
});
|
||||
|
||||
it('creates with dev phrase with derivation path specified', (): void => {
|
||||
const pair = keyring.createFromUri(PHRASE);
|
||||
const pair = keyring.createFromUri(PHRASE, undefined, undefined, undefined, 2048);
|
||||
|
||||
expect(
|
||||
pair.address
|
||||
@@ -367,7 +367,7 @@ describe('keypair', (): void => {
|
||||
|
||||
it('creates with dev phrase with derivation path specified - addFromUri', (): void => {
|
||||
expect(
|
||||
keyring.addFromUri(PHRASE).address
|
||||
keyring.addFromUri(PHRASE, undefined, undefined, undefined, 2048).address
|
||||
).toEqual(ETH_ADDRESS_ONE);
|
||||
});
|
||||
|
||||
@@ -375,12 +375,12 @@ describe('keypair', (): void => {
|
||||
const keyringUntyped = new Keyring();
|
||||
|
||||
expect(
|
||||
keyringUntyped.addFromUri(PHRASE, {}, 'ethereum').address
|
||||
keyringUntyped.addFromUri(PHRASE, {}, 'ethereum', undefined, 2048).address
|
||||
).toEqual(ETH_ADDRESS_ONE);
|
||||
});
|
||||
|
||||
it('encodes a pair toJSON (and decodes)', (): void => {
|
||||
const pair = keyring.createFromUri(PHRASE);
|
||||
const pair = keyring.createFromUri(PHRASE, undefined, undefined, undefined, 2048);
|
||||
const json = pair.toJson('password');
|
||||
|
||||
expect(json.address).toEqual('0x0381351b1b46d2602b0992bb5d5531f9c1696b0812feb2534b6884adc47e2e1d8b'); // this is the public key (different from address for ethereum)
|
||||
@@ -399,7 +399,7 @@ describe('keypair', (): void => {
|
||||
});
|
||||
|
||||
it('encodes a pair toJSON and back', (): void => {
|
||||
const pairOriginal = keyring.createFromUri(PHRASE);
|
||||
const pairOriginal = keyring.createFromUri(PHRASE, undefined, undefined, undefined, 2048);
|
||||
const json = pairOriginal.toJson('password');
|
||||
const pair = keyring.addFromJson(
|
||||
json
|
||||
|
||||
@@ -152,10 +152,15 @@ export class Keyring implements KeyringInstance {
|
||||
* @name addFromUri
|
||||
* @summary Creates an account via an suri
|
||||
* @description Extracts the phrase, path and password from a SURI format for specifying secret keys `<secret>/<soft-key>//<hard-key>///<password>` (the `///password` may be omitted, and `/<soft-key>` and `//<hard-key>` maybe repeated and mixed). The secret can be a hex string, mnemonic phrase or a string (to be padded)
|
||||
*/
|
||||
public addFromUri (suri: string, meta: KeyringPair$Meta = {}, type: KeypairType = this.type, wordlist?: string[]): KeyringPair {
|
||||
* @param _suri
|
||||
* @param meta
|
||||
* @param type The supported types of pairs. Either 'ed25519' | 'sr25519' | 'ecdsa' | 'ethereum'.
|
||||
* @param wordlist - Optional custom wordlist for mnemonic.
|
||||
* @param rounds - Optional: Number of PBKDF2 iterations to run (default: 210000 (when onlyJS = true) or 2048 (when onlyJS = false).
|
||||
*/
|
||||
public addFromUri (suri: string, meta: KeyringPair$Meta = {}, type: KeypairType = this.type, wordlist?: string[], rounds?: number): KeyringPair {
|
||||
return this.addPair(
|
||||
this.createFromUri(suri, meta, type, wordlist)
|
||||
this.createFromUri(suri, meta, type, wordlist, rounds)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -202,8 +207,14 @@ export class Keyring implements KeyringInstance {
|
||||
* @name createFromUri
|
||||
* @summary Creates a Keypair from an suri
|
||||
* @description This creates a pair from the suri, but does not add it to the keyring
|
||||
*
|
||||
* @param _suri
|
||||
* @param meta
|
||||
* @param type The supported types of pairs. Either 'ed25519' | 'sr25519' | 'ecdsa' | 'ethereum'.
|
||||
* @param wordlist - Optional custom wordlist for mnemonic.
|
||||
* @param rounds - Optional: Number of PBKDF2 iterations to run (default: 210000 (when onlyJS = true) or 2048 (when onlyJS = false).
|
||||
*/
|
||||
public createFromUri (_suri: string, meta: KeyringPair$Meta = {}, type: KeypairType = this.type, wordlist?: string[]): KeyringPair {
|
||||
public createFromUri (_suri: string, meta: KeyringPair$Meta = {}, type: KeypairType = this.type, wordlist?: string[], rounds?: number): KeyringPair {
|
||||
// here we only aut-add the dev phrase if we have a hard-derived path
|
||||
const suri = _suri.startsWith('//')
|
||||
? `${DEV_PHRASE}${_suri}`
|
||||
@@ -219,8 +230,8 @@ export class Keyring implements KeyringInstance {
|
||||
|
||||
if ([12, 15, 18, 21, 24].includes(parts.length)) {
|
||||
seed = type === 'ethereum'
|
||||
? mnemonicToLegacySeed(phrase, '', false, 64)
|
||||
: mnemonicToMiniSecret(phrase, password, wordlist);
|
||||
? mnemonicToLegacySeed(phrase, '', false, 64, rounds)
|
||||
: mnemonicToMiniSecret(phrase, password, wordlist, false, rounds);
|
||||
} else {
|
||||
if (phrase.length > 32) {
|
||||
throw new Error('specified phrase is not a valid mnemonic and is invalid as a raw seed at > 32 bytes');
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -98,7 +98,7 @@ describe('keyring.addFromUri', (): void => {
|
||||
describe(`${type}`, (): void => {
|
||||
tests.forEach(({ pk, ss, uri }): void => {
|
||||
it(`creates ${uri}`, (): void => {
|
||||
const pair = keyring.addFromUri(uri, {}, type as KeypairType);
|
||||
const pair = keyring.addFromUri(uri, {}, type as KeypairType, undefined, 2048);
|
||||
|
||||
expect(u8aToHex(pair.publicKey)).toEqual(pk);
|
||||
expect(pair.address).toEqual(ss);
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/util": "13.5.6",
|
||||
"@substrate/ss58-registry": "^1.51.0",
|
||||
"tslib": "^2.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/hw-ledger": "13.5.2"
|
||||
"@polkadot/hw-ledger": "13.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,9 +46,17 @@ export const knownGenesis: KnownGenesis = {
|
||||
composable: [
|
||||
'0xdaab8df776eb52ec604a5df5d388bb62a050a0aaec4556a64265b9d42755552d'
|
||||
],
|
||||
creditcoin3: [
|
||||
'0x4436a7d64e363df85e065a894721002a86643283f9707338bf195d360ba2ee71', // cc3 mainnet
|
||||
'0xfc4ec97a1c1f119c4353aecb4a17c7c0cf7b40d5d660143d8bad9117e9866572', // cc3 testnet/drynet
|
||||
'0xfc9df99a665f964aed6649f275055e54df5e3420489538ed31d7788f53d11ef6' // cc3 devnet
|
||||
],
|
||||
darwinia: [
|
||||
'0xe71578b37a7c799b0ab4ee87ffa6f059a6b98f71f06fb8c84a8d88013a548ad6'
|
||||
],
|
||||
dentnet: [
|
||||
'0x0313f6a011d128d22f996703cbab05162e2fdc9e031493314fe6db79979c5ca7'
|
||||
],
|
||||
'dock-mainnet': [
|
||||
'0x6bfe24dca2a3be10f22212678ac13a6446ec764103c0f3471c71609eac384aae',
|
||||
'0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9'
|
||||
@@ -105,6 +113,9 @@ export const knownGenesis: KnownGenesis = {
|
||||
matrixchain: [
|
||||
'0x3af4ff48ec76d2efc8476730f423ac07e25ad48f5f4c9dc39c778b164d808615'
|
||||
],
|
||||
mythos: [
|
||||
'0xf6ee56e9c5277df5b4ce6ae9983ee88f3cbed27d31beeb98f9f84f997a1ab0b9'
|
||||
],
|
||||
nodle: [
|
||||
'0x97da7ede98d7bad4e36b4d734b6055425a3be036da2a332ea5a7037656427a21'
|
||||
],
|
||||
|
||||
@@ -17,7 +17,9 @@ export const knownLedger: KnownLedger = {
|
||||
bittensor: 0x00000162,
|
||||
centrifuge: 0x000002eb,
|
||||
composable: 0x00000162,
|
||||
creditcoin3: 0x00000162,
|
||||
darwinia: 0x00000162,
|
||||
dentnet: 0x000002de,
|
||||
'dock-mainnet': 0x00000252,
|
||||
edgeware: 0x0000020b,
|
||||
encointer: 0x000001b2,
|
||||
@@ -33,6 +35,7 @@ export const knownLedger: KnownLedger = {
|
||||
kusama: 0x000001b2,
|
||||
liberland: 0x000002ff,
|
||||
matrixchain: 0x00000483,
|
||||
mythos: 0x0000003c,
|
||||
nodle: 0x000003eb,
|
||||
origintrail: 0x00000162,
|
||||
parallel: 0x00000162,
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"browser": {
|
||||
"crypto": false,
|
||||
"stream": false
|
||||
@@ -29,16 +29,16 @@
|
||||
"dependencies": {
|
||||
"@noble/curves": "^1.3.0",
|
||||
"@noble/hashes": "^1.3.3",
|
||||
"@polkadot/networks": "13.5.2",
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/wasm-crypto": "^7.4.1",
|
||||
"@polkadot/wasm-util": "^7.4.1",
|
||||
"@polkadot/x-bigint": "13.5.2",
|
||||
"@polkadot/x-randomvalues": "13.5.2",
|
||||
"@polkadot/networks": "13.5.6",
|
||||
"@polkadot/util": "13.5.6",
|
||||
"@polkadot/wasm-crypto": "^7.5.1",
|
||||
"@polkadot/wasm-util": "^7.5.1",
|
||||
"@polkadot/x-bigint": "13.5.6",
|
||||
"@polkadot/x-randomvalues": "13.5.6",
|
||||
"@scure/base": "^1.1.7",
|
||||
"tslib": "^2.8.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "13.5.2"
|
||||
"@polkadot/util": "13.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ export function encodeAddress (key: string | Uint8Array, ss58Format: Prefix = de
|
||||
// decode it, this means we can re-encode an address
|
||||
const u8a = decodeAddress(key);
|
||||
|
||||
if ((ss58Format < 0) || (ss58Format > 16383) || [46, 47].includes(ss58Format)) {
|
||||
if ((ss58Format < 0) || (ss58Format > 16383 && !ss58Exceptions.includes(ss58Format)) || [46, 47].includes(ss58Format)) {
|
||||
throw new Error('Out of range ss58Format specified');
|
||||
} else if (!defaults.allowedDecodedLengths.includes(u8a.length)) {
|
||||
throw new Error(`Expected a valid key to convert, with length ${defaults.allowedDecodedLengths.join(', ')}`);
|
||||
@@ -38,3 +38,6 @@ export function encodeAddress (key: string | Uint8Array, ss58Format: Prefix = de
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Exceptions like 29972 (Mythos chain) which uses Ethereum style account (not ss58 Encoded)
|
||||
const ss58Exceptions = [29972];
|
||||
|
||||
@@ -39,14 +39,14 @@ describe('hdEthereum', (): void => {
|
||||
]);
|
||||
|
||||
it('derives the right key pair from a mnemonic', (): void => {
|
||||
const key = hdEthereum(mnemonicToLegacySeed(PHRASE, '', false, 64));
|
||||
const key = hdEthereum(mnemonicToLegacySeed(PHRASE, '', false, 64, 2048));
|
||||
|
||||
expect(key.publicKey).toEqual(PUBLIC);
|
||||
expect(key.secretKey).toEqual(SECRET);
|
||||
});
|
||||
|
||||
it('derives the right key pair from a mnemonic and a derivation path', (): void => {
|
||||
const key = hdEthereum(mnemonicToLegacySeed(PHRASE, '', false, 64), derivationPath);
|
||||
const key = hdEthereum(mnemonicToLegacySeed(PHRASE, '', false, 64, 2048), derivationPath);
|
||||
|
||||
expect(key.publicKey).toEqual(PUBLICDERIVED);
|
||||
expect(key.secretKey).toEqual(SECRETDERIVED);
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('ledgerDerive', (): void => {
|
||||
tests.forEach(({ ed25519, index: [account, address], mnemonic }, index): void => {
|
||||
it(`derives a known ed25519 seed for ${network} (${index})`, (): void => {
|
||||
expect(u8aToHex(
|
||||
hdLedger(mnemonic, `m/44'/${slip44}'/${account}'/0'/${address}'`)
|
||||
hdLedger(mnemonic, `m/44'/${slip44}'/${account}'/0'/${address}'`, 2048)
|
||||
.secretKey
|
||||
.slice(0, 32)
|
||||
)).toEqual(ed25519);
|
||||
|
||||
@@ -9,7 +9,7 @@ import { HARDENED, hdValidatePath } from '../validatePath.js';
|
||||
import { ledgerDerivePrivate } from './derivePrivate.js';
|
||||
import { ledgerMaster } from './master.js';
|
||||
|
||||
export function hdLedger (_mnemonic: string, path: string): Keypair {
|
||||
export function hdLedger (_mnemonic: string, path: string, rounds?: number): Keypair {
|
||||
const words = _mnemonic
|
||||
.split(' ')
|
||||
.map((s) => s.trim())
|
||||
@@ -30,7 +30,7 @@ export function hdLedger (_mnemonic: string, path: string): Keypair {
|
||||
}
|
||||
|
||||
const parts = path.split('/').slice(1);
|
||||
let seed = ledgerMaster(mnemonic, password);
|
||||
let seed = ledgerMaster(mnemonic, password, rounds);
|
||||
|
||||
for (const p of parts) {
|
||||
const n = parseInt(p.replace(/'$/, ''), 10);
|
||||
|
||||
@@ -13,7 +13,7 @@ const XPRV = '0x402b03cd9c8bed9ba9f9bd6cd9c315ce9fcc59c7c25d37c85a36096617e69d41
|
||||
describe('ledgerDerive', (): void => {
|
||||
it('derives a known master xprv', (): void => {
|
||||
expect(u8aToHex(
|
||||
ledgerMaster(MNEMONIC)
|
||||
ledgerMaster(MNEMONIC, undefined, 2048)
|
||||
)).toEqual(XPRV);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -8,9 +8,17 @@ import { mnemonicToSeedSync } from '../../mnemonic/bip39.js';
|
||||
|
||||
const ED25519_CRYPTO = 'ed25519 seed';
|
||||
|
||||
// gets an xprv from a mnemonic
|
||||
export function ledgerMaster (mnemonic: string, password?: string): Uint8Array {
|
||||
const seed = mnemonicToSeedSync(mnemonic, password);
|
||||
/**
|
||||
* Gets an xprv from a mnemonic
|
||||
*
|
||||
* @param mnemonic - The BIP-39 mnemonic phrase to derive the secret from.
|
||||
* @param password - Optional: password to secure the seed (default: empty string).
|
||||
* @param wordlist - Optional custom wordlist for mnemonic.
|
||||
* @param onlyJs - Optional: If `true`, forces use of the JavaScript implementation instead of WASM.
|
||||
* @param rounds - Optional: Number of PBKDF2 iterations to run (default: 210000).
|
||||
*/
|
||||
export function ledgerMaster (mnemonic: string, password?: string, rounds?: number): Uint8Array {
|
||||
const seed = mnemonicToSeedSync(mnemonic, password, rounds);
|
||||
const chainCode = hmacShaAsU8a(ED25519_CRYPTO, new Uint8Array([1, ...seed]), 256);
|
||||
let priv;
|
||||
|
||||
|
||||
@@ -47,10 +47,16 @@ function deriveChecksumBits (entropyBuffer: Uint8Array): string {
|
||||
).slice(0, (entropyBuffer.length * 8) / 32);
|
||||
}
|
||||
|
||||
export function mnemonicToSeedSync (mnemonic: string, password?: string): Uint8Array {
|
||||
/*
|
||||
* @param mnemonic - The BIP-39 mnemonic phrase to derive the secret from.
|
||||
* @param password - Optional: password to secure the seed (default: empty string).
|
||||
* @param rounds - Optional: Number of PBKDF2 iterations to run (default: 210000).
|
||||
*/
|
||||
export function mnemonicToSeedSync (mnemonic: string, password?: string, rounds?: number): Uint8Array {
|
||||
return pbkdf2Encode(
|
||||
stringToU8a(normalize(mnemonic)),
|
||||
stringToU8a(`mnemonic${normalize(password)}`)
|
||||
stringToU8a(`mnemonic${normalize(password)}`),
|
||||
rounds
|
||||
).password;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ describe('mnemonicToLegacySeed', (): void => {
|
||||
it(`generates Wasm & Js equivalents for password=${password || 'undefined'}`, (): void => {
|
||||
expect(
|
||||
u8aEq(
|
||||
mnemonicToLegacySeed(MNEMONIC, password, true),
|
||||
mnemonicToLegacySeed(MNEMONIC, password, false)
|
||||
mnemonicToLegacySeed(MNEMONIC, password, true, 32, 2048),
|
||||
mnemonicToLegacySeed(MNEMONIC, password, false, 32, 2048)
|
||||
)
|
||||
).toEqual(true);
|
||||
});
|
||||
@@ -32,19 +32,19 @@ describe('mnemonicToLegacySeed', (): void => {
|
||||
describe(`onlyJs=${(onlyJs && 'true') || 'false'}`, (): void => {
|
||||
it('generates a valid 64bytes seed', (): void => {
|
||||
expect(
|
||||
u8aToHex(mnemonicToLegacySeed(MNEMONIC, undefined, onlyJs, 64))
|
||||
u8aToHex(mnemonicToLegacySeed(MNEMONIC, undefined, onlyJs, 64, 2048))
|
||||
).toEqual(SEED_64);
|
||||
});
|
||||
|
||||
it('generates a valid 32bytes seed', (): void => {
|
||||
expect(
|
||||
u8aToHex(mnemonicToLegacySeed(MNEMONIC, undefined, onlyJs))
|
||||
u8aToHex(mnemonicToLegacySeed(MNEMONIC, undefined, onlyJs, 32, 2048))
|
||||
).toEqual(SEED_32);
|
||||
});
|
||||
|
||||
it('fails with non-mnemonics', (): void => {
|
||||
expect(
|
||||
() => mnemonicToLegacySeed('foo bar baz', undefined, onlyJs)
|
||||
() => mnemonicToLegacySeed('foo bar baz', undefined, onlyJs, 32, 2048)
|
||||
).toThrow(/mnemonic specified/);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -23,8 +23,14 @@ import { mnemonicValidate } from './validate.js';
|
||||
* console.log(`Seed generated from mnemonic: ${mnemonicToLegacySeed(mnemonic)}`); => u8a
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export function mnemonicToLegacySeed (mnemonic: string, password = '', onlyJs?: boolean, byteLength: 32 | 64 = 32): Uint8Array {
|
||||
*
|
||||
* @param mnemonic - The BIP-39 mnemonic phrase to derive the secret from.
|
||||
* @param password - Optional: password to secure the seed (default: empty string).
|
||||
* @param onlyJs - Optional: If `true`, forces use of the JavaScript implementation instead of WASM.
|
||||
* @param byteLength - Optional: Either 32 or 64. Default is 32
|
||||
* @param rounds - Optional: Number of PBKDF2 iterations to run (default: 210000).
|
||||
*/
|
||||
export function mnemonicToLegacySeed (mnemonic: string, password = '', onlyJs?: boolean, byteLength: 32 | 64 = 32, rounds?: number): Uint8Array {
|
||||
if (!mnemonicValidate(mnemonic)) {
|
||||
throw new Error('Invalid bip39 mnemonic specified');
|
||||
} else if (![32, 64].includes(byteLength)) {
|
||||
@@ -34,6 +40,6 @@ export function mnemonicToLegacySeed (mnemonic: string, password = '', onlyJs?:
|
||||
return byteLength === 32
|
||||
? !hasBigInt || (!onlyJs && isReady())
|
||||
? bip39ToSeed(mnemonic, password)
|
||||
: mnemonicToSeedSync(mnemonic, password).subarray(0, 32)
|
||||
: mnemonicToSeedSync(mnemonic, password);
|
||||
: mnemonicToSeedSync(mnemonic, password, rounds).subarray(0, 32)
|
||||
: mnemonicToSeedSync(mnemonic, password, rounds);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ describe('mnemonicToMiniSecret', (): void => {
|
||||
it(`generates Wasm & Js equivalents for password=${password || 'undefined'}`, (): void => {
|
||||
expect(
|
||||
u8aEq(
|
||||
mnemonicToMiniSecret(MNEMONIC, password, undefined, true),
|
||||
mnemonicToMiniSecret(MNEMONIC, password, undefined, false)
|
||||
mnemonicToMiniSecret(MNEMONIC, password, undefined, true, 2048),
|
||||
mnemonicToMiniSecret(MNEMONIC, password, undefined, false, 2048)
|
||||
)
|
||||
).toEqual(true);
|
||||
});
|
||||
@@ -31,10 +31,10 @@ describe('mnemonicToMiniSecret', (): void => {
|
||||
const mnemonic = '엉덩이 능동적 숫자 팩시밀리 비난 서적 파출소 도움 독창적 인생 상류 먼지 답변 음반 수박 사업 노란색 공사 우체국 특급 도대체 금지 굉장히 고무신';
|
||||
|
||||
expect(
|
||||
() => mnemonicToMiniSecret(mnemonic, 'testing')
|
||||
() => mnemonicToMiniSecret(mnemonic, 'testing', undefined, false, 2048)
|
||||
).toThrow();
|
||||
expect(
|
||||
u8aToHex(mnemonicToMiniSecret(mnemonic, 'testing', koreanWords))
|
||||
u8aToHex(mnemonicToMiniSecret(mnemonic, 'testing', koreanWords, false, 2048))
|
||||
).toEqual('0xefa278a62535581767a2f49cb542ed91b65fb911e1b05e7a09c702b257f10c13');
|
||||
});
|
||||
|
||||
@@ -42,20 +42,20 @@ describe('mnemonicToMiniSecret', (): void => {
|
||||
describe(`onlyJs=${(onlyJs && 'true') || 'false'}`, (): void => {
|
||||
it('generates a valid seed', (): void => {
|
||||
expect(
|
||||
u8aToHex(mnemonicToMiniSecret(MNEMONIC, undefined, undefined, onlyJs))
|
||||
u8aToHex(mnemonicToMiniSecret(MNEMONIC, undefined, undefined, onlyJs, 2048))
|
||||
).toEqual(SEED);
|
||||
});
|
||||
|
||||
it('fails with non-mnemonics', (): void => {
|
||||
expect(
|
||||
() => mnemonicToMiniSecret('foo bar baz', undefined, undefined, onlyJs)
|
||||
() => mnemonicToMiniSecret('foo bar baz', undefined, undefined, onlyJs, 2048)
|
||||
).toThrow(/mnemonic specified/);
|
||||
});
|
||||
|
||||
tests.forEach(([mnemonic, , seed], index): void => {
|
||||
it(`Created correct seed for ${index}`, (): void => {
|
||||
expect(
|
||||
u8aToHex(mnemonicToMiniSecret(mnemonic, 'Substrate', undefined, onlyJs))
|
||||
u8aToHex(mnemonicToMiniSecret(mnemonic, 'Substrate', undefined, onlyJs, 2048))
|
||||
).toEqual(
|
||||
// mini returned here, only check first 32-bytes (64 hex + 2 prefix)
|
||||
seed.substring(0, 66)
|
||||
|
||||
@@ -8,7 +8,14 @@ import { pbkdf2Encode } from '../pbkdf2/index.js';
|
||||
import { mnemonicToEntropy } from './toEntropy.js';
|
||||
import { mnemonicValidate } from './validate.js';
|
||||
|
||||
export function mnemonicToMiniSecret (mnemonic: string, password = '', wordlist?: string[], onlyJs?: boolean): Uint8Array {
|
||||
/**
|
||||
* @param mnemonic - The BIP-39 mnemonic phrase to derive the secret from.
|
||||
* @param password - Optional: password to secure the seed (default: empty string).
|
||||
* @param wordlist - Optional custom wordlist for mnemonic.
|
||||
* @param onlyJs - Optional: If `true`, forces use of the JavaScript implementation instead of WASM.
|
||||
* @param rounds - Optional: Number of PBKDF2 iterations to run (default: 210000 (when onlyJS = true) or 2048 (when onlyJS = false).
|
||||
*/
|
||||
export function mnemonicToMiniSecret (mnemonic: string, password = '', wordlist?: string[], onlyJs?: boolean, rounds?: number): Uint8Array {
|
||||
if (!mnemonicValidate(mnemonic, wordlist, onlyJs)) {
|
||||
throw new Error('Invalid bip39 mnemonic specified');
|
||||
} else if (!wordlist && !onlyJs && isReady()) {
|
||||
@@ -19,5 +26,5 @@ export function mnemonicToMiniSecret (mnemonic: string, password = '', wordlist?
|
||||
const salt = stringToU8a(`mnemonic${password}`);
|
||||
|
||||
// return the first 32 bytes as the seed
|
||||
return pbkdf2Encode(entropy, salt).password.slice(0, 32);
|
||||
return pbkdf2Encode(entropy, salt, rounds).password.slice(0, 32);
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -49,6 +49,6 @@ describe('pbkdf2Encode', (): void => {
|
||||
}
|
||||
|
||||
perfWasm('pbkdf2Encode', 8, (input, onlyJs) =>
|
||||
pbkdf2Encode(input, input, undefined, onlyJs)
|
||||
pbkdf2Encode(input, input, 2048, onlyJs)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -15,7 +15,14 @@ interface Result {
|
||||
salt: Uint8Array;
|
||||
}
|
||||
|
||||
export function pbkdf2Encode (passphrase?: string | Uint8Array, salt: Uint8Array = randomAsU8a(), rounds = 2048, onlyJs?: boolean): Result {
|
||||
export function pbkdf2Encode (passphrase?: string | Uint8Array, salt: Uint8Array = randomAsU8a(), rounds = 210000, onlyJs?: boolean): Result {
|
||||
// When using the JS implementation (pbkdf2Js), large iteration counts can
|
||||
// cause excessive computation time or memory usage. In that case, we cap
|
||||
// the number of rounds to 2048 to ensure reliable performance.
|
||||
if (onlyJs && rounds > 2048) {
|
||||
rounds = 2048;
|
||||
}
|
||||
|
||||
const u8aPass = u8aToU8a(passphrase);
|
||||
const u8aSalt = u8aToU8a(salt);
|
||||
|
||||
|
||||
@@ -3,8 +3,17 @@
|
||||
|
||||
import type { ScryptParams } from './types.js';
|
||||
|
||||
export const ALLOWED_PARAMS: ScryptParams[] = [
|
||||
{ N: 1 << 13, p: 10, r: 8 },
|
||||
{ N: 1 << 14, p: 5, r: 8 },
|
||||
{ N: 1 << 15, p: 3, r: 8 },
|
||||
{ N: 1 << 15, p: 1, r: 8 },
|
||||
{ N: 1 << 16, p: 2, r: 8 },
|
||||
{ N: 1 << 17, p: 1, r: 8 }
|
||||
];
|
||||
|
||||
export const DEFAULT_PARAMS: ScryptParams = {
|
||||
N: 1 << 15,
|
||||
N: 1 << 17,
|
||||
p: 1,
|
||||
r: 8
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ import { scryptEncode } from './index.js';
|
||||
export const KNOWN_TEST = 'testing, 123';
|
||||
|
||||
// eslint-disable-next-line jest/no-export
|
||||
export const KNOWN_PASS = new Uint8Array([223, 185, 241, 135, 125, 17, 195, 27, 64, 64, 154, 69, 47, 82, 123, 38, 255, 230, 199, 200, 101, 115, 21, 116, 119, 59, 67, 43, 58, 220, 112, 70, 124, 139, 240, 206, 42, 148, 140, 132, 64, 226, 164, 25, 104, 80, 49, 92, 144, 132, 109, 178, 76, 225, 171, 116, 151, 181, 34, 243, 177, 235, 134, 76]);
|
||||
export const KNOWN_PASS = new Uint8Array([225, 18, 85, 30, 46, 178, 200, 63, 147, 225, 37, 46, 88, 224, 151, 132, 48, 206, 104, 234, 120, 112, 243, 198, 92, 52, 101, 127, 242, 22, 116, 55, 74, 29, 17, 197, 38, 191, 128, 39, 255, 119, 175, 113, 180, 252, 171, 10, 78, 93, 226, 7, 166, 120, 99, 198, 225, 158, 107, 132, 226, 73, 129, 35]);
|
||||
|
||||
// eslint-disable-next-line jest/no-export
|
||||
export const KNOWN_SALT = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8]);
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { ScryptParams } from './types.js';
|
||||
import { u8aToBn } from '@polkadot/util';
|
||||
|
||||
import { BN_LE_OPTS } from '../bn.js';
|
||||
import { DEFAULT_PARAMS } from './defaults.js';
|
||||
import { ALLOWED_PARAMS } from './defaults.js';
|
||||
|
||||
interface Result {
|
||||
params: ScryptParams,
|
||||
@@ -28,12 +28,15 @@ export function scryptFromU8a (data: Uint8Array): Result {
|
||||
const p = u8aToBn(data.subarray(36, 40), BN_LE_OPTS).toNumber();
|
||||
const r = u8aToBn(data.subarray(40, 44), BN_LE_OPTS).toNumber();
|
||||
|
||||
// FIXME At this moment we assume these to be fixed params, this is not a great idea
|
||||
// since we lose flexibility and updates for greater security. However we need some
|
||||
// protection against carefully-crafted params that can eat up CPU since these are user
|
||||
// inputs. So we need to get very clever here, but atm we only allow the defaults
|
||||
// and if no match, bail out
|
||||
if (N !== DEFAULT_PARAMS.N || p !== DEFAULT_PARAMS.p || r !== DEFAULT_PARAMS.r) {
|
||||
if (N > (1 << 20) || p > 4 || r > 16) {
|
||||
throw new Error('Scrypt parameters exceed safe limits');
|
||||
}
|
||||
|
||||
const isAllowed = ALLOWED_PARAMS.some((preset) =>
|
||||
preset.N === N && preset.p === p && preset.r === r
|
||||
);
|
||||
|
||||
if (!isAllowed) {
|
||||
throw new Error('Invalid injected scrypt params found');
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('secp256k1Verify', (): void => {
|
||||
await waitReady();
|
||||
});
|
||||
|
||||
for (const onlyJs of [false, true]) {
|
||||
for (const onlyJs of [true]) {
|
||||
describe(`onlyJs=${(onlyJs && 'true') || 'false'}`, (): void => {
|
||||
it('validates known ETH against address', (): void => {
|
||||
expect(
|
||||
|
||||
@@ -22,7 +22,7 @@ type VerifyFn = (result: VerifyResult, input: VerifyInput) => VerifyResult;
|
||||
|
||||
const secp256k1VerifyHasher = (hashType: 'blake2' | 'keccak') =>
|
||||
(message: Uint8Array | string, signature: Uint8Array, publicKey: Uint8Array) =>
|
||||
secp256k1Verify(message, signature, publicKey, hashType);
|
||||
secp256k1Verify(message, signature, publicKey, hashType, true);
|
||||
|
||||
const VERIFIERS_ECDSA: Verifier[] = [
|
||||
['ecdsa', secp256k1VerifyHasher('blake2')],
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
"./hex/toU8a": {
|
||||
@@ -35,15 +35,15 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@polkadot/x-bigint": "13.5.2",
|
||||
"@polkadot/x-global": "13.5.2",
|
||||
"@polkadot/x-textdecoder": "13.5.2",
|
||||
"@polkadot/x-textencoder": "13.5.2",
|
||||
"@polkadot/x-bigint": "13.5.6",
|
||||
"@polkadot/x-global": "13.5.6",
|
||||
"@polkadot/x-textdecoder": "13.5.6",
|
||||
"@polkadot/x-textencoder": "13.5.6",
|
||||
"@types/bn.js": "^5.1.6",
|
||||
"bn.js": "^5.2.1",
|
||||
"tslib": "^2.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/x-randomvalues": "13.5.2"
|
||||
"@polkadot/x-randomvalues": "13.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -20,23 +20,29 @@ const TESTS: [input: U8aLike | null | undefined, output: Uint8Array][] = [
|
||||
|
||||
describe('u8aToU8a', (): void => {
|
||||
it('returns an empty Uint8Array when null/undefined/"" provided', (): void => {
|
||||
expect(
|
||||
u8aToU8a(null)
|
||||
).toHaveLength(0);
|
||||
expect(u8aToU8a(null)).toHaveLength(0);
|
||||
expect(
|
||||
u8aToU8a()
|
||||
).toHaveLength(0);
|
||||
expect(
|
||||
u8aToU8a('')
|
||||
).toHaveLength(0);
|
||||
expect(
|
||||
u8aToU8a('')
|
||||
).toEqual(new Uint8Array());
|
||||
});
|
||||
|
||||
it('Throw error on null/undefined values on strict checking', () => {
|
||||
expect(() => u8aToU8a(undefined, true)).toThrow('u8aToU8a: Expected non-null, non-undefined value');
|
||||
expect(() => u8aToU8a(null, true)).toThrow('u8aToU8a: Expected non-null, non-undefined value');
|
||||
});
|
||||
|
||||
it('returns a Uint8Array as-is (u8a input)', (): void => {
|
||||
const input = new Uint8Array([128, 0, 10]);
|
||||
|
||||
expect(
|
||||
u8aToU8a(input) === input
|
||||
).toEqual(true);
|
||||
u8aToU8a(input)
|
||||
).toEqual(input);
|
||||
});
|
||||
|
||||
describe('conversion tests', (): void => {
|
||||
|
||||
@@ -14,6 +14,8 @@ import { stringToU8a } from '../string/toU8a.js';
|
||||
* @summary Creates a Uint8Array value from a Uint8Array, Buffer, string or hex input.
|
||||
* @description
|
||||
* `null` or `undefined` inputs returns a `[]` result, Uint8Array values returns the value, hex strings returns a Uint8Array representation.
|
||||
* If `strict` is true, `null` or `undefined` will throw an error instead of returning an empty array.
|
||||
* Supports input types: Uint8Array, Buffer, hex string, string, or number array.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
@@ -24,7 +26,11 @@ import { stringToU8a } from '../string/toU8a.js';
|
||||
* u8aToU8a(0x1234); // => Uint8Array([0x12, 0x34])
|
||||
* ```
|
||||
*/
|
||||
export function u8aToU8a (value?: U8aLike | null): Uint8Array {
|
||||
export function u8aToU8a (value?: U8aLike | null, strict = false): Uint8Array {
|
||||
if (strict && (value === null || value === undefined)) {
|
||||
throw new Error('u8aToU8a: Expected non-null, non-undefined value');
|
||||
}
|
||||
|
||||
return isU8a(value)
|
||||
// NOTE isBuffer needs to go here since it actually extends
|
||||
// Uint8Array on Node.js environments, so all Buffer are Uint8Array,
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
"./shim.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"dependencies": {
|
||||
"@polkadot/x-global": "13.5.2",
|
||||
"@polkadot/x-global": "13.5.6",
|
||||
"tslib": "^2.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/x-bigint', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/x-bigint', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/util": "13.5.6",
|
||||
"buffer-es6": "^4.9.3",
|
||||
"tslib": "^2.8.0"
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"browser": "browser.js",
|
||||
"main": "node.js",
|
||||
"react-native": "react-native.js",
|
||||
"dependencies": {
|
||||
"@polkadot/x-global": "13.5.2",
|
||||
"@polkadot/x-global": "13.5.6",
|
||||
"node-fetch": "^3.3.2",
|
||||
"tslib": "^2.8.0"
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/x-fetch', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/x-fetch', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"tslib": "^2.8.0"
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/x-global', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/x-global', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"browser": "browser.js",
|
||||
"main": "node.js",
|
||||
"react-native": "react-native.js",
|
||||
"dependencies": {
|
||||
"@polkadot/x-global": "13.5.2",
|
||||
"@polkadot/x-global": "13.5.6",
|
||||
"tslib": "^2.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/wasm-util": "^7.4.1",
|
||||
"@polkadot/util": "13.5.6",
|
||||
"@polkadot/wasm-util": "^7.5.1",
|
||||
"@types/react-native": "^0.73.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "13.5.2",
|
||||
"@polkadot/util": "13.5.6",
|
||||
"@polkadot/wasm-util": "*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/x-randomvalues', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/x-randomvalues', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"browser": "browser.js",
|
||||
"main": "node.js",
|
||||
"react-native": "react-native.js",
|
||||
"dependencies": {
|
||||
"@polkadot/x-global": "13.5.2",
|
||||
"@polkadot/x-global": "13.5.6",
|
||||
"tslib": "^2.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/x-textdecoder', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/x-textdecoder', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"browser": "browser.js",
|
||||
"main": "node.js",
|
||||
"react-native": "react-native.js",
|
||||
"dependencies": {
|
||||
"@polkadot/x-global": "13.5.2",
|
||||
"@polkadot/x-global": "13.5.6",
|
||||
"tslib": "^2.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/x-textencoder', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/x-textencoder', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "13.5.2",
|
||||
"version": "13.5.6",
|
||||
"browser": "browser.js",
|
||||
"main": "node.js",
|
||||
"react-native": "react-native.js",
|
||||
"dependencies": {
|
||||
"@polkadot/x-global": "13.5.2",
|
||||
"@polkadot/x-global": "13.5.6",
|
||||
"tslib": "^2.8.0",
|
||||
"ws": "^8.18.0"
|
||||
},
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/x-ws', path: 'auto', type: 'auto', version: '13.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/x-ws', path: 'auto', type: 'auto', version: '13.5.6' };
|
||||
|
||||
182
yarn.lock
182
yarn.lock
@@ -1478,34 +1478,34 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/dev-test@npm:^0.83.2":
|
||||
version: 0.83.2
|
||||
resolution: "@polkadot/dev-test@npm:0.83.2"
|
||||
"@polkadot/dev-test@npm:^0.83.3":
|
||||
version: 0.83.3
|
||||
resolution: "@polkadot/dev-test@npm:0.83.3"
|
||||
dependencies:
|
||||
jsdom: "npm:^24.0.0"
|
||||
tslib: "npm:^2.7.0"
|
||||
checksum: 10/afe60165272a09d5c9f08e3aec0015621350dc7394ee8ff121d5803c576c7601b176b753716203abba4a81a142b529da066fe4c73f39387b018bdde69fef7a10
|
||||
checksum: 10/c03e0c5c5c5d22394c63948b35157b97f8f734a6a8403c89990c55b2657f2b284996aef8613815b2b576b271a126244d7f0a2c9ddece438c5799f273be2e1c69
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/dev-ts@npm:^0.83.2":
|
||||
version: 0.83.2
|
||||
resolution: "@polkadot/dev-ts@npm:0.83.2"
|
||||
"@polkadot/dev-ts@npm:^0.83.3":
|
||||
version: 0.83.3
|
||||
resolution: "@polkadot/dev-ts@npm:0.83.3"
|
||||
dependencies:
|
||||
json5: "npm:^2.2.3"
|
||||
tslib: "npm:^2.7.0"
|
||||
typescript: "npm:^5.5.4"
|
||||
checksum: 10/abca4df87a0682285bf5e5644ab8522820d53e0dffc124bfe540b7fccc55532057d1912629584bb04648e855e110896b36e55536d53556a166fc3d33bcc27b39
|
||||
checksum: 10/a2ddc4dba934758cc24f02e8acbfa5a5f5295ad874f42c1bea8548a6dfa97c882b127a279001831caedc8d474becb905286847e0f64e8efe7063b6bac4830112
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/dev@npm:^0.83.2":
|
||||
version: 0.83.2
|
||||
resolution: "@polkadot/dev@npm:0.83.2"
|
||||
"@polkadot/dev@npm:^0.83.3":
|
||||
version: 0.83.3
|
||||
resolution: "@polkadot/dev@npm:0.83.3"
|
||||
dependencies:
|
||||
"@eslint/js": "npm:^8.56.0"
|
||||
"@polkadot/dev-test": "npm:^0.83.2"
|
||||
"@polkadot/dev-ts": "npm:^0.83.2"
|
||||
"@polkadot/dev-test": "npm:^0.83.3"
|
||||
"@polkadot/dev-ts": "npm:^0.83.3"
|
||||
"@rollup/plugin-alias": "npm:^5.1.1"
|
||||
"@rollup/plugin-commonjs": "npm:^25.0.8"
|
||||
"@rollup/plugin-dynamic-import-vars": "npm:^2.1.5"
|
||||
@@ -1570,11 +1570,11 @@ __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: 10/42a67e0f2401fc13bdffff86398958e326613461eaa294fb5b435037d636b94cbbbce81b1fadbdf3c0553798d3bc5df43ef6af2250f75e312f01e52b665eddfe
|
||||
checksum: 10/f34171f4776f0ade59e750e6c43db56fccc800e5c5c2e7796299e83072534257fa5e7478b8159a4b265e96d36c9fe380d56326c21cdbdf51dda3221c269601be
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/hw-ledger-transports@npm:13.5.2, @polkadot/hw-ledger-transports@workspace:packages/hw-ledger-transports":
|
||||
"@polkadot/hw-ledger-transports@npm:13.5.6, @polkadot/hw-ledger-transports@workspace:packages/hw-ledger-transports":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/hw-ledger-transports@workspace:packages/hw-ledger-transports"
|
||||
dependencies:
|
||||
@@ -1582,7 +1582,7 @@ __metadata:
|
||||
"@ledgerhq/hw-transport-node-hid-singleton": "npm:^6.31.5"
|
||||
"@ledgerhq/hw-transport-webhid": "npm:^6.29.4"
|
||||
"@ledgerhq/hw-transport-webusb": "npm:^6.29.4"
|
||||
"@polkadot/util": "npm:13.5.2"
|
||||
"@polkadot/util": "npm:13.5.6"
|
||||
tslib: "npm:^2.8.0"
|
||||
dependenciesMeta:
|
||||
"@ledgerhq/hw-transport-node-hid-singleton":
|
||||
@@ -1590,12 +1590,12 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/hw-ledger@npm:13.5.2, @polkadot/hw-ledger@workspace:packages/hw-ledger":
|
||||
"@polkadot/hw-ledger@npm:13.5.6, @polkadot/hw-ledger@workspace:packages/hw-ledger":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/hw-ledger@workspace:packages/hw-ledger"
|
||||
dependencies:
|
||||
"@polkadot/hw-ledger-transports": "npm:13.5.2"
|
||||
"@polkadot/util": "npm:13.5.2"
|
||||
"@polkadot/hw-ledger-transports": "npm:13.5.6"
|
||||
"@polkadot/util": "npm:13.5.6"
|
||||
"@zondax/ledger-substrate": "npm:1.1.1"
|
||||
tslib: "npm:^2.8.0"
|
||||
languageName: unknown
|
||||
@@ -1605,145 +1605,145 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/keyring@workspace:packages/keyring"
|
||||
dependencies:
|
||||
"@polkadot/util": "npm:13.5.2"
|
||||
"@polkadot/util-crypto": "npm:13.5.2"
|
||||
"@polkadot/util": "npm:13.5.6"
|
||||
"@polkadot/util-crypto": "npm:13.5.6"
|
||||
tslib: "npm:^2.8.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": 13.5.2
|
||||
"@polkadot/util-crypto": 13.5.2
|
||||
"@polkadot/util": 13.5.6
|
||||
"@polkadot/util-crypto": 13.5.6
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/networks@npm:13.5.2, @polkadot/networks@workspace:packages/networks":
|
||||
"@polkadot/networks@npm:13.5.6, @polkadot/networks@workspace:packages/networks":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/networks@workspace:packages/networks"
|
||||
dependencies:
|
||||
"@polkadot/hw-ledger": "npm:13.5.2"
|
||||
"@polkadot/util": "npm:13.5.2"
|
||||
"@polkadot/hw-ledger": "npm:13.5.6"
|
||||
"@polkadot/util": "npm:13.5.6"
|
||||
"@substrate/ss58-registry": "npm:^1.51.0"
|
||||
tslib: "npm:^2.8.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/util-crypto@npm:13.5.2, @polkadot/util-crypto@workspace:packages/util-crypto":
|
||||
"@polkadot/util-crypto@npm:13.5.6, @polkadot/util-crypto@workspace:packages/util-crypto":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/util-crypto@workspace:packages/util-crypto"
|
||||
dependencies:
|
||||
"@noble/curves": "npm:^1.3.0"
|
||||
"@noble/hashes": "npm:^1.3.3"
|
||||
"@polkadot/networks": "npm:13.5.2"
|
||||
"@polkadot/util": "npm:13.5.2"
|
||||
"@polkadot/wasm-crypto": "npm:^7.4.1"
|
||||
"@polkadot/wasm-util": "npm:^7.4.1"
|
||||
"@polkadot/x-bigint": "npm:13.5.2"
|
||||
"@polkadot/x-randomvalues": "npm:13.5.2"
|
||||
"@polkadot/networks": "npm:13.5.6"
|
||||
"@polkadot/util": "npm:13.5.6"
|
||||
"@polkadot/wasm-crypto": "npm:^7.5.1"
|
||||
"@polkadot/wasm-util": "npm:^7.5.1"
|
||||
"@polkadot/x-bigint": "npm:13.5.6"
|
||||
"@polkadot/x-randomvalues": "npm:13.5.6"
|
||||
"@scure/base": "npm:^1.1.7"
|
||||
tslib: "npm:^2.8.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": 13.5.2
|
||||
"@polkadot/util": 13.5.6
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/util@npm:13.5.2, @polkadot/util@workspace:packages/util":
|
||||
"@polkadot/util@npm:13.5.6, @polkadot/util@workspace:packages/util":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/util@workspace:packages/util"
|
||||
dependencies:
|
||||
"@polkadot/x-bigint": "npm:13.5.2"
|
||||
"@polkadot/x-global": "npm:13.5.2"
|
||||
"@polkadot/x-randomvalues": "npm:13.5.2"
|
||||
"@polkadot/x-textdecoder": "npm:13.5.2"
|
||||
"@polkadot/x-textencoder": "npm:13.5.2"
|
||||
"@polkadot/x-bigint": "npm:13.5.6"
|
||||
"@polkadot/x-global": "npm:13.5.6"
|
||||
"@polkadot/x-randomvalues": "npm:13.5.6"
|
||||
"@polkadot/x-textdecoder": "npm:13.5.6"
|
||||
"@polkadot/x-textencoder": "npm:13.5.6"
|
||||
"@types/bn.js": "npm:^5.1.6"
|
||||
bn.js: "npm:^5.2.1"
|
||||
tslib: "npm:^2.8.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/wasm-bridge@npm:7.4.1":
|
||||
version: 7.4.1
|
||||
resolution: "@polkadot/wasm-bridge@npm:7.4.1"
|
||||
"@polkadot/wasm-bridge@npm:7.5.1":
|
||||
version: 7.5.1
|
||||
resolution: "@polkadot/wasm-bridge@npm:7.5.1"
|
||||
dependencies:
|
||||
"@polkadot/wasm-util": "npm:7.4.1"
|
||||
"@polkadot/wasm-util": "npm:7.5.1"
|
||||
tslib: "npm:^2.7.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
"@polkadot/x-randomvalues": "*"
|
||||
checksum: 10/b1d687ff433974cb34e54539b69209b569c4faf818e3cf376601d76acacc946bd56e5c06b18f0720dd1f63454f8e74f65bc37f259c7fca35d58623d27154b033
|
||||
checksum: 10/70094b6e9727a902a922709326022e22c2a9bc7e27de541d646cb25d3cbee56df5eddd4a0046269ef34092562bc7f746e5d3347ac3f8aff01990eae837d078b8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/wasm-crypto-asmjs@npm:7.4.1":
|
||||
version: 7.4.1
|
||||
resolution: "@polkadot/wasm-crypto-asmjs@npm:7.4.1"
|
||||
"@polkadot/wasm-crypto-asmjs@npm:7.5.1":
|
||||
version: 7.5.1
|
||||
resolution: "@polkadot/wasm-crypto-asmjs@npm:7.5.1"
|
||||
dependencies:
|
||||
tslib: "npm:^2.7.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
checksum: 10/68df2338bff14c0331d62871b66e31cea1005eac8f136c294074f7350d4c342bba17a7edd3cc9aecb2ae63dad4e927422e7be562c446bb2b7ff1a6af17bb8eee
|
||||
checksum: 10/6849a96bf9191f22e238fa847ebc8cbbb13d9d2569007dde6055769144c3c6cf8398e81f3ab93b3fad458bf69f3833a77f197ff36b015fb61690ee15ba9ec45b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/wasm-crypto-init@npm:7.4.1":
|
||||
version: 7.4.1
|
||||
resolution: "@polkadot/wasm-crypto-init@npm:7.4.1"
|
||||
"@polkadot/wasm-crypto-init@npm:7.5.1":
|
||||
version: 7.5.1
|
||||
resolution: "@polkadot/wasm-crypto-init@npm:7.5.1"
|
||||
dependencies:
|
||||
"@polkadot/wasm-bridge": "npm:7.4.1"
|
||||
"@polkadot/wasm-crypto-asmjs": "npm:7.4.1"
|
||||
"@polkadot/wasm-crypto-wasm": "npm:7.4.1"
|
||||
"@polkadot/wasm-util": "npm:7.4.1"
|
||||
"@polkadot/wasm-bridge": "npm:7.5.1"
|
||||
"@polkadot/wasm-crypto-asmjs": "npm:7.5.1"
|
||||
"@polkadot/wasm-crypto-wasm": "npm:7.5.1"
|
||||
"@polkadot/wasm-util": "npm:7.5.1"
|
||||
tslib: "npm:^2.7.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
"@polkadot/x-randomvalues": "*"
|
||||
checksum: 10/d12c791214301419d94f5b374b443addc59c45e155f67b9503db4fe72866fa92e040ce8764f6dd8b4ce95005d4508a83efe832c6df4c946b7f14c18d28e8f0c1
|
||||
checksum: 10/ca429d97bdfe637d1b3672015d16bc0a160af37bf647ccb52597b40f929fc7af16096c1af5603fb5b838e04140db91904c774fb3e59cd34debf026e45c77ac5b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/wasm-crypto-wasm@npm:7.4.1":
|
||||
version: 7.4.1
|
||||
resolution: "@polkadot/wasm-crypto-wasm@npm:7.4.1"
|
||||
"@polkadot/wasm-crypto-wasm@npm:7.5.1":
|
||||
version: 7.5.1
|
||||
resolution: "@polkadot/wasm-crypto-wasm@npm:7.5.1"
|
||||
dependencies:
|
||||
"@polkadot/wasm-util": "npm:7.4.1"
|
||||
"@polkadot/wasm-util": "npm:7.5.1"
|
||||
tslib: "npm:^2.7.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
checksum: 10/22cd4e5d734bc08f6707d25cf43c9b75af335ee39284bf43dced0c72abd1300c7ebc3e956c3ce175db59655ed4fd1c37fc652c7851ee308de0bdf65331f7ba67
|
||||
checksum: 10/c652b38edbb07d7b7546ecdb44ea370244e3f1ff37c9733ee2db4d7e7483e7c7496ce220ec5c621a26fdb49d0475390fc84d51cec5ddb110fa0fc3373d06dd43
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/wasm-crypto@npm:^7.4.1":
|
||||
version: 7.4.1
|
||||
resolution: "@polkadot/wasm-crypto@npm:7.4.1"
|
||||
"@polkadot/wasm-crypto@npm:^7.5.1":
|
||||
version: 7.5.1
|
||||
resolution: "@polkadot/wasm-crypto@npm:7.5.1"
|
||||
dependencies:
|
||||
"@polkadot/wasm-bridge": "npm:7.4.1"
|
||||
"@polkadot/wasm-crypto-asmjs": "npm:7.4.1"
|
||||
"@polkadot/wasm-crypto-init": "npm:7.4.1"
|
||||
"@polkadot/wasm-crypto-wasm": "npm:7.4.1"
|
||||
"@polkadot/wasm-util": "npm:7.4.1"
|
||||
"@polkadot/wasm-bridge": "npm:7.5.1"
|
||||
"@polkadot/wasm-crypto-asmjs": "npm:7.5.1"
|
||||
"@polkadot/wasm-crypto-init": "npm:7.5.1"
|
||||
"@polkadot/wasm-crypto-wasm": "npm:7.5.1"
|
||||
"@polkadot/wasm-util": "npm:7.5.1"
|
||||
tslib: "npm:^2.7.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
"@polkadot/x-randomvalues": "*"
|
||||
checksum: 10/7fbb38c15217965066904dfa007dafc835ed828c0a33ef6621f772fdd50b634aa0862118713e5bf564dc17891f3e3a6f09a589b447ba4e39f2e9847a0f5383be
|
||||
checksum: 10/d304959e67dab123f9ba9e9d400358156478f633ef3e2f760530fc556d79fcebc155be809ec73dc54c247c4e5185e118fe23c191167a9ad77ec575adb32979e3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/wasm-util@npm:7.4.1, @polkadot/wasm-util@npm:^7.4.1":
|
||||
version: 7.4.1
|
||||
resolution: "@polkadot/wasm-util@npm:7.4.1"
|
||||
"@polkadot/wasm-util@npm:7.5.1, @polkadot/wasm-util@npm:^7.5.1":
|
||||
version: 7.5.1
|
||||
resolution: "@polkadot/wasm-util@npm:7.5.1"
|
||||
dependencies:
|
||||
tslib: "npm:^2.7.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": "*"
|
||||
checksum: 10/08effda106378716954267cb268035a37d2c0a8c1db2e6f617ccd7b4f1e410342b4ff1c26db95b828aeb23e2b5512ca72f389055d717c54fda00e97fba89462a
|
||||
checksum: 10/7e96be99a275f6e4a68b92b6439b70aa7d80f1209031d4f7e7f7c00dee65272aabaaee43ec153c969a72a02792c2bf271e266bccd60e83e9a1450c5c5e7b06ee
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-bigint@npm:13.5.2, @polkadot/x-bigint@workspace:packages/x-bigint":
|
||||
"@polkadot/x-bigint@npm:13.5.6, @polkadot/x-bigint@workspace:packages/x-bigint":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/x-bigint@workspace:packages/x-bigint"
|
||||
dependencies:
|
||||
"@polkadot/x-global": "npm:13.5.2"
|
||||
"@polkadot/x-global": "npm:13.5.6"
|
||||
tslib: "npm:^2.8.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@@ -1752,7 +1752,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/x-bundle@workspace:packages/x-bundle"
|
||||
dependencies:
|
||||
"@polkadot/util": "npm:13.5.2"
|
||||
"@polkadot/util": "npm:13.5.6"
|
||||
buffer-es6: "npm:^4.9.3"
|
||||
tslib: "npm:^2.8.0"
|
||||
languageName: unknown
|
||||
@@ -1762,13 +1762,13 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/x-fetch@workspace:packages/x-fetch"
|
||||
dependencies:
|
||||
"@polkadot/x-global": "npm:13.5.2"
|
||||
"@polkadot/x-global": "npm:13.5.6"
|
||||
node-fetch: "npm:^3.3.2"
|
||||
tslib: "npm:^2.8.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/x-global@npm:13.5.2, @polkadot/x-global@workspace:packages/x-global":
|
||||
"@polkadot/x-global@npm:13.5.6, @polkadot/x-global@workspace:packages/x-global":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/x-global@workspace:packages/x-global"
|
||||
dependencies:
|
||||
@@ -1776,35 +1776,35 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/x-randomvalues@npm:13.5.2, @polkadot/x-randomvalues@workspace:packages/x-randomvalues":
|
||||
"@polkadot/x-randomvalues@npm:13.5.6, @polkadot/x-randomvalues@workspace:packages/x-randomvalues":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/x-randomvalues@workspace:packages/x-randomvalues"
|
||||
dependencies:
|
||||
"@polkadot/util": "npm:13.5.2"
|
||||
"@polkadot/wasm-util": "npm:^7.4.1"
|
||||
"@polkadot/x-global": "npm:13.5.2"
|
||||
"@polkadot/util": "npm:13.5.6"
|
||||
"@polkadot/wasm-util": "npm:^7.5.1"
|
||||
"@polkadot/x-global": "npm:13.5.6"
|
||||
"@types/react-native": "npm:^0.73.0"
|
||||
tslib: "npm:^2.8.0"
|
||||
peerDependencies:
|
||||
"@polkadot/util": 13.5.2
|
||||
"@polkadot/util": 13.5.6
|
||||
"@polkadot/wasm-util": "*"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/x-textdecoder@npm:13.5.2, @polkadot/x-textdecoder@workspace:packages/x-textdecoder":
|
||||
"@polkadot/x-textdecoder@npm:13.5.6, @polkadot/x-textdecoder@workspace:packages/x-textdecoder":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/x-textdecoder@workspace:packages/x-textdecoder"
|
||||
dependencies:
|
||||
"@polkadot/x-global": "npm:13.5.2"
|
||||
"@polkadot/x-global": "npm:13.5.6"
|
||||
tslib: "npm:^2.8.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/x-textencoder@npm:13.5.2, @polkadot/x-textencoder@workspace:packages/x-textencoder":
|
||||
"@polkadot/x-textencoder@npm:13.5.6, @polkadot/x-textencoder@workspace:packages/x-textencoder":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/x-textencoder@workspace:packages/x-textencoder"
|
||||
dependencies:
|
||||
"@polkadot/x-global": "npm:13.5.2"
|
||||
"@polkadot/x-global": "npm:13.5.6"
|
||||
tslib: "npm:^2.8.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@@ -1813,7 +1813,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/x-ws@workspace:packages/x-ws"
|
||||
dependencies:
|
||||
"@polkadot/x-global": "npm:13.5.2"
|
||||
"@polkadot/x-global": "npm:13.5.6"
|
||||
"@types/ws": "npm:^8.5.12"
|
||||
tslib: "npm:^2.8.0"
|
||||
ws: "npm:^8.18.0"
|
||||
@@ -10741,7 +10741,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "root-workspace-0b6124@workspace:."
|
||||
dependencies:
|
||||
"@polkadot/dev": "npm:^0.83.2"
|
||||
"@polkadot/dev": "npm:^0.83.3"
|
||||
"@types/node": "npm:^22.7.5"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
Reference in New Issue
Block a user