@metamask/account-api
Version:
MetaMask Account API
24 lines • 909 B
text/typescript
import type { KeyringAccount, KeyringAccountEntropyMnemonicOptions } from "@metamask/keyring-api";
/**
* BIP-44 compatible account type.
*/
export type Bip44Account<Account extends KeyringAccount> = Account & {
options: {
entropy: KeyringAccountEntropyMnemonicOptions;
};
};
/**
* Checks if an account is BIP-44 compatible.
*
* @param account - The account to be tested.
* @returns True if the account is BIP-44 compatible.
*/
export declare function isBip44Account<Account extends KeyringAccount>(account: Account): account is Bip44Account<Account>;
/**
* Asserts a keyring account is BIP-44 compatible.
*
* @param account - Keyring account to check.
* @throws If the keyring account is not compatible.
*/
export declare function assertIsBip44Account<Account extends KeyringAccount>(account: Account): asserts account is Bip44Account<Account>;
//# sourceMappingURL=bip44.d.mts.map