ton_sdk_client 1.16.1 → 1.17.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: 622e37887180cee84b905ded176e40e785e5cd776b57f5ca47190a16113e429b
4
- data.tar.gz: af8e2218ea8112ac0133f36bb87a32a535c15192f86ef815d00cc1386eddf2e6
3
+ metadata.gz: 611b507cb9f4b904651663ac9d6de9c35730c1fdb246174c591b1c9e18b2e2c1
4
+ data.tar.gz: f86b4cbd48751a2853263ee20ffc642cd9af9afcd67c7a64aa6a8c3d240f48b5
5
5
  SHA512:
6
- metadata.gz: 5e04c5d81a9aea2f7e7690f95fab69126fed54ae808ae7500d4504b7846adb7659047c8f092cbcdcc507ba49e256198b42ef4c2673b7dbc7e787dae334dd7036
7
- data.tar.gz: ad6100613644e18d0c6ce35fbb88c05c0cacc72dde99454cb978cb5a5ef1a09663bc89702edd80f1e8610fb192c32d17a3bef8cc46843ba172e7d7e01ec22fe6
6
+ metadata.gz: b8f11f0c94deff6280c93206990b747712798f668b2d1edd15540245335780dc07f8e7093d7c905744774d051671c816533a4547ee501b47721fc6af6af3487c
7
+ data.tar.gz: 43b87245c92344484bac45ff9c095e2ee5d93b0869bc16cc7668d33794a6bbb8c9092adf6d3ff571220782fc8cf92a22d31620476b175ba376876c833f5ae094
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ 1.17.x
4
+ -----
5
+ * the changes are according the ones of TON SDK
6
+
7
+
3
8
  1.16.x
4
9
  -----
5
10
  * TON SDK version: 1.16.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.16.1-green)](https://github.com/tonlabs/TON-SDK/tree/1.16.1)
4
+ [![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.17.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.17.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
 
@@ -265,6 +265,11 @@ module TonSdk
265
265
  end
266
266
  end
267
267
 
268
+ EncryptionBoxInfo = Struct.new(:hdpath, :algorithm, :options, :public, keyword_init: true)
269
+ ParamsOfEncryptionBoxGetInfo = Struct.new(:encryption_box)
270
+ ResultOfEncryptionBoxGetInfo = Struct.new(:info)
271
+ RegisteredEncryptionBox = Struct.new(:handle)
272
+
268
273
 
269
274
  #
270
275
  # functions
@@ -762,5 +767,57 @@ module TonSdk
762
767
  end
763
768
  end
764
769
  end
770
+
771
+ def self.register_encryption_box(ctx, app_obj:)
772
+ client_callback = Proc.new do |type_, x|
773
+ app_res = app_obj.request(x["request_data"])
774
+ app_req_result = case app_res
775
+ in [:success, result]
776
+ TonSdk::Client::AppRequestResult.new(
777
+ type_: :ok,
778
+ result: result
779
+ )
780
+ in [:error, text]
781
+ TonSdk::Client::AppRequestResult.new(
782
+ type_: :error,
783
+ text: text
784
+ )
785
+ end
786
+
787
+ params = TonSdk::Client::ParamsOfResolveAppRequest.new(
788
+ app_request_id: x["app_request_id"],
789
+ result: app_req_result
790
+ )
791
+ TonSdk::Client.resolve_app_request(ctx, params)
792
+ end
793
+
794
+ Interop::request_to_native_lib(
795
+ ctx,
796
+ "crypto.register_encryption_box",
797
+ nil,
798
+ client_callback: client_callback,
799
+ is_single_thread_only: false
800
+ ) do |resp|
801
+ if resp.success?
802
+ yield NativeLibResponsetResult.new(
803
+ result: RegisteredEncryptionBox.new(resp.result["handle"])
804
+ )
805
+ else
806
+ yield resp
807
+ end
808
+ end
809
+ end
810
+
811
+ def self.encryption_box_get_info(ctx, params)
812
+ Interop::request_to_native_lib(ctx, "crypto.encryption_box_get_info", params) do |resp|
813
+ if resp.success?
814
+ yield NativeLibResponsetResult.new(
815
+ result: ResultOfEncryptionBoxGetInfo.new(resp.result["info"])
816
+ )
817
+ else
818
+ yield resp
819
+ end
820
+ end
821
+ end
765
822
  end
766
823
  end
@@ -1,4 +1,4 @@
1
1
  module TonSdk
2
- VERSION = "1.16.1"
3
- NATIVE_SDK_VERSION = "1.16.1"
2
+ VERSION = "1.17.0"
3
+ NATIVE_SDK_VERSION = "1.17.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.16.1
4
+ version: 1.17.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-06-23 00:00:00.000000000 Z
11
+ date: 2021-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi