We can now pass more than one set of `nonce_pks` when creating a CFD.
Each set corresponds to (and is identified by) a different oracle
event, allowing us to construct CFDs which can be settled via oracle
attestation at more than one point in time.
We also remember the CET-event relationship in `CfdTransactions`. This
is needed so that we can select the correct CET when the oracle
attests to the outcome of an event. Additionally, we save the
`nonce_pks` to more easily verify the adaptor signatures.
We also stopped generating random oracle-related values for the
protocol tests, greatly simplifying the test suite. This has the
side-effect that we no longer verify that _all_ CETs can be unlocked.
Re-introducing random oracle-related data in the future should be
considered.
- Add wallet to maker and taker.
For now we have different, static descriptors with a hardcoded DB
path. We also only operate on testnet and use sled as a database.
- Associate each CET with a unique nonce_pk
Eventually a set of `(message, nonce_pk)`.
- Share transactions with maker
- Add serialisation support to adaptor signature
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
It makes sense to put the `nonce_pk` together with the `message`,
since they're both used to generate the attestation (signature) point.
We also remove the `OracleParams` type since it would only have one
field after this change.
We were only testing against CETs with a single output, so the
`SIGNED_VBYTES` constant was based on a smaller transaction than
usual.
We could use a different constant for the case when the CET has a
single output, but it's just an edge case and the transaction fees are
very small.