everscale-client-ruby 1.1.50 → 1.1.60

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,13 +3,14 @@ module TonClient
3
3
  class Debot
4
4
  include CommonInstanceHelpers
5
5
 
6
- attr_reader :context, :request_id, :requests
6
+ attr_reader :context, :request_id, :requests, :monitor
7
7
  MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
8
8
 
9
- def initialize(context: nil, request_id: nil, requests: nil)
9
+ def initialize(context: nil, request_id: nil, requests: nil, monitor: nil)
10
10
  @context = context
11
11
  @request_id = request_id
12
12
  @requests = requests
13
+ @monitor = monitor
13
14
  end
14
15
 
15
16
  # INPUT: ParamsOfInit
@@ -18,42 +19,78 @@ module TonClient
18
19
  # debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
19
20
  # debot_abi: String - # # Debot abi as json string.
20
21
  # info: DebotInfo - # # Debot metadata.
22
+ # Async
21
23
  def init(payload, &block)
22
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
24
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
25
+ end
26
+
27
+ # Sync
28
+ def init_sync(payload)
29
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
23
30
  end
24
31
 
25
32
  # INPUT: ParamsOfStart
26
33
  # debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
34
+ # Async
27
35
  def start(payload, &block)
28
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
36
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
37
+ end
38
+
39
+ # Sync
40
+ def start_sync(payload)
41
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
29
42
  end
30
43
 
31
44
  # INPUT: ParamsOfFetch
32
45
  # address: String - # # Debot smart contract address.
33
46
  # RESPONSE: ResultOfFetch
34
47
  # info: DebotInfo - # # Debot metadata.
48
+ # Async
35
49
  def fetch(payload, &block)
36
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
50
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
51
+ end
52
+
53
+ # Sync
54
+ def fetch_sync(payload)
55
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
37
56
  end
38
57
 
39
58
  # INPUT: ParamsOfExecute
40
59
  # debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
41
60
  # action: DebotAction - # # Debot Action that must be executed.
61
+ # Async
42
62
  def execute(payload, &block)
43
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
63
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
64
+ end
65
+
66
+ # Sync
67
+ def execute_sync(payload)
68
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
44
69
  end
45
70
 
46
71
  # INPUT: ParamsOfSend
47
72
  # debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
48
73
  # message: String - # # BOC of internal message to debot encoded in base64 format.
74
+ # Async
49
75
  def send(payload, &block)
50
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
76
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
77
+ end
78
+
79
+ # Sync
80
+ def send_sync(payload)
81
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
51
82
  end
52
83
 
53
84
  # INPUT: ParamsOfRemove
54
85
  # debot_handle: DebotHandle - # # Debot handle which references an instance of debot engine.
86
+ # Async
55
87
  def remove(payload, &block)
56
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
88
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
89
+ end
90
+
91
+ # Sync
92
+ def remove_sync(payload)
93
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
57
94
  end
58
95
 
59
96
  end
@@ -3,13 +3,14 @@ module TonClient
3
3
  class Net
4
4
  include CommonInstanceHelpers
5
5
 
6
- attr_reader :context, :request_id, :requests
6
+ attr_reader :context, :request_id, :requests, :monitor
7
7
  MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
8
8
 
9
- def initialize(context: nil, request_id: nil, requests: nil)
9
+ def initialize(context: nil, request_id: nil, requests: nil, monitor: nil)
10
10
  @context = context
11
11
  @request_id = request_id
12
12
  @requests = requests
13
+ @monitor = monitor
13
14
  end
14
15
 
15
16
  # INPUT: ParamsOfQuery
@@ -17,16 +18,28 @@ module TonClient
17
18
  # variables: Value - # # Variables used in query. # # Must be a map with named values that can be used in query.
18
19
  # RESPONSE: ResultOfQuery
19
20
  # result: Value - # # Result provided by DAppServer.
21
+ # Async
20
22
  def query(payload, &block)
21
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
23
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
24
+ end
25
+
26
+ # Sync
27
+ def query_sync(payload)
28
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
22
29
  end
23
30
 
24
31
  # INPUT: ParamsOfBatchQuery
25
32
  # operations: Array - # # List of query operations that must be performed per single fetch.
26
33
  # RESPONSE: ResultOfBatchQuery
27
34
  # results: Array - # # Result values for batched queries. # # Returns an array of values. Each value corresponds to `queries` item.
35
+ # Async
28
36
  def batch_query(payload, &block)
29
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
37
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
38
+ end
39
+
40
+ # Sync
41
+ def batch_query_sync(payload)
42
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
30
43
  end
31
44
 
32
45
  # INPUT: ParamsOfQueryCollection
@@ -37,8 +50,14 @@ module TonClient
37
50
  # limit: Number<Optional> - # # Number of documents to return
38
51
  # RESPONSE: ResultOfQueryCollection
39
52
  # result: Array - # # Objects that match the provided criteria
53
+ # Async
40
54
  def query_collection(payload, &block)
41
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
55
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
56
+ end
57
+
58
+ # Sync
59
+ def query_collection_sync(payload)
60
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
42
61
  end
43
62
 
44
63
  # INPUT: ParamsOfAggregateCollection
@@ -48,8 +67,14 @@ module TonClient
48
67
  # RESPONSE: ResultOfAggregateCollection
49
68
  # values: Value - # # Values for requested fields. # # Returns an array of strings. Each string refers to the corresponding `fields` item.
50
69
  # Numeric value is returned as a decimal string representations.
70
+ # Async
51
71
  def aggregate_collection(payload, &block)
52
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
72
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
73
+ end
74
+
75
+ # Sync
76
+ def aggregate_collection_sync(payload)
77
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
53
78
  end
54
79
 
55
80
  # INPUT: ParamsOfWaitForCollection
@@ -59,14 +84,26 @@ module TonClient
59
84
  # timeout: Number<Optional> - # # Query timeout
60
85
  # RESPONSE: ResultOfWaitForCollection
61
86
  # result: Value - # # First found object that matches the provided criteria
87
+ # Async
62
88
  def wait_for_collection(payload, &block)
63
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
89
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
90
+ end
91
+
92
+ # Sync
93
+ def wait_for_collection_sync(payload)
94
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
64
95
  end
65
96
 
66
97
  # INPUT: ResultOfSubscribeCollection
67
98
  # handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
99
+ # Async
68
100
  def unsubscribe(payload, &block)
69
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
101
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
102
+ end
103
+
104
+ # Sync
105
+ def unsubscribe_sync(payload)
106
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
70
107
  end
71
108
 
72
109
  # INPUT: ParamsOfSubscribeCollection
@@ -75,8 +112,14 @@ module TonClient
75
112
  # result: String - # # Projection (result) string
76
113
  # RESPONSE: ResultOfSubscribeCollection
77
114
  # handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
115
+ # Async
78
116
  def subscribe_collection(payload, &block)
79
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
117
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
118
+ end
119
+
120
+ # Sync
121
+ def subscribe_collection_sync(payload)
122
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
80
123
  end
81
124
 
82
125
  # INPUT: ParamsOfSubscribe
@@ -84,43 +127,85 @@ module TonClient
84
127
  # variables: Value - # # Variables used in subscription. # # Must be a map with named values that can be used in query.
85
128
  # RESPONSE: ResultOfSubscribeCollection
86
129
  # handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
130
+ # Async
87
131
  def subscribe(payload, &block)
88
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
132
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
89
133
  end
90
134
 
135
+ # Sync
136
+ def subscribe_sync(payload)
137
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
138
+ end
139
+
140
+ # Async
91
141
  def suspend(&block)
92
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
142
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
93
143
  end
94
144
 
145
+ # Sync
146
+ def suspend_sync()
147
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: {})
148
+ end
149
+
150
+ # Async
95
151
  def resume(&block)
96
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
152
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
153
+ end
154
+
155
+ # Sync
156
+ def resume_sync()
157
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: {})
97
158
  end
98
159
 
99
160
  # INPUT: ParamsOfFindLastShardBlock
100
161
  # address: String - # # Account address
101
162
  # RESPONSE: ResultOfFindLastShardBlock
102
163
  # block_id: String - # # Account shard last block ID
164
+ # Async
103
165
  def find_last_shard_block(payload, &block)
104
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
166
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
167
+ end
168
+
169
+ # Sync
170
+ def find_last_shard_block_sync(payload)
171
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
105
172
  end
106
173
 
107
174
  # RESPONSE: EndpointsSet
108
175
  # endpoints: Array - # # List of endpoints provided by server
176
+ # Async
109
177
  def fetch_endpoints(&block)
110
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
178
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
179
+ end
180
+
181
+ # Sync
182
+ def fetch_endpoints_sync()
183
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: {})
111
184
  end
112
185
 
113
186
  # INPUT: EndpointsSet
114
187
  # endpoints: Array - # # List of endpoints provided by server
188
+ # Async
115
189
  def set_endpoints(payload, &block)
116
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
190
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
191
+ end
192
+
193
+ # Sync
194
+ def set_endpoints_sync(payload)
195
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
117
196
  end
118
197
 
119
198
  # RESPONSE: ResultOfGetEndpoints
120
199
  # query: String - # # Current query endpoint
121
200
  # endpoints: Array - # # List of all endpoints used by client
201
+ # Async
122
202
  def get_endpoints(&block)
123
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
203
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
204
+ end
205
+
206
+ # Sync
207
+ def get_endpoints_sync()
208
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: {})
124
209
  end
125
210
 
126
211
  # INPUT: ParamsOfQueryCounterparties
@@ -130,8 +215,14 @@ module TonClient
130
215
  # after: String<Optional> - # # `cursor` field of the last received result
131
216
  # RESPONSE: ResultOfQueryCollection
132
217
  # result: Array - # # Objects that match the provided criteria
218
+ # Async
133
219
  def query_counterparties(payload, &block)
134
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
220
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
221
+ end
222
+
223
+ # Sync
224
+ def query_counterparties_sync(payload)
225
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
135
226
  end
136
227
 
137
228
  # INPUT: ParamsOfQueryTransactionTree
@@ -142,8 +233,14 @@ module TonClient
142
233
  # RESPONSE: ResultOfQueryTransactionTree
143
234
  # messages: Array - # # Messages.
144
235
  # transactions: Array - # # Transactions.
236
+ # Async
145
237
  def query_transaction_tree(payload, &block)
146
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
238
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
239
+ end
240
+
241
+ # Sync
242
+ def query_transaction_tree_sync(payload)
243
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
147
244
  end
148
245
 
149
246
  # INPUT: ParamsOfCreateBlockIterator
@@ -162,16 +259,28 @@ module TonClient
162
259
  # Note that iterated items can contains additional fields that arenot requested in the `result`.
163
260
  # RESPONSE: RegisteredIterator
164
261
  # handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
262
+ # Async
165
263
  def create_block_iterator(payload, &block)
166
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
264
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
265
+ end
266
+
267
+ # Sync
268
+ def create_block_iterator_sync(payload)
269
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
167
270
  end
168
271
 
169
272
  # INPUT: ParamsOfResumeBlockIterator
170
273
  # resume_state: Value - # # Iterator state from which to resume. # # Same as value returned from `iterator_next`.
171
274
  # RESPONSE: RegisteredIterator
172
275
  # handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
276
+ # Async
173
277
  def resume_block_iterator(payload, &block)
174
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
278
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
279
+ end
280
+
281
+ # Sync
282
+ def resume_block_iterator_sync(payload)
283
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
175
284
  end
176
285
 
177
286
  # INPUT: ParamsOfCreateTransactionIterator
@@ -196,8 +305,14 @@ module TonClient
196
305
  # include_transfers: Boolean<Optional> - # # Include `transfers` field in iterated transactions. # # If this parameter is `true` then each transaction contains field`transfers` with list of transfer. See more about this structure in function description.
197
306
  # RESPONSE: RegisteredIterator
198
307
  # handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
308
+ # Async
199
309
  def create_transaction_iterator(payload, &block)
200
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
310
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
311
+ end
312
+
313
+ # Sync
314
+ def create_transaction_iterator_sync(payload)
315
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
201
316
  end
202
317
 
203
318
  # INPUT: ParamsOfResumeTransactionIterator
@@ -208,8 +323,14 @@ module TonClient
208
323
  # So it is the application's responsibility to specify the correct filter combination.
209
324
  # RESPONSE: RegisteredIterator
210
325
  # handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
326
+ # Async
211
327
  def resume_transaction_iterator(payload, &block)
212
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
328
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
329
+ end
330
+
331
+ # Sync
332
+ def resume_transaction_iterator_sync(payload)
333
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
213
334
  end
214
335
 
215
336
  # INPUT: ParamsOfIteratorNext
@@ -223,14 +344,26 @@ module TonClient
223
344
  # has_more: Boolean - # # Indicates that there are more available items in iterated range.
224
345
  # resume_state: Value<Optional> - # # Optional iterator state that can be used for resuming iteration. # # This field is returned only if the `return_resume_state` parameteris specified.
225
346
  # Note that `resume_state` corresponds to the iteration positionafter the returned items.
347
+ # Async
226
348
  def iterator_next(payload, &block)
227
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
349
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
350
+ end
351
+
352
+ # Sync
353
+ def iterator_next_sync(payload)
354
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
228
355
  end
229
356
 
230
357
  # INPUT: RegisteredIterator
231
358
  # handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
359
+ # Async
232
360
  def remove_iterator(payload, &block)
233
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
361
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
362
+ end
363
+
364
+ # Sync
365
+ def remove_iterator_sync(payload)
366
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
234
367
  end
235
368
 
236
369
  end
@@ -3,13 +3,14 @@ module TonClient
3
3
  class Processing
4
4
  include CommonInstanceHelpers
5
5
 
6
- attr_reader :context, :request_id, :requests
6
+ attr_reader :context, :request_id, :requests, :monitor
7
7
  MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
8
8
 
9
- def initialize(context: nil, request_id: nil, requests: nil)
9
+ def initialize(context: nil, request_id: nil, requests: nil, monitor: nil)
10
10
  @context = context
11
11
  @request_id = request_id
12
12
  @requests = requests
13
+ @monitor = monitor
13
14
  end
14
15
 
15
16
  # INPUT: ParamsOfSendMessage
@@ -21,8 +22,14 @@ module TonClient
21
22
  # RESPONSE: ResultOfSendMessage
22
23
  # 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`.
23
24
  # 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`.
25
+ # Async
24
26
  def send_message(payload, &block)
25
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
27
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
28
+ end
29
+
30
+ # Sync
31
+ def send_message_sync(payload)
32
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
26
33
  end
27
34
 
28
35
  # INPUT: ParamsOfWaitForTransaction
@@ -39,8 +46,14 @@ module TonClient
39
46
  # out_messages: Array - # # List of output messages' BOCs. # # Encoded as `base64`
40
47
  # decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
41
48
  # fees: TransactionFees - # # Transaction fees
49
+ # Async
42
50
  def wait_for_transaction(payload, &block)
43
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
51
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
52
+ end
53
+
54
+ # Sync
55
+ def wait_for_transaction_sync(payload)
56
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
44
57
  end
45
58
 
46
59
  # INPUT: ParamsOfProcessMessage
@@ -51,8 +64,14 @@ module TonClient
51
64
  # out_messages: Array - # # List of output messages' BOCs. # # Encoded as `base64`
52
65
  # decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
53
66
  # fees: TransactionFees - # # Transaction fees
67
+ # Async
54
68
  def process_message(payload, &block)
55
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
69
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
70
+ end
71
+
72
+ # Sync
73
+ def process_message_sync(payload)
74
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
56
75
  end
57
76
 
58
77
  end
@@ -3,31 +3,50 @@ module TonClient
3
3
  class Proofs
4
4
  include CommonInstanceHelpers
5
5
 
6
- attr_reader :context, :request_id, :requests
6
+ attr_reader :context, :request_id, :requests, :monitor
7
7
  MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
8
8
 
9
- def initialize(context: nil, request_id: nil, requests: nil)
9
+ def initialize(context: nil, request_id: nil, requests: nil, monitor: nil)
10
10
  @context = context
11
11
  @request_id = request_id
12
12
  @requests = requests
13
+ @monitor = monitor
13
14
  end
14
15
 
15
16
  # INPUT: ParamsOfProofBlockData
16
17
  # 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.
18
+ # Async
17
19
  def proof_block_data(payload, &block)
18
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
20
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
21
+ end
22
+
23
+ # Sync
24
+ def proof_block_data_sync(payload)
25
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
19
26
  end
20
27
 
21
28
  # INPUT: ParamsOfProofTransactionData
22
29
  # 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.
30
+ # Async
23
31
  def proof_transaction_data(payload, &block)
24
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
32
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
33
+ end
34
+
35
+ # Sync
36
+ def proof_transaction_data_sync(payload)
37
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
25
38
  end
26
39
 
27
40
  # INPUT: ParamsOfProofMessageData
28
41
  # 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`.
42
+ # Async
29
43
  def proof_message_data(payload, &block)
30
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
44
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
45
+ end
46
+
47
+ # Sync
48
+ def proof_message_data_sync(payload)
49
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
31
50
  end
32
51
 
33
52
  end
@@ -3,13 +3,14 @@ module TonClient
3
3
  class Tvm
4
4
  include CommonInstanceHelpers
5
5
 
6
- attr_reader :context, :request_id, :requests
6
+ attr_reader :context, :request_id, :requests, :monitor
7
7
  MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
8
8
 
9
- def initialize(context: nil, request_id: nil, requests: nil)
9
+ def initialize(context: nil, request_id: nil, requests: nil, monitor: nil)
10
10
  @context = context
11
11
  @request_id = request_id
12
12
  @requests = requests
13
+ @monitor = monitor
13
14
  end
14
15
 
15
16
  # INPUT: ParamsOfRunExecutor
@@ -26,8 +27,14 @@ module TonClient
26
27
  # decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
27
28
  # account: String - # # Updated account state BOC. # # Encoded as `base64`
28
29
  # fees: TransactionFees - # # Transaction fees
30
+ # Async
29
31
  def run_executor(payload, &block)
30
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
32
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
33
+ end
34
+
35
+ # Sync
36
+ def run_executor_sync(payload)
37
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
31
38
  end
32
39
 
33
40
  # INPUT: ParamsOfRunTvm
@@ -41,8 +48,14 @@ module TonClient
41
48
  # out_messages: Array - # # List of output messages' BOCs. # # Encoded as `base64`
42
49
  # decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
43
50
  # account: String - # # Updated account state BOC. # # Encoded as `base64`. Attention! Only `account_state.storage.state.data` part of the BOC is updated.
51
+ # Async
44
52
  def run_tvm(payload, &block)
45
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
53
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
54
+ end
55
+
56
+ # Sync
57
+ def run_tvm_sync(payload)
58
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
46
59
  end
47
60
 
48
61
  # INPUT: ParamsOfRunGet
@@ -54,8 +67,14 @@ module TonClient
54
67
  # This may happen, for example, when elector contract contains too many participants
55
68
  # RESPONSE: ResultOfRunGet
56
69
  # output: Value - # # Values returned by get-method on stack
70
+ # Async
57
71
  def run_get(payload, &block)
58
- TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
72
+ TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
73
+ end
74
+
75
+ # Sync
76
+ def run_get_sync(payload)
77
+ TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
59
78
  end
60
79
 
61
80
  end