Class: CardanoWallet::Byron::CoinSelections
- Inherits:
-
CardanoWallet::Base
- Object
- CardanoWallet::Base
- CardanoWallet::Byron::CoinSelections
- Defined in:
- lib/cardano_wallet/byron.rb
Overview
API for CoinSelections
Instance Attribute Summary
Attributes inherited from CardanoWallet::Base
Instance Method Summary collapse
-
#random(wid, payments) ⇒ Object
Show random coin selection for particular payment.
Methods inherited from CardanoWallet::Base
#byron, #initialize, #misc, #shared, #shelley, #utils
Constructor Details
This class inherits a constructor from CardanoWallet::Base
Instance Method Details
#random(wid, payments) ⇒ Object
Show random coin selection for particular payment
233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/cardano_wallet/byron.rb', line 233 def random(wid, payments) Utils.verify_param_is_array!(payments) payments_formatted = if payments.any? { |p| p.key?(:address) || p.key?('address') } payments else Utils.format_payments(payments) end self.class.post("/byron-wallets/#{wid}/coin-selections/random", body: { payments: payments_formatted }.to_json, headers: { 'Content-Type' => 'application/json' }) end |