UNPKG

@okxweb3/coin-ethereum

Version:

An Ethereum SDK for building Web3 wallets and applications.

25 lines (24 loc) 1.05 kB
/// <reference types="bn.js" /> /// <reference types="node" /> import { TxData, JsonTx, TxValuesArray } from './types'; import { BaseTransaction } from './baseTransaction'; import { BN } from '@okxweb3/coin-base'; export default class Transaction extends BaseTransaction<Transaction> { readonly gasPrice: BN; readonly chainId: BN; static fromTxData(txData: TxData): Transaction; static fromSerializedTx(serialized: Buffer, chainId?: number): Transaction; static fromValuesArray(values: TxValuesArray, chainId?: number): Transaction; constructor(txData: TxData); raw(): TxValuesArray; serialize(): Buffer; private _getMessageToSign; getMessageToSign(hashMessage: false): Buffer[]; getMessageToSign(hashMessage?: true): Buffer; hash(): Buffer; protected _processSignature(v: number, r: Buffer, s: Buffer): Transaction; protected _processSignatureWithRawV(v: number, r: Buffer, s: Buffer): Transaction; toJSON(): JsonTx; errorStr(): string; protected _errorMsg(msg: string): string; }