* Auto-conversion * Cleanup type conversion errors * Inching closer, resolution sorted * Additional cleanups * TS, TS everywhere * Minor version for TS release * Last roundups
27 lines
745 B
TypeScript
27 lines
745 B
TypeScript
// Copyright 2017-2018 @polkadot/util-keyring authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the ISC license. See the LICENSE file for details.
|
|
|
|
import { KeyringPair, KeyringInstance } from './types';
|
|
|
|
import createKeyring from './testing';
|
|
import nobody from './pair/nobody';
|
|
|
|
type TestKeyringMap = {
|
|
[index: string]: KeyringPair
|
|
};
|
|
|
|
export default function testKeyringPairs (): TestKeyringMap {
|
|
const keyring = createKeyring();
|
|
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() });
|
|
}
|