@metamask/multichain-network-controller
Version:
Multichain network controller
22 lines • 932 B
text/typescript
import type { CaipAccountId } from "@metamask/utils";
import type { ActiveNetworksResponse } from "../api/accounts-api.cjs";
/**
* Service responsible for fetching network activity data from the API.
*/
export declare class MultichainNetworkService {
#private;
constructor({ fetch: fetchFunction, batchSize, }: {
fetch: typeof fetch;
batchSize?: number;
});
/**
* Fetches active networks for the given account IDs.
* Automatically handles batching requests to comply with URL length limitations.
*
* @param accountIds - Array of CAIP-10 account IDs to fetch activity for.
* @returns Promise resolving to the combined active networks response.
* @throws Error if the response format is invalid or the request fails.
*/
fetchNetworkActivity(accountIds: CaipAccountId[]): Promise<ActiveNetworksResponse>;
}
//# sourceMappingURL=MultichainNetworkService.d.cts.map