The default would have been min=0, max=0. This made any mint initialized with MintMeltLimits::default() to fail every mint and melt operation, because the amount was out of bounds.
* Add ArcSwap to update Mint configuration at runtime
The main goal is to change settings without having multiple RwLock everywhere,
instead having ArcSwap to update the configuration without having access to a
mutable reference to the Mint.
This will allow the RPC Server, or any other medium to update the Mint without
minimum contention.
* Rename structs
* Move quote_ttl to the new config
* Fixed clippy issues
The main goal is to add a subscription to CDK Mint updates into the wallet.
This feature will be particularly useful for improving the code whenever loops
hit the mint server to check status changes.
The goal is to add an easy-to-use interface that will hide the fact that we're
connecting to WebSocket and subscribing to events. This will also hide the fact
that the CDK-mint server may not support WebSocket updates.
To be fully backward compatible, the HttpClientMethods traits have a new
method, `subscribe,` which will return an object that implements
`ActiveSubscription.`
In the primary implementation, there is a `SubscriptionClient` that will
attempt to connect through WebSocket and will fall to the HTTP-status pull and
sleep approach (the current approach), but upper stream code will receive
updates as if they come from a stream of updates through WebSocket. This
`SubscriptionClient` struct will also manage reconnections to WebSockets (with
automatic resubscriptions) and all the low-level stuff, providing an
easy-to-use interface and leaving the upper-level code with a nice interface
that is hard to misuse. When `ActiveSubscription` is dropped, it will
automatically unsubscribe.
Fixed bug with Default as described in https://github.com/cashubtc/cdk/pull/473#discussion_r1871032297