lib/bitcoin/builder.rb
# Previous transaction that contains the output we want to use.
# You can either pass the transaction, or just the tx hash.
# If you pass only the hash, you need to pass the previous outputs
# +script+ separately if you want the txin to be signed.
Previous transaction that contains the output we want to use.
You can either pass the transaction, or just the tx hash.
If you pass only the hash, you need to pass the previous outputs
+script+ separately if you want the txin to be signed.
Previous transaction that contains the output we want to use . You can either pass the transaction or just the tx hash . If you pass only the hash you need to pass the previous outputs + script + separately if you want the txin to be signed .
def prev_out(tx, idx = nil, script = nil, prev_value = nil, prev_forkid = nil)
        @prev_out_forkid = prev_forkid
        if tx.is_a?(Bitcoin::P::Tx)
          @prev_tx = tx
          @prev_out_hash = tx.binary_hash
          @prev_out_script = tx.out[idx].pk_script if idx
        else
          @prev_out_hash = tx.htb.reverse
        end
        @prev_out_script = script if script
        @prev_out_index = idx if idx
        @prev_out_value = prev_value if prev_value
      end
def prev_out ( tx , idx = nil , script = nil , prev_value = nil , prev_forkid = nil ) @prev_out_forkid = prev_forkid if tx . is_a? ( Bitcoin :: P :: Tx ) @prev_tx = tx @prev_out_hash = tx . binary_hash @prev_out_script = tx . out [ idx ] . pk_script if idx else @prev_out_hash = tx . htb . reverse end @prev_out_script = script if script @prev_out_index = idx if idx @prev_out_value = prev_value if prev_value end
Previous transaction that contains the output we want to use.
Previous transaction that contains the output we want to use .
tx
<not_specific>
idx
<not_specific>
script
<not_specific>
prev_value
<not_specific>
prev_forkid
<not_specific>