UNPKG

@solarity/hardhat-migrate

Version:
73 lines 2.64 kB
import { Transaction } from "ethers"; /** * Options for Cast wallet commands */ export interface CastWalletOptions { /** The sender account (e.g. address) */ from?: string; /** Open an interactive prompt to enter your private key */ interactive?: boolean; /** Use a provided raw private key */ privateKey?: string; /** Use a mnemonic phrase (or path to one) */ mnemonic?: string; /** Use a BIP39 passphrase for the mnemonic */ mnemonicPassphrase?: string; /** The derivation path for the mnemonic */ mnemonicDerivationPath?: string; /** The mnemonic index (default 0) */ mnemonicIndex?: number; /** Use a keystore file or directory */ keystore?: string; /** The account name (when using the default keystore directory) */ account?: string; /** Keystore password */ password?: string; /** File path to the keystore password */ passwordFile?: string; /** Use a Ledger hardware wallet */ ledger?: boolean; /** Use a Trezor hardware wallet */ trezor?: boolean; /** Use AWS KMS */ aws?: boolean; /** Log color: "auto", "always", or "never" */ color?: "auto" | "always" | "never"; /** Format log messages as JSON */ json?: boolean; /** Suppress log messages */ quiet?: boolean; /** Increase verbosity (repeat flag `-v` as needed) */ verbosity?: number; /** Number of threads to use */ threads?: number; } /** * Options specific to the sign command */ export interface CastSignOptions extends CastWalletOptions { /** Treat the message as JSON typed data */ data?: boolean; /** When using typed data, treat the message as a file containing JSON */ fromFile?: boolean; /** Do not hash the input; sign the provided 32-byte hash directly */ noHash?: boolean; } export declare function getCastVersion(): Promise<string>; export declare function getSignedTxViaCast(tx: Transaction, castOpts?: CastSignOptions): Promise<string>; /** * Get the Ethereum address associated with the Cast wallet configuration * * @param options Cast wallet options * @returns The Ethereum address */ export declare function getCastWalletAddress(options?: CastWalletOptions): Promise<string>; /** * Sign a message (or data/transaction hash) using Foundry's cast wallet sign command. * * @param message The message (or hash) to sign. * @param options Additional options mapping to cast's flags. * @returns The signature string from cast. */ export declare function signMessage(message: string, options?: CastSignOptions): Promise<string>; //# sourceMappingURL=cast-integration.d.ts.map