cardano_wallet 0.3.5 → 0.3.6
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/lib/cardano_wallet/shared.rb +25 -0
- data/lib/cardano_wallet/shelley.rb +2 -2
- data/lib/cardano_wallet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f149bd85ed1c3a010b17f066f6c8a8e246206b0d4d8850d407119a85f41c13c8
|
4
|
+
data.tar.gz: f93405819fda7d70f52ba8f9012388b872705eec927f2d8d0b33bed7a89cf465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bb6a4745be667c10ae3d9d9710156c6ae596d4ebd6c1314e379b0e30d62c73f2bc4640e9b6925d17eac8dbdd71da50cf820a156c92b484349068beb30c53450
|
7
|
+
data.tar.gz: a18defeaa4668b984d98b6518857855297215935bf20a6df293800356bd8db4e2fae694eef28b35b31cedd41d8bd2925013e1c415e1e50710a4391ae9293cf9b
|
@@ -15,6 +15,31 @@ module CardanoWallet
|
|
15
15
|
def wallets
|
16
16
|
Wallets.new @opt
|
17
17
|
end
|
18
|
+
|
19
|
+
# Call API for Shared Keys
|
20
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Shared-Keys
|
21
|
+
def keys
|
22
|
+
Keys.new @opt
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# API for Keys
|
27
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Shared-Keys
|
28
|
+
class Keys < Base
|
29
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/#operation/getSharedWalletKey
|
30
|
+
# https://localhost:8090/v2/shared-wallets/{walletId}/keys/{role}/{index}?hash=false
|
31
|
+
def get_public_key(wid, role, index, hash = {})
|
32
|
+
hash_query = hash.empty? ? '' : Utils.to_query(hash)
|
33
|
+
self.class.get("/shared-wallets/#{wid}/keys/#{role}/#{index}#{hash_query}")
|
34
|
+
end
|
35
|
+
|
36
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/#operation/postAccountKeyShared
|
37
|
+
def create_acc_public_key(wid, index, pass, format)
|
38
|
+
payload = { passphrase: pass, format: format }
|
39
|
+
self.class.post("/shared-wallets/#{wid}/keys/#{index}",
|
40
|
+
body: payload.to_json,
|
41
|
+
headers: { 'Content-Type' => 'application/json' })
|
42
|
+
end
|
18
43
|
end
|
19
44
|
|
20
45
|
# API for Wallets
|
@@ -93,8 +93,8 @@ module CardanoWallet
|
|
93
93
|
end
|
94
94
|
|
95
95
|
# @see https://input-output-hk.github.io/cardano-wallet/api/#operation/postAccountKey
|
96
|
-
def create_acc_public_key(wid, index, pass,
|
97
|
-
payload = { passphrase: pass,
|
96
|
+
def create_acc_public_key(wid, index, pass, format)
|
97
|
+
payload = { passphrase: pass, format: format }
|
98
98
|
self.class.post("/wallets/#{wid}/keys/#{index}",
|
99
99
|
body: payload.to_json,
|
100
100
|
headers: { 'Content-Type' => 'application/json' })
|
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.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Stachyra
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|