everscale-client-ruby 1.1.44 → 1.1.49
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 +24 -12
- data/lib/everscale-client-ruby/Binding/binding.rb +79 -82
- data/lib/everscale-client-ruby/Binding/struct.rb +0 -8
- data/lib/everscale-client-ruby/Client/Abi.rb +19 -18
- data/lib/everscale-client-ruby/Client/Boc.rb +23 -22
- data/lib/everscale-client-ruby/Client/Client.rb +29 -20
- data/lib/everscale-client-ruby/Client/Crypto.rb +55 -54
- data/lib/everscale-client-ruby/Client/Debot.rb +10 -9
- data/lib/everscale-client-ruby/Client/Net.rb +26 -25
- data/lib/everscale-client-ruby/Client/Processing.rb +7 -6
- data/lib/everscale-client-ruby/Client/Proofs.rb +7 -6
- data/lib/everscale-client-ruby/Client/Tvm.rb +7 -6
- data/lib/everscale-client-ruby/Client/Utils.rb +9 -8
- data/lib/everscale-client-ruby/version.rb +1 -1
- data/lib/everscale-client-ruby.rb +2 -2
- metadata +7 -8
- data/lib/everscale-client-ruby/Client/Context.rb +0 -34
@@ -3,12 +3,13 @@ module TonClient
|
|
3
3
|
class Net
|
4
4
|
include CommonInstanceHelpers
|
5
5
|
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :context, :request_id, :requests
|
7
7
|
MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
|
8
8
|
|
9
|
-
def initialize(context:
|
9
|
+
def initialize(context: nil, request_id: nil, requests: nil)
|
10
10
|
@context = context
|
11
|
-
@
|
11
|
+
@request_id = request_id
|
12
|
+
@requests = requests
|
12
13
|
end
|
13
14
|
|
14
15
|
# INPUT: ParamsOfQuery
|
@@ -17,7 +18,7 @@ module TonClient
|
|
17
18
|
# RESPONSE: ResultOfQuery
|
18
19
|
# result: Value - # # Result provided by DAppServer.
|
19
20
|
def query(payload, &block)
|
20
|
-
|
21
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
21
22
|
end
|
22
23
|
|
23
24
|
# INPUT: ParamsOfBatchQuery
|
@@ -25,7 +26,7 @@ module TonClient
|
|
25
26
|
# RESPONSE: ResultOfBatchQuery
|
26
27
|
# results: Array - # # Result values for batched queries. # # Returns an array of values. Each value corresponds to `queries` item.
|
27
28
|
def batch_query(payload, &block)
|
28
|
-
|
29
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
29
30
|
end
|
30
31
|
|
31
32
|
# INPUT: ParamsOfQueryCollection
|
@@ -37,7 +38,7 @@ module TonClient
|
|
37
38
|
# RESPONSE: ResultOfQueryCollection
|
38
39
|
# result: Array - # # Objects that match the provided criteria
|
39
40
|
def query_collection(payload, &block)
|
40
|
-
|
41
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
41
42
|
end
|
42
43
|
|
43
44
|
# INPUT: ParamsOfAggregateCollection
|
@@ -48,7 +49,7 @@ module TonClient
|
|
48
49
|
# values: Value - # # Values for requested fields. # # Returns an array of strings. Each string refers to the corresponding `fields` item.
|
49
50
|
# Numeric value is returned as a decimal string representations.
|
50
51
|
def aggregate_collection(payload, &block)
|
51
|
-
|
52
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
52
53
|
end
|
53
54
|
|
54
55
|
# INPUT: ParamsOfWaitForCollection
|
@@ -59,13 +60,13 @@ module TonClient
|
|
59
60
|
# RESPONSE: ResultOfWaitForCollection
|
60
61
|
# result: Value - # # First found object that matches the provided criteria
|
61
62
|
def wait_for_collection(payload, &block)
|
62
|
-
|
63
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
63
64
|
end
|
64
65
|
|
65
66
|
# INPUT: ResultOfSubscribeCollection
|
66
67
|
# handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
|
67
68
|
def unsubscribe(payload, &block)
|
68
|
-
|
69
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
69
70
|
end
|
70
71
|
|
71
72
|
# INPUT: ParamsOfSubscribeCollection
|
@@ -75,7 +76,7 @@ module TonClient
|
|
75
76
|
# RESPONSE: ResultOfSubscribeCollection
|
76
77
|
# handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
|
77
78
|
def subscribe_collection(payload, &block)
|
78
|
-
|
79
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
79
80
|
end
|
80
81
|
|
81
82
|
# INPUT: ParamsOfSubscribe
|
@@ -84,15 +85,15 @@ module TonClient
|
|
84
85
|
# RESPONSE: ResultOfSubscribeCollection
|
85
86
|
# handle: Number - # # Subscription handle. # # Must be closed with `unsubscribe`
|
86
87
|
def subscribe(payload, &block)
|
87
|
-
|
88
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
88
89
|
end
|
89
90
|
|
90
91
|
def suspend(&block)
|
91
|
-
|
92
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
|
92
93
|
end
|
93
94
|
|
94
95
|
def resume(&block)
|
95
|
-
|
96
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
|
96
97
|
end
|
97
98
|
|
98
99
|
# INPUT: ParamsOfFindLastShardBlock
|
@@ -100,26 +101,26 @@ module TonClient
|
|
100
101
|
# RESPONSE: ResultOfFindLastShardBlock
|
101
102
|
# block_id: String - # # Account shard last block ID
|
102
103
|
def find_last_shard_block(payload, &block)
|
103
|
-
|
104
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
104
105
|
end
|
105
106
|
|
106
107
|
# RESPONSE: EndpointsSet
|
107
108
|
# endpoints: Array - # # List of endpoints provided by server
|
108
109
|
def fetch_endpoints(&block)
|
109
|
-
|
110
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
|
110
111
|
end
|
111
112
|
|
112
113
|
# INPUT: EndpointsSet
|
113
114
|
# endpoints: Array - # # List of endpoints provided by server
|
114
115
|
def set_endpoints(payload, &block)
|
115
|
-
|
116
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
116
117
|
end
|
117
118
|
|
118
119
|
# RESPONSE: ResultOfGetEndpoints
|
119
120
|
# query: String - # # Current query endpoint
|
120
121
|
# endpoints: Array - # # List of all endpoints used by client
|
121
122
|
def get_endpoints(&block)
|
122
|
-
|
123
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: {}, &block)
|
123
124
|
end
|
124
125
|
|
125
126
|
# INPUT: ParamsOfQueryCounterparties
|
@@ -130,7 +131,7 @@ module TonClient
|
|
130
131
|
# RESPONSE: ResultOfQueryCollection
|
131
132
|
# result: Array - # # Objects that match the provided criteria
|
132
133
|
def query_counterparties(payload, &block)
|
133
|
-
|
134
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
134
135
|
end
|
135
136
|
|
136
137
|
# INPUT: ParamsOfQueryTransactionTree
|
@@ -142,7 +143,7 @@ module TonClient
|
|
142
143
|
# messages: Array - # # Messages.
|
143
144
|
# transactions: Array - # # Transactions.
|
144
145
|
def query_transaction_tree(payload, &block)
|
145
|
-
|
146
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
146
147
|
end
|
147
148
|
|
148
149
|
# INPUT: ParamsOfCreateBlockIterator
|
@@ -162,7 +163,7 @@ module TonClient
|
|
162
163
|
# RESPONSE: RegisteredIterator
|
163
164
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
164
165
|
def create_block_iterator(payload, &block)
|
165
|
-
|
166
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
166
167
|
end
|
167
168
|
|
168
169
|
# INPUT: ParamsOfResumeBlockIterator
|
@@ -170,7 +171,7 @@ module TonClient
|
|
170
171
|
# RESPONSE: RegisteredIterator
|
171
172
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
172
173
|
def resume_block_iterator(payload, &block)
|
173
|
-
|
174
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
174
175
|
end
|
175
176
|
|
176
177
|
# INPUT: ParamsOfCreateTransactionIterator
|
@@ -196,7 +197,7 @@ module TonClient
|
|
196
197
|
# RESPONSE: RegisteredIterator
|
197
198
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
198
199
|
def create_transaction_iterator(payload, &block)
|
199
|
-
|
200
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
200
201
|
end
|
201
202
|
|
202
203
|
# INPUT: ParamsOfResumeTransactionIterator
|
@@ -208,7 +209,7 @@ module TonClient
|
|
208
209
|
# RESPONSE: RegisteredIterator
|
209
210
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
210
211
|
def resume_transaction_iterator(payload, &block)
|
211
|
-
|
212
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
212
213
|
end
|
213
214
|
|
214
215
|
# INPUT: ParamsOfIteratorNext
|
@@ -223,13 +224,13 @@ module TonClient
|
|
223
224
|
# 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.
|
224
225
|
# Note that `resume_state` corresponds to the iteration positionafter the returned items.
|
225
226
|
def iterator_next(payload, &block)
|
226
|
-
|
227
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
227
228
|
end
|
228
229
|
|
229
230
|
# INPUT: RegisteredIterator
|
230
231
|
# handle: Number - # # Iterator handle. # # Must be removed using `remove_iterator`when it is no more needed for the application.
|
231
232
|
def remove_iterator(payload, &block)
|
232
|
-
|
233
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
233
234
|
end
|
234
235
|
|
235
236
|
end
|
@@ -3,12 +3,13 @@ module TonClient
|
|
3
3
|
class Processing
|
4
4
|
include CommonInstanceHelpers
|
5
5
|
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :context, :request_id, :requests
|
7
7
|
MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
|
8
8
|
|
9
|
-
def initialize(context:
|
9
|
+
def initialize(context: nil, request_id: nil, requests: nil)
|
10
10
|
@context = context
|
11
|
-
@
|
11
|
+
@request_id = request_id
|
12
|
+
@requests = requests
|
12
13
|
end
|
13
14
|
|
14
15
|
# INPUT: ParamsOfSendMessage
|
@@ -21,7 +22,7 @@ module TonClient
|
|
21
22
|
# 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`.
|
22
23
|
# 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`.
|
23
24
|
def send_message(payload, &block)
|
24
|
-
|
25
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
25
26
|
end
|
26
27
|
|
27
28
|
# INPUT: ParamsOfWaitForTransaction
|
@@ -39,7 +40,7 @@ module TonClient
|
|
39
40
|
# decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
|
40
41
|
# fees: TransactionFees - # # Transaction fees
|
41
42
|
def wait_for_transaction(payload, &block)
|
42
|
-
|
43
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
43
44
|
end
|
44
45
|
|
45
46
|
# INPUT: ParamsOfProcessMessage
|
@@ -51,7 +52,7 @@ module TonClient
|
|
51
52
|
# decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
|
52
53
|
# fees: TransactionFees - # # Transaction fees
|
53
54
|
def process_message(payload, &block)
|
54
|
-
|
55
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
55
56
|
end
|
56
57
|
|
57
58
|
end
|
@@ -3,30 +3,31 @@ module TonClient
|
|
3
3
|
class Proofs
|
4
4
|
include CommonInstanceHelpers
|
5
5
|
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :context, :request_id, :requests
|
7
7
|
MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
|
8
8
|
|
9
|
-
def initialize(context:
|
9
|
+
def initialize(context: nil, request_id: nil, requests: nil)
|
10
10
|
@context = context
|
11
|
-
@
|
11
|
+
@request_id = request_id
|
12
|
+
@requests = requests
|
12
13
|
end
|
13
14
|
|
14
15
|
# INPUT: ParamsOfProofBlockData
|
15
16
|
# 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.
|
16
17
|
def proof_block_data(payload, &block)
|
17
|
-
|
18
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
18
19
|
end
|
19
20
|
|
20
21
|
# INPUT: ParamsOfProofTransactionData
|
21
22
|
# 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.
|
22
23
|
def proof_transaction_data(payload, &block)
|
23
|
-
|
24
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
24
25
|
end
|
25
26
|
|
26
27
|
# INPUT: ParamsOfProofMessageData
|
27
28
|
# 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`.
|
28
29
|
def proof_message_data(payload, &block)
|
29
|
-
|
30
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
30
31
|
end
|
31
32
|
|
32
33
|
end
|
@@ -3,12 +3,13 @@ module TonClient
|
|
3
3
|
class Tvm
|
4
4
|
include CommonInstanceHelpers
|
5
5
|
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :context, :request_id, :requests
|
7
7
|
MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
|
8
8
|
|
9
|
-
def initialize(context:
|
9
|
+
def initialize(context: nil, request_id: nil, requests: nil)
|
10
10
|
@context = context
|
11
|
-
@
|
11
|
+
@request_id = request_id
|
12
|
+
@requests = requests
|
12
13
|
end
|
13
14
|
|
14
15
|
# INPUT: ParamsOfRunExecutor
|
@@ -26,7 +27,7 @@ module TonClient
|
|
26
27
|
# account: String - # # Updated account state BOC. # # Encoded as `base64`
|
27
28
|
# fees: TransactionFees - # # Transaction fees
|
28
29
|
def run_executor(payload, &block)
|
29
|
-
|
30
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
30
31
|
end
|
31
32
|
|
32
33
|
# INPUT: ParamsOfRunTvm
|
@@ -41,7 +42,7 @@ module TonClient
|
|
41
42
|
# decoded: DecodedOutput<Optional> - # # Optional decoded message bodies according to the optional `abi` parameter.
|
42
43
|
# account: String - # # Updated account state BOC. # # Encoded as `base64`. Attention! Only `account_state.storage.state.data` part of the BOC is updated.
|
43
44
|
def run_tvm(payload, &block)
|
44
|
-
|
45
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
45
46
|
end
|
46
47
|
|
47
48
|
# INPUT: ParamsOfRunGet
|
@@ -54,7 +55,7 @@ module TonClient
|
|
54
55
|
# RESPONSE: ResultOfRunGet
|
55
56
|
# output: Value - # # Values returned by get-method on stack
|
56
57
|
def run_get(payload, &block)
|
57
|
-
|
58
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
58
59
|
end
|
59
60
|
|
60
61
|
end
|
@@ -3,12 +3,13 @@ module TonClient
|
|
3
3
|
class Utils
|
4
4
|
include CommonInstanceHelpers
|
5
5
|
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :context, :request_id, :requests
|
7
7
|
MODULE = self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
|
8
8
|
|
9
|
-
def initialize(context:
|
9
|
+
def initialize(context: nil, request_id: nil, requests: nil)
|
10
10
|
@context = context
|
11
|
-
@
|
11
|
+
@request_id = request_id
|
12
|
+
@requests = requests
|
12
13
|
end
|
13
14
|
|
14
15
|
# INPUT: ParamsOfConvertAddress
|
@@ -17,7 +18,7 @@ module TonClient
|
|
17
18
|
# RESPONSE: ResultOfConvertAddress
|
18
19
|
# address: String - # # Address in the specified format
|
19
20
|
def convert_address(payload, &block)
|
20
|
-
|
21
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
21
22
|
end
|
22
23
|
|
23
24
|
# INPUT: ParamsOfGetAddressType
|
@@ -25,7 +26,7 @@ module TonClient
|
|
25
26
|
# RESPONSE: ResultOfGetAddressType
|
26
27
|
# address_type: AccountAddressType - # # Account address type.
|
27
28
|
def get_address_type(payload, &block)
|
28
|
-
|
29
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
29
30
|
end
|
30
31
|
|
31
32
|
# INPUT: ParamsOfCalcStorageFee
|
@@ -34,7 +35,7 @@ module TonClient
|
|
34
35
|
# RESPONSE: ResultOfCalcStorageFee
|
35
36
|
# fee: String -
|
36
37
|
def calc_storage_fee(payload, &block)
|
37
|
-
|
38
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
38
39
|
end
|
39
40
|
|
40
41
|
# INPUT: ParamsOfCompressZstd
|
@@ -43,7 +44,7 @@ module TonClient
|
|
43
44
|
# RESPONSE: ResultOfCompressZstd
|
44
45
|
# compressed: String - # # Compressed data. # # Must be encoded as base64.
|
45
46
|
def compress_zstd(payload, &block)
|
46
|
-
|
47
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
47
48
|
end
|
48
49
|
|
49
50
|
# INPUT: ParamsOfDecompressZstd
|
@@ -51,7 +52,7 @@ module TonClient
|
|
51
52
|
# RESPONSE: ResultOfDecompressZstd
|
52
53
|
# decompressed: String - # # Decompressed data. # # Must be encoded as base64.
|
53
54
|
def decompress_zstd(payload, &block)
|
54
|
-
|
55
|
+
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
55
56
|
end
|
56
57
|
|
57
58
|
end
|
@@ -3,10 +3,10 @@ require "base64"
|
|
3
3
|
require 'json'
|
4
4
|
require 'dotenv'
|
5
5
|
require 'fileutils'
|
6
|
+
require 'concurrent'
|
6
7
|
require_relative './everscale-client-ruby/Helpers/CommonHelpers.rb'
|
7
8
|
require_relative './everscale-client-ruby/Binding/struct.rb'
|
8
9
|
require_relative './everscale-client-ruby/Binding/binding.rb'
|
9
|
-
require_relative './everscale-client-ruby/Client/Context.rb'
|
10
10
|
require_relative './everscale-client-ruby/Client/Client.rb'
|
11
11
|
require_relative './everscale-client-ruby/Client/Crypto.rb'
|
12
12
|
require_relative './everscale-client-ruby/Client/Abi.rb'
|
@@ -38,6 +38,6 @@ module TonClient
|
|
38
38
|
|
39
39
|
def self.create(config: {})
|
40
40
|
check_configuration
|
41
|
-
Client.new(
|
41
|
+
Client.new(context_config: config)
|
42
42
|
end
|
43
43
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
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.49
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nerzh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-07 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
19
|
version: 1.15.0
|
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
26
|
version: 1.15.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -39,19 +39,19 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.7.6
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: ruby
|
42
|
+
name: concurrent-ruby
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.1.10
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.1.10
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,7 +128,6 @@ files:
|
|
128
128
|
- lib/everscale-client-ruby/Client/Abi.rb
|
129
129
|
- lib/everscale-client-ruby/Client/Boc.rb
|
130
130
|
- lib/everscale-client-ruby/Client/Client.rb
|
131
|
-
- lib/everscale-client-ruby/Client/Context.rb
|
132
131
|
- lib/everscale-client-ruby/Client/Crypto.rb
|
133
132
|
- lib/everscale-client-ruby/Client/Debot.rb
|
134
133
|
- lib/everscale-client-ruby/Client/Net.rb
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module TonClient
|
2
|
-
class Context
|
3
|
-
|
4
|
-
attr_reader :id
|
5
|
-
|
6
|
-
def initialize(config: {})
|
7
|
-
TonClient.check_configuration
|
8
|
-
@config = TonBinding.make_string(config.to_json)
|
9
|
-
context = TonBinding.tc_create_context(@config)
|
10
|
-
@id = TonBinding.read_string_to_hash(context)['result']
|
11
|
-
ObjectSpace.define_finalizer(self, self.class.finalize(@id))
|
12
|
-
end
|
13
|
-
|
14
|
-
def config=(value = {})
|
15
|
-
@config = TonBinding.make_string(value.to_json)
|
16
|
-
end
|
17
|
-
|
18
|
-
def config
|
19
|
-
TonBinding.read_string_to_hash(@config)
|
20
|
-
end
|
21
|
-
|
22
|
-
def destroy
|
23
|
-
TonBinding.tc_destroy_context(id)
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.finalize(id)
|
27
|
-
Proc.new do
|
28
|
-
if (id != nil) && (id > 0)
|
29
|
-
TonBinding.tc_destroy_context(id)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|