ton-sdk-ruby 0.0.8 → 0.0.10
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/lib/ton-sdk-ruby/types/address.rb +3 -5
- data/lib/ton-sdk-ruby/utils/helpers.rb +2 -0
- data/lib/ton-sdk-ruby/version.rb +1 -1
- 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: 68504e10900a26ccd5a6c524e2eac0cb454bd1f34c108f759697fcd84b357799
|
4
|
+
data.tar.gz: 6e77df109856cf14a81f2495dceb003ee6db0a95b3b5bce0159be8e6fb2a9fd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6765370f7db2173007951e2e95f7095bfe42060a559ca20c586a74c278e734cce35373b49de7888a847496f6bdf0ecfdd40110dc0e7a9f13e8b123f37d312eae
|
7
|
+
data.tar.gz: 477c4277c23f4f4540f792e619ae59335c6f5e022ffcc02016b32c3ad9b629bf262fd443feb154a347f35da517436f1e2f882b5b06be12208852f8d9ae4c68a5
|
@@ -24,7 +24,6 @@ module TonSdkRuby
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def initialize(address, options = {})
|
27
|
-
options = {workchain: 0, bounceable: false, test_only: false}.merge(options)
|
28
27
|
is_address = Address.is_address?(address)
|
29
28
|
is_encoded = Address.is_encoded?(address)
|
30
29
|
is_raw = Address.is_raw?(address)
|
@@ -99,7 +98,7 @@ module TonSdkRuby
|
|
99
98
|
"#{workchain}:#{bytes_to_hex(hash)}"
|
100
99
|
else
|
101
100
|
tag = Address.encode_tag(bounceable: bounceable, test_only: test_only)
|
102
|
-
address = [tag, workchain] + hash
|
101
|
+
address = [tag, [workchain].pack("c*").unpack("C*").last] + hash
|
103
102
|
checksum = crc16_bytes_be(address)
|
104
103
|
base64 = bytes_to_base64(address + checksum)
|
105
104
|
|
@@ -139,9 +138,8 @@ module TonSdkRuby
|
|
139
138
|
|
140
139
|
buffer = address.shift(2).pack('C2')
|
141
140
|
|
142
|
-
|
143
|
-
|
144
|
-
workchain = tag_and_wc.last.to_i
|
141
|
+
tag = buffer.unpack('C*').first
|
142
|
+
workchain = buffer.unpack('c*').last
|
145
143
|
|
146
144
|
hash = address.shift(32)
|
147
145
|
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nerzh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ed25519
|