deth
Version:
Ethereum node focused on Developer Experience
21 lines (20 loc) • 794 B
TypeScript
import { Address, Quantity, HexData } from '../primitives';
import { FakeTransaction } from 'ethereumjs-tx';
import { providers } from 'ethers';
declare type WithoutPromises<T> = {
[K in keyof T]: Exclude<T[K], Promise<unknown>>;
};
declare type EthersTxRequest = WithoutPromises<providers.TransactionRequest>;
export interface RpcTransactionRequest {
from?: Address;
to?: Address;
gas?: Quantity;
gasPrice?: Quantity;
value?: Quantity;
nonce?: Quantity;
data?: HexData;
}
export declare function toFakeTransaction(tx: RpcTransactionRequest): FakeTransaction;
export declare function toRpcTransactionRequest(transaction: EthersTxRequest): RpcTransactionRequest;
export declare function toEthersTransaction(tx: RpcTransactionRequest): EthersTxRequest;
export {};