mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-21 23:48:05 +00:00
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import type { KeypairType } from '@pezkuwi/util-crypto/types';
|
|
import type { KeyringOptions, KeyringPair } from './types.js';
|
|
export interface TestKeyringMap {
|
|
nobody: KeyringPair;
|
|
[index: string]: KeyringPair;
|
|
}
|
|
export interface TestKeyringMapBizinikiwi extends TestKeyringMap {
|
|
alice: KeyringPair;
|
|
bob: KeyringPair;
|
|
charlie: KeyringPair;
|
|
dave: KeyringPair;
|
|
eve: KeyringPair;
|
|
ferdie: KeyringPair;
|
|
}
|
|
export interface TestKeyringMapEthereum extends TestKeyringMap {
|
|
Alith: KeyringPair;
|
|
Baltathar: KeyringPair;
|
|
Charleth: KeyringPair;
|
|
Dorothy: KeyringPair;
|
|
Ethan: KeyringPair;
|
|
Faith: KeyringPair;
|
|
}
|
|
export type DetectMap<O extends KeyringOptions | undefined> = DetectPairType<O> extends 'ethereum' ? TestKeyringMapEthereum : TestKeyringMapBizinikiwi;
|
|
export type DetectPairType<O extends KeyringOptions | undefined> = O extends KeyringOptions ? O['type'] extends KeypairType ? O['type'] : 'sr25519' : 'sr25519';
|
|
export declare function createTestPairs<O extends KeyringOptions, M = DetectMap<O>>(options?: O, isDerived?: boolean): M;
|