UNPKG

@metamask-previews/account-api

Version:
27 lines 885 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_ACCOUNT_GROUP_NAME = exports.DEFAULT_ACCOUNT_GROUP_UNIQUE_ID = void 0; exports.toAccountGroupId = toAccountGroupId; exports.toDefaultAccountGroupId = toDefaultAccountGroupId; exports.DEFAULT_ACCOUNT_GROUP_UNIQUE_ID = 'default'; exports.DEFAULT_ACCOUNT_GROUP_NAME = 'Default'; /** * Convert a wallet ID and a unique ID, to a group ID. * * @param walletId - A wallet ID. * @param id - A unique ID. * @returns A group ID. */ function toAccountGroupId(walletId, id) { return `${walletId}:${id}`; } /** * Convert a wallet ID to the default group ID. * * @param walletId - A wallet ID. * @returns The default group ID. */ function toDefaultAccountGroupId(walletId) { return toAccountGroupId(walletId, exports.DEFAULT_ACCOUNT_GROUP_UNIQUE_ID); } //# sourceMappingURL=group.cjs.map