ethereum 0.4.97 → 0.4.98

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: 8e13e5f377c9928e972270b0dfc7847fb4008712
4
- data.tar.gz: d2ac0d7b4d981b02c6b830ccac5e65eaaf714a58
3
+ metadata.gz: 84008eb04c7583cf3af957baeae6e90c0f2562f5
4
+ data.tar.gz: 95ffa5112b13ec411aca38426ded830aa011b48c
5
5
  SHA512:
6
- metadata.gz: 6558f7e08e2fa3117b96c90faa3614f753bbf8e50def818189ff8e2fb5ba095c3664c09b8fb33f3aaf8492171d1e8af815a281221f41ad54fa128ac154b0d46d
7
- data.tar.gz: 4cc8725c1fcf88e4505771abbe5cb5e2ddad4b90c280c684cd2f25aa0425e60303963d073f7d7f665dce4221ec7b54f7ee01363f71694b218805d1e4ad356b0e
6
+ metadata.gz: 888094de234a1c170a178f4df60245d42d0690f157aa6c43028b4cc1abea2fd7679f211629d5be49decc71a5acbd2c2c262a171b363e3f3d89e3fb6a60cc85ec
7
+ data.tar.gz: 88b31b3785f1e8fff7d2d420196c5cfba1c953b61340870509da4dd92429bdedb3670b2c4c7cec573a746c0f9a3afc60717cb5aa00c19e2224536bafc161dec8
@@ -1,12 +1,13 @@
1
1
  require 'net/http'
2
2
  module Ethereum
3
3
  class HttpClient < Client
4
- attr_accessor :command, :id, :host, :port, :batch, :converted_transactions, :uri
4
+ attr_accessor :command, :id, :host, :port, :batch, :converted_transactions, :uri, :ssl
5
5
 
6
6
  def initialize(host, port, ssl = false)
7
7
  @host = host
8
8
  @port = port
9
9
  @id = 1
10
+ @ssl = ssl
10
11
  if ssl
11
12
  @uri = URI("https://#{@host}:#{@port}")
12
13
  else
@@ -21,6 +22,9 @@ module Ethereum
21
22
  command = rpc_command
22
23
  payload = {jsonrpc: "2.0", method: command, params: args, id: get_id}
23
24
  http = ::Net::HTTP.new(@host, @port)
25
+ if @ssl
26
+ http.use_ssl = true
27
+ end
24
28
  header = {'Content-Type' => 'application/json'}
25
29
  request = ::Net::HTTP::Post.new(uri, header)
26
30
  request.body = payload.to_json
@@ -1,3 +1,3 @@
1
1
  module Ethereum
2
- VERSION = "0.4.97"
2
+ VERSION = "0.4.98"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethereum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.97
4
+ version: 0.4.98
5
5
  platform: ruby
6
6
  authors:
7
7
  - DigixGlobal Pte Ltd (https://dgx.io)