ton_sdk_client 1.19.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/ton_sdk_client/abi.rb +6 -2
- data/lib/ton_sdk_client/config.rb +4 -2
- data/lib/ton_sdk_client/crypto.rb +32 -0
- data/lib/ton_sdk_client/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8acd2e283e07e29ebb3ddf0d5517db4ff5417baa61d921c30bd190a12ba88e1a
|
4
|
+
data.tar.gz: a66af55f8cb5d31e578dc770944a1334fa0b90e5b8043a67a3347f529cd5f011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1851aa1391362eef92b4a646de3c0969ce6501010edd7ff66c266cc5f4d77f11fe11787c9ece962bd85bc6c31ea3f0b84861b33435137977d8cef1332145bdfd
|
7
|
+
data.tar.gz: 4cc944c9d95d9441447cd7e137fc055d3438a09c8851a3a5ba5f5c630007476d153f622acda647fd9dd3caf3cccf3f25e4744a73e7b2ae794b5d5724439b37b3
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
all the changes are always according to the ones of the main TON SDK library; and on top on that, there may be additional ones
|
4
4
|
|
5
|
+
1.20.x
|
6
|
+
-----
|
7
|
+
* NetworkConfig and AbiContract have been changed (not mentioned explicitly in Changelog of TON SDK )
|
8
|
+
|
5
9
|
|
6
10
|
1.15.x
|
7
11
|
-----
|
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.
|
4
|
+
[![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.22.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.22.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
|
|
data/lib/ton_sdk_client/abi.rb
CHANGED
@@ -549,10 +549,11 @@ module TonSdk
|
|
549
549
|
end
|
550
550
|
|
551
551
|
class AbiContract
|
552
|
-
attr_reader :abi_version, :header, :functions, :events, :data, :fields
|
552
|
+
attr_reader :abi_version, :version, :header, :functions, :events, :data, :fields
|
553
553
|
|
554
554
|
def initialize(
|
555
555
|
abi_version: nil,
|
556
|
+
version: nil,
|
556
557
|
header: [],
|
557
558
|
functions: [],
|
558
559
|
events: [],
|
@@ -560,6 +561,7 @@ module TonSdk
|
|
560
561
|
fields: []
|
561
562
|
)
|
562
563
|
@abi_version = abi_version
|
564
|
+
@version = version
|
563
565
|
@header = header
|
564
566
|
@functions = functions
|
565
567
|
@events = events
|
@@ -571,11 +573,12 @@ module TonSdk
|
|
571
573
|
{
|
572
574
|
abi_version: @abi_version,
|
573
575
|
:"ABI version" => @abi_version, #TODO
|
576
|
+
version: @version,
|
574
577
|
header: @header,
|
575
578
|
functions: @functions&.map(&:to_h),
|
576
579
|
events: @events&.map(&:to_h),
|
577
580
|
data: @data&.map(&:to_h),
|
578
|
-
fields: @fields
|
581
|
+
fields: @fields&.map(&:to_h)
|
579
582
|
}
|
580
583
|
end
|
581
584
|
|
@@ -608,6 +611,7 @@ module TonSdk
|
|
608
611
|
|
609
612
|
self.new(
|
610
613
|
abi_version: j["ABI version"],
|
614
|
+
version: j["version"],
|
611
615
|
header: j["header"],
|
612
616
|
functions: fn_s,
|
613
617
|
events: ev_s,
|
@@ -5,15 +5,16 @@ module TonSdk
|
|
5
5
|
:server_address,
|
6
6
|
:endpoints,
|
7
7
|
:network_retries_count,
|
8
|
+
:max_reconnect_timeout,
|
9
|
+
:reconnect_timeout,
|
8
10
|
:message_retries_count,
|
9
11
|
:message_processing_timeout,
|
10
12
|
:wait_for_timeout,
|
11
13
|
:out_of_sync_threshold,
|
12
|
-
:reconnect_timeout,
|
13
|
-
:max_reconnect_timeout,
|
14
14
|
:sending_endpoint_count,
|
15
15
|
:latency_detection_interval,
|
16
16
|
:max_latency,
|
17
|
+
:query_timeout,
|
17
18
|
:access_key,
|
18
19
|
keyword_init: true
|
19
20
|
) do
|
@@ -30,6 +31,7 @@ module TonSdk
|
|
30
31
|
sending_endpoint_count: 2,
|
31
32
|
latency_detection_interval: 60000,
|
32
33
|
max_latency: 60000,
|
34
|
+
query_timeout: 60000,
|
33
35
|
access_key: nil
|
34
36
|
)
|
35
37
|
super
|
@@ -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.22.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-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
|
-
rubygems_version: 3.2.
|
130
|
+
rubygems_version: 3.2.22
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: TON SDK client library, in Ruby and for Ruby
|