Copyright | © 2021 IOHK |
---|---|
License | Apache-2.0 |
Safe Haskell | None |
Language | Haskell2010 |
This module provides a public API for planning wallet migrations.
Use
createPlan
to create a migration plan.
Synopsis
- createPlan :: TxConstraints -> UTxO -> RewardWithdrawal -> MigrationPlan
-
data
MigrationPlan
=
MigrationPlan
{
- selections :: ![ Selection ( TxIn , TxOut )]
- unselected :: ! UTxO
- totalFee :: ! Coin
- newtype RewardWithdrawal = RewardWithdrawal { }
-
data
Selection
input =
Selection
{
- inputIds :: !( NonEmpty input)
- inputBalance :: ! TokenBundle
- outputs :: !( NonEmpty TokenBundle )
- fee :: ! Coin
- feeExcess :: ! Coin
- size :: ! TxSize
- rewardWithdrawal :: ! Coin
Creating a migration plan
createPlan :: TxConstraints -> UTxO -> RewardWithdrawal -> MigrationPlan Source #
Creates a migration plan for the given UTxO set and reward withdrawal amount.
See
MigrationPlan
.
data MigrationPlan Source #
Represents a plan for migrating a
UTxO
set.
See
createPlan
to create a migration plan.
MigrationPlan | |
|
Instances
newtype RewardWithdrawal Source #
Instances
Eq RewardWithdrawal Source # | |
Defined in Cardano.Wallet.Primitive.Migration.Selection (==) :: RewardWithdrawal -> RewardWithdrawal -> Bool Source # (/=) :: RewardWithdrawal -> RewardWithdrawal -> Bool Source # |
|
Show RewardWithdrawal Source # | |
Defined in Cardano.Wallet.Primitive.Migration.Selection |
A selection is the basis for a single transaction.
Use
create
to create a selection with one or more inputs.
Use
extend
to extend a selection with an additional input.
Use
verify
to verify the correctness of a selection.
Selection | |
|