import { Provider, TransactionRequest } from '@ethersproject/abstract-provider'; import { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from '@ethersproject/abstract-signer'; import { Bytes } from '@ethersproject/bytes'; import { EncryptOptions, ProgressCallback } from '@ethersproject/json-wallets'; import { Wordlist } from '@ethersproject/wordlists'; import { ethers, Wallet } from 'ethers'; import { PKPClientHelpers, PKPEthersWalletProp, PKPWallet, SigResponse } from '@lit-protocol/types'; import { ETHRequestSigningPayload } from './pkp-ethers-types'; export declare class PKPEthersWallet implements PKPWallet, Signer, ExternallyOwnedAccount, TypedDataSigner, PKPClientHelpers { private readonly pkpBase; readonly address: string; readonly _isSigner: boolean; rpcProvider: ethers.providers.StaticJsonRpcProvider; provider: Provider; manualGasPrice?: string; manualGasLimit?: string; manualMaxFeePerGas?: string; manualMaxPriorityFeePerGas?: string; nonce?: string; chainId?: number; get litNodeClientReady(): boolean; constructor(prop: PKPEthersWalletProp); getRpc: () => string; setRpc: (rpc: string) => Promise; handleRequest: (payload: ETHRequestSigningPayload) => Promise; request: (payload: ETHRequestSigningPayload) => Promise; setGasPrice: (gasPrice: string) => void; setGasLimit: (gasLimit: string) => void; setMaxFeePerGas: (maxFeePerGas: string) => void; setMaxPriorityFeePerGas: (maxPriorityFeePerGas: string) => void; setNonce: (nonce: string) => void; setChainId: (chainId: number) => void; resetManualSettings: () => void; get publicKey(): string; getAddress(): Promise; /** * Initializes the PKPEthersWallet instance and its dependencies */ init(): Promise; connect(): never; signTransaction(transaction: TransactionRequest): Promise; signMessage(message: Bytes | string): Promise; _signTypedData(domain: TypedDataDomain, types: Record, value: Record): Promise; encrypt(password: Bytes | string, options?: EncryptOptions | ProgressCallback, progressCallback?: ProgressCallback): Promise; sendTransaction(transaction: TransactionRequest | any): Promise; /** * Static methods to create Wallet instances. */ static createRandom(options?: { extraEntropy?: Uint8Array; locale?: Wordlist; path?: string; }): Wallet; static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise; static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet; static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet; getBalance(blockTag?: ethers.providers.BlockTag | undefined): Promise; getTransactionCount(blockTag?: ethers.providers.BlockTag | undefined): Promise; estimateGas(transaction: ethers.utils.Deferrable): Promise; call(transaction: ethers.utils.Deferrable, blockTag?: ethers.providers.BlockTag | Promise): Promise; getChainId(): Promise; getGasPrice(): Promise; getFeeData(): Promise; resolveName(): never; checkTransaction(): never; populateTransaction(): never; _checkProvider(): void; get mnemonic(): never; get privateKey(): never; /** * Runs the specified Lit action with the given parameters. * * @param {Uint8Array} toSign - The data to be signed by the Lit action. * @param {string} sigName - The name of the signature to be returned by the Lit action. * * @returns {Promise} - A Promise that resolves with the signature returned by the Lit action. * * @throws {Error} - Throws an error if `pkpPubKey` is not provided, if `controllerAuthSig` or `controllerSessionSigs` is not provided, if `controllerSessionSigs` is not an object, if `executeJsArgs` does not have either `code` or `ipfsId`, or if an error occurs during the execution of the Lit action. */ runLitAction(toSign: Uint8Array, sigName: string): Promise; /** * Sign the provided data with the PKP private key. * * @param {Uint8Array} toSign - The data to be signed. * * @returns {Promise} - A Promise that resolves with the signature of the provided data. * * @throws {Error} - Throws an error if `pkpPubKey` is not provided, if `controllerAuthSig` or `controllerSessionSigs` is not provided, if `controllerSessionSigs` is not an object, or if an error occurs during the signing process. */ runSign(toSign: Uint8Array): Promise; }