ton_sdk_client 1.20.0 → 1.21.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: b2505e8728fde891a77e7ba520d4d465757220891c03731b685b632963508154
4
- data.tar.gz: 29dc859c271d8534e04d9de0464d78b2d773db8dce304fdc1ab56a59428644e4
3
+ metadata.gz: 6256a1ec816fa6bb0473e20cd8b6d96ff2748c73073e23a1a68da801d57459fe
4
+ data.tar.gz: 03a2a5a3dc2c0553fa183b8affc1ffa304030967493fa12f4f4efe5d5b7e7752
5
5
  SHA512:
6
- metadata.gz: 9183bc4f29e8a6b17cd9985ffb7dbab5508b0a5ca8a46afc7d049e602cc20c51d5d2bc39e39ef5b262a1d38946e12bd7ca78945db4cb1bc7fc46e4ff8a26d6b5
7
- data.tar.gz: b7421f58b1a8efa63fe36bba7e5fd55cdfd3e6b5171575c81136f4a506678df09f1aef4e025f3848a8ccd5d6927f417affd8ac03b26de9ce874d96701d885079
6
+ metadata.gz: f996f811660b6cdfb4ee248c72662729a3cdf681a3552718a73d902c3497176662bb12b2ebd2e547b9d6f6db9c08e38c76ecbe025e386c8425e519597726ea7d
7
+ data.tar.gz: 9f065d85fe4bd9125a07b0f9ee5a324c9a463d34b1442bc9de722bd452a5dd79055a0b2899d9068998aa691f84dd18327addd1bd353b8c1154abbd9544cc4d14
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.20.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.20.0)
4
+ [![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.21.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.21.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
 
@@ -25,6 +25,13 @@ module TonSdk
25
25
  MNEMONICFROMENTROPY_FAILED = 120
26
26
  SIGNING_BOX_NOT_REGISTERED = 121
27
27
  INVALID_SIGNATURE = 122
28
+ ENCRYPTION_BOX_NOT_REGISTERED = 123
29
+ INVALID_IV_SIZE = 124
30
+ UNSUPPORTED_CIPHER_MODE = 125
31
+ CANNOT_CREATE_CIPHER = 126
32
+ ENCRYPT_DATA_ERROR = 127
33
+ DECRYPT_DATA_ERROR = 128
34
+ IV_REQUIRED = 129
28
35
  end
29
36
 
30
37
  ParamsOfFactorize = Struct.new(:composite)
@@ -269,6 +276,19 @@ module TonSdk
269
276
  ParamsOfEncryptionBoxGetInfo = Struct.new(:encryption_box)
270
277
  ResultOfEncryptionBoxGetInfo = Struct.new(:info)
271
278
  RegisteredEncryptionBox = Struct.new(:handle)
279
+ ParamsOfCreateEncryptionBox = Struct.new(:algorithm)
280
+
281
+ class EncryptionAlgorithm
282
+ private_class_method :new
283
+
284
+ attr_reader :type_, :aes_params
285
+
286
+ def self.new_with_type_aes(aes_params:)
287
+ @type_ = :aes
288
+ @aes_params = aes_params
289
+ end
290
+ end
291
+
272
292
 
273
293
 
274
294
  #
@@ -819,5 +839,17 @@ module TonSdk
819
839
  end
820
840
  end
821
841
  end
842
+
843
+ def self.create_encryption_box(ctx, params)
844
+ Interop::request_to_native_lib(ctx, "crypto.create_encryption_box", params) do |resp|
845
+ if resp.success?
846
+ yield NativeLibResponsetResult.new(
847
+ result: RegisteredEncryptionBox.new(resp.result["handle"])
848
+ )
849
+ else
850
+ yield resp
851
+ end
852
+ end
853
+ end
822
854
  end
823
855
  end
@@ -1,4 +1,4 @@
1
1
  module TonSdk
2
- VERSION = "1.20.0"
3
- NATIVE_SDK_VERSION = "1.20.0"
2
+ VERSION = "1.21.0"
3
+ NATIVE_SDK_VERSION = "1.21.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.20.0
4
+ version: 1.21.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-07-22 00:00:00.000000000 Z
11
+ date: 2021-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi