-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This pull requests implements a REST-like `IO` interface for the Deposit Wallet. This interface corresponds more closely to an HTTP interface. Essentially, the main difference between `Cardano.Wallet.Deposit.IO` and `Cardano.Wallet.Deposit.REST` is that the latter postpones the need to initialize the wallet. Instead of working with a `WalletInstance`, the latter module now works with a `WalletResource`, which is roughly a `TVar (Maybe WalletInstance)`. This mutable variable starts with `Nothing` and the function `putWallet` can be used to initialize the wallet, putting a `Just` in the mutable variable. In turn, a module `Cardano.Wallet.Deposit.IO.Resource` implements a data type `Resource` that encapsulate the idea of `TVar (Maybe WalletInstance)` and is (reasonably) safe to use in a concurrent environment. ### Comments * Not implemented yet: `withWalletResource` inspects the database directory and loads a wallet if necessary. ### Issue Number ADP-3344
- Loading branch information
Showing
7 changed files
with
711 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.