diff --git a/src/api.ts b/src/api.ts index c29ba5eeb..bd8f638b8 100644 --- a/src/api.ts +++ b/src/api.ts @@ -24,6 +24,14 @@ export enum BtcAccountType { P2wpkh = 'bip122:p2wpkh', } +/** + * Supported account types. + */ +export type KeyringAccountType = + | `${EthAccountType.Eoa}` + | `${EthAccountType.Erc4337}` + | `${BtcAccountType.P2wpkh}`; + /** * A struct which represents a Keyring account object. It is abstract enough to * be used with any blockchain. Specific blockchain account types should extend diff --git a/src/eth/utils.ts b/src/eth/utils.ts index a5b5c728a..e686e8581 100644 --- a/src/eth/utils.ts +++ b/src/eth/utils.ts @@ -1,11 +1,12 @@ +import type { KeyringAccountType } from '../api'; import { EthAccountType } from '../api'; -import type { InternalAccountType } from '../internal'; /** * Checks if the given type is an EVM account type. + * * @param type - The type to check. * @returns Returns true if the type is an EVM account type, false otherwise. */ -export function isEvmAccountType(type: InternalAccountType | string): boolean { +export function isEvmAccountType(type: KeyringAccountType): boolean { return type === EthAccountType.Eoa || type === EthAccountType.Erc4337; }