tezos_client 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +59 -57
- data/lib/tezos_client/tools/convert_to_hash/big_map.rb +13 -6
- data/lib/tezos_client/tools/convert_to_hash/key.rb +11 -11
- data/lib/tezos_client/version.rb +1 -1
- data/tezos_client.gemspec +4 -4
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92a3126df9c366800e22df7dceda0ac25f30ea97d53dd98aa9497d208047d428
|
4
|
+
data.tar.gz: 8eebd23077fe8aa0d6f79ed4620c40554aad2ce1ca7d9d0ffc63fb0b963c2559
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1d9dcffed8b093bbac4973667441caf9c665c4228f8119f72fe7e3593bc50422d9b11198a907521e911401ca464d9dd0dff975be2d77dc57e7cd8ee5639d7be
|
7
|
+
data.tar.gz: 68ffadaed7188bf5927e844213134de291e55230817c6340c4492b37181dbc520b460522a938faafa6a6eeeee759446bc858e19ffe4011b040eeddbae24b2db6
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tezos_client (1.
|
4
|
+
tezos_client (1.4.1)
|
5
5
|
active_interaction (>= 3.8)
|
6
6
|
activesupport (~> 6.0.0)
|
7
7
|
base58 (~> 0.2.3)
|
@@ -14,24 +14,24 @@ PATH
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
actionpack (6.0.3.
|
18
|
-
actionview (= 6.0.3.
|
19
|
-
activesupport (= 6.0.3.
|
17
|
+
actionpack (6.0.3.7)
|
18
|
+
actionview (= 6.0.3.7)
|
19
|
+
activesupport (= 6.0.3.7)
|
20
20
|
rack (~> 2.0, >= 2.0.8)
|
21
21
|
rack-test (>= 0.6.3)
|
22
22
|
rails-dom-testing (~> 2.0)
|
23
23
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
24
|
-
actionview (6.0.3.
|
25
|
-
activesupport (= 6.0.3.
|
24
|
+
actionview (6.0.3.7)
|
25
|
+
activesupport (= 6.0.3.7)
|
26
26
|
builder (~> 3.1)
|
27
27
|
erubi (~> 1.4)
|
28
28
|
rails-dom-testing (~> 2.0)
|
29
29
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
30
|
-
active_interaction (4.0.
|
30
|
+
active_interaction (4.0.1)
|
31
31
|
activemodel (>= 5, < 7)
|
32
|
-
activemodel (6.0.3.
|
33
|
-
activesupport (= 6.0.3.
|
34
|
-
activesupport (6.0.3.
|
32
|
+
activemodel (6.0.3.7)
|
33
|
+
activesupport (= 6.0.3.7)
|
34
|
+
activesupport (6.0.3.7)
|
35
35
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
36
36
|
i18n (>= 0.7, < 2)
|
37
37
|
minitest (~> 5.1)
|
@@ -52,37 +52,35 @@ GEM
|
|
52
52
|
domain_name (0.5.20190701)
|
53
53
|
unf (>= 0.0.5, < 1.0.0)
|
54
54
|
erubi (1.10.0)
|
55
|
-
ffi (1.
|
55
|
+
ffi (1.15.1)
|
56
56
|
hashdiff (1.0.1)
|
57
57
|
http-cookie (1.0.3)
|
58
58
|
domain_name (~> 0.5)
|
59
59
|
httparty (0.17.3)
|
60
60
|
mime-types (~> 3.0)
|
61
61
|
multi_xml (>= 0.5.2)
|
62
|
-
i18n (1.8.
|
62
|
+
i18n (1.8.10)
|
63
63
|
concurrent-ruby (~> 1.0)
|
64
|
-
loofah (2.9.
|
64
|
+
loofah (2.9.1)
|
65
65
|
crass (~> 1.0.2)
|
66
66
|
nokogiri (>= 1.5.9)
|
67
|
-
method_source (0.
|
67
|
+
method_source (1.0.0)
|
68
68
|
mime-types (3.3.1)
|
69
69
|
mime-types-data (~> 3.2015)
|
70
70
|
mime-types-data (3.2021.0225)
|
71
|
-
mini_portile2 (2.5.0)
|
72
71
|
minitest (5.14.4)
|
73
72
|
money-tree (0.10.0)
|
74
73
|
ffi
|
75
74
|
multi_xml (0.6.0)
|
76
75
|
netrc (0.11.0)
|
77
|
-
nokogiri (1.11.
|
78
|
-
mini_portile2 (~> 2.5.0)
|
76
|
+
nokogiri (1.11.6-x86_64-darwin)
|
79
77
|
racc (~> 1.4)
|
80
78
|
parallel (1.20.1)
|
81
|
-
parser (3.0.
|
79
|
+
parser (3.0.1.1)
|
82
80
|
ast (~> 2.4.1)
|
83
|
-
pry (0.
|
84
|
-
coderay (~> 1.1
|
85
|
-
method_source (~>
|
81
|
+
pry (0.14.1)
|
82
|
+
coderay (~> 1.1)
|
83
|
+
method_source (~> 1.0)
|
86
84
|
public_suffix (4.0.6)
|
87
85
|
racc (1.5.2)
|
88
86
|
rack (2.2.3)
|
@@ -93,14 +91,14 @@ GEM
|
|
93
91
|
nokogiri (>= 1.6)
|
94
92
|
rails-html-sanitizer (1.3.0)
|
95
93
|
loofah (~> 2.3)
|
96
|
-
railties (6.0.3.
|
97
|
-
actionpack (= 6.0.3.
|
98
|
-
activesupport (= 6.0.3.
|
94
|
+
railties (6.0.3.7)
|
95
|
+
actionpack (= 6.0.3.7)
|
96
|
+
activesupport (= 6.0.3.7)
|
99
97
|
method_source
|
100
98
|
rake (>= 0.8.7)
|
101
99
|
thor (>= 0.20.3, < 2.0)
|
102
100
|
rainbow (3.0.0)
|
103
|
-
rake (13.0.
|
101
|
+
rake (13.0.3)
|
104
102
|
rbnacl (5.0.0)
|
105
103
|
ffi
|
106
104
|
regexp_parser (2.1.1)
|
@@ -108,42 +106,46 @@ GEM
|
|
108
106
|
http-cookie (>= 1.0.2, < 2.0)
|
109
107
|
mime-types (>= 1.16, < 4.0)
|
110
108
|
netrc (~> 0.8)
|
111
|
-
rexml (3.2.
|
112
|
-
rspec (3.
|
113
|
-
rspec-core (~> 3.
|
114
|
-
rspec-expectations (~> 3.
|
115
|
-
rspec-mocks (~> 3.
|
116
|
-
rspec-core (3.
|
117
|
-
rspec-support (~> 3.
|
118
|
-
rspec-expectations (3.
|
109
|
+
rexml (3.2.5)
|
110
|
+
rspec (3.10.0)
|
111
|
+
rspec-core (~> 3.10.0)
|
112
|
+
rspec-expectations (~> 3.10.0)
|
113
|
+
rspec-mocks (~> 3.10.0)
|
114
|
+
rspec-core (3.10.1)
|
115
|
+
rspec-support (~> 3.10.0)
|
116
|
+
rspec-expectations (3.10.1)
|
119
117
|
diff-lcs (>= 1.2.0, < 2.0)
|
120
|
-
rspec-support (~> 3.
|
121
|
-
rspec-mocks (3.
|
118
|
+
rspec-support (~> 3.10.0)
|
119
|
+
rspec-mocks (3.10.2)
|
122
120
|
diff-lcs (>= 1.2.0, < 2.0)
|
123
|
-
rspec-support (~> 3.
|
124
|
-
rspec-support (3.
|
125
|
-
rubocop (
|
121
|
+
rspec-support (~> 3.10.0)
|
122
|
+
rspec-support (3.10.2)
|
123
|
+
rubocop (1.15.0)
|
126
124
|
parallel (~> 1.10)
|
127
|
-
parser (>=
|
125
|
+
parser (>= 3.0.0.0)
|
128
126
|
rainbow (>= 2.2.2, < 4.0)
|
129
|
-
regexp_parser (>= 1.8)
|
127
|
+
regexp_parser (>= 1.8, < 3.0)
|
130
128
|
rexml
|
131
|
-
rubocop-ast (>=
|
129
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
132
130
|
ruby-progressbar (~> 1.7)
|
133
|
-
unicode-display_width (>= 1.4.0, <
|
134
|
-
rubocop-ast (1.
|
135
|
-
parser (>=
|
136
|
-
rubocop-
|
137
|
-
rubocop (>= 0.
|
131
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
132
|
+
rubocop-ast (1.6.0)
|
133
|
+
parser (>= 3.0.1.1)
|
134
|
+
rubocop-packaging (0.5.1)
|
135
|
+
rubocop (>= 0.89, < 2.0)
|
136
|
+
rubocop-performance (1.11.3)
|
137
|
+
rubocop (>= 1.7.0, < 2.0)
|
138
138
|
rubocop-ast (>= 0.4.0)
|
139
|
-
rubocop-rails (2.
|
139
|
+
rubocop-rails (2.10.1)
|
140
140
|
activesupport (>= 4.2.0)
|
141
141
|
rack (>= 1.1)
|
142
|
-
rubocop (>=
|
143
|
-
rubocop-rails_config (
|
144
|
-
railties (>=
|
145
|
-
rubocop (
|
146
|
-
rubocop-
|
142
|
+
rubocop (>= 1.7.0, < 2.0)
|
143
|
+
rubocop-rails_config (1.5.3)
|
144
|
+
railties (>= 5.0)
|
145
|
+
rubocop (>= 1.13)
|
146
|
+
rubocop-ast (>= 1.0.1)
|
147
|
+
rubocop-packaging (~> 0.5)
|
148
|
+
rubocop-performance (~> 1.11)
|
147
149
|
rubocop-rails (~> 2.0)
|
148
150
|
ruby-progressbar (1.11.0)
|
149
151
|
thor (1.1.0)
|
@@ -153,19 +155,19 @@ GEM
|
|
153
155
|
unf (0.1.4)
|
154
156
|
unf_ext
|
155
157
|
unf_ext (0.0.7.7)
|
156
|
-
unicode-display_width (
|
158
|
+
unicode-display_width (2.0.0)
|
157
159
|
vcr (4.0.0)
|
158
|
-
webmock (3.
|
160
|
+
webmock (3.13.0)
|
159
161
|
addressable (>= 2.3.6)
|
160
162
|
crack (>= 0.3.2)
|
161
163
|
hashdiff (>= 0.4.0, < 2.0.0)
|
162
164
|
zeitwerk (2.4.2)
|
163
165
|
|
164
166
|
PLATFORMS
|
165
|
-
|
167
|
+
x86_64-darwin-19
|
166
168
|
|
167
169
|
DEPENDENCIES
|
168
|
-
bundler (~> 1
|
170
|
+
bundler (~> 2.1)
|
169
171
|
pry
|
170
172
|
rake (~> 13.0)
|
171
173
|
rspec (~> 3.0)
|
@@ -175,4 +177,4 @@ DEPENDENCIES
|
|
175
177
|
webmock
|
176
178
|
|
177
179
|
BUNDLED WITH
|
178
|
-
|
180
|
+
2.2.18
|
@@ -7,12 +7,19 @@ class TezosClient
|
|
7
7
|
class ConvertToHash < ActiveInteraction::Base
|
8
8
|
class BigMap < Base
|
9
9
|
def decode
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
if data.is_a? Hash
|
11
|
+
::TezosClient::BigMap.new(
|
12
|
+
var_name,
|
13
|
+
data[:int],
|
14
|
+
type[:args].second,
|
15
|
+
type[:args].first
|
16
|
+
)
|
17
|
+
else
|
18
|
+
TezosClient::Tools::ConvertToHash::Map.new(
|
19
|
+
data: data,
|
20
|
+
type: type
|
21
|
+
).value[var_name]
|
22
|
+
end
|
16
23
|
end
|
17
24
|
end
|
18
25
|
end
|
@@ -7,20 +7,20 @@ class TezosClient
|
|
7
7
|
include TezosClient::Crypto
|
8
8
|
|
9
9
|
def decode
|
10
|
-
if
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
encode_tz(:p2pk, data[:bytes][2..-1])
|
17
|
-
else
|
18
|
-
data[:bytes]
|
19
|
-
end
|
10
|
+
if tmp_data.start_with?("00")
|
11
|
+
encode_tz(:edpk, tmp_data[2..-1])
|
12
|
+
elsif tmp_data.start_with?("01")
|
13
|
+
encode_tz(:sppk, tmp_data[2..-1])
|
14
|
+
elsif tmp_data.start_with?("02")
|
15
|
+
encode_tz(:p2pk, tmp_data[2..-1])
|
20
16
|
else
|
21
|
-
|
17
|
+
tmp_data
|
22
18
|
end
|
23
19
|
end
|
20
|
+
|
21
|
+
def tmp_data
|
22
|
+
@tmp_data ||= data[:bytes] || data[:string]
|
23
|
+
end
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/tezos_client/version.rb
CHANGED
data/tezos_client.gemspec
CHANGED
@@ -7,12 +7,12 @@ require "tezos_client/version"
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = "tezos_client"
|
9
9
|
spec.version = TezosClient::VERSION
|
10
|
-
spec.authors = ["Pierre Michard"]
|
11
|
-
spec.email = ["pierre@moneytrack.io"]
|
10
|
+
spec.authors = ["Pierre Michard", "Sébastien Lauret", "Othmane El Kesri"]
|
11
|
+
spec.email = ["pierre@moneytrack.io", "sebastien@moneytrack.io", "othmane@moneytrack.io"]
|
12
12
|
|
13
13
|
spec.summary = "Wrapper to the tezos client."
|
14
14
|
spec.description = ""
|
15
|
-
spec.homepage = "
|
15
|
+
spec.homepage = "https://moneytrack.io"
|
16
16
|
spec.license = "MIT"
|
17
17
|
|
18
18
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
34
34
|
spec.require_paths = ["lib"]
|
35
35
|
|
36
|
-
spec.add_development_dependency "bundler", "~> 1
|
36
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
37
37
|
spec.add_development_dependency "rake", "~> 13.0"
|
38
38
|
spec.add_development_dependency "rspec", "~> 3.0"
|
39
39
|
spec.add_development_dependency "rubocop-rails_config"
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tezos_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Michard
|
8
|
+
- Sébastien Lauret
|
9
|
+
- Othmane El Kesri
|
8
10
|
autorequire:
|
9
11
|
bindir: exe
|
10
12
|
cert_chain: []
|
11
|
-
date: 2021-
|
13
|
+
date: 2021-05-31 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: bundler
|
@@ -16,14 +18,14 @@ dependencies:
|
|
16
18
|
requirements:
|
17
19
|
- - "~>"
|
18
20
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
21
|
+
version: '2.1'
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
23
25
|
requirements:
|
24
26
|
- - "~>"
|
25
27
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
28
|
+
version: '2.1'
|
27
29
|
- !ruby/object:Gem::Dependency
|
28
30
|
name: rake
|
29
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,6 +225,8 @@ dependencies:
|
|
223
225
|
description: ''
|
224
226
|
email:
|
225
227
|
- pierre@moneytrack.io
|
228
|
+
- sebastien@moneytrack.io
|
229
|
+
- othmane@moneytrack.io
|
226
230
|
executables: []
|
227
231
|
extensions: []
|
228
232
|
extra_rdoc_files: []
|
@@ -308,7 +312,7 @@ files:
|
|
308
312
|
- lib/tezos_client/version.rb
|
309
313
|
- tezos_client.gemspec
|
310
314
|
- travis-scripts/prepare-ubuntu.sh
|
311
|
-
homepage:
|
315
|
+
homepage: https://moneytrack.io
|
312
316
|
licenses:
|
313
317
|
- MIT
|
314
318
|
metadata:
|