@metamask/multichain-account-service
Version:
Service to manage multichain accounts
493 lines • 29.2 kB
JavaScript
"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _MultichainAccountService_instances, _MultichainAccountService_messenger, _MultichainAccountService_providers, _MultichainAccountService_trace, _MultichainAccountService_wallets, _MultichainAccountService_getStateKeys, _MultichainAccountService_constructServiceState, _MultichainAccountService_getWallet, _MultichainAccountService_getPrimaryEntropySourceId, _MultichainAccountService_createWalletByImport, _MultichainAccountService_createWalletByNewVault, _MultichainAccountService_createWalletByRestore;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MultichainAccountService = exports.serviceName = void 0;
const account_api_1 = require("@metamask/account-api");
const keyring_controller_1 = require("@metamask/keyring-controller");
const utils_1 = require("@metamask/utils");
const analytics_1 = require("./analytics/index.cjs");
const perf_1 = require("./analytics/perf.cjs");
const errors_1 = require("./errors.cjs");
const logger_1 = require("./logger.cjs");
const MultichainAccountWallet_1 = require("./MultichainAccountWallet.cjs");
const providers_1 = require("./providers/index.cjs");
const AccountProviderWrapper_1 = require("./providers/AccountProviderWrapper.cjs");
const EvmAccountProvider_1 = require("./providers/EvmAccountProvider.cjs");
const SolAccountProvider_1 = require("./providers/SolAccountProvider.cjs");
const SolAccountProvider_2 = require("./providers/SolAccountProvider.cjs");
const utils_2 = require("./utils.cjs");
exports.serviceName = 'MultichainAccountService';
const MESSENGER_EXPOSED_METHODS = [
'getMultichainAccountGroup',
'getMultichainAccountGroups',
'getMultichainAccountWallet',
'getMultichainAccountWallets',
'createNextMultichainAccountGroup',
'createMultichainAccountGroup',
'createMultichainAccountGroups',
'setBasicFunctionality',
'alignWallets',
'alignWallet',
'createMultichainAccountWallet',
'resyncAccounts',
'removeMultichainAccountWallet',
'init',
];
/**
* Service to expose multichain accounts capabilities.
*/
class MultichainAccountService {
/**
* Constructs a new MultichainAccountService.
*
* @param options - The options.
* @param options.messenger - The messenger suited to this
* MultichainAccountService.
* @param options.providers - Optional list of account
* @param options.providerConfigs - Optional provider configs
* @param options.config - Optional config.
*/
constructor({ messenger, providers = [], providerConfigs, config, }) {
_MultichainAccountService_instances.add(this);
_MultichainAccountService_messenger.set(this, void 0);
_MultichainAccountService_providers.set(this, void 0);
_MultichainAccountService_trace.set(this, void 0);
_MultichainAccountService_wallets.set(this, void 0);
/**
* The name of the service.
*/
this.name = exports.serviceName;
__classPrivateFieldSet(this, _MultichainAccountService_messenger, messenger, "f");
__classPrivateFieldSet(this, _MultichainAccountService_wallets, new Map(), "f");
// Pass trace callback directly to preserve original 'this' context.
// This avoids binding the callback to the MultichainAccountService instance.
let trace = config?.trace ?? analytics_1.traceFallback;
// Wrap the trace callback with local performance tracing if performance logging is enabled.
if ((0, perf_1.isPerfEnabled)()) {
trace = (0, perf_1.withLocalPerfTrace)(trace);
}
// This trace is passed down to wallets and providers to be used for tracing operations within them.
__classPrivateFieldSet(this, _MultichainAccountService_trace, trace, "f");
// TODO: Rely on keyring capabilities once the keyring API is used by all keyrings.
__classPrivateFieldSet(this, _MultichainAccountService_providers, [
new EvmAccountProvider_1.EvmAccountProvider(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), providerConfigs?.[providers_1.EVM_ACCOUNT_PROVIDER_NAME], trace),
new AccountProviderWrapper_1.AccountProviderWrapper(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), new SolAccountProvider_1.SolAccountProvider(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), providerConfigs?.[SolAccountProvider_2.SOL_ACCOUNT_PROVIDER_NAME], trace)),
new AccountProviderWrapper_1.AccountProviderWrapper(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), new providers_1.BtcAccountProvider(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), providerConfigs?.[providers_1.BTC_ACCOUNT_PROVIDER_NAME], trace)),
new AccountProviderWrapper_1.AccountProviderWrapper(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), new providers_1.TrxAccountProvider(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), providerConfigs?.[providers_1.TRX_ACCOUNT_PROVIDER_NAME], trace)),
// Custom account providers that can be provided by the MetaMask client.
...providers,
], "f");
__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f").registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
}
/**
* Initialize the service and constructs the internal reprensentation of
* multichain accounts and wallets.
*/
async init() {
(0, logger_1.projectLogger)('Initializing...');
__classPrivateFieldGet(this, _MultichainAccountService_wallets, "f").clear();
const { serviceState, providerState } = __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_constructServiceState).call(this);
for (const provider of __classPrivateFieldGet(this, _MultichainAccountService_providers, "f")) {
const providerName = provider.getName();
// Initialize providers even if there are no accounts yet.
// Passing an empty array ensures providers start in a valid state.
const state = providerState[providerName] ?? [];
provider.init(state);
}
for (const entropySource of Object.keys(serviceState)) {
const wallet = new MultichainAccountWallet_1.MultichainAccountWallet({
entropySource,
providers: __classPrivateFieldGet(this, _MultichainAccountService_providers, "f"),
messenger: __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"),
trace: __classPrivateFieldGet(this, _MultichainAccountService_trace, "f"),
});
wallet.init(serviceState[entropySource]);
__classPrivateFieldGet(this, _MultichainAccountService_wallets, "f").set(wallet.id, wallet);
}
(0, logger_1.projectLogger)('Initialized');
}
/**
* Re-synchronize MetaMask accounts and the providers accounts if needed.
*
* NOTE: This is mostly required if one of the providers (keyrings or Snaps)
* have different sets of accounts. This method would ensure that both are
* in-sync and use the same accounts (and same IDs).
*
* READ THIS CAREFULLY (State inconsistency bugs/de-sync)
* We've seen some problems were keyring accounts on some Snaps were not synchronized
* with the accounts on MM side. This causes problems where we cannot interact with
* those accounts because the Snap does know about them.
* To "workaround" this de-sync problem for now, we make sure that both parties are
* in-sync when the service boots up.
* ----------------------------------------------------------------------------------
*/
async resyncAccounts() {
(0, logger_1.projectLogger)('Re-sync provider accounts if needed...');
const accounts = __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f")
.call('AccountsController:listMultichainAccounts')
.filter(account_api_1.isBip44Account);
// We use `Promise.all` + `try-catch` combo, since we don't wanna block the wallet
// from being used even if some accounts are not sync (best-effort).
await Promise.all(__classPrivateFieldGet(this, _MultichainAccountService_providers, "f").map(async (provider) => {
try {
await provider.resyncAccounts(accounts);
}
catch (error) {
(0, errors_1.reportError)(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), `Unable to re-sync provider "${provider.getName()}"`, error, {
provider: provider.getName(),
});
}
}));
(0, logger_1.projectLogger)('Providers got re-synced!');
}
/**
* Gets a reference to the multichain account wallet matching this entropy source.
*
* @param options - Options.
* @param options.entropySource - The entropy source of the multichain account.
* @throws If none multichain account match this entropy.
* @returns A reference to the multichain account wallet.
*/
getMultichainAccountWallet({ entropySource, }) {
return __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getWallet).call(this, entropySource);
}
/**
* Gets an array of all multichain account wallets.
*
* @returns An array of all multichain account wallets.
*/
getMultichainAccountWallets() {
return Array.from(__classPrivateFieldGet(this, _MultichainAccountService_wallets, "f").values());
}
/**
* Creates a new multichain account wallet by either importing an existing mnemonic,
* creating a new vault and keychain, or restoring a vault and keyring.
*
* NOTE: This method should only be called in client code where a mutex lock is acquired.
* `discoverAccounts` should be called after this method to discover and create accounts.
*
* @param params - The parameters to use to create the new wallet.
* @param params.mnemonic - The mnemonic to use to create the new wallet.
* @param params.password - The password to encrypt the vault with.
* @param params.type - The flow type to use to create the new wallet.
* @throws If the mnemonic has already been imported.
* @returns The new multichain account wallet.
*/
async createMultichainAccountWallet(params) {
let wallet;
if (params.type === 'import') {
wallet = await __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_createWalletByImport).call(this, params.mnemonic);
}
else if (params.type === 'create') {
wallet = await __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_createWalletByNewVault).call(this, params.password);
}
else if (params.type === 'restore') {
wallet = await __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_createWalletByRestore).call(this, params.password, params.mnemonic);
}
(0, utils_1.assert)(wallet, 'Failed to create wallet.');
wallet.init({});
// READ THIS CAREFULLY:
// We do not await for non-EVM account creations as they
// are depending on the Snap platform to be ready (which is, waiting for onboarding to be completed).
// Awaiting for this might cause a deadlock otherwise (during onboarding at least).
await wallet.createMultichainAccountGroup(0, {
waitForAllProvidersToFinishCreatingAccounts: false,
});
__classPrivateFieldGet(this, _MultichainAccountService_wallets, "f").set(wallet.id, wallet);
(0, logger_1.projectLogger)(`Wallet created: [${wallet.id}]`);
return wallet;
}
/**
* Removes a multichain account wallet, deleting all of its accounts across
* every registered provider (EVM and snap-based).
*
* The deletion iterates providers (the source of truth for their own
* account lists) and filters each provider's accounts to those matching
* the wallet's entropy source. Cleanup is best-effort end-to-end: neither
* a single account deletion failure nor a failure to enumerate a given
* provider's accounts aborts cleanup of the remaining providers. If one or
* more operations fail, a single aggregated error is reported via
* `reportError` with all per-failure details in its context. The wallet is
* always removed from the service's internal map at the end.
*
* @param entropySource - The entropy source of the multichain account wallet.
*/
async removeMultichainAccountWallet(entropySource) {
const wallet = __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getWallet).call(this, entropySource);
const failures = [];
for (const provider of __classPrivateFieldGet(this, _MultichainAccountService_providers, "f")) {
// Enumerating a provider's owned accounts can itself throw (e.g.
// `unwrap()`, `getAccounts()`, or reading account options). Catch it as
// a provider-level failure and move on so one bad provider does not
// abort cleanup of the others or skip the always-remove step below.
let owned;
try {
// For wrapped providers, enumerate via the underlying provider so we
// also see accounts when the wrapper has been disabled (i.e. basic
// functionality is off). The wrapper's `deleteAccount` itself forwards
// unconditionally, but its `getAccounts()` returns `[]` when disabled,
// which would otherwise leave snap-backed accounts orphaned in their
// underlying keyrings.
const source = (0, AccountProviderWrapper_1.isAccountProviderWrapper)(provider)
? provider.unwrap()
: provider;
owned = source
.getAccounts()
.filter((account) => account.options.entropy.id === entropySource);
}
catch (error) {
failures.push({
provider: provider.getName(),
error,
});
continue;
}
for (const account of owned) {
try {
await provider.deleteAccount(account.id);
}
catch (error) {
failures.push({
provider: provider.getName(),
accountId: account.id,
error,
});
}
}
}
if (failures.length > 0) {
// One aggregated report per wallet-removal action: keeps the Sentry
// message stable for grouping while still surfacing every per-account
// failure in `context`. The shape is pinned by
// `RemoveMultichainAccountWalletFailureContext`.
const context = {
failures: failures.map(({ provider, accountId, error }) => ({
provider,
accountId,
error: (0, utils_2.toErrorMessage)(error),
})),
};
(0, errors_1.reportError)(__classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"), `Failed to delete one or more accounts during wallet removal`, new Error('Wallet removal partially failed'), context);
}
__classPrivateFieldGet(this, _MultichainAccountService_wallets, "f").delete(wallet.id);
}
/**
* Gets a reference to the multichain account group matching this entropy source
* and a group index.
*
* @param options - Options.
* @param options.entropySource - The entropy source of the multichain account.
* @param options.groupIndex - The group index of the multichain account.
* @throws If none multichain account match this entropy source and group index.
* @returns A reference to the multichain account.
*/
getMultichainAccountGroup({ entropySource, groupIndex, }) {
const multichainAccount = __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getWallet).call(this, entropySource).getMultichainAccountGroup(groupIndex);
if (!multichainAccount) {
throw new Error(`No multichain account for index: ${groupIndex}`);
}
return multichainAccount;
}
/**
* Gets all multichain account groups for a given entropy source.
*
* @param options - Options.
* @param options.entropySource - The entropy source to query.
* @throws If no multichain accounts match this entropy source.
* @returns A list of all multichain accounts.
*/
getMultichainAccountGroups({ entropySource, }) {
return __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getWallet).call(this, entropySource).getMultichainAccountGroups();
}
/**
* Creates the next multichain account group.
*
* @param options - Options.
* @param options.entropySource - The wallet's entropy source.
* @returns The next multichain account group.
*/
async createNextMultichainAccountGroup({ entropySource, }) {
return await __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getWallet).call(this, entropySource).createNextMultichainAccountGroup();
}
/**
* Creates a multichain account group.
*
* @param options - Options.
* @param options.groupIndex - The group index to use.
* @param options.entropySource - The wallet's entropy source.
* @returns The multichain account group for this group index.
*/
async createMultichainAccountGroup({ groupIndex, entropySource, }) {
return await __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getWallet).call(this, entropySource).createMultichainAccountGroup(groupIndex);
}
/**
* Creates multiple multichain account groups up to maxGroupIndex.
*
* @param params - Parameters for creating account groups.
* @param params.fromGroupIndex - Starting group index to create (inclusive) (defaults to 0).
* @param params.toGroupIndex - Maximum group index to create (inclusive).
* @param params.entropySource - The entropy source ID.
* @returns Array of created multichain account groups.
*/
async createMultichainAccountGroups({ fromGroupIndex = 0, toGroupIndex, entropySource, }) {
return await __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getWallet).call(this, entropySource).createMultichainAccountGroups({ from: fromGroupIndex, to: toGroupIndex }, { waitForAllProvidersToFinishCreatingAccounts: false });
}
/**
* Set basic functionality state and trigger alignment if enabled.
* When basic functionality is disabled, snap-based providers are disabled.
* When enabled, all snap providers are enabled and wallet alignment is triggered.
* EVM providers are never disabled as they're required for basic wallet functionality.
*
* @param enabled - Whether basic functionality is enabled.
*/
async setBasicFunctionality(enabled) {
(0, logger_1.projectLogger)(`Turning basic functionality: ${enabled ? 'ON' : 'OFF'}`);
// Loop through providers and enable/disable only wrapped ones when basic functionality changes
for (const provider of __classPrivateFieldGet(this, _MultichainAccountService_providers, "f")) {
if ((0, AccountProviderWrapper_1.isAccountProviderWrapper)(provider)) {
(0, logger_1.projectLogger)(`${enabled ? 'Enabling' : 'Disabling'} account provider: "${provider.getName()}"`);
provider.setEnabled(enabled);
}
// Regular providers (like EVM) are never disabled for basic functionality
}
// Trigger alignment only when basic functionality is enabled
if (enabled) {
await this.alignWallets();
}
}
/**
* Align all multichain account wallets.
*/
async alignWallets() {
(0, logger_1.projectLogger)(`Triggering alignment on all wallets...`);
const wallets = this.getMultichainAccountWallets();
await Promise.all(wallets.map((w) => w.alignAccounts()));
(0, logger_1.projectLogger)(`Wallets aligned`);
}
/**
* Align a specific multichain account wallet.
*
* @param entropySource - The entropy source of the multichain account wallet.
*/
async alignWallet(entropySource) {
const wallet = this.getMultichainAccountWallet({ entropySource });
(0, logger_1.projectLogger)(`Triggering alignment for wallet: [${wallet.id}]`);
await wallet.alignAccounts();
(0, logger_1.projectLogger)(`Wallet [${wallet.id}] aligned`);
}
}
exports.MultichainAccountService = MultichainAccountService;
_MultichainAccountService_messenger = new WeakMap(), _MultichainAccountService_providers = new WeakMap(), _MultichainAccountService_trace = new WeakMap(), _MultichainAccountService_wallets = new WeakMap(), _MultichainAccountService_instances = new WeakSet(), _MultichainAccountService_getStateKeys = function _MultichainAccountService_getStateKeys(account) {
for (const provider of __classPrivateFieldGet(this, _MultichainAccountService_providers, "f")) {
if ((0, account_api_1.isBip44Account)(account) && provider.isAccountCompatible(account)) {
return {
entropySource: account.options.entropy.id,
groupIndex: account.options.entropy.groupIndex,
providerName: provider.getName(),
};
}
}
return null;
}, _MultichainAccountService_constructServiceState = function _MultichainAccountService_constructServiceState() {
var _a, _b;
const accounts = __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f").call('AccountsController:listMultichainAccounts');
const serviceState = {};
const providerState = {};
for (const account of accounts) {
const keys = __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getStateKeys).call(this, account);
if (keys) {
const { entropySource, groupIndex, providerName } = keys;
serviceState[entropySource] ?? (serviceState[entropySource] = {});
(_a = serviceState[entropySource])[groupIndex] ?? (_a[groupIndex] = {});
(_b = serviceState[entropySource][groupIndex])[providerName] ?? (_b[providerName] = []);
serviceState[entropySource][groupIndex][providerName].push(account.id);
providerState[providerName] ?? (providerState[providerName] = []);
providerState[providerName].push(account.id);
}
}
return { serviceState, providerState };
}, _MultichainAccountService_getWallet = function _MultichainAccountService_getWallet(entropySource) {
const wallet = __classPrivateFieldGet(this, _MultichainAccountService_wallets, "f").get((0, account_api_1.toMultichainAccountWalletId)(entropySource));
if (!wallet) {
throw new Error('Unknown wallet, no wallet matching this entropy source');
}
return wallet;
}, _MultichainAccountService_getPrimaryEntropySourceId = function _MultichainAccountService_getPrimaryEntropySourceId() {
const { keyrings } = __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f").call('KeyringController:getState');
const primaryKeyring = keyrings.find((keyring) => keyring.type === keyring_controller_1.KeyringTypes.hd);
(0, utils_1.assert)(primaryKeyring, 'Primary keyring not found');
return primaryKeyring.metadata.id;
}, _MultichainAccountService_createWalletByImport =
/**
* Creates a new multichain account wallet by importing an existing mnemonic.
*
* @param mnemonic - The mnemonic to use to create the new wallet.
* @returns The new multichain account wallet.
*/
async function _MultichainAccountService_createWalletByImport(mnemonic) {
(0, logger_1.projectLogger)(`Creating new wallet by importing an existing mnemonic...`);
const existingKeyrings = __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f").call('KeyringController:getKeyringsByType', keyring_controller_1.KeyringTypes.hd);
const alreadyHasImportedSrp = existingKeyrings.some((keyring) => {
if (!keyring.mnemonic) {
return false;
}
return (0, utils_1.areUint8ArraysEqual)(keyring.mnemonic, mnemonic);
});
if (alreadyHasImportedSrp) {
throw new Error('This Secret Recovery Phrase has already been imported.');
}
const result = await __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f").call('KeyringController:addNewKeyring', keyring_controller_1.KeyringTypes.hd, { mnemonic, numberOfAccounts: 1 });
return new MultichainAccountWallet_1.MultichainAccountWallet({
providers: __classPrivateFieldGet(this, _MultichainAccountService_providers, "f"),
entropySource: result.id,
messenger: __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"),
trace: __classPrivateFieldGet(this, _MultichainAccountService_trace, "f"),
});
}, _MultichainAccountService_createWalletByNewVault =
/**
* Creates a new multichain account wallet by creating a new vault and keychain.
*
* @param password - The password to encrypt the vault with.
* @returns The new multichain account wallet.
*/
async function _MultichainAccountService_createWalletByNewVault(password) {
(0, logger_1.projectLogger)(`Creating new wallet by creating a new vault and keychain...`);
await __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f").call('KeyringController:createNewVaultAndKeychain', password);
const entropySourceId = __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getPrimaryEntropySourceId).call(this);
return new MultichainAccountWallet_1.MultichainAccountWallet({
providers: __classPrivateFieldGet(this, _MultichainAccountService_providers, "f"),
entropySource: entropySourceId,
messenger: __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"),
trace: __classPrivateFieldGet(this, _MultichainAccountService_trace, "f"),
});
}, _MultichainAccountService_createWalletByRestore =
/**
* Creates a new multichain account wallet by restoring a vault and keyring.
*
* @param password - The password to encrypt the vault with.
* @param mnemonic - The mnemonic to use to restore the new wallet.
* @returns The new multichain account wallet.
*/
async function _MultichainAccountService_createWalletByRestore(password, mnemonic) {
(0, logger_1.projectLogger)(`Creating new wallet by restoring vault and keyring...`);
await __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f").call('KeyringController:createNewVaultAndRestore', password, mnemonic);
const entropySourceId = __classPrivateFieldGet(this, _MultichainAccountService_instances, "m", _MultichainAccountService_getPrimaryEntropySourceId).call(this);
return new MultichainAccountWallet_1.MultichainAccountWallet({
providers: __classPrivateFieldGet(this, _MultichainAccountService_providers, "f"),
entropySource: entropySourceId,
messenger: __classPrivateFieldGet(this, _MultichainAccountService_messenger, "f"),
trace: __classPrivateFieldGet(this, _MultichainAccountService_trace, "f"),
});
};
//# sourceMappingURL=MultichainAccountService.cjs.map