ton-sdk-ruby 0.0.9 → 0.0.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea2f0bb2da2ec2d31058d8144b95bc892fc747c7338aa6e5a10665f148fce5b5
|
4
|
+
data.tar.gz: f41db82f01a2ee7871f01cdabcfc77962fe0ce990d41b8cc06f543332e740a05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8003a77b05ca6471fd3e60389eea930a92952ca0ad5c664530403a53f84da50e84d894c0d1d4f68b1692eb0a6a13f08a6c49c4c34c3cdcf3ae142a6e4cf0f9b
|
7
|
+
data.tar.gz: b93cd3a1606aa745f96098ad9afc85efd00133d459d17df192f055386014a8f015f1502a794d35ff798a3ad98facf1316ff0b9ae2e24c5b2cba1502f60764332
|
@@ -229,6 +229,7 @@ module TonSdkRuby
|
|
229
229
|
# Calculate depth descriptor
|
230
230
|
def self.get_depth_descriptor(depth)
|
231
231
|
descriptor = [(depth / 256).floor, depth % 256].pack('C*')
|
232
|
+
byebug
|
232
233
|
bytes_to_bits(descriptor)
|
233
234
|
end
|
234
235
|
|
@@ -347,16 +348,20 @@ module TonSdkRuby
|
|
347
348
|
depth_repr.concat(Cell.get_depth_descriptor(ref_depth))
|
348
349
|
hash_repr.concat(hex_to_bits(ref_hash))
|
349
350
|
depth = [depth, ref_depth].max
|
351
|
+
byebug
|
350
352
|
end
|
351
353
|
representation = refs_descriptor + bits_descriptor + data + depth_repr + hash_repr
|
352
354
|
|
355
|
+
byebug
|
353
356
|
if @refs.length.positive? && depth >= 1024
|
354
357
|
raise 'Cell depth can\'t be more than 1024'
|
355
358
|
end
|
356
359
|
dest = hash_index - hash_index_offset
|
357
360
|
|
358
361
|
@depths[dest] = depth + (has_refs ? 1 : 0)
|
362
|
+
|
359
363
|
@hashes[dest] = sha256(bits_to_bytes(representation))
|
364
|
+
|
360
365
|
hash_index += 1
|
361
366
|
end
|
362
367
|
end
|
@@ -98,7 +98,7 @@ module TonSdkRuby
|
|
98
98
|
"#{workchain}:#{bytes_to_hex(hash)}"
|
99
99
|
else
|
100
100
|
tag = Address.encode_tag(bounceable: bounceable, test_only: test_only)
|
101
|
-
address = [tag, workchain] + hash
|
101
|
+
address = [tag, [workchain].pack("c*").unpack("C*").last] + hash
|
102
102
|
checksum = crc16_bytes_be(address)
|
103
103
|
base64 = bytes_to_base64(address + checksum)
|
104
104
|
|
data/lib/ton-sdk-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ton-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nerzh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ed25519
|