Class: TonClient::Processing
- Includes:
- CommonInstanceHelpers
- Defined in:
- lib/everscale-client-ruby/Client/Processing.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.
-
#monitor ⇒ Object
readonly
Returns the value of attribute monitor.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#requests ⇒ Object
readonly
Returns the value of attribute requests.
Instance Method Summary collapse
-
#cancel_monitor(payload, &block) ⇒ Object
INPUT: ParamsOfCancelMonitor queue: String - # # Name of the monitoring queue.
-
#cancel_monitor_sync(payload) ⇒ Object
Sync.
-
#fetch_next_monitor_results(payload, &block) ⇒ Object
INPUT: ParamsOfFetchNextMonitorResults queue: String - # # Name of the monitoring queue.
-
#fetch_next_monitor_results_sync(payload) ⇒ Object
Sync.
-
#get_monitor_info(payload, &block) ⇒ Object
INPUT: ParamsOfGetMonitorInfo queue: String - # # Name of the monitoring queue.
-
#get_monitor_info_sync(payload) ⇒ Object
Sync.
-
#initialize(context: nil, request_id: nil, requests: nil, monitor: nil) ⇒ Processing
constructor
A new instance of Processing.
-
#monitor_messages(payload, &block) ⇒ Object
INPUT: ParamsOfMonitorMessages queue: String - # # Name of the monitoring queue.
-
#monitor_messages_sync(payload) ⇒ Object
Sync.
-
#process_message(payload, &block) ⇒ Object
INPUT: ParamsOfProcessMessage message_encode_params: ParamsOfEncodeMessage - # # Message encode parameters.
-
#process_message_sync(payload) ⇒ Object
Sync.
-
#send_message(payload, &block) ⇒ Object
INPUT: ParamsOfSendMessage message: String - # # Message BOC.
-
#send_message_sync(payload) ⇒ Object
Sync.
-
#send_messages(payload, &block) ⇒ Object
INPUT: ParamsOfSendMessages messages: Array - # # Messages that must be sent to the blockchain.
-
#send_messages_sync(payload) ⇒ Object
Sync.
-
#wait_for_transaction(payload, &block) ⇒ Object
INPUT: ParamsOfWaitForTransaction abi: Value<Optional> - # # Optional ABI for decoding the transaction result.
-
#wait_for_transaction_sync(payload) ⇒ Object
Sync.
Methods included from CommonInstanceHelpers
#base64?, #encode_to_base64, #full_method_name
Constructor Details
#initialize(context: nil, request_id: nil, requests: nil, monitor: nil) ⇒ Processing
Returns a new instance of Processing.
9 10 11 12 13 14 |
# File 'lib/everscale-client-ruby/Client/Processing.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
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 6 def context @context end |
#monitor ⇒ Object (readonly)
Returns the value of attribute monitor.
6 7 8 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 6 def monitor @monitor end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
6 7 8 |
# File 'lib/everscale-client-ruby/Client/Processing.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/Processing.rb', line 6 def requests @requests end |
Instance Method Details
#cancel_monitor(payload, &block) ⇒ Object
INPUT: ParamsOfCancelMonitor queue: String - # # Name of the monitoring queue. Async
62 63 64 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 62 def cancel_monitor(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 |
#cancel_monitor_sync(payload) ⇒ Object
Sync
67 68 69 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 67 def cancel_monitor_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#fetch_next_monitor_results(payload, &block) ⇒ Object
INPUT: ParamsOfFetchNextMonitorResults queue: String - # # Name of the monitoring queue. wait_mode: MonitorFetchWaitMode<Optional> - # # Wait mode. # # Default is ‘NO_WAIT`. RESPONSE: ResultOfFetchNextMonitorResults results: Array - # # List of the resolved results. Async
50 51 52 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 50 def fetch_next_monitor_results(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 |
#fetch_next_monitor_results_sync(payload) ⇒ Object
Sync
55 56 57 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 55 def fetch_next_monitor_results_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#get_monitor_info(payload, &block) ⇒ Object
INPUT: ParamsOfGetMonitorInfo queue: String - # # Name of the monitoring queue. RESPONSE: MonitoringQueueInfo unresolved: Number - # # Count of the unresolved messages. resolved: Number - # # Count of resolved results. Async
35 36 37 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 35 def get_monitor_info(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 |
#get_monitor_info_sync(payload) ⇒ Object
Sync
40 41 42 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 40 def get_monitor_info_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#monitor_messages(payload, &block) ⇒ Object
INPUT: ParamsOfMonitorMessages queue: String - # # Name of the monitoring queue. messages: Array - # # Messages to start monitoring for. Async
20 21 22 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 20 def (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 |
#monitor_messages_sync(payload) ⇒ Object
Sync
25 26 27 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 25 def (payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#process_message(payload, &block) ⇒ Object
INPUT: ParamsOfProcessMessage message_encode_params: ParamsOfEncodeMessage - # # Message encode parameters. send_events: Boolean - # # Flag for requesting events sending RESPONSE: ResultOfProcessMessage transaction: Value - # # Parsed transaction. # # In addition to the regular transaction fields there is a`boc` field encoded with ‘base64` which contains sourcetransaction BOC. out_messages: Array - # # List of output messages’ BOCs. # # Encoded as ‘base64` decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter. fees: TransactionFees - # # Transaction fees Async
138 139 140 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 138 def (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 |
#process_message_sync(payload) ⇒ Object
Sync
143 144 145 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 143 def (payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#send_message(payload, &block) ⇒ Object
INPUT: ParamsOfSendMessage message: String - # # Message BOC. abi: Value<Optional> - # # Optional message ABI. # # If this parameter is specified and the message has the`expire` header then expiration time will be checked againstthe current time to prevent unnecessary sending of already expired message. The ‘message already expired` error will be returned in thiscase. Note, that specifying `abi` for ABI compliant contracts isstrongly recommended, so that proper processing strategy can bechosen. send_events: Boolean - # # Flag for requesting events sending RESPONSE: ResultOfSendMessage shard_block_id: String - # # The last generated shard block of the message destination account before the message was sent. # # This block id must be used as a parameter of the`wait_for_transaction`. sending_endpoints: Array - # # The list of endpoints to which the message was sent. # # This list id must be used as a parameter of the`wait_for_transaction`. Async
96 97 98 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 96 def (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 |
#send_message_sync(payload) ⇒ Object
Sync
101 102 103 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 101 def (payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#send_messages(payload, &block) ⇒ Object
INPUT: ParamsOfSendMessages messages: Array - # # Messages that must be sent to the blockchain. monitor_queue: String<Optional> - # # Optional message monitor queue that starts monitoring for the processing results for sent messages. RESPONSE: ResultOfSendMessages messages: Array - # # Messages that was sent to the blockchain for execution. Async
77 78 79 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 77 def (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 |
#send_messages_sync(payload) ⇒ Object
Sync
82 83 84 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 82 def (payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#wait_for_transaction(payload, &block) ⇒ Object
INPUT: ParamsOfWaitForTransaction abi: Value<Optional> - # # Optional ABI for decoding the transaction result. # # If it is specified, then the output messages’ bodies will bedecoded according to this ABI. The ‘abi_decoded` result field will be filled out. message: String - # # Message BOC. # # Encoded with `base64`. shard_block_id: String - # # The last generated block id of the destination account shard before the message was sent. # # You must provide the same value as the `send_message` has returned. send_events: Boolean - # # Flag that enables/disables intermediate events sending_endpoints: Array<Optional> - # # The list of endpoints to which the message was sent. # # Use this field to get more informative errors. Provide the same value as the `send_message` has returned. If the message was not delivered (expired), SDK will log the endpoint URLs, used for its sending. RESPONSE: ResultOfProcessMessage transaction: Value - # # Parsed transaction. # # In addition to the regular transaction fields there is a`boc` field encoded with `base64` which contains sourcetransaction BOC. out_messages: Array - # # List of output messages’ BOCs. # # Encoded as ‘base64` decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter. fees: TransactionFees - # # Transaction fees Async
120 121 122 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 120 def wait_for_transaction(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 |
#wait_for_transaction_sync(payload) ⇒ Object
Sync
125 126 127 |
# File 'lib/everscale-client-ruby/Client/Processing.rb', line 125 def wait_for_transaction_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |