class CardanoWallet::Misc::Utils
@see input-output-hk.github.io/cardano-wallet/api/edge/#tag/Utils
Public Instance Methods
addresses(address_id)
click to toggle source
@see input-output-hk.github.io/cardano-wallet/api/edge/#operation/inspectAddress
# File lib/cardano_wallet/misc.rb, line 93 def addresses(address_id) self.class.get("/addresses/#{address_id}") end
get_public_key(wid, role, index)
click to toggle source
@see input-output-hk.github.io/cardano-wallet/api/#operation/getWalletKey
# File lib/cardano_wallet/misc.rb, line 88 def get_public_key(wid, role, index) self.class.get("/wallets/#{wid}/keys/#{role}/#{index}") end
post_address(payload)
click to toggle source
@see input-output-hk.github.io/cardano-wallet/api/edge/#operation/postAnyAddress
# File lib/cardano_wallet/misc.rb, line 98 def post_address(payload) CardanoWallet::Utils.verify_param_is_hash!(payload) self.class.post('/addresses', body: payload.to_json, headers: { 'Content-Type' => 'application/json', 'Accept' => 'application/json' }) end
sign_metadata(wid, role, index, pass, metadata)
click to toggle source
@see input-output-hk.github.io/cardano-wallet/api/#operation/signMetadata
# File lib/cardano_wallet/misc.rb, line 78 def sign_metadata(wid, role, index, pass, metadata) payload = { passphrase: pass } payload[:metadata] = metadata if metadata self.class.post("/wallets/#{wid}/signatures/#{role}/#{index}", body: payload.to_json, headers: { 'Content-Type' => 'application/json' }) end
smash_health(query = {})
click to toggle source
Current SMASH health @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/getCurrentSmashHealth
@example
smash_health({url: "https://smash.cardano-mainnet.iohk.io/"})
# File lib/cardano_wallet/misc.rb, line 111 def smash_health(query = {}) query_formatted = query.empty? ? '' : CardanoWallet::Utils.to_query(query) self.class.get("/smash/health#{query_formatted}") end