digix-eth 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eth/rpc_signer.rb +3 -3
- data/lib/eth/signature.rb +1 -1
- data/lib/eth/version.rb +1 -1
- 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: 5be7dffc1a811fbdc04ef6f2d3b7225846dc8878
|
4
|
+
data.tar.gz: 9a65fa1b1600a634f472b9e3352746cb0caff1b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c62931153bfd8e1f287a0534ff5144bb418ff15d0095e6f753bf652aaeb66fb9e3848a0ecadc941bc7c8cf22a11cacae3922811e6ec24f47c47d3d7c935aaf4e
|
7
|
+
data.tar.gz: fc12cc2637cc2ba44f10a94149101644d002baf6851021aacd9d80d23347a005e18cdd447d64c758f0b2f712cfcc98d4ff25a53b02593542ea22d622872355fc
|
data/lib/eth/rpc_signer.rb
CHANGED
@@ -10,9 +10,9 @@ module Eth
|
|
10
10
|
def sign_message(message)
|
11
11
|
payload = Eth::Signature.new(message)
|
12
12
|
payload.signer = @key.address
|
13
|
-
payload.
|
14
|
-
payload.hash = Eth::Utils.keccak256(payload.
|
15
|
-
payload.signature = @key.
|
13
|
+
payload.padded_message = Eth::Utils.prefix_message(message)
|
14
|
+
payload.hash = Eth::Utils.keccak256(payload.padded_message)
|
15
|
+
payload.signature = @key.sign_hash(payload.hash)
|
16
16
|
payload.v, payload.r, payload.s = Eth::Utils.v_r_s_for(payload.signature)
|
17
17
|
payload.rpc_signature = Eth::Utils.zpad_int(payload.r, 32) + Eth::Utils.zpad_int(payload.s, 32) + [(payload.v - 27)].pack('C')
|
18
18
|
return payload
|
data/lib/eth/signature.rb
CHANGED
data/lib/eth/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: digix-eth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Ellis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-07-
|
12
|
+
date: 2017-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: digest-sha3
|