class OpenAssets::Transaction::OutPoint

The combination of a transaction hash and an index n into its vout

Attributes

hash[RW]
index[RW]

Public Class Methods

new(hash, index) click to toggle source

@param [String] hash: 32 bytes transaction hash in vout. @param [Integer] index: index in vout.

# File lib/openassets/transaction/out_point.rb, line 12
def initialize(hash, index)
  raise ArgumentError, 'hash must be exactly 32 bytes.' unless [hash].pack("H*").bytesize == 32
  raise ArgumentError, 'index must be in range 0x0 to 0xffffffff.' unless index.between?(0x0, 0xffffffff)
  @hash = hash
  @index = index
end