everscale-client-ruby 1.1.50 → 1.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/code_generator/code_generator.rb +11 -8
- data/lib/everscale-client-ruby/Binding/binding.rb +41 -38
- data/lib/everscale-client-ruby/Client/Abi.rb +18 -17
- data/lib/everscale-client-ruby/Client/Boc.rb +22 -21
- data/lib/everscale-client-ruby/Client/Client.rb +18 -17
- data/lib/everscale-client-ruby/Client/Crypto.rb +54 -53
- data/lib/everscale-client-ruby/Client/Debot.rb +9 -8
- data/lib/everscale-client-ruby/Client/Net.rb +25 -24
- data/lib/everscale-client-ruby/Client/Processing.rb +6 -5
- data/lib/everscale-client-ruby/Client/Proofs.rb +6 -5
- data/lib/everscale-client-ruby/Client/Tvm.rb +6 -5
- data/lib/everscale-client-ruby/Client/Utils.rb +8 -7
- data/lib/everscale-client-ruby/Helpers/CommonHelpers.rb +38 -1
- data/lib/everscale-client-ruby/version.rb +1 -1
- data/lib/everscale-client-ruby.rb +1 -1
- metadata +6 -20
@@ -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
|
@@ -18,7 +19,7 @@ module TonClient
|
|
18
19
|
# RESPONSE: ResultOfQuery
|
19
20
|
# result: Value - # # Result provided by DAppServer.
|
20
21
|
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)
|
22
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
22
23
|
end
|
23
24
|
|
24
25
|
# INPUT: ParamsOfBatchQuery
|
@@ -26,7 +27,7 @@ module TonClient
|
|
26
27
|
# RESPONSE: ResultOfBatchQuery
|
27
28
|
# results: Array - # # Result values for batched queries. # # Returns an array of values. Each value corresponds to `queries` item.
|
28
29
|
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)
|
30
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
30
31
|
end
|
31
32
|
|
32
33
|
# INPUT: ParamsOfQueryCollection
|
@@ -38,7 +39,7 @@ module TonClient
|
|
38
39
|
# RESPONSE: ResultOfQueryCollection
|
39
40
|
# result: Array - # # Objects that match the provided criteria
|
40
41
|
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)
|
42
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
42
43
|
end
|
43
44
|
|
44
45
|
# INPUT: ParamsOfAggregateCollection
|
@@ -49,7 +50,7 @@ module TonClient
|
|
49
50
|
# values: Value - # # Values for requested fields. # # Returns an array of strings. Each string refers to the corresponding `fields` item.
|
50
51
|
# Numeric value is returned as a decimal string representations.
|
51
52
|
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)
|
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)
|
53
54
|
end
|
54
55
|
|
55
56
|
# INPUT: ParamsOfWaitForCollection
|
@@ -60,13 +61,13 @@ module TonClient
|
|
60
61
|
# RESPONSE: ResultOfWaitForCollection
|
61
62
|
# result: Value - # # First found object that matches the provided criteria
|
62
63
|
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)
|
64
|
+
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
65
|
end
|
65
66
|
|
66
67
|
# INPUT: ResultOfSubscribeCollection
|
67
68
|
# handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
|
68
69
|
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)
|
70
|
+
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
71
|
end
|
71
72
|
|
72
73
|
# INPUT: ParamsOfSubscribeCollection
|
@@ -76,7 +77,7 @@ module TonClient
|
|
76
77
|
# RESPONSE: ResultOfSubscribeCollection
|
77
78
|
# handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
|
78
79
|
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)
|
80
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
80
81
|
end
|
81
82
|
|
82
83
|
# INPUT: ParamsOfSubscribe
|
@@ -85,15 +86,15 @@ module TonClient
|
|
85
86
|
# RESPONSE: ResultOfSubscribeCollection
|
86
87
|
# handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
|
87
88
|
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)
|
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)
|
89
90
|
end
|
90
91
|
|
91
92
|
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)
|
93
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
|
93
94
|
end
|
94
95
|
|
95
96
|
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)
|
97
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
|
97
98
|
end
|
98
99
|
|
99
100
|
# INPUT: ParamsOfFindLastShardBlock
|
@@ -101,26 +102,26 @@ module TonClient
|
|
101
102
|
# RESPONSE: ResultOfFindLastShardBlock
|
102
103
|
# block_id: String - # # Account shard last block ID
|
103
104
|
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)
|
105
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
105
106
|
end
|
106
107
|
|
107
108
|
# RESPONSE: EndpointsSet
|
108
109
|
# endpoints: Array - # # List of endpoints provided by server
|
109
110
|
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)
|
111
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
|
111
112
|
end
|
112
113
|
|
113
114
|
# INPUT: EndpointsSet
|
114
115
|
# endpoints: Array - # # List of endpoints provided by server
|
115
116
|
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)
|
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)
|
117
118
|
end
|
118
119
|
|
119
120
|
# RESPONSE: ResultOfGetEndpoints
|
120
121
|
# query: String - # # Current query endpoint
|
121
122
|
# endpoints: Array - # # List of all endpoints used by client
|
122
123
|
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)
|
124
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
|
124
125
|
end
|
125
126
|
|
126
127
|
# INPUT: ParamsOfQueryCounterparties
|
@@ -131,7 +132,7 @@ module TonClient
|
|
131
132
|
# RESPONSE: ResultOfQueryCollection
|
132
133
|
# result: Array - # # Objects that match the provided criteria
|
133
134
|
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)
|
135
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
135
136
|
end
|
136
137
|
|
137
138
|
# INPUT: ParamsOfQueryTransactionTree
|
@@ -143,7 +144,7 @@ module TonClient
|
|
143
144
|
# messages: Array - # # Messages.
|
144
145
|
# transactions: Array - # # Transactions.
|
145
146
|
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)
|
147
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
147
148
|
end
|
148
149
|
|
149
150
|
# INPUT: ParamsOfCreateBlockIterator
|
@@ -163,7 +164,7 @@ module TonClient
|
|
163
164
|
# RESPONSE: RegisteredIterator
|
164
165
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
165
166
|
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)
|
167
|
+
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
168
|
end
|
168
169
|
|
169
170
|
# INPUT: ParamsOfResumeBlockIterator
|
@@ -171,7 +172,7 @@ module TonClient
|
|
171
172
|
# RESPONSE: RegisteredIterator
|
172
173
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
173
174
|
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)
|
175
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
175
176
|
end
|
176
177
|
|
177
178
|
# INPUT: ParamsOfCreateTransactionIterator
|
@@ -197,7 +198,7 @@ module TonClient
|
|
197
198
|
# RESPONSE: RegisteredIterator
|
198
199
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
199
200
|
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)
|
201
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
201
202
|
end
|
202
203
|
|
203
204
|
# INPUT: ParamsOfResumeTransactionIterator
|
@@ -209,7 +210,7 @@ module TonClient
|
|
209
210
|
# RESPONSE: RegisteredIterator
|
210
211
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
211
212
|
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)
|
213
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
213
214
|
end
|
214
215
|
|
215
216
|
# INPUT: ParamsOfIteratorNext
|
@@ -224,13 +225,13 @@ module TonClient
|
|
224
225
|
# 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
226
|
# Note that `resume_state` corresponds to the iteration positionafter the returned items.
|
226
227
|
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)
|
228
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
228
229
|
end
|
229
230
|
|
230
231
|
# INPUT: RegisteredIterator
|
231
232
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
232
233
|
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)
|
234
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
234
235
|
end
|
235
236
|
|
236
237
|
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
|
@@ -22,7 +23,7 @@ module TonClient
|
|
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`.
|
24
25
|
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)
|
26
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
26
27
|
end
|
27
28
|
|
28
29
|
# INPUT: ParamsOfWaitForTransaction
|
@@ -40,7 +41,7 @@ module TonClient
|
|
40
41
|
# decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
|
41
42
|
# fees: TransactionFees - # # Transaction fees
|
42
43
|
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)
|
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)
|
44
45
|
end
|
45
46
|
|
46
47
|
# INPUT: ParamsOfProcessMessage
|
@@ -52,7 +53,7 @@ module TonClient
|
|
52
53
|
# decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
|
53
54
|
# fees: TransactionFees - # # Transaction fees
|
54
55
|
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)
|
56
|
+
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
57
|
end
|
57
58
|
|
58
59
|
end
|
@@ -3,31 +3,32 @@ 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.
|
17
18
|
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)
|
19
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
19
20
|
end
|
20
21
|
|
21
22
|
# INPUT: ParamsOfProofTransactionData
|
22
23
|
# 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
|
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)
|
25
|
+
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
26
|
end
|
26
27
|
|
27
28
|
# INPUT: ParamsOfProofMessageData
|
28
29
|
# 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
|
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)
|
31
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
31
32
|
end
|
32
33
|
|
33
34
|
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
|
@@ -27,7 +28,7 @@ module TonClient
|
|
27
28
|
# account: String - # # Updated account state BOC. # # Encoded as `base64`
|
28
29
|
# fees: TransactionFees - # # Transaction fees
|
29
30
|
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)
|
31
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
31
32
|
end
|
32
33
|
|
33
34
|
# INPUT: ParamsOfRunTvm
|
@@ -42,7 +43,7 @@ module TonClient
|
|
42
43
|
# decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
|
43
44
|
# account: String - # # Updated account state BOC. # # Encoded as `base64`. Attention! Only `account_state.storage.state.data` part of the BOC is updated.
|
44
45
|
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)
|
46
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
46
47
|
end
|
47
48
|
|
48
49
|
# INPUT: ParamsOfRunGet
|
@@ -55,7 +56,7 @@ module TonClient
|
|
55
56
|
# RESPONSE: ResultOfRunGet
|
56
57
|
# output: Value - # # Values returned by get-method on stack
|
57
58
|
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)
|
59
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
59
60
|
end
|
60
61
|
|
61
62
|
end
|
@@ -3,13 +3,14 @@ module TonClient
|
|
3
3
|
class Utils
|
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: ParamsOfConvertAddress
|
@@ -18,7 +19,7 @@ module TonClient
|
|
18
19
|
# RESPONSE: ResultOfConvertAddress
|
19
20
|
# address: String - # # Address in the specified format
|
20
21
|
def convert_address(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)
|
22
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
22
23
|
end
|
23
24
|
|
24
25
|
# INPUT: ParamsOfGetAddressType
|
@@ -26,7 +27,7 @@ module TonClient
|
|
26
27
|
# RESPONSE: ResultOfGetAddressType
|
27
28
|
# address_type: AccountAddressType - # # Account address type.
|
28
29
|
def get_address_type(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)
|
30
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
30
31
|
end
|
31
32
|
|
32
33
|
# INPUT: ParamsOfCalcStorageFee
|
@@ -35,7 +36,7 @@ module TonClient
|
|
35
36
|
# RESPONSE: ResultOfCalcStorageFee
|
36
37
|
# fee: String -
|
37
38
|
def calc_storage_fee(payload, &block)
|
38
|
-
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
39
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
39
40
|
end
|
40
41
|
|
41
42
|
# INPUT: ParamsOfCompressZstd
|
@@ -44,7 +45,7 @@ module TonClient
|
|
44
45
|
# RESPONSE: ResultOfCompressZstd
|
45
46
|
# compressed: String - # # Compressed data. # # Must be encoded as base64.
|
46
47
|
def compress_zstd(payload, &block)
|
47
|
-
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
48
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
48
49
|
end
|
49
50
|
|
50
51
|
# INPUT: ParamsOfDecompressZstd
|
@@ -52,7 +53,7 @@ module TonClient
|
|
52
53
|
# RESPONSE: ResultOfDecompressZstd
|
53
54
|
# decompressed: String - # # Decompressed data. # # Must be encoded as base64.
|
54
55
|
def decompress_zstd(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)
|
56
|
+
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
57
|
end
|
57
58
|
|
58
59
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
module TonClient
|
3
2
|
|
4
3
|
def self.read_abi(path_to_file)
|
@@ -24,6 +23,44 @@ module TonClient
|
|
24
23
|
end
|
25
24
|
queue.pop
|
26
25
|
end
|
26
|
+
|
27
|
+
class RequestId
|
28
|
+
include MonitorMixin
|
29
|
+
|
30
|
+
def initialize
|
31
|
+
super
|
32
|
+
synchronize { @value = 1 }
|
33
|
+
end
|
34
|
+
|
35
|
+
def increment
|
36
|
+
synchronize { @value += 1}
|
37
|
+
end
|
38
|
+
|
39
|
+
def value
|
40
|
+
synchronize { @value }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
class Requests
|
45
|
+
include MonitorMixin
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
super
|
49
|
+
synchronize { @value = {} }
|
50
|
+
end
|
51
|
+
|
52
|
+
def []=(key, value)
|
53
|
+
synchronize { @value[key] = value }
|
54
|
+
end
|
55
|
+
|
56
|
+
def [](key)
|
57
|
+
synchronize { @value[key] }
|
58
|
+
end
|
59
|
+
|
60
|
+
def delete(key)
|
61
|
+
synchronize { @value.delete(key) }
|
62
|
+
end
|
63
|
+
end
|
27
64
|
end
|
28
65
|
|
29
66
|
module CommonClassHelpers
|
@@ -3,7 +3,7 @@ require "base64"
|
|
3
3
|
require 'json'
|
4
4
|
require 'dotenv'
|
5
5
|
require 'fileutils'
|
6
|
-
require '
|
6
|
+
require 'monitor'
|
7
7
|
require_relative './everscale-client-ruby/Helpers/CommonHelpers.rb'
|
8
8
|
require_relative './everscale-client-ruby/Binding/struct.rb'
|
9
9
|
require_relative './everscale-client-ruby/Binding/binding.rb'
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everscale-client-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nerzh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.15
|
19
|
+
version: '1.15'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.15
|
26
|
+
version: '1.15'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dotenv
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.7.6
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: concurrent-ruby
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.1.10
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.1.10
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: bundler
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|