import { TestAccountSigningKey, Provider, Signer } from '@reef-defi/evm-provider'; import { Keyring } from '@polkadot/api'; import { KeyringPair } from '@polkadot/keyring/types'; import { SocketParams } from '../Logger'; import { ethers } from 'ethers'; interface TransactionParams { from: string; to: string; gas: string; gasPrice: string; value: string; data: string; nonce: string; } /** * Wraps the Conflux Wallet so it's compatible with the RPC gateway of * `web3-jsonrpc-gateway`. */ export declare class WalletWrapper { accounts: string[]; graphUrl: string; keyring: Keyring; keyringPairs: KeyringPair[]; numAddresses: number; provider: Provider; seedPhrase: string; signers: Signer[]; signingKey: TestAccountSigningKey; constructor(rpcUrl: string, graphUrl: string, seedPhrase: string, numAddresses: number); setup(): Promise; /** * Sends raw call to provider. * @param method JSON-RPC method * @param params JSON-RPC parameters * @returns */ call(socket: SocketParams, tx: any): Promise; /** * Populate essential transaction parameters, self-estimating gas price and/or gas limit if required. * @param socket Socket parms where the RPC call is coming from. * @param params Input params, to be validated and completed, if necessary. * @returns */ composeTransaction(socket: SocketParams, params: TransactionParams): Promise; estimateGas(socket: SocketParams, params: TransactionParams): Promise; estimateGasPrice(_socket: SocketParams): Promise; /** * Gets addresses of the wallet. */ getAccounts(): string[]; getSignerFromEvmAddress(evmAddress: string): Promise; getBlockNumber(_socket: SocketParams, _params: any[]): Promise; getBlockByNumber(socket: SocketParams, _params: any): Promise; getBalance(_socket: SocketParams, params: any): Promise; getCode(_socket: SocketParams, params: any): Promise; getNetVersion(_socket: SocketParams): Promise; getTransactionByHash(socket: SocketParams, txHash: string): Promise; getTransactionReceipt(socket: SocketParams, txHash: string): Promise; /** * Get syncing status from provider. */ getSyncingStatus(_socket: SocketParams): Promise; getWeb3Version(_socket: SocketParams, _tx: TransactionParams): Promise; /** * Create new eth_client block filter. */ mockCreateBlockFilter(_socket: SocketParams): Promise; /** * Gets eth filter changes. Only EthBlockFilters are currently supported. */ mockGetFilterChanges(socket: SocketParams, id: string): Promise; /** * Signs transactinon usings wallet's private key, before forwarding to provider. * * @remark Return type is made `any` here because the result needs to be a String, not a `Record`. */ sendTransaction(socket: SocketParams, params: any): Promise; } export {}; //# sourceMappingURL=wrapper.d.ts.map