tezos_client 0.3.8 → 0.3.9
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/Gemfile.lock +2 -2
- data/lib/tezos_client/crypto.rb +13 -0
- data/lib/tezos_client/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: 6bf4544c54f90bdbafd3fed0e9ba139470ffc59c0925de1d388a290a40e15a90
|
|
4
|
+
data.tar.gz: 42ad8f061e34b90ef5c646b235794945456dc17b81b2e4914513f1a53fad250d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dcd4257f68999a0ef7a88fdebdcb9b65d19704f963dba7723799e89e90567d513f479f10f5f3e2df4397231c3606e176c3ea07b6feec14dec3affda0c8cea343
|
|
7
|
+
data.tar.gz: e4afe38e6103582396862a447458fea502063fe8ef111ba5fd7b34fca9b2900b3764707a4be1943d204911224b0b5cab231de42399f10d67a9c193ea271a52b4
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
tezos_client (0.3.
|
|
4
|
+
tezos_client (0.3.9)
|
|
5
5
|
activesupport (~> 5.2.0)
|
|
6
6
|
base58 (~> 0.2.3)
|
|
7
7
|
bip_mnemonic (~> 0.0.2)
|
|
@@ -49,7 +49,7 @@ GEM
|
|
|
49
49
|
hashdiff (0.3.8)
|
|
50
50
|
http-cookie (1.0.3)
|
|
51
51
|
domain_name (~> 0.5)
|
|
52
|
-
httparty (0.16.
|
|
52
|
+
httparty (0.16.4)
|
|
53
53
|
mime-types (~> 3.0)
|
|
54
54
|
multi_xml (>= 0.5.2)
|
|
55
55
|
i18n (1.5.1)
|
data/lib/tezos_client/crypto.rb
CHANGED
|
@@ -124,6 +124,10 @@ class TezosClient
|
|
|
124
124
|
}
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
+
def generate_mnemonic
|
|
128
|
+
BipMnemonic.to_mnemonic(nil)
|
|
129
|
+
end
|
|
130
|
+
|
|
127
131
|
def signing_key(secret_key)
|
|
128
132
|
secret_key = decode_tz(secret_key) do |type, _key|
|
|
129
133
|
raise "invalid secret key: #{secret_key} " unless type == :edsk2
|
|
@@ -177,6 +181,15 @@ class TezosClient
|
|
|
177
181
|
end
|
|
178
182
|
end
|
|
179
183
|
|
|
184
|
+
def decode_account_wallet(wallet)
|
|
185
|
+
wallet_config = JSON.load(wallet).with_indifferent_access
|
|
186
|
+
|
|
187
|
+
mnemonic = wallet_config[:mnemonic].join(" ")
|
|
188
|
+
password = "#{wallet_config[:email]}#{wallet_config[:password]}"
|
|
189
|
+
key = generate_key(mnemonic: mnemonic, password: password)
|
|
190
|
+
key.merge(activation_secret: wallet_config[:secret])
|
|
191
|
+
end
|
|
192
|
+
|
|
180
193
|
private
|
|
181
194
|
def generate_signing_key(mnemonic: nil, password: nil, wallet_seed: nil, path: nil)
|
|
182
195
|
if mnemonic
|
data/lib/tezos_client/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tezos_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pierre Michard
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-03-
|
|
11
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|