diff --git a/packages/account-api/src/api/provider.test.ts b/packages/account-api/src/api/provider.test.ts new file mode 100644 index 000000000..a0424aee4 --- /dev/null +++ b/packages/account-api/src/api/provider.test.ts @@ -0,0 +1,11 @@ +import { AccountProviderType } from './provider'; + +describe('AccountProviderType', () => { + it('has expected values', () => { + expect(AccountProviderType).toStrictEqual({ + Evm: 'Evm', + Solana: 'Solana', + Btc: 'Btc', + }); + }); +}); diff --git a/packages/account-api/src/api/provider.ts b/packages/account-api/src/api/provider.ts index 7771bf10d..baa6d4033 100644 --- a/packages/account-api/src/api/provider.ts +++ b/packages/account-api/src/api/provider.ts @@ -1,9 +1,19 @@ import type { EntropySourceId, KeyringAccount } from '@metamask/keyring-api'; +export enum AccountProviderType { + Evm = 'Evm', + Solana = 'Solana', + Btc = 'Btc', +} + /** * An account provider is reponsible of providing accounts to an account group. */ export type AccountProvider = { + /** + * The type of the provider. + */ + providerType: AccountProviderType; /** * Gets an account for a given ID. * @@ -33,18 +43,15 @@ export type AccountProvider = { }) => Promise; /** - * Discover accounts for a given entropy source and a given group - * index. + * Discover accounts for a given entropy source. * * NOTE: This method needs to also create the discovered accounts. * * @param options - Options. * @param options.entropySource - Entropy source to use. - * @param options.groupIndex - Group index to use. * @returns The list of discovered and created accounts. */ discoverAndCreateAccounts: (options: { entropySource: EntropySourceId; - groupIndex: number; }) => Promise; };