Class: TonClient::Proofs

Inherits:
Object show all
Includes:
CommonInstanceHelpers
Defined in:
lib/everscale-client-ruby/Client/Proofs.rb

Constant Summary collapse

MODULE =
self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CommonInstanceHelpers

#base64?, #encode_to_base64, #full_method_name

Constructor Details

#initialize(context: nil, request_id: nil, requests: nil, monitor: nil) ⇒ Proofs

Returns a new instance of Proofs.



9
10
11
12
13
14
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 9

def initialize(context: nil, request_id: nil, requests: nil, monitor: nil)
  @context = context
  @request_id = request_id
  @requests = requests
  @monitor = monitor
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



6
7
8
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 6

def context
  @context
end

#monitorObject (readonly)

Returns the value of attribute monitor.



6
7
8
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 6

def monitor
  @monitor
end

#request_idObject (readonly)

Returns the value of attribute request_id.



6
7
8
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 6

def request_id
  @request_id
end

#requestsObject (readonly)

Returns the value of attribute requests.



6
7
8
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 6

def requests
  @requests
end

Instance Method Details

#proof_block_data(payload, &block) ⇒ Object

INPUT: ParamsOfProofBlockData block: Value - # # Single block’s data, retrieved from TONOS API, that needs proof. Required fields are ‘id` and/or top-level `boc` (for block identification), others are optional. Async



19
20
21
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 19

def proof_block_data(payload, &block)
  TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
end

#proof_block_data_sync(payload) ⇒ Object

Sync



24
25
26
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 24

def proof_block_data_sync(payload)
  TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
end

#proof_message_data(payload, &block) ⇒ Object

INPUT: ParamsOfProofMessageData message: Value - # # Single message’s data as queried from DApp server, without modifications. The required fields are ‘id` and/or top-level `boc`, others are optional. In order to reduce network requests count, it is recommended to provide at least `boc` of message and non-null `src_transaction.id` or `dst_transaction.id`. Async



43
44
45
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 43

def proof_message_data(payload, &block)
  TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
end

#proof_message_data_sync(payload) ⇒ Object

Sync



48
49
50
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 48

def proof_message_data_sync(payload)
  TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
end

#proof_transaction_data(payload, &block) ⇒ Object

INPUT: ParamsOfProofTransactionData transaction: Value - # # Single transaction’s data as queried from DApp server, without modifications. The required fields are ‘id` and/or top-level `boc`, others are optional. In order to reduce network requests count, it is recommended to provide `block_id` and `boc` of transaction. Async



31
32
33
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 31

def proof_transaction_data(payload, &block)
  TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
end

#proof_transaction_data_sync(payload) ⇒ Object

Sync



36
37
38
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 36

def proof_transaction_data_sync(payload)
  TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
end