UNPKG

@parity/light.js

Version:

A high-level reactive JS library optimized for light clients

38 lines (37 loc) 1.3 kB
import { RpcObservableOptions, Tx } from '../../types'; interface PostOptions extends RpcObservableOptions { estimate?: boolean; passphrase: string; } /** * Post a transaction to the network. * * Calls, in this order, `eth_estimateGas`, `personal_signTransaction`, * `eth_sendRawTransaction` and `eth_getTransactionByHash` to get the status of * the transaction. * * @param tx - Transaction object * @param options - Options to pass to the {@link RpcObservable}. * @param options.passphrase - Passphrase of the account * @return - The status of the transaction: (estimated), signed, sent, confirmed */ export declare function post$(tx: Tx, options: PostOptions): any; /** * Post a raw (signed) transaction to the network. * * Calls, in this order, `eth_sendRawTransaction` and * `eth_getTransactionByHash` to get the status of the transaction. * * Note: if using parity-ethereum light client, this method only works with * >=v2.5.0. See https://github.com/paritytech/parity-ethereum/pull/10559 for * more info. * * @param rawTx - Raw transaction * @param options? - Options to pass to the {@link RpcObservable}. * @return - The status of the transaction: sent, confirmed */ export declare function postRaw$( rawTx: string, options?: RpcObservableOptions ): any; export {};