Class: Sibit::TxBuilder::Built

Inherits:
Object
  • Object
show all
Defined in:
lib/sibit/txbuilder.rb

Overview

Wrapper for built transaction with convenience methods.

Author

Yegor Bugayenko (yegor256@gmail.com)

Copyright

Copyright (c) 2019-2026 Yegor Bugayenko

License

MIT

Defined Under Namespace

Classes: Payload

Instance Method Summary collapse

Constructor Details

#initialize(txn, inputs, outputs) ⇒ Built

Returns a new instance of Built.



103
104
105
106
107
# File 'lib/sibit/txbuilder.rb', line 103

def initialize(txn, inputs, outputs)
  @tx = txn
  @inputs = inputs
  @outputs = outputs
end

Instance Method Details

#hashObject



109
110
111
# File 'lib/sibit/txbuilder.rb', line 109

def hash
  @tx.hash
end

#inObject



113
114
115
# File 'lib/sibit/txbuilder.rb', line 113

def in
  @tx.in
end

#inputsObject



121
122
123
# File 'lib/sibit/txbuilder.rb', line 121

def inputs
  @tx.inputs
end

#outObject



117
118
119
# File 'lib/sibit/txbuilder.rb', line 117

def out
  @tx.out
end

#outputsObject



125
126
127
# File 'lib/sibit/txbuilder.rb', line 125

def outputs
  @tx.outputs
end

#to_payloadObject



129
130
131
# File 'lib/sibit/txbuilder.rb', line 129

def to_payload
  Payload.new(@tx.payload)
end