Class: TonClient::Proofs
- 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
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#requests ⇒ Object
readonly
Returns the value of attribute requests.
Instance Method Summary collapse
-
#initialize(context: nil, request_id: nil, requests: nil) ⇒ Proofs
constructor
A new instance of Proofs.
-
#proof_block_data(payload, &block) ⇒ Object
INPUT: ParamsOfProofBlockData block: Value - # # Single block’s data, retrieved from TONOS API, that needs proof.
-
#proof_message_data(payload, &block) ⇒ Object
INPUT: ParamsOfProofMessageData message: Value - # # Single message’s data as queried from DApp server, without modifications.
-
#proof_transaction_data(payload, &block) ⇒ Object
INPUT: ParamsOfProofTransactionData transaction: Value - # # Single transaction’s data as queried from DApp server, without modifications.
Methods included from CommonInstanceHelpers
#base64?, #encode_to_base64, #full_method_name
Constructor Details
#initialize(context: nil, request_id: nil, requests: nil) ⇒ Proofs
Returns a new instance of Proofs.
9 10 11 12 13 |
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 9 def initialize(context: nil, request_id: nil, requests: nil) @context = context @request_id = request_id @requests = requests end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 6 def context @context end |
#request_id ⇒ Object (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 |
#requests ⇒ Object (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.
17 18 19 |
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 17 def proof_block_data(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) 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.
29 30 31 |
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 29 def (payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) 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.
23 24 25 |
# File 'lib/everscale-client-ruby/Client/Proofs.rb', line 23 def proof_transaction_data(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |