import { CannonRegistry, ChainArtifacts, ChainDefinition, ContractMap, DeploymentInfo } from '@usecannon/builder'; import { AbiEvent } from 'abitype'; import * as viem from 'viem'; export declare function stripCredentialsFromURL(uri: string): string; export declare function filterSettings(settings: any): Promise; /** * Installs or upgrades Foundry to ensure compatibility with Cannon. * * This function checks the current version of Anvil (a component of Foundry) and prompts the user * to upgrade if necessary. If Foundry is not installed, it prompts for installation. * * @throws Will exit the process if the user declines to install or upgrade when necessary. * @returns {Promise} */ export declare function ensureFoundryCompatibility(): Promise; export declare function getSighash(fragment: viem.AbiFunction | AbiEvent): string; export declare function formatAbiFunction(v: viem.AbiFunction): string; export declare function execPromise(command: string): Promise; export declare function resolveCannonVersion(): Promise; export declare function checkCannonVersion(currentVersion: string): Promise; export declare function loadCannonfile(filepath: string): Promise<{ def: ChainDefinition; name: any; version: any; preset: any; cannonfile: string; }>; export declare function getChainName(chainId: number): string; export declare function getChainId(chainName: string): number; export declare function getChainDataFromId(chainId: number): viem.Chain | null; export declare function ensureChainIdConsistency(rpcUrl?: string, chainId?: number): Promise; export declare function saveToMetadataCache(packageName: string, updatedMetadata: { [key: string]: string; }): Promise<{ [x: string]: string; }>; export declare function readMetadataCache(packageName: string): Promise<{ [key: string]: string; }>; /** * Extracts the contract and details from the state of a deploy package * * @param state The deploy package state * @returns an object containing ContractData * */ export declare function getContractsAndDetails(state: { [key: string]: { artifacts: Pick; }; }): ContractMap; /** * * @param registries The cannon registries * @returns The source a cannon package is loaded from */ export declare function getSourceFromRegistry(registries: CannonRegistry[]): string | undefined; /** * Verifies a private key is valid * @param privateKey The private key to verify * @returns boolean If the private key is valid */ export declare function isPrivateKey(privateKey: viem.Hex): boolean; /** * Normalizes a private key * @param privateKey The private key to normalize * @returns The normalized private key */ export declare function normalizePrivateKey(privateKey: string | viem.Hex): viem.Hex; /** * Checks and normalizes a private key * @param privateKey * @returnsThe normalized private keys */ export declare function checkAndNormalizePrivateKey(privateKey: string | viem.Hex | undefined): viem.Hex | undefined; export declare function getPackageReference(packageRef: string, givenChainId: any, givenRpcUrl?: string): Promise<{ fullPackageRef: string; chainId: number; }>; /** * * @param packageRef The package reference, eg. name:version@preset or ipfs:// * @returns Package Reference string */ export declare function getPackageInfo(packageRef: string, givenChainId: any, givenRpcUrl: string): Promise<{ fullPackageRef: string; chainId: number; ipfsUrl: string; deployInfo: DeploymentInfo; }>; //# sourceMappingURL=helpers.d.ts.map