Class: Runar::SDK::PreparedCall

Inherits:
Struct
  • Object
show all
Defined in:
lib/runar/sdk/types.rb

Overview

Result of prepare_call — contains everything needed for external signing and subsequent finalize_call.

Public fields (sighash, preimage, op_push_tx_sig, tx_hex, sig_indices) are for external signer coordination. All other fields are internal state consumed by finalize_call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sighash: '', preimage: '', op_push_tx_sig: '', tx_hex: '', sig_indices: [], method_name: '', resolved_args: [], method_selector_hex: '', is_stateful: false, is_terminal: false, needs_op_push_tx: false, method_needs_change: false, change_pkh_hex: '', change_amount: 0, method_needs_new_amount: false, new_amount: 0, preimage_index: -1,, contract_utxo: nil, new_locking_script: '', new_satoshis: 0, has_multi_output: false, contract_outputs: [], code_sep_idx: -1) ⇒ PreparedCall

rubocop:disable Metrics/ParameterLists



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/runar/sdk/types.rb', line 240

def initialize(
  sighash: '',
  preimage: '',
  op_push_tx_sig: '',
  tx_hex: '',
  sig_indices: [],
  method_name: '',
  resolved_args: [],
  method_selector_hex: '',
  is_stateful: false,
  is_terminal: false,
  needs_op_push_tx: false,
  method_needs_change: false,
  change_pkh_hex: '',
  change_amount: 0,
  method_needs_new_amount: false,
  new_amount: 0,
  preimage_index: -1,
  contract_utxo: nil,
  new_locking_script: '',
  new_satoshis: 0,
  has_multi_output: false,
  contract_outputs: [],
  code_sep_idx: -1
)
  super
end

Instance Attribute Details

#change_amountObject

Returns the value of attribute change_amount

Returns:

  • (Object)

    the current value of change_amount



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def change_amount
  @change_amount
end

#change_pkh_hexObject

Returns the value of attribute change_pkh_hex

Returns:

  • (Object)

    the current value of change_pkh_hex



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def change_pkh_hex
  @change_pkh_hex
end

#code_sep_idxObject

Returns the value of attribute code_sep_idx

Returns:

  • (Object)

    the current value of code_sep_idx



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def code_sep_idx
  @code_sep_idx
end

#contract_outputsObject

Returns the value of attribute contract_outputs

Returns:

  • (Object)

    the current value of contract_outputs



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def contract_outputs
  @contract_outputs
end

#contract_utxoObject

Returns the value of attribute contract_utxo

Returns:

  • (Object)

    the current value of contract_utxo



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def contract_utxo
  @contract_utxo
end

#has_multi_outputObject

Returns the value of attribute has_multi_output

Returns:

  • (Object)

    the current value of has_multi_output



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def has_multi_output
  @has_multi_output
end

#is_statefulObject

Returns the value of attribute is_stateful

Returns:

  • (Object)

    the current value of is_stateful



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def is_stateful
  @is_stateful
end

#is_terminalObject

Returns the value of attribute is_terminal

Returns:

  • (Object)

    the current value of is_terminal



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def is_terminal
  @is_terminal
end

#method_nameObject

Returns the value of attribute method_name

Returns:

  • (Object)

    the current value of method_name



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def method_name
  @method_name
end

#method_needs_changeObject

Returns the value of attribute method_needs_change

Returns:

  • (Object)

    the current value of method_needs_change



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def method_needs_change
  @method_needs_change
end

#method_needs_new_amountObject

Returns the value of attribute method_needs_new_amount

Returns:

  • (Object)

    the current value of method_needs_new_amount



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def method_needs_new_amount
  @method_needs_new_amount
end

#method_selector_hexObject

Returns the value of attribute method_selector_hex

Returns:

  • (Object)

    the current value of method_selector_hex



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def method_selector_hex
  @method_selector_hex
end

#needs_op_push_txObject

Returns the value of attribute needs_op_push_tx

Returns:

  • (Object)

    the current value of needs_op_push_tx



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def needs_op_push_tx
  @needs_op_push_tx
end

#new_amountObject

Returns the value of attribute new_amount

Returns:

  • (Object)

    the current value of new_amount



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def new_amount
  @new_amount
end

#new_locking_scriptObject

Returns the value of attribute new_locking_script

Returns:

  • (Object)

    the current value of new_locking_script



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def new_locking_script
  @new_locking_script
end

#new_satoshisObject

Returns the value of attribute new_satoshis

Returns:

  • (Object)

    the current value of new_satoshis



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def new_satoshis
  @new_satoshis
end

#op_push_tx_sigObject

Returns the value of attribute op_push_tx_sig

Returns:

  • (Object)

    the current value of op_push_tx_sig



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def op_push_tx_sig
  @op_push_tx_sig
end

#preimageObject

Returns the value of attribute preimage

Returns:

  • (Object)

    the current value of preimage



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def preimage
  @preimage
end

#preimage_indexObject

Returns the value of attribute preimage_index

Returns:

  • (Object)

    the current value of preimage_index



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def preimage_index
  @preimage_index
end

#resolved_argsObject

Returns the value of attribute resolved_args

Returns:

  • (Object)

    the current value of resolved_args



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def resolved_args
  @resolved_args
end

#sig_indicesObject

Returns the value of attribute sig_indices

Returns:

  • (Object)

    the current value of sig_indices



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def sig_indices
  @sig_indices
end

#sighashObject

Returns the value of attribute sighash

Returns:

  • (Object)

    the current value of sighash



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def sighash
  @sighash
end

#tx_hexObject

Returns the value of attribute tx_hex

Returns:

  • (Object)

    the current value of tx_hex



210
211
212
# File 'lib/runar/sdk/types.rb', line 210

def tx_hex
  @tx_hex
end