UNPKG

@metamask/multichain-account-service

Version:
22 lines 1.25 kB
import { type Bip44Account } from "@metamask/account-api"; import type { EntropySourceId, KeyringAccount } from "@metamask/keyring-api"; import type { InternalAccount } from "@metamask/keyring-internal-api"; import type { Json, SnapId } from "@metamask/snaps-sdk"; import type { MultichainAccountServiceMessenger } from "src/types"; import { BaseAccountProvider } from "./BaseAccountProvider.mjs"; export type RestrictedSnapKeyringCreateAccount = (options: Record<string, Json>) => Promise<KeyringAccount>; export declare abstract class SnapAccountProvider extends BaseAccountProvider { readonly snapId: SnapId; constructor(snapId: SnapId, messenger: MultichainAccountServiceMessenger); protected getRestrictedSnapAccountCreator(): Promise<RestrictedSnapKeyringCreateAccount>; abstract isAccountCompatible(account: Bip44Account<InternalAccount>): boolean; abstract createAccounts(options: { entropySource: EntropySourceId; groupIndex: number; }): Promise<Bip44Account<KeyringAccount>[]>; abstract discoverAndCreateAccounts(options: { entropySource: EntropySourceId; groupIndex: number; }): Promise<Bip44Account<KeyringAccount>[]>; } //# sourceMappingURL=SnapAccountProvider.d.mts.map