import { TxOptions } from '@ethereumjs/tx'; import { EthereumActionContract, EthereumActionHelperInput, EthereumRawTransactionAction, EthereumTransactionAction, EthereumSignatureNative } from './models'; export type ActionChainOptions = { chain: string; hardfork: string; }; /** Helper class to ensure transaction actions properties are set correctly */ export declare class EthereumActionHelper { private _nonce; private _gasLimit; private _gasPrice; private _data; private _to; private _value; private _from; private _contract; private _v; private _r; private _s; private _ethereumJsChainOptions; /** Creates a new Action from 'human-readable' transfer or contract info * OR from 'raw' data property * Allows access to human-readable properties (method, parameters) or raw data (hex) */ constructor(actionInput: EthereumActionHelperInput, ethereumJsChainOptions: TxOptions); /** apply rules for imput params, set class private properties, throw if violation */ private assertAndValidateEthereumActionInput; /** set gasLimit - value should be a decimal string in units of gas e.g. '21000' */ set gasLimit(value: string); /** set gasPrice - value should be a string in units of WEI or a Hex value e.g. '123' */ /** note that the unit if WEI has no decimal places so you should never be providing 1.1 etc. */ /** since WEI is the smallest unit you should expect to be proving what looks like a big number 1100000000 (This is 1.1 Gwei converted to WEI - https://eth-converter.com/) . */ set gasPrice(value: string); /** set nonce - value is a string or Buffer */ set nonce(value: string); /** set signature */ set signature(signature: EthereumSignatureNative); /** update a single property in this action */ private updateActionProperty; /** Checks is data value is empty or implying 0 */ get hasData(): boolean; /** Action properties (encoded as hex string for most fields) * Returns null for any 'empty' Eth values e.g. (0x00...00) */ get action(): EthereumTransactionAction; /** Action properties in raw form (encoded as Buffer) */ get raw(): EthereumRawTransactionAction; /** Action properties including raw data */ get contract(): EthereumActionContract; }