cardano_wallet 0.1.9 → 0.2.0
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/.github/workflows/nightly.yml +2 -2
- data/.github/workflows/tests.yml +1 -1
- data/dev +1 -1
- data/lib/cardano_wallet.rb +0 -1
- data/lib/cardano_wallet/base.rb +4 -0
- data/lib/cardano_wallet/misc.rb +39 -0
- data/lib/cardano_wallet/version.rb +1 -1
- metadata +2 -3
- data/lib/cardano_wallet/proxy.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00a386b2276f8b8373cd9a89cebdba30a5f151c2b32cee0ae3d8915a6daee980
|
4
|
+
data.tar.gz: 10094b3fb16e9c9e71e61409a314b06d94dd140c01f79641e8bce9dafa21fccc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
34
|
+
NODE: 1.20.0
|
data/.github/workflows/tests.yml
CHANGED
data/dev
CHANGED
@@ -1 +1 @@
|
|
1
|
-
NETWORK=testnet WALLET=dev-master-shelley NODE=1.19.
|
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
|
data/lib/cardano_wallet.rb
CHANGED
data/lib/cardano_wallet/base.rb
CHANGED
@@ -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]
|
data/lib/cardano_wallet/misc.rb
CHANGED
@@ -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
|
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.
|
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-
|
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
|
data/lib/cardano_wallet/proxy.rb
DELETED
@@ -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
|