@metamask/multichain-account-service
Version:
Service to manage multichain accounts
40 lines • 1.84 kB
text/typescript
import type { TraceCallback } from "@metamask/controller-utils";
import { CreateAccountOptions } from "@metamask/keyring-api";
import type { Bip44AccountProvider } from "../providers/BaseBip44AccountProvider.cjs";
/**
* Fallback function for tracing.
* This function is used when no specific trace function is provided.
* It executes the provided function in a trace context if available.
*
* @param _request - The trace request containing additional data and context.
* @param fn - The function to execute within the trace context.
* @returns A promise that resolves to the result of the executed function.
* If no function is provided, it resolves to undefined.
*/
export declare const traceFallback: TraceCallback;
/**
* Compute trace data for a list of providers.
*
* @param providers Providers to be included in the trace data.
* @returns An object mapping provider names to true, indicating their presence in the trace.
*/
export declare function toProviderDataTraces(providers: Bip44AccountProvider[]): Record<string, boolean>;
/**
* Compute trace data for `createAccounts` options.
*
* @param options The `createAccounts` options.
* @returns An object containing options data depending on its type.
*/
export declare function toCreateAccountsV2DataTraces(options: CreateAccountOptions): Record<string, string | number | boolean>;
/**
* Trace names.
*/
export declare enum TraceName {
SnapDiscoverAccounts = "Snap Discover Accounts",
EvmDiscoverAccounts = "EVM Discover Accounts",
ProviderCreateAccounts = "Provider Create Accounts (v2 - batched)",
WalletAlignment = "Wallet Alignment",
WalletCreateMultichainAccountGroup = "Wallet Create Multichain Account Group",
WalletCreateMultichainAccountGroups = "Wallet Create Multichain Account Groups"
}
//# sourceMappingURL=traces.d.cts.map