@polkadot/keyring
Advanced tools
Comparing version 13.3.1 to 13.4.1
@@ -274,4 +274,4 @@ (function (global, factory) { | ||
} | ||
addFromMnemonic(mnemonic, meta = {}, type = this.type) { | ||
return this.addFromUri(mnemonic, meta, type); | ||
addFromMnemonic(mnemonic, meta = {}, type = this.type, wordlist) { | ||
return this.addFromUri(mnemonic, meta, type, wordlist); | ||
} | ||
@@ -284,4 +284,4 @@ addFromPair(pair, meta = {}, type = this.type) { | ||
} | ||
addFromUri(suri, meta = {}, type = this.type) { | ||
return this.addPair(this.createFromUri(suri, meta, type)); | ||
addFromUri(suri, meta = {}, type = this.type, wordlist) { | ||
return this.addPair(this.createFromUri(suri, meta, type, wordlist)); | ||
} | ||
@@ -312,3 +312,3 @@ createFromJson({ address, encoded, encoding: { content, type, version }, meta }, ignoreChecksum) { | ||
} | ||
createFromUri(_suri, meta = {}, type = this.type) { | ||
createFromUri(_suri, meta = {}, type = this.type, wordlist) { | ||
const suri = _suri.startsWith('//') | ||
@@ -328,3 +328,3 @@ ? `${DEV_PHRASE}${_suri}` | ||
? utilCrypto.mnemonicToLegacySeed(phrase, '', false, 64) | ||
: utilCrypto.mnemonicToMiniSecret(phrase, password); | ||
: utilCrypto.mnemonicToMiniSecret(phrase, password, wordlist); | ||
} | ||
@@ -370,3 +370,3 @@ else { | ||
const packageInfo = { name: '@polkadot/keyring', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-keyring.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-keyring.js', document.baseURI).href))) ? new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-keyring.js', document.baseURI).href))).pathname.substring(0, new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-keyring.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '13.3.1' }; | ||
const packageInfo = { name: '@polkadot/keyring', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-keyring.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-keyring.js', document.baseURI).href))) ? new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-keyring.js', document.baseURI).href))).pathname.substring(0, new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-keyring.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '13.4.1' }; | ||
@@ -373,0 +373,0 @@ const PAIRSSR25519 = [ |
@@ -66,3 +66,3 @@ import type { EncryptedJsonEncoding, Keypair, KeypairType } from '@polkadot/util-crypto/types'; | ||
*/ | ||
addFromMnemonic(mnemonic: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromMnemonic(mnemonic: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
/** | ||
@@ -86,3 +86,3 @@ * @name addFromPair | ||
*/ | ||
addFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
/** | ||
@@ -103,3 +103,3 @@ * @name createFromJson | ||
*/ | ||
createFromUri(_suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
createFromUri(_suri: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
/** | ||
@@ -106,0 +106,0 @@ * @name encodeAddress |
@@ -103,4 +103,4 @@ "use strict"; | ||
*/ | ||
addFromMnemonic(mnemonic, meta = {}, type = this.type) { | ||
return this.addFromUri(mnemonic, meta, type); | ||
addFromMnemonic(mnemonic, meta = {}, type = this.type, wordlist) { | ||
return this.addFromUri(mnemonic, meta, type, wordlist); | ||
} | ||
@@ -129,4 +129,4 @@ /** | ||
*/ | ||
addFromUri(suri, meta = {}, type = this.type) { | ||
return this.addPair(this.createFromUri(suri, meta, type)); | ||
addFromUri(suri, meta = {}, type = this.type, wordlist) { | ||
return this.addPair(this.createFromUri(suri, meta, type, wordlist)); | ||
} | ||
@@ -171,3 +171,3 @@ /** | ||
*/ | ||
createFromUri(_suri, meta = {}, type = this.type) { | ||
createFromUri(_suri, meta = {}, type = this.type, wordlist) { | ||
// here we only aut-add the dev phrase if we have a hard-derived path | ||
@@ -188,3 +188,3 @@ const suri = _suri.startsWith('//') | ||
? (0, util_crypto_1.mnemonicToLegacySeed)(phrase, '', false, 64) | ||
: (0, util_crypto_1.mnemonicToMiniSecret)(phrase, password); | ||
: (0, util_crypto_1.mnemonicToMiniSecret)(phrase, password, wordlist); | ||
} | ||
@@ -191,0 +191,0 @@ else { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.packageInfo = void 0; | ||
exports.packageInfo = { name: '@polkadot/keyring', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '13.3.1' }; | ||
exports.packageInfo = { name: '@polkadot/keyring', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '13.4.1' }; |
@@ -99,9 +99,9 @@ import type { HexString } from '@polkadot/util/types'; | ||
addFromJson(pair: KeyringPair$Json, ignoreChecksum?: boolean): KeyringPair; | ||
addFromMnemonic(mnemonic: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromMnemonic(mnemonic: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
addFromPair(pair: Keypair, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromSeed(seed: Uint8Array, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
createFromJson(json: KeyringPair$Json, ignoreChecksum?: boolean): KeyringPair; | ||
createFromPair(pair: Keypair, meta: KeyringPair$Meta, type: KeypairType): KeyringPair; | ||
createFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
createFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
getPair(address: string | Uint8Array): KeyringPair; | ||
@@ -108,0 +108,0 @@ getPairs(): KeyringPair[]; |
@@ -66,3 +66,3 @@ import type { EncryptedJsonEncoding, Keypair, KeypairType } from '@polkadot/util-crypto/types'; | ||
*/ | ||
addFromMnemonic(mnemonic: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromMnemonic(mnemonic: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
/** | ||
@@ -86,3 +86,3 @@ * @name addFromPair | ||
*/ | ||
addFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
/** | ||
@@ -103,3 +103,3 @@ * @name createFromJson | ||
*/ | ||
createFromUri(_suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
createFromUri(_suri: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
/** | ||
@@ -106,0 +106,0 @@ * @name encodeAddress |
@@ -100,4 +100,4 @@ import { hexToU8a, isHex, stringToU8a } from '@polkadot/util'; | ||
*/ | ||
addFromMnemonic(mnemonic, meta = {}, type = this.type) { | ||
return this.addFromUri(mnemonic, meta, type); | ||
addFromMnemonic(mnemonic, meta = {}, type = this.type, wordlist) { | ||
return this.addFromUri(mnemonic, meta, type, wordlist); | ||
} | ||
@@ -126,4 +126,4 @@ /** | ||
*/ | ||
addFromUri(suri, meta = {}, type = this.type) { | ||
return this.addPair(this.createFromUri(suri, meta, type)); | ||
addFromUri(suri, meta = {}, type = this.type, wordlist) { | ||
return this.addPair(this.createFromUri(suri, meta, type, wordlist)); | ||
} | ||
@@ -168,3 +168,3 @@ /** | ||
*/ | ||
createFromUri(_suri, meta = {}, type = this.type) { | ||
createFromUri(_suri, meta = {}, type = this.type, wordlist) { | ||
// here we only aut-add the dev phrase if we have a hard-derived path | ||
@@ -185,3 +185,3 @@ const suri = _suri.startsWith('//') | ||
? mnemonicToLegacySeed(phrase, '', false, 64) | ||
: mnemonicToMiniSecret(phrase, password); | ||
: mnemonicToMiniSecret(phrase, password, wordlist); | ||
} | ||
@@ -188,0 +188,0 @@ else { |
@@ -21,3 +21,3 @@ { | ||
"type": "module", | ||
"version": "13.3.1", | ||
"version": "13.4.1", | ||
"main": "./cjs/index.js", | ||
@@ -287,10 +287,10 @@ "module": "./index.js", | ||
"dependencies": { | ||
"@polkadot/util": "13.3.1", | ||
"@polkadot/util-crypto": "13.3.1", | ||
"@polkadot/util": "13.4.1", | ||
"@polkadot/util-crypto": "13.4.1", | ||
"tslib": "^2.8.0" | ||
}, | ||
"peerDependencies": { | ||
"@polkadot/util": "13.3.1", | ||
"@polkadot/util-crypto": "13.3.1" | ||
"@polkadot/util": "13.4.1", | ||
"@polkadot/util-crypto": "13.4.1" | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
export const packageInfo = { name: '@polkadot/keyring', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '13.3.1' }; | ||
export const packageInfo = { name: '@polkadot/keyring', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '13.4.1' }; |
@@ -99,9 +99,9 @@ import type { HexString } from '@polkadot/util/types'; | ||
addFromJson(pair: KeyringPair$Json, ignoreChecksum?: boolean): KeyringPair; | ||
addFromMnemonic(mnemonic: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromMnemonic(mnemonic: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
addFromPair(pair: Keypair, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromSeed(seed: Uint8Array, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
addFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
createFromJson(json: KeyringPair$Json, ignoreChecksum?: boolean): KeyringPair; | ||
createFromPair(pair: Keypair, meta: KeyringPair$Meta, type: KeypairType): KeyringPair; | ||
createFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair; | ||
createFromUri(suri: string, meta?: KeyringPair$Meta, type?: KeypairType, wordlist?: string[]): KeyringPair; | ||
getPair(address: string | Uint8Array): KeyringPair; | ||
@@ -108,0 +108,0 @@ getPairs(): KeyringPair[]; |
156331
+ Added@polkadot/networks@13.4.1(transitive)
+ Added@polkadot/util@13.4.1(transitive)
+ Added@polkadot/util-crypto@13.4.1(transitive)
+ Added@polkadot/x-bigint@13.4.1(transitive)
+ Added@polkadot/x-global@13.4.1(transitive)
+ Added@polkadot/x-randomvalues@13.4.1(transitive)
+ Added@polkadot/x-textdecoder@13.4.1(transitive)
+ Added@polkadot/x-textencoder@13.4.1(transitive)
- Removed@polkadot/networks@13.3.1(transitive)
- Removed@polkadot/util@13.3.1(transitive)
- Removed@polkadot/util-crypto@13.3.1(transitive)
- Removed@polkadot/x-bigint@13.3.1(transitive)
- Removed@polkadot/x-global@13.3.1(transitive)
- Removed@polkadot/x-randomvalues@13.3.1(transitive)
- Removed@polkadot/x-textdecoder@13.3.1(transitive)
- Removed@polkadot/x-textencoder@13.3.1(transitive)
Updated@polkadot/util@13.4.1
Updated@polkadot/util-crypto@13.4.1