Skip to content

Commit 63fd52b

Browse files
authored
Merge pull request #38 from piotr-iohk/more_key_endpoints
More key endpoints
2 parents d0deac9 + de20bf9 commit 63fd52b

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

lib/cardano_wallet/shared.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ def create_acc_public_key(wid, index, pass, format)
5555
body: payload.to_json,
5656
headers: { 'Content-Type' => 'application/json' })
5757
end
58+
59+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getAccountKeyShared
60+
def get_acc_public_key(wid, query = {})
61+
query_formatted = query.empty? ? '' : Utils.to_query(query)
62+
self.class.get("/shared-wallets/#{wid}/keys#{query_formatted}")
63+
end
5864
end
5965

6066
# API for Wallets

lib/cardano_wallet/shelley.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ def create_acc_public_key(wid, index, pass, format)
9999
body: payload.to_json,
100100
headers: { 'Content-Type' => 'application/json' })
101101
end
102+
103+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getAccountKey
104+
def get_acc_public_key(wid, query = {})
105+
query_formatted = query.empty? ? '' : Utils.to_query(query)
106+
self.class.get("/wallets/#{wid}/keys#{query_formatted}")
107+
end
102108
end
103109

104110
# API for Wallets

lib/cardano_wallet/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module CardanoWallet
4-
VERSION = '0.3.7'
4+
VERSION = '0.3.8'
55
end

0 commit comments

Comments
 (0)