ton_sdk_client 1.9.0 → 1.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4628284d59b45da1c738c5d06d810fed3ec130ed943ad936ba33ce8b137646ac
4
- data.tar.gz: 56016ac85cce1f045b4155f9319a586d6a72a70e513513834fd1101c611f4ee7
3
+ metadata.gz: cc6839d9210776851ef13a1ff787ea690cbd94ff0090d0b2ad7c9503eb3b7060
4
+ data.tar.gz: 6c2003bc7d9a5f26323af1758583ec6c6894668f2f9f57e0461131fd282f1990
5
5
  SHA512:
6
- metadata.gz: 27278e85093709cbab1d1d792972cf33002dbce639ba8369076873ab8b4809c4f96ad7f5c9177bf13898d8155c011b5551baf37bfbaf671a2d2626a83a51062e
7
- data.tar.gz: 91f3a8e4b4510a91a4268d0640f1354dd4c2d8a0bc3d90e6769077ac4aed70f0b46f1c02eae5a03cd818799a66da33e2f925cdab3ce13a48810165d1f891e45c
6
+ metadata.gz: bc1a87a1d9f9cd848a5e95caf5023a7cd14f82a1398de65c4db64108dfb10b2c5757de9bd0c57e1113ef904d0b6d1eb96a06c5daacc51bc0b198a2b8995c5cc1
7
+ data.tar.gz: 9f0a774f31e5de0bf2a3c22ce9ca7db6db449c99abd9724ccb21394ef193734bc365f36837c3a8f61b42b0056ce337c1ebdd4b64ca577a7757032a5a7dd143f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ 1.10.x
4
+ -----
5
+ * TON SDK version: 1.10.0
6
+ * the changes are according the ones of TON SDK
7
+
8
+
3
9
  1.9.x
4
10
  -----
5
11
  * TON SDK version: 1.9.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.9.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.9.0)
4
+ [![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.10.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.10.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
 
@@ -777,7 +777,7 @@ module TonSdk
777
777
  attr_reader :abi, :address, :src_address, :deploy_set, :call_set, :value, :bounce, :enable_ihr
778
778
 
779
779
  def initialize(
780
- abi:,
780
+ abi: nil,
781
781
  address: nil,
782
782
  src_address: nil,
783
783
  deploy_set: nil,
@@ -798,7 +798,7 @@ module TonSdk
798
798
 
799
799
  def to_h
800
800
  {
801
- abi: @abi,
801
+ abi: @abi.nil? ? nil : @abi.to_h,
802
802
  address: @address,
803
803
  src_address: @src_address,
804
804
  deploy_set: @deploy_set.nil? ? nil : @deploy_set.to_h,
@@ -199,6 +199,51 @@ module TonSdk
199
199
  end
200
200
  end
201
201
 
202
+ class ParamsOfEncodeBoc
203
+ attr_reader :builder, :boc_cache
204
+
205
+ def initialize(builder:, boc_cache: nil)
206
+ @builder = builder
207
+ @boc_cache = boc_cache
208
+ end
209
+
210
+ def to_h
211
+ {
212
+ boc: @boc,
213
+ boc_ref: @boc_ref
214
+ }
215
+ end
216
+ end
217
+
218
+ class ResultOfEncodeBoc
219
+ attr_reader :boc
220
+
221
+ def initialize(a)
222
+ @boc = a
223
+ end
224
+ end
225
+
226
+ class ParamsOfGetBlockchainConfig
227
+ attr_reader :block_boc
228
+
229
+ def initialize(a)
230
+ @block_boc = a
231
+ end
232
+
233
+ def to_h
234
+ {
235
+ block_boc: @block_boc
236
+ }
237
+ end
238
+ end
239
+
240
+ class ResultOfGetBlockchainConfig
241
+ attr_reader :config_boc
242
+
243
+ def initialize(a)
244
+ @config_boc = a
245
+ end
246
+ end
202
247
 
203
248
 
204
249
  #
@@ -340,5 +385,33 @@ module TonSdk
340
385
  end
341
386
  end
342
387
  end
388
+
389
+ def self.encode_boc(ctx, params)
390
+ Interop::request_to_native_lib(ctx, "boc.encode_boc", params.to_h.to_json) do |resp|
391
+ if resp.success?
392
+ yield NativeLibResponsetResult.new(
393
+ result: ResultOfEncodeBoc.new(
394
+ resp.result["boc"]
395
+ )
396
+ )
397
+ else
398
+ yield resp
399
+ end
400
+ end
401
+ end
402
+
403
+ def self.get_blockchain_config(ctx, params)
404
+ Interop::request_to_native_lib(ctx, "boc.get_blockchain_config", params.to_h.to_json) do |resp|
405
+ if resp.success?
406
+ yield NativeLibResponsetResult.new(
407
+ result: ResultOfGetBlockchainConfig.new(
408
+ resp.result["config_boc"]
409
+ )
410
+ )
411
+ else
412
+ yield resp
413
+ end
414
+ end
415
+ end
343
416
  end
344
417
  end
@@ -19,6 +19,8 @@ module TonSdk
19
19
  GET_METHOD_FAILED = 808
20
20
  INVALID_MSG = 809
21
21
  EXTERNAL_CALL_FAILED = 810
22
+ BROWSER_CALLBACK_FAILED = 811
23
+ OPERATION_REJECTED = 812
22
24
  end
23
25
 
24
26
  class DebotAction
@@ -171,22 +173,26 @@ module TonSdk
171
173
  end
172
174
 
173
175
  class ResultOfAppDebotBrowser
174
- TYPE_VALUES = [
175
- :input,
176
- :get_signing_box,
177
- :invoke_debot
178
- ]
176
+ attr_reader :type_, :value, :signing_box, :is_approved
179
177
 
180
- attr_reader :type_, :value, :signing_box
178
+ def new_with_type_input(a)
179
+ @type_ = :input
180
+ @value = a
181
+ end
181
182
 
182
- def initialize(type_:, value: nil, signing_box: nil)
183
- unless TYPE_VALUES.include?(type_)
184
- raise ArgumentError.new("type #{type_} is unknown; known types: #{TYPE_VALUES}")
185
- end
186
- @type_ = type_
187
- @value = value
183
+ def new_with_type_get_signing_box(a)
184
+ @type_ = :get_signing_box
188
185
  @signing_box = signing_box
189
186
  end
187
+
188
+ def new_with_type_invoke_debot
189
+ @type_ = :invoke_debot
190
+ end
191
+
192
+ def new_with_type_approve(a)
193
+ @type_ = :approve
194
+ @is_approved = a
195
+ end
190
196
  end
191
197
 
192
198
  class ParamsOfFetch
@@ -134,7 +134,7 @@ module TonSdk
134
134
  function_name,
135
135
  function_params_json = nil,
136
136
  client_callback: nil,
137
- is_single_thread_only: trfue
137
+ is_single_thread_only: true
138
138
  )
139
139
  function_name_tc_str = TcStringData.from_string(function_name)
140
140
  function_params_json_str = function_params_json || ""
@@ -5,6 +5,23 @@ module TonSdk
5
5
  # types
6
6
  #
7
7
 
8
+ module ErrorCode
9
+ CANNOT_READ_TRANSACTION = 401
10
+ CANNOT_READ_BLOCKCHAIN_CONFIG = 402
11
+ TRANSACTION_ABORTED = 403
12
+ INTERNAL_ERROR = 404
13
+ ACTION_PHASE_FAILED = 405
14
+ ACCOUNT_CODE_MISSING = 406
15
+ LOW_BALANCE = 407
16
+ ACCOUNT_FROZEN_OR_DELETED = 408
17
+ ACCOUNT_MISSING = 409
18
+ UNKNOWN_EXECUTION_ERROR = 410
19
+ INVALID_INPUT_STACK = 411
20
+ INVALID_ACCOUNT_BOC = 412
21
+ INVALID_MESSAGE_TYPE = 413
22
+ CONTRACT_EXECUTION_ERROR = 414
23
+ end
24
+
8
25
  class ExecutionOptions
9
26
  attr_reader :blockchain_config, :block_time, :block_lt, :transaction_lt
10
27
 
@@ -1,4 +1,4 @@
1
1
  module TonSdk
2
- VERSION = "1.9.0"
3
- NATIVE_SDK_VERSION = "1.9.0"
2
+ VERSION = "1.10.0"
3
+ NATIVE_SDK_VERSION = "1.10.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ton_sdk_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Maslakov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-12 00:00:00.000000000 Z
11
+ date: 2021-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi