@metamask/snaps-jest
Version:
A Jest preset for end-to-end testing MetaMask Snaps, including a Jest environment, and a set of Jest matchers
21 lines • 936 B
text/typescript
import type { CaipAssetType, CaipChainId } from "@metamask/utils";
/**
* Get a function that generates pseudo-random UUIDs. This function uses a
* counter to generate a unique UUID each time it is called.
*
* This is likely not suitable for production use, as it does not guarantee
* true randomness and is not cryptographically secure. It is intended for
* testing and mock purposes only.
*
* @returns A function that generates a pseudo-random UUID.
*/
export declare function getPseudoRandomUuidGenerator(): () => string;
/**
* Get unique scopes from a list of assets. This assumes the assets are in
* CAIP format, where the chain ID is the first part of the asset type.
*
* @param assets - An array of CAIP asset types.
* @returns An array of unique CAIP chain IDs derived from the assets.
*/
export declare function getScopesFromAssets(assets?: CaipAssetType[]): CaipChainId[];
//# sourceMappingURL=accounts.d.cts.map