ton_sdk_client 1.15.0 → 1.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f2ac355af8715a6b9902625f87e3056ab2f0b1e587f254e215536f61884260c
4
- data.tar.gz: fd17e79331f37041c964540eab79bbf2865ee71e2eb4229b09c86ea81096f076
3
+ metadata.gz: 6c809c22fee5e69dca9653a3f3ef7541e43491152f954c97dea5e4438e9981d7
4
+ data.tar.gz: 56ea8b10cbae34389691afeedb1f72f21dcf8f8568258aeb9d250ee1b7ef3231
5
5
  SHA512:
6
- metadata.gz: 79499cc78e89af5b1aaee344abc5b22b0fad2c5edfc44b0126dfca3055953813ca54d85307cc2d8f17f18b9fd4baebb89e801d8593fea1fd80006ee092b2d175
7
- data.tar.gz: 6c4af233eaec857f5e6bc03a140fdd3beb812c69e8cbd4a5334bc1e3a69fca4eaf6650367f609202c2def14996dcae27ed96a3aaa583debec1d72c8402adfeee
6
+ metadata.gz: 4602857970a2c0c5d1f7ee3917e7df637516b684b7dd69d39975d8ec866bae0556e4053e0d54ede9a831a4815027f9522f239337ba3ae8f62bac288d6f67e6be
7
+ data.tar.gz: 97857fb5c4bb08844bd973e71a8c54873f963516f398457bdf19bc7af5c33e0e47745311c66a0cb5a490242cfa5280a9dc3aaa3c0682ebbb9f25b33497c96689
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ 1.16.x
4
+ -----
5
+ * TON SDK version: 1.16.0
6
+ * the changes are according the ones of TON SDK
7
+
3
8
  1.15.x
4
9
  -----
5
10
  * TON SDK version: 1.15.0
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # TON SDK client in Ruby and for Ruby
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/ton_sdk_client.png)](https://badge.fury.io/rb/ton_sdk_client)
4
- [![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.15.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.15.0)
4
+ [![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.16.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.16.0)
5
5
 
6
6
  Ruby gem-client bindings for [TON SDK](https://github.com/tonlabs/TON-SDK) which allows one to communicate with [FreeTON](https://freeton.org) blockchain in Ruby.
7
7
 
@@ -62,20 +62,20 @@ module TonSdk
62
62
  ResultOfWaitForCollection = Struct.new(:result)
63
63
  ResultOfQuery = Struct.new(:result)
64
64
  ResultOfBatchQuery = Struct.new(:results)
65
- ParamsOfWaitForCollection = Struct.new(:collection, :filter, :result, :timeout) do
65
+ ParamsOfWaitForCollection = Struct.new(:collection, :filter, :result, :timeout, keyword_init: true) do
66
66
  def initialize(collection:, filter: nil, result:, timeout: nil)
67
67
  super
68
68
  end
69
69
  end
70
70
 
71
- ParamsOfSubscribeCollection = Struct.new(:collection, :filter, :result) do
71
+ ParamsOfSubscribeCollection = Struct.new(:collection, :filter, :result, keyword_init: true) do
72
72
  def initialize(collection:, filter: nil, result:)
73
73
  super
74
74
  end
75
75
  end
76
76
 
77
77
  ResultOfSubscribeCollection = Struct.new(:handle)
78
- ParamsOfQuery = Struct.new(:query, :variables) do
78
+ ParamsOfQuery = Struct.new(:query, :variables, keyword_init: true) do
79
79
  def initialize(query:, variables: nil)
80
80
  super
81
81
  end
@@ -105,6 +105,11 @@ module TonSdk
105
105
  @params = params
106
106
  end
107
107
 
108
+ def self.new_with_type_query_counterparties(params)
109
+ @type_ = :query_counterparties
110
+ @params = params
111
+ end
112
+
108
113
  def to_h
109
114
  tp = {
110
115
  type: Helper.sym_to_capitalized_case_str(@type_)
@@ -172,6 +177,60 @@ module TonSdk
172
177
 
173
178
  ResultOfGetEndpoints = Struct.new(:query, :endpoints, keyword_init: true)
174
179
 
180
+ TransactionNode = Struct.new(
181
+ :id_,
182
+ :in_msg,
183
+ :out_msgs,
184
+ :account_addr,
185
+ :total_fees,
186
+ :aborted,
187
+ :exit_code,
188
+ keyword_init: true
189
+ ) do
190
+ def initialize(id_:, in_msg:, out_msgs:, account_addr:, total_fees:, aborted:, exit_code: nil)
191
+ super
192
+ end
193
+ end
194
+
195
+ MessageNode = Struct.new(
196
+ :id_,
197
+ :src_transaction_id,
198
+ :dst_transaction_id,
199
+ :src,
200
+ :dst,
201
+ :value,
202
+ :bounce,
203
+ :decoded_body,
204
+ keyword_init: true
205
+ ) do
206
+ def initialize(
207
+ id_:,
208
+ src_transaction_id: nil,
209
+ dst_transaction_id: nil,
210
+ src: nil,
211
+ dst: nil,
212
+ value: nil,
213
+ bounce:,
214
+ decoded_body: nil
215
+ )
216
+ super
217
+ end
218
+ end
219
+
220
+ ParamsOfQueryTransactionTree = Struct.new(:in_msg, :abi_registry, keyword_init: true) do
221
+ def initialize(in_msg:, abi_registry: [])
222
+ super
223
+ end
224
+
225
+ def to_h
226
+ h = super
227
+ h[:abi_registry] = self.abi_registry&.map(&:to_h)
228
+ h
229
+ end
230
+ end
231
+
232
+ ResultOfQueryTransactionTree = Struct.new(:messages, :transactions, keyword_init: true)
233
+
175
234
 
176
235
  #
177
236
  # functions
@@ -334,6 +393,21 @@ module TonSdk
334
393
  end
335
394
  end
336
395
 
396
+ def self.get_endpoints(ctx, params)
397
+ Interop::request_to_native_lib(ctx, "net.get_endpoints", params) do |resp|
398
+ if resp.success?
399
+ yield NativeLibResponsetResult.new(
400
+ result: ResultOfGetEndpoints.new(
401
+ query: resp.result["query"],
402
+ endpoints: resp.result["endpoints"],
403
+ )
404
+ )
405
+ else
406
+ yield resp
407
+ end
408
+ end
409
+ end
410
+
337
411
  def self.query_counterparties(ctx, params)
338
412
  Interop::request_to_native_lib(ctx, "net.query_counterparties", params) do |resp|
339
413
  if resp.success?
@@ -346,13 +420,13 @@ module TonSdk
346
420
  end
347
421
  end
348
422
 
349
- def self.get_endpoints(ctx, params)
350
- Interop::request_to_native_lib(ctx, "net.get_endpoints", params) do |resp|
423
+ def self.query_transaction_tree(ctx, params)
424
+ Interop::request_to_native_lib(ctx, "net.query_transaction_tree", params) do |resp|
351
425
  if resp.success?
352
426
  yield NativeLibResponsetResult.new(
353
- result: ResultOfGetEndpoints.new(
354
- query: resp.result["query"],
355
- endpoints: resp.result["endpoints"],
427
+ result: ResultOfQueryTransactionTree.new(
428
+ messages: resp.result["messages"],
429
+ transactions: resp.result["transactions"],
356
430
  )
357
431
  )
358
432
  else
@@ -1,4 +1,4 @@
1
1
  module TonSdk
2
- VERSION = "1.15.0"
3
- NATIVE_SDK_VERSION = "1.15.0"
2
+ VERSION = "1.16.0"
3
+ NATIVE_SDK_VERSION = "1.16.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ton_sdk_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Maslakov