Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Shelley migrations in Api doc #1687

Merged
merged 2 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/core/src/Cardano/Wallet/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ type DeleteTransaction = "wallets"
Shelley Migrations

See also:
https://input-output-hk.github.io/cardano-wallet/api/#tag/Shelley-Migrations
https://input-output-hk.github.io/cardano-wallet/api/#tag/Migrations
-------------------------------------------------------------------------------}

type ShelleyMigrations n =
Expand Down
23 changes: 15 additions & 8 deletions specifications/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,7 @@ x-tagGroups:
- Addresses
- Coin Selections
- Transactions
- Migrations
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shelley migrations were not displayed in api doc because of this 👆

- Stake Pools

- name: Byron (Random)
Expand Down Expand Up @@ -1967,26 +1968,32 @@ paths:
/wallets/{walletId}/migrations:
get:
operationId: getShelleyWalletMigrationInfo
tags: ["Shelley Migrations"]
tags: ["Migrations"]
summary: Calculate Cost
description: |
<p align="right">status: <strong>stable</strong></p>
<p align="right">status: <strong>in development</strong></p>

Calculate the exact cost of migrating from a Shelley wallet to
the specified set of addresses.
Calculate the exact cost of sending all funds from particular Shelley wallet
to a set of addresses.
parameters:
- <<: *parametersWalletId
name: walletId
responses: *responsesGetWalletMigrationInfo

post:
operationId: migrateShelleyWallet
tags: ["Shelley Migrations"]
tags: ["Migrations"]
summary: Migrate
description: |
<p align="right">status: <strong>stable</strong></p>
<p align="right">status: <strong>in development</strong></p>

Migrate all funds from a Shelley wallet to a specified set of addresses.
Create one or several transactions sending all funds from a Shelley wallet to set of addresses.
This operation tries to preserve as much as possible the current UTxO shape of a wallet (hence
why several transactions may be needed).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether word why is needed here 🤔 @rvl / @jonathanknowles could you voice your opinion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this

Submit one or more transactions which transfers all funds from a Shelley wallet to a set of addresses.
This operation attempts to preserve the UTxO "shape" of a wallet as far as possible. That is, coins will not be agglomerated.
Therefore, if the wallet has a large UTxO set, several transactions may be needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded in 508e41b.


A typical usage would be when one wants to move all funds from an old wallet to another
by providing addresses coming from the new wallet.
parameters:
- <<: *parametersWalletId
name: walletId
Expand Down Expand Up @@ -2212,8 +2219,8 @@ paths:
description: |
<p align="right">status: <strong>stable</strong></p>

Calculate the exact cost of migrating from a Byron wallet to
the specified set of addresses.
Calculate the exact cost of sending all funds from particular Byron wallet to
a set of addresses.
parameters:
- <<: *parametersWalletId
name: walletId
Expand Down