Class: CardanoWallet::Byron::Addresses
- Inherits:
-
CardanoWallet::Base
- Object
- CardanoWallet::Base
- CardanoWallet::Byron::Addresses
- Defined in:
- lib/cardano_wallet/byron.rb
Overview
Byron addresses
Instance Attribute Summary
Attributes inherited from CardanoWallet::Base
Instance Method Summary collapse
-
#bulk_import(wid, addresses) ⇒ Object
Import addresses to Byron wallet.
-
#create(wid, params) ⇒ Object
Create address for Byron random wallet.
-
#import(wid, addr_id) ⇒ Object
Import address to Byron wallet.
-
#list(wid, query = {}) ⇒ Object
List Byron addresses.
Methods inherited from CardanoWallet::Base
#byron, #initialize, #misc, #shared, #shelley, #utils
Constructor Details
This class inherits a constructor from CardanoWallet::Base
Instance Method Details
#bulk_import(wid, addresses) ⇒ Object
Import addresses to Byron wallet.
212 213 214 215 216 |
# File 'lib/cardano_wallet/byron.rb', line 212 def bulk_import(wid, addresses) self.class.put("/byron-wallets/#{wid}/addresses", body: { addresses: addresses }.to_json, headers: { 'Content-Type' => 'application/json' }) end |
#create(wid, params) ⇒ Object
Create address for Byron random wallet.
193 194 195 196 197 198 |
# File 'lib/cardano_wallet/byron.rb', line 193 def create(wid, params) Utils.verify_param_is_hash!(params) self.class.post("/byron-wallets/#{wid}/addresses", body: params.to_json, headers: { 'Content-Type' => 'application/json' }) end |
#import(wid, addr_id) ⇒ Object
Import address to Byron wallet.
204 205 206 |
# File 'lib/cardano_wallet/byron.rb', line 204 def import(wid, addr_id) self.class.put("/byron-wallets/#{wid}/addresses/#{addr_id}") end |