class CardanoWallet::Shelley::Migrations

Shelley migrations @see input-output-hk.github.io/cardano-wallet/api/#tag/Migrations

Public Instance Methods

migrate(wid, passphrase, addresses) click to toggle source

Migrate all funds from Shelley wallet. @see input-output-hk.github.io/cardano-wallet/api/#operation/migrateShelleyWallet @param wid [String] wallet id @param passphrase [String] wallet's passphrase @param [Array] array of addresses

# File lib/cardano_wallet/shelley.rb, line 463
def migrate(wid, passphrase, addresses)
  self.class.post("/wallets/#{wid}/migrations",
                  body: { addresses: addresses,
                          passphrase: passphrase }.to_json,
                  headers: { 'Content-Type' => 'application/json' })
end
plan(wid, addresses) click to toggle source

Get migration plan @see input-output-hk.github.io/cardano-wallet/api/edge/#operation/createShelleyWalletMigrationPlan

# File lib/cardano_wallet/shelley.rb, line 452
def plan(wid, addresses)
  self.class.post("/wallets/#{wid}/migrations/plan",
                  body: { addresses: addresses }.to_json,
                  headers: { 'Content-Type' => 'application/json' })
end