Introduce key suri (path derivation) (#358)
* Introduce key suri (path derivation) * Errant console.log * let -> const * Add seed derivation from path * Allow new-generation derivation * Add addFromUri to keyring * Use addFromUri in testing keyring * Add suri tests * Prepare for sr25519 derivation * CHANGELOG entry * ed25519 is aligned with substrate * Bump version
This commit is contained in:
@@ -11,16 +11,15 @@ type TestKeyringMap = {
|
||||
[index: string]: KeyringPair
|
||||
};
|
||||
|
||||
export default function testKeyringPairs (options?: KeyringOptions): TestKeyringMap {
|
||||
const keyring = createKeyring(options);
|
||||
export default function testKeyringPairs (options?: KeyringOptions, isHdKd: boolean = false): TestKeyringMap {
|
||||
const keyring = createKeyring(options, isHdKd);
|
||||
const pairs = keyring.getPairs();
|
||||
|
||||
return pairs.reduce((result, pair) => {
|
||||
const { name } = pair.getMeta();
|
||||
|
||||
// @ts-ignore dunno what the complaint here is about...
|
||||
result[name as string] = pair;
|
||||
|
||||
return result;
|
||||
}, { 'nobody': nobody() });
|
||||
}, { 'nobody': nobody() } as TestKeyringMap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user