-
Notifications
You must be signed in to change notification settings - Fork 214
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
Provide a wallet-specific interface for coin selection. #3109
Provide a wallet-specific interface for coin selection. #3109
Conversation
4859110
to
9c31da8
Compare
This commit provides the module `Cardano.Wallet.CoinSelection`, which provides a wallet-specific interface for coin selection. Wallet features requiring coin selection functionality should import from this module.
This commit: 1. Renames `Primitive.CoinSelection` to `CoinSelection.Internal`, making it more obvious that this module is an "internal" module. 2. Adds a disclaimer to the top of the module advising people to import from the "public" module instead.
9c31da8
to
72dd574
Compare
bors try |
tryBuild failed: Failure:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, looks good to me! Having a single module Cardano.Wallet.CoinSelection
that exposes "everything you need to know about coin selection" encourages us to keep the abstraction boundary clean and simple — the "internals that you do not need to know about coin selection" are not exposed.
bors r+ |
Build succeeded: |
Issue Number
ADP-1407
Summary
This PR reorganizes the coin selection module hierarchy to have the following structure:
Cardano.Wallet.CoinSelection
provides a stable, wallet-specific interface for coin selection, with wallet-friendly types such as
TxIn
,TxOut
, andUTxO
.Cardano.Wallet.CoinSelection.Internal.*
provides internal functions and types, whose definitions are allowed to deviate from those provided in the public module.
This PR also:
Cardano.Wallet.CoinSelection
, rather thanCardano.Wallet.CoinSelection.Internal
.