Class: CardanoWallet::Byron::Wallets
- Inherits:
-
CardanoWallet::Base
- Object
- CardanoWallet::Base
- CardanoWallet::Byron::Wallets
- Defined in:
- lib/cardano_wallet/byron.rb
Overview
Byron wallets
Instance Attribute Summary
Attributes inherited from CardanoWallet::Base
Instance Method Summary collapse
-
#create(params) ⇒ Object
Create a Byron wallet based on the params.
-
#delete(wid) ⇒ Object
Delete Byron wallet.
-
#get(wid) ⇒ Object
Get Byron wallet details.
-
#list ⇒ Object
List Byron wallets.
-
#update_metadata(wid, params) ⇒ Object
Update Byron wallet’s metadata.
-
#update_passphrase(wid, params) ⇒ Object
Update Byron wallet’s passphrase.
-
#utxo(wid) ⇒ Object
See Byron wallet’s utxo distribution.
- #utxo_snapshot(wid) ⇒ Object
Methods inherited from CardanoWallet::Base
#byron, #initialize, #misc, #shared, #shelley, #utils
Constructor Details
This class inherits a constructor from CardanoWallet::Base
Instance Method Details
#create(params) ⇒ Object
Create a Byron wallet based on the params.
112 113 114 115 116 117 |
# File 'lib/cardano_wallet/byron.rb', line 112 def create(params) Utils.verify_param_is_hash!(params) self.class.post('/byron-wallets', body: params.to_json, headers: { 'Content-Type' => 'application/json' }) end |
#delete(wid) ⇒ Object
Delete Byron wallet
123 124 125 |
# File 'lib/cardano_wallet/byron.rb', line 123 def delete(wid) self.class.delete("/byron-wallets/#{wid}") end |
#get(wid) ⇒ Object
Get Byron wallet details
99 100 101 |
# File 'lib/cardano_wallet/byron.rb', line 99 def get(wid) self.class.get("/byron-wallets/#{wid}") end |
#list ⇒ Object
List Byron wallets
91 92 93 |
# File 'lib/cardano_wallet/byron.rb', line 91 def list self.class.get('/byron-wallets') end |
#update_metadata(wid, params) ⇒ Object
Update Byron wallet’s metadata
132 133 134 135 136 137 |
# File 'lib/cardano_wallet/byron.rb', line 132 def (wid, params) Utils.verify_param_is_hash!(params) self.class.put("/byron-wallets/#{wid}", body: params.to_json, headers: { 'Content-Type' => 'application/json' }) end |
#update_passphrase(wid, params) ⇒ Object
Update Byron wallet’s passphrase.
160 161 162 163 164 165 |
# File 'lib/cardano_wallet/byron.rb', line 160 def update_passphrase(wid, params) Utils.verify_param_is_hash!(params) self.class.put("/byron-wallets/#{wid}/passphrase", body: params.to_json, headers: { 'Content-Type' => 'application/json' }) end |
#utxo(wid) ⇒ Object
See Byron wallet’s utxo distribution
143 144 145 |
# File 'lib/cardano_wallet/byron.rb', line 143 def utxo(wid) self.class.get("/byron-wallets/#{wid}/statistics/utxos") end |
#utxo_snapshot(wid) ⇒ Object
150 151 152 |
# File 'lib/cardano_wallet/byron.rb', line 150 def utxo_snapshot(wid) self.class.get("/byron-wallets/#{wid}/utxo") end |