import { BigNumber } from '@ethersproject/bignumber'; import { Eip3770Address, EthAdapter, EthAdapterTransaction, GetContractProps, SafeTransactionEIP712Args } from '@safe-global/safe-core-sdk-types'; import Web3 from 'web3'; import { Transaction } from 'web3-core'; import { ContractOptions } from 'web3-eth-contract'; import { AbiItem } from 'web3-utils'; import CompatibilityFallbackHandlerWeb3Contract from './contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerWeb3Contract'; import CreateCallWeb3Contract from './contracts/CreateCall/CreateCallWeb3Contract'; import GnosisSafeContractWeb3 from './contracts/GnosisSafe/GnosisSafeContractWeb3'; import GnosisSafeProxyFactoryWeb3Contract from './contracts/GnosisSafeProxyFactory/GnosisSafeProxyFactoryWeb3Contract'; import MultiSendWeb3Contract from './contracts/MultiSend/MultiSendWeb3Contract'; import MultiSendCallOnlyWeb3Contract from './contracts/MultiSendCallOnly/MultiSendCallOnlyWeb3Contract'; import SignMessageLibWeb3Contract from './contracts/SignMessageLib/SignMessageLibWeb3Contract'; export interface Web3AdapterConfig { /** web3 - Web3 library */ web3: Web3; /** signerAddress - Address of the signer */ signerAddress?: string; } declare class Web3Adapter implements EthAdapter { #private; constructor({ web3, signerAddress }: Web3AdapterConfig); isAddress(address: string): boolean; getEip3770Address(fullAddress: string): Promise; getBalance(address: string, defaultBlock?: string | number): Promise; getNonce(address: string, defaultBlock?: string | number): Promise; getChainId(): Promise; getChecksummedAddress(address: string): string; getSafeContract({ safeVersion, chainId, singletonDeployment, customContractAddress, customContractAbi }: GetContractProps): GnosisSafeContractWeb3; getSafeProxyFactoryContract({ safeVersion, chainId, singletonDeployment, customContractAddress, customContractAbi }: GetContractProps): GnosisSafeProxyFactoryWeb3Contract; getMultiSendContract({ safeVersion, chainId, singletonDeployment, customContractAddress, customContractAbi }: GetContractProps): MultiSendWeb3Contract; getMultiSendCallOnlyContract({ safeVersion, chainId, singletonDeployment, customContractAddress, customContractAbi }: GetContractProps): MultiSendCallOnlyWeb3Contract; getCompatibilityFallbackHandlerContract({ safeVersion, chainId, singletonDeployment, customContractAddress, customContractAbi }: GetContractProps): CompatibilityFallbackHandlerWeb3Contract; getSignMessageLibContract({ safeVersion, chainId, singletonDeployment, customContractAddress, customContractAbi }: GetContractProps): SignMessageLibWeb3Contract; getCreateCallContract({ safeVersion, chainId, singletonDeployment, customContractAddress, customContractAbi }: GetContractProps): CreateCallWeb3Contract; getContract(address: string, abi: AbiItem | AbiItem[], options?: ContractOptions): any; getContractCode(address: string, defaultBlock?: string | number): Promise; isContractDeployed(address: string, defaultBlock?: string | number): Promise; getStorageAt(address: string, position: string): Promise; getTransaction(transactionHash: string): Promise; getSignerAddress(): Promise; signMessage(message: string): Promise; signTypedData(safeTransactionEIP712Args: SafeTransactionEIP712Args, methodVersion?: 'v3' | 'v4'): Promise; estimateGas(transaction: EthAdapterTransaction, callback?: (error: Error, gas: number) => void): Promise; call(transaction: EthAdapterTransaction, defaultBlock?: string | number): Promise; encodeParameters(types: string[], values: any[]): string; decodeParameters(types: any[], values: string): { [key: string]: any; }; } export default Web3Adapter;