Class: CardanoWallet::Byron::Migrations

Inherits:
CardanoWallet::Base show all
Defined in:
lib/cardano_wallet/byron.rb

Overview

Byron migrations

Examples:

@cw = CardanoWallet.new
@cw.byron.migrations # API for Byron Migrations

See Also:

Instance Attribute Summary

Attributes inherited from CardanoWallet::Base

#opt

Instance Method Summary collapse

Methods inherited from CardanoWallet::Base

#byron, #initialize, #misc, #shared, #shelley, #utils

Constructor Details

This class inherits a constructor from CardanoWallet::Base

Instance Method Details

#migrate(wid, passphrase, addresses) ⇒ Object

Migrate all funds from Byron wallet.

Parameters:

  • wid (String)

    wallet id

  • passphrase (String)

    wallet’s passphrase

  • array (Array)

    of addresses

See Also:



385
386
387
388
389
390
# File 'lib/cardano_wallet/byron.rb', line 385

def migrate(wid, passphrase, addresses)
  self.class.post("/byron-wallets/#{wid}/migrations",
                  body: { addresses: addresses,
                          passphrase: passphrase }.to_json,
                  headers: { 'Content-Type' => 'application/json' })
end

#plan(wid, addresses) ⇒ Object

Get migration plan



374
375
376
377
378
# File 'lib/cardano_wallet/byron.rb', line 374

def plan(wid, addresses)
  self.class.post("/byron-wallets/#{wid}/migrations/plan",
                  body: { addresses: addresses }.to_json,
                  headers: { 'Content-Type' => 'application/json' })
end