Skip to main content

fromBufferReader

scrypt-ts-opcat v1.0.1


scrypt-ts-opcat / Input / fromBufferReader

Function: fromBufferReader()

fromBufferReader(br): Input

Defined in: node_modules/@opcat-labs/opcat/types/transaction/input/input.d.cts:168

Creates an Input instance from a BufferReader.

Parameters

br

BufferReader

The buffer reader containing input data.

Returns

Input

The parsed Input object with properties:

  • prevTxId: Reversed 32-byte previous transaction ID.
  • outputIndex: LE uint32 output index.
  • _scriptBuffer: Var-length script buffer.
  • sequenceNumber: LE uint32 sequence number.

Note

TODO: Return specialized input types (CoinbaseInput, PublicKeyHashInput, etc.).

Static