class CardanoWallet::Byron::Wallets

Byron wallets @see input-output-hk.github.io/cardano-wallet/api/edge/#tag/Byron-Wallets

Public Instance Methods

create(params) click to toggle source

Create a Byron wallet based on the params. @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/postByronWallet

@example

create({style: "random",
        name: "Random Wallet from mnemonic_sentence",
        passphrase: "Secure Passphrase",
        mnemonic_sentence: %w[arctic decade pizza ...],
       })
# File lib/cardano_wallet/byron.rb, line 89
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) click to toggle source

Delete Byron wallet @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/deleteByronWallet

# File lib/cardano_wallet/byron.rb, line 98
def delete(wid)
  self.class.delete("/byron-wallets/#{wid}")
end
get(wid) click to toggle source

Get Byron wallet details @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/getByronWallet

# File lib/cardano_wallet/byron.rb, line 76
def get(wid)
  self.class.get("/byron-wallets/#{wid}")
end
list() click to toggle source

List Byron wallets @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/listByronWallets

# File lib/cardano_wallet/byron.rb, line 70
def list
  self.class.get('/byron-wallets')
end
update_metadata(wid, params) click to toggle source

Update Byron wallet's metadata @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/putByronWallet

@example

update_metadata(wid, {name: "New wallet name"})
# File lib/cardano_wallet/byron.rb, line 107
def update_metadata(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) click to toggle source

Update Byron wallet's passphrase. @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/putByronWalletPassphrase

@example

update_passphrase(wid, {old_passphrase: "Secure Passphrase", new_passphrase: "Securer Passphrase"})
# File lib/cardano_wallet/byron.rb, line 130
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) click to toggle source

See Byron wallet's utxo distribution @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/getByronUTxOsStatistics

# File lib/cardano_wallet/byron.rb, line 116
def utxo(wid)
  self.class.get("/byron-wallets/#{wid}/statistics/utxos")
end
utxo_snapshot(wid) click to toggle source

@see input-output-hk.github.io/cardano-wallet/api/edge/#operation/getByronWalletUtxoSnapshot

# File lib/cardano_wallet/byron.rb, line 121
def utxo_snapshot(wid)
  self.class.get("/byron-wallets/#{wid}/utxo")
end