vchain_client 1.0.29 → 1.0.30
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/vchain_client.rb +11 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4284af3786825b9f4ba931166806dca6753abe37
|
|
4
|
+
data.tar.gz: fae59220bb596f6b395002f7c505c7a758d5ecfc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71770851b7c1544369155b078652ae5c836ec135a43fc1555d80ebffc84e360a977e07d73049ba7433adcb7fdd8a26bf30a329b3c3ca7e74689850d769a0b436
|
|
7
|
+
data.tar.gz: 8235ab8121cbe25477fb7e0e173896eb8ecfa7fead84c8fcd5dd4e6119d8ce413524386747f56c92e93ef7a8839a8951e3d3cbd95bd0199cadc4709c709cc000
|
data/lib/vchain_client.rb
CHANGED
|
@@ -26,7 +26,7 @@ module VChainClient
|
|
|
26
26
|
|
|
27
27
|
DATA_POINT_VERSION = "1"
|
|
28
28
|
|
|
29
|
-
CLIENT_LIB_VERSION = "1.0.
|
|
29
|
+
CLIENT_LIB_VERSION = "1.0.30"
|
|
30
30
|
|
|
31
31
|
@config = nil
|
|
32
32
|
@log = nil
|
|
@@ -1501,7 +1501,10 @@ module VChainClient
|
|
|
1501
1501
|
end
|
|
1502
1502
|
|
|
1503
1503
|
def self.generateBlockstackCommand(config)
|
|
1504
|
-
|
|
1504
|
+
|
|
1505
|
+
OpenSSL::PKey::EC.send(:alias_method, :private?, :private_key?)
|
|
1506
|
+
|
|
1507
|
+
blockstack_id = config["blockstack"]["client_id"]
|
|
1505
1508
|
|
|
1506
1509
|
#A1 pubkey
|
|
1507
1510
|
public_key_location = config["public_key_location"]
|
|
@@ -1511,7 +1514,7 @@ module VChainClient
|
|
|
1511
1514
|
pub_key_aligned = pub_key.gsub(/\n/, "")
|
|
1512
1515
|
|
|
1513
1516
|
#A2 vchain_client_id
|
|
1514
|
-
vchain_client_id = config["
|
|
1517
|
+
vchain_client_id = config["client_id"]
|
|
1515
1518
|
|
|
1516
1519
|
#A3 validator_sig
|
|
1517
1520
|
validator_sig = nil
|
|
@@ -1526,7 +1529,7 @@ module VChainClient
|
|
|
1526
1529
|
validator_blockstack_id = "vchain_core_01.id"
|
|
1527
1530
|
|
|
1528
1531
|
#A6 vchain_role
|
|
1529
|
-
vchain_role =
|
|
1532
|
+
vchain_role = "verificator"
|
|
1530
1533
|
|
|
1531
1534
|
#A7 sig_version
|
|
1532
1535
|
sig_version = "1"
|
|
@@ -1535,10 +1538,14 @@ module VChainClient
|
|
|
1535
1538
|
client_sig = nil
|
|
1536
1539
|
priv_key_path = config["private_key_location"]
|
|
1537
1540
|
priv_key = File.read(priv_key_path)
|
|
1541
|
+
|
|
1538
1542
|
whole_sign = vchain_client_id + vchain_role + blockstack_id + pub_key + sig_version
|
|
1543
|
+
|
|
1539
1544
|
ec = OpenSSL::PKey::EC.new(priv_key)
|
|
1540
1545
|
digest = OpenSSL::Digest::SHA256.new
|
|
1546
|
+
|
|
1541
1547
|
whole_signature = ec.sign(digest, whole_sign)
|
|
1548
|
+
|
|
1542
1549
|
client_sig = Base64.encode64(whole_signature).gsub(/\n/, "")
|
|
1543
1550
|
|
|
1544
1551
|
if validator_sig == nil
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vchain_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.30
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aleksandr Gorelik
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-03-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: log4r
|