@metamask/account-api
Version:
MetaMask Account API
29 lines • 987 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountWalletType = void 0;
exports.toAccountWalletId = toAccountWalletId;
/**
* Wallet type.
*
* Each wallet types groups accounts using different criterias.
*/
var AccountWalletType;
(function (AccountWalletType) {
/** Wallet grouping accounts based on their entropy source. */
AccountWalletType["Entropy"] = "entropy";
/** Wallet grouping accounts based on their keyring's type. */
AccountWalletType["Keyring"] = "keyring";
/** Wallet grouping accounts associated with an account management Snap. */
AccountWalletType["Snap"] = "snap";
})(AccountWalletType || (exports.AccountWalletType = AccountWalletType = {}));
/**
* Convert a unique ID to a wallet ID for a given type.
*
* @param type - A wallet type.
* @param id - A unique ID.
* @returns A wallet ID.
*/
function toAccountWalletId(type, id) {
return `${type}:${id}`;
}
//# sourceMappingURL=wallet.cjs.map