feat: async support for dlc-manager #235
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
builds on top of #234
Adds a feature flag of
async
. There are functions for less reliance on oracles for creating offers and closing contracts. In my implementation ofdlcdevkit
the consumers are typically going to use async runtimes with gRPC servers, REST servers, tauri, etc. Manually closing contracts and tracking for attestations created code and solutions that I was not happy with for something I believe should be handled internally in the library.I think that
dlc-manager
should manage contracts agnostic to runtimes. I.e. not having to spawn a blocking thread for periodic checks.This makes the manual close for situations in which an attestation is produced before the maturity. Not necessarily for async runtimes that are not running periodic checks for confirmed contracts.