Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Input

A transaction input.

Hierarchy

  • Input

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Input(blockNum: number, txIdx: number, outIdx: number, depositNonce?: BN): Input
  • Constructs a new Input. Will throw an error if depositNonce is set alongside any non-zero blockNum, txIdx, or outIdx.

    Parameters

    • blockNum: number
    • txIdx: number
    • outIdx: number
    • Optional depositNonce: BN

    Returns Input

Properties

blockNum

blockNum: number

The block number of the output being spent by this input.

depositNonce

depositNonce: BN

The deposit nonce being spent by this input.

outIdx

outIdx: number

The index of the output being spent by this input.

txIdx

txIdx: number

The index of the transaction containing the output being spent by this input.

Methods

hash

  • hash(): Buffer
  • Returns the keccak256 hash of this input for use in signatures.

    Returns Buffer

toArray

  • toArray(): Buffer[]
  • Serializes the input to an array that can be encoded as RLP.

    Returns Buffer[]

toRLP

  • toRLP(): any
  • Serializes the input to an RLP-encoded Buffer.

    Returns any

Static zero

  • Returns a 'zero' input - that is, an input whose fields are all zero. Used in TransactionBody objects to represent null inputs.

    Returns Input

Generated using TypeDoc