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 +4 -4
- data/README.md +1 -1
- data/lib/ton_sdk_client/crypto.rb +32 -0
- data/lib/ton_sdk_client/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6256a1ec816fa6bb0473e20cd8b6d96ff2748c73073e23a1a68da801d57459fe
|
4
|
+
data.tar.gz: 03a2a5a3dc2c0553fa183b8affc1ffa304030967493fa12f4f4efe5d5b7e7752
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
[](https://badge.fury.io/rb/ton_sdk_client)
|
4
|
-
[](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
|
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.
|
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-
|
11
|
+
date: 2021-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|