Class: TonClient::Debot
- Includes:
- CommonInstanceHelpers
- Defined in:
- lib/everscale-client-ruby/Client/Debot.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
-
#execute(payload, &block) ⇒ Object
INPUT: ParamsOfExecute debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
-
#execute_sync(payload) ⇒ Object
Sync.
-
#fetch(payload, &block) ⇒ Object
INPUT: ParamsOfFetch address: String - # # Debot smart contract address.
-
#fetch_sync(payload) ⇒ Object
Sync.
-
#init(payload, &block) ⇒ Object
INPUT: ParamsOfInit address: String - # # Debot smart contract address RESPONSE: RegisteredDebot debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
-
#init_sync(payload) ⇒ Object
Sync.
-
#initialize(context: nil, request_id: nil, requests: nil, monitor: nil) ⇒ Debot
constructor
A new instance of Debot.
-
#remove(payload, &block) ⇒ Object
INPUT: ParamsOfRemove debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
-
#remove_sync(payload) ⇒ Object
Sync.
-
#send(payload, &block) ⇒ Object
INPUT: ParamsOfSend debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
-
#send_sync(payload) ⇒ Object
Sync.
-
#start(payload, &block) ⇒ Object
INPUT: ParamsOfStart debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
-
#start_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) ⇒ Debot
Returns a new instance of Debot.
9 10 11 12 13 14 |
# File 'lib/everscale-client-ruby/Client/Debot.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/Debot.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/Debot.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/Debot.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/Debot.rb', line 6 def requests @requests end |
Instance Method Details
#execute(payload, &block) ⇒ Object
INPUT: ParamsOfExecute debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine. action: DebotAction - # # Debot Action that must be executed. Async
62 63 64 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 62 def execute(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 |
#execute_sync(payload) ⇒ Object
Sync
67 68 69 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 67 def execute_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#fetch(payload, &block) ⇒ Object
INPUT: ParamsOfFetch address: String - # # Debot smart contract address. RESPONSE: ResultOfFetch info: DebotInfo - # # Debot metadata. Async
49 50 51 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 49 def fetch(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_sync(payload) ⇒ Object
Sync
54 55 56 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 54 def fetch_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#init(payload, &block) ⇒ Object
INPUT: ParamsOfInit address: String - # # Debot smart contract address RESPONSE: RegisteredDebot debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine. debot_abi: String - # # Debot abi as json string. info: DebotInfo - # # Debot metadata. Async
23 24 25 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 23 def init(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 |
#init_sync(payload) ⇒ Object
Sync
28 29 30 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 28 def init_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#remove(payload, &block) ⇒ Object
INPUT: ParamsOfRemove debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine. Async
87 88 89 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 87 def remove(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 |
#remove_sync(payload) ⇒ Object
Sync
92 93 94 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 92 def remove_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#send(payload, &block) ⇒ Object
INPUT: ParamsOfSend debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine. message: String - # # BOC of internal message to debot encoded in base64 format. Async
75 76 77 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 75 def send(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_sync(payload) ⇒ Object
Sync
80 81 82 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 80 def send_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |
#start(payload, &block) ⇒ Object
INPUT: ParamsOfStart debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine. Async
35 36 37 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 35 def start(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 |
#start_sync(payload) ⇒ Object
Sync
40 41 42 |
# File 'lib/everscale-client-ruby/Client/Debot.rb', line 40 def start_sync(payload) TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload) end |