diff --git a/src/keyring.ts b/src/keyring.ts index c433ac142..f34cadaed 100644 --- a/src/keyring.ts +++ b/src/keyring.ts @@ -11,7 +11,7 @@ import type { Json } from './json'; * static property on Keyring classes. See the {@link Keyring} type for more * information. */ -export type KeyringClass = { +export type KeyringClass = { /** * The Keyring constructor. Takes a single parameter, an "options" object. * See the documentation for the specific keyring for more information about @@ -20,13 +20,13 @@ export type KeyringClass = { * @param options - The constructor options. Differs between keyring * implementations. */ - new (options?: Record): Keyring; + new (options?: Record): Keyring; /** * The name of this type of keyring. This must uniquely identify the * keyring type. */ - type: string; + type: Type; }; /** @@ -44,12 +44,12 @@ export type KeyringClass = { * should be treated with care though, just in case it does contain sensitive * material such as a private key. */ -export type Keyring = { +export type Keyring = { /** * The name of this type of keyring. This must match the `type` property of * the keyring class. */ - type: string; + type: Type; /** * Get the addresses for all accounts in this keyring. @@ -264,3 +264,11 @@ export type Keyring = { */ destroy?(): Promise; }; + +/** + * A Keyring factory function. + */ +export type KeyringBuilder = { + (): Keyring; + type: Type; +};