Class: TonClient::Debot
- Includes:
- CommonInstanceHelpers
- Defined in:
- lib/ton-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.
-
#core ⇒ Object
readonly
Returns the value of attribute core.
Instance Method Summary collapse
-
#execute(payload, &block) ⇒ Object
INPUT: ParamsOfExecute debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
-
#fetch(payload, &block) ⇒ Object
INPUT: ParamsOfFetch address: String - # # Debot smart contract address.
-
#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.
-
#initialize(context: Context.new, core: TonClient::TonBinding) ⇒ 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.
-
#send(payload, &block) ⇒ Object
INPUT: ParamsOfSend debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
-
#start(payload, &block) ⇒ Object
INPUT: ParamsOfStart debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
Methods included from CommonInstanceHelpers
#base64?, #encode_to_base64, #full_method_name
Constructor Details
#initialize(context: Context.new, core: TonClient::TonBinding) ⇒ Debot
Returns a new instance of Debot.
9 10 11 12 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 9 def initialize(context: Context.new, core: TonClient::TonBinding) @context = context @core = core end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 6 def context @context end |
#core ⇒ Object (readonly)
Returns the value of attribute core.
6 7 8 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 6 def core @core 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.
41 42 43 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 41 def execute(payload, &block) core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#fetch(payload, &block) ⇒ Object
INPUT: ParamsOfFetch address: String - # # Debot smart contract address. RESPONSE: ResultOfFetch info: DebotInfo - # # Debot metadata.
34 35 36 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 34 def fetch(payload, &block) core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) 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.
20 21 22 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 20 def init(payload, &block) core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#remove(payload, &block) ⇒ Object
INPUT: ParamsOfRemove debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
54 55 56 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 54 def remove(payload, &block) core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) 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.
48 49 50 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 48 def send(payload, &block) core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#start(payload, &block) ⇒ Object
INPUT: ParamsOfStart debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
26 27 28 |
# File 'lib/ton-client-ruby/Client/Debot.rb', line 26 def start(payload, &block) core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |