eth 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39ea19eb79ae52a313fb63ce5dd5f9df09dd6cd6
4
- data.tar.gz: e418f5f13def9424252dfd8804f235fa94c395f0
3
+ metadata.gz: 1aa11c555d957c6c8c55d2ea7268609d3f9736f3
4
+ data.tar.gz: 73b6328615458f16f7bbd5a5bcaf6720ce5c9178
5
5
  SHA512:
6
- metadata.gz: 2f2b7e85c649b70b6e7c99b37684e94ccf85543ce8d43e5ee871547aec67da7dba5716fb475402482864bc2240ae630eccca6804accbfb7468d5022d2d8ff240
7
- data.tar.gz: 474ecae6e27db5623a1f7da63d4ab770660551582829ba35213e4b986d27bcb0238291ce2345175f6fb9779f088866b5c6a80101fe518b651ed57b1e22bb2a8a
6
+ metadata.gz: f199ecb42d65c41df74875767570780f2d92d248fa8c8352203744d8337401883ecb05cad4d09d8886412b9672beb2a320af4adf8c5c83b9a5cc74dc6dc56fb1
7
+ data.tar.gz: a90b8616b9ee5812a165ba685e24b8e9e1bfccc724cfb2c6ea5dfab9e9075b0e870a593a5aa0e33e704a61606cd8d8f8df48ece2ac8eac01acf22291a9c681fc
data/README.md CHANGED
@@ -52,7 +52,7 @@ Then sign the transaction:
52
52
  ```ruby
53
53
  tx.sign key
54
54
  ```
55
- Get the raw transaction with `tx.hex`, and broadcast it through any Ethereum node.
55
+ Get the raw transaction with `tx.hex`, and broadcast it through any Ethereum node. Or, just get the TXID with `tx.hash`.
56
56
 
57
57
 
58
58
  ## Contributing
@@ -41,7 +41,7 @@ module Eth
41
41
  end
42
42
 
43
43
  def hex
44
- bin_to_hex encoded
44
+ Utils.bin_to_hex encoded
45
45
  end
46
46
 
47
47
  def sign(key)
@@ -70,6 +70,10 @@ module Eth
70
70
  end.join if [v, r, s].all?
71
71
  end
72
72
 
73
+ def hash
74
+ Utils.bin_to_hex Utils.keccak256_rlp(self)
75
+ end
76
+
73
77
 
74
78
  private
75
79
 
@@ -1,3 +1,3 @@
1
1
  module Eth
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Ellis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-17 00:00:00.000000000 Z
11
+ date: 2016-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ethereum-base
@@ -166,8 +166,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  requirements: []
168
168
  rubyforge_project:
169
- rubygems_version: 2.5.1
169
+ rubygems_version: 2.4.5.1
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: Simple API to sign Ethereum transactions.
173
173
  test_files: []
174
+ has_rdoc: