Skip to content

Commit

Permalink
Merge pull request #44 from piotr-iohk/decode_ep
Browse files Browse the repository at this point in the history
Decode transaction endpoint
  • Loading branch information
piotr-iohk authored Nov 8, 2021
2 parents 215935b + 9d8ec40 commit 5162f3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/cardano_wallet/shelley.rb
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@ def balance(wid, payload)
headers: { 'Content-Type' => 'application/json' })
end

# Decode transaction
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/decodeTransaction
# @param wid [String] source wallet id
# @param transaction [String] CBOR base64|base16 encoded transaction
def decode(wid, transaction)
payload = {}
payload[:transaction] = transaction
self.class.post("/wallets/#{wid}/transactions-decode",
body: payload.to_json,
headers: { 'Content-Type' => 'application/json' })
end

# Construct transaction
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/constructTransaction
# @param wid [String] source wallet id
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.16'
VERSION = '0.3.17'
end

0 comments on commit 5162f3a

Please sign in to comment.