Skip to content

Commit

Permalink
Merge pull request #38 from piotr-iohk/more_key_endpoints
Browse files Browse the repository at this point in the history
More key endpoints
  • Loading branch information
piotr-iohk authored May 26, 2021
2 parents d0deac9 + de20bf9 commit 63fd52b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/cardano_wallet/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def create_acc_public_key(wid, index, pass, format)
body: payload.to_json,
headers: { 'Content-Type' => 'application/json' })
end

# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getAccountKeyShared
def get_acc_public_key(wid, query = {})
query_formatted = query.empty? ? '' : Utils.to_query(query)
self.class.get("/shared-wallets/#{wid}/keys#{query_formatted}")
end
end

# API for Wallets
Expand Down
6 changes: 6 additions & 0 deletions lib/cardano_wallet/shelley.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ def create_acc_public_key(wid, index, pass, format)
body: payload.to_json,
headers: { 'Content-Type' => 'application/json' })
end

# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getAccountKey
def get_acc_public_key(wid, query = {})
query_formatted = query.empty? ? '' : Utils.to_query(query)
self.class.get("/wallets/#{wid}/keys#{query_formatted}")
end
end

# API for Wallets
Expand Down
2 changes: 1 addition & 1 deletion lib/cardano_wallet/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module CardanoWallet
VERSION = '0.3.7'
VERSION = '0.3.8'
end

0 comments on commit 63fd52b

Please sign in to comment.