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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c950332d6aa59108f227517d4c832b4f5e0427be93205ba6b6f88a93b85ef7dd
4
- data.tar.gz: fb58ff9bd30d1adbd5ad9014093ca4e58cb3d625103b45e31b4289625a46e31a
3
+ metadata.gz: f149bd85ed1c3a010b17f066f6c8a8e246206b0d4d8850d407119a85f41c13c8
4
+ data.tar.gz: f93405819fda7d70f52ba8f9012388b872705eec927f2d8d0b33bed7a89cf465
5
5
  SHA512:
6
- metadata.gz: 7a1e6e2eeb3734432a792d6e00736fd816fa3244f8f1651ad6daa7ddf91ac9ccb60392ae370bf0e45d9e199af7258e82afa8c75f50d34662bab535e4508398fd
7
- data.tar.gz: f03b8111111b85cc59c8f22ea86fea2e5159a6634b69c1c06e20d786394ba037fa1f866aff081ad2c18aa1fb85e172e9fcb5f796e40b3124cb1000c5d47ad542
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, extended)
97
- payload = { passphrase: pass, extended: extended }
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' })
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CardanoWallet
4
- VERSION = '0.3.5'
4
+ VERSION = '0.3.6'
5
5
  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.3.5
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-04 00:00:00.000000000 Z
11
+ date: 2021-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty