cardano_wallet 0.1.9 → 0.2.0

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
  SHA256:
3
- metadata.gz: aac2a09241bb9761fcd14be27d36baf749e7bce4211f0b153e01f086412fc7c7
4
- data.tar.gz: 3a4accd8dc3e07e157cea62b640f934c703ccbf566a83ba3cd8012d017ed048a
3
+ metadata.gz: 00a386b2276f8b8373cd9a89cebdba30a5f151c2b32cee0ae3d8915a6daee980
4
+ data.tar.gz: 10094b3fb16e9c9e71e61409a314b06d94dd140c01f79641e8bce9dafa21fccc
5
5
  SHA512:
6
- metadata.gz: d60a9175cac06389aa7ba70531a2b96be7611beff90eb28fc9a36f44e91e748ee6beee8d50ee9b9efc43340b101ee459752ef0e89c41d387558e3133810bb496
7
- data.tar.gz: ce86f1f1c8cd233785cf12be8c90924ba2af63c6579590deed845e53fd5cd0dc97dc66b043c62392b962f2f136de6a324a6a83bb9866af835c3963f6d65df454
6
+ metadata.gz: ff0b9ac1b5071acee4be8ad9830adbe082fb01587e4593fa868ed7dd47552609e04ed3a382a47abedba658340a4cad4e25506ad9f0db73e6b6f7f35fe23621a8
7
+ data.tar.gz: 19e1aad7916ec508822a48e1ac38996236874236c8d7849754fed3922444bae0396c955d62a4a06a11e4aafefbeb33b494035c5e9026aefa36a5885a7d3495ca
@@ -25,10 +25,10 @@ jobs:
25
25
  - name: Wait until node is synced
26
26
  run: bundle exec rake wait_until_node_synced
27
27
  - name: Run all tests
28
- run: bundle exec rspec .
28
+ run: bundle exec rspec .
29
29
  env:
30
30
  CI: true
31
31
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32
32
  NETWORK: testnet
33
33
  WALLET: dev-master-shelley
34
- NODE: 1.19.0
34
+ NODE: 1.20.0
@@ -38,4 +38,4 @@ jobs:
38
38
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39
39
  NETWORK: testnet
40
40
  WALLET: dev-master-shelley
41
- NODE: 1.19.0
41
+ NODE: 1.20.0
data/dev CHANGED
@@ -1 +1 @@
1
- NETWORK=testnet WALLET=dev-master-shelley NODE=1.19.0 NODE_CONFIG_PATH=`pwd`/spec/testnet docker-compose -f docker-compose-shelley.yml $1
1
+ NETWORK=testnet WALLET=dev-master-shelley NODE=1.19.1 NODE_CONFIG_PATH=`pwd`/spec/testnet docker-compose -f docker-compose-shelley.yml $1
@@ -6,7 +6,6 @@ require_relative "cardano_wallet/utils"
6
6
  require_relative "cardano_wallet/shelley"
7
7
  require_relative "cardano_wallet/byron"
8
8
  require_relative "cardano_wallet/misc"
9
- require_relative "cardano_wallet/proxy"
10
9
 
11
10
  module CardanoWallet
12
11
  def self.new(options = {})
@@ -13,7 +13,11 @@ module CardanoWallet
13
13
  opt[:url] ||= "#{opt[:protocol]}://#{opt[:host]}:#{opt[:port]}/v2"
14
14
  opt[:cacert] ||= ''
15
15
  opt[:pem] ||= ''
16
+ opt[:timeout] ||= -1
16
17
  self.class.base_uri opt[:url]
18
+ unless(opt[:timeout] == -1)
19
+ self.class.default_timeout(opt[:timeout].to_i)
20
+ end
17
21
 
18
22
  unless opt[:cacert].empty?
19
23
  ENV['SSL_CERT_FILE'] = opt[:cacert]
@@ -15,6 +15,16 @@ module CardanoWallet
15
15
  def network
16
16
  Network.new @opt
17
17
  end
18
+
19
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Utils
20
+ def utils
21
+ Utils.new @opt
22
+ end
23
+
24
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Proxy
25
+ def proxy
26
+ Proxy.new @opt
27
+ end
18
28
  end
19
29
 
20
30
  # API for Network
@@ -43,5 +53,34 @@ module CardanoWallet
43
53
  end
44
54
 
45
55
  end
56
+
57
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Utils
58
+ class Utils < Base
59
+ def initialize opt
60
+ super
61
+ end
62
+
63
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/inspectAddress
64
+ def addresses(address_id)
65
+ self.class.get("/addresses/#{address_id}")
66
+ end
67
+
68
+ end
69
+
70
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Proxy
71
+ class Proxy < Base
72
+ def initialize opt
73
+ super
74
+ end
75
+
76
+ # Submit a transaction that was created and signed outside of cardano-wallet.
77
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postExternalTransaction
78
+ # @param binary_blob [String] Signed transaction message binary blob.
79
+ def submit_external_transaction(binary_blob)
80
+ self.class.post("/proxy/transactions",
81
+ :body => binary_blob,
82
+ :headers => { 'Content-Type' => 'application/octet-stream' })
83
+ end
84
+ end
46
85
  end
47
86
  end
@@ -1,3 +1,3 @@
1
1
  module CardanoWallet
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cardano_wallet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Stachyra
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-04 00:00:00.000000000 Z
11
+ date: 2020-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -122,7 +122,6 @@ files:
122
122
  - lib/cardano_wallet/base.rb
123
123
  - lib/cardano_wallet/byron.rb
124
124
  - lib/cardano_wallet/misc.rb
125
- - lib/cardano_wallet/proxy.rb
126
125
  - lib/cardano_wallet/shelley.rb
127
126
  - lib/cardano_wallet/utils.rb
128
127
  - lib/cardano_wallet/version.rb
@@ -1,26 +0,0 @@
1
- module CardanoWallet
2
- module Proxy
3
-
4
- # Call API for Proxy
5
- # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Proxy
6
- def self.new(opt)
7
- Init.new opt
8
- end
9
-
10
- class Init < Base
11
- def initialize opt
12
- super
13
- end
14
-
15
- # Submit a transaction that was created and signed outside of cardano-wallet.
16
- # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postExternalTransaction
17
- # @param binary_blob [String] Signed transaction message binary blob.
18
- def submit_external_transaction(binary_blob)
19
- self.class.post("/proxy/transactions",
20
- :body => binary_blob,
21
- :headers => { 'Content-Type' => 'application/octet-stream' })
22
- end
23
- end
24
-
25
- end
26
- end