Thomas Eizinger
f2445ee8e5
Reformat impl of `derive_extended_priv_key`
3 years ago
Daniel Karzel
b6bb36266d
Remove snapshot tests
These tests don't really add much value anymore.
They were initially added for making sure we don't break the API towards the UI, but we introduced a separate model for that in the meanwhile.
One could still argue that these tests ensure backwards compatibility for the cfd state in the DB, but that is not important at the moment.
Since we have more complex states now it is quite a pain to maintain these tests now - without getting much out.
3 years ago
Lucas Soriano del Pino
8e4d3254f2
Add close_transaction API to cfd_protocol lib
3 years ago
Philipp Hoenisch
1fd4745319
Use logger instead of println
3 years ago
Philipp Hoenisch
382e7095e8
Add logging library and initialize by default
3 years ago
Philipp Hoenisch
8b390354e8
Merge pull request #95 from comit-network/embed_frontend
Embed maker/taker frontend into binary
3 years ago
Lucas Soriano
bb5768ca84
Merge pull request #81 from comit-network/interval
Construct `Payout` based on interval
3 years ago
Lucas Soriano del Pino
e879b36304
Document create_cfd_transactions
3 years ago
Lucas Soriano del Pino
1eb237faaa
Take RangeInclusive<u64> as argument to Payout constructor
3 years ago
Lucas Soriano del Pino
7e646461c5
Remove unnecessary newlines around imports
3 years ago
Lucas Soriano del Pino
e395876cc1
Prefer pub(crate) over pub(super)
It does the same job for us and it makes it easier to move things
around later.
3 years ago
Lucas Soriano del Pino
d3440f9733
Use Oracle::MAX_DIGITS where possible in tests
3 years ago
Lucas Soriano del Pino
d2c8c9191c
Use impl Trait shorthand wherever possible
3 years ago
Lucas Soriano del Pino
4fdbe89898
Refactor cfd_protocol crate
3 years ago
Lucas Soriano del Pino
c4d34ae443
Remove Interval from public API
3 years ago
Lucas Soriano del Pino
4e2e3914cb
Reorganize modules
3 years ago
Lucas Soriano del Pino
b8ce7fac35
Expose APIs that are needed
And move the protocol to a `protocol` sub-module.
3 years ago
Lucas Soriano del Pino
8122cd7b79
Prove that signing a price works
And fix bugs along the way.
3 years ago
Lucas Soriano del Pino
000b64818e
Simplify test oracle attest API
3 years ago
Lucas Soriano del Pino
0939aba57e
Remove rand_chacha
We don't need to use seedable RNG in our tests.
3 years ago
Lucas Soriano del Pino
ea3a54ff36
Introduce oracle module
3 years ago
Lucas Soriano del Pino
b49dc137fe
Construct payouts from intervals
3 years ago
Lucas Soriano del Pino
aedce9b4b6
Handle multiple (message, nonce) pairs
3 years ago
Lucas Soriano del Pino
0b6336c13d
Add interval module
3 years ago
Philipp Hoenisch
28cc157cee
Add ext trait to convert EmbeddedFile to Response
3 years ago
Philipp Hoenisch
6ec95eef7a
Embed maker/taker frontend into binary
Note: we need to check-in `frontend/dist` directories as otherwise the build will fail.
If you want to embed the files into the binaries you will need to build them first (`yarn run build`).
3 years ago
Daniel Karzel
71a69d5c97
Merge pull request #92 from comit-network/remove-adaptor-signature-wrapper
Remove `AdaptorSignature` wrapper
3 years ago
Daniel Karzel
17471c9196
Remove `AdaptorSignature` wrapper in favor of latest `rust-secp256k1-zkp`
`EcdsaAdaptorSignature` implements `Serialize` and `Deserialize` on latest master of `rust-secp256k1-zkp` so we can remove the wrapper.
3 years ago
Daniel Karzel
685e73b747
Merge pull request #91 from comit-network/cleanup-refund-threshold
Remove duplicated refund timelock block calculation
3 years ago
Daniel Karzel
6626a76d0d
Remove duplicated refund timelock block calculation
3 years ago
Daniel Karzel
eadc5ea42c
Merge pull request #85 from comit-network/testnet-funding
Wallet updates in the UI 🎉
3 years ago
Daniel Karzel
bde11ba368
Merge pull request #80 from comit-network/past-party-param-build
Use the actual margin
3 years ago
Daniel Karzel
d5bbee3edd
Wallet updates in the UI 🎉
- wallet feed that sends balance + current address
- display in UI (balance + address) in separate wallet component (shared for taker and maker for now)
Includes two seed files that are already funded with some testnet coins. We can share those for testing for now. If more funds are needed I'm happy to top them up.
3 years ago
Daniel Karzel
7630b301c7
Work in PR comments
3 years ago
Daniel Karzel
3dbd60a17e
Remove unnecessary duplicated comments
3 years ago
Daniel Karzel
fceb18d98b
Use actual margin value for contract setup
Includes validating that the amount the other party commits to is the expected amount based on calculating the counterparty margin out of the CFD values.
Note: We could also remove the lock amount from the messages and use the calculation on both sides - that would simplify things.
3 years ago
Thomas Eizinger
20a031a9b0
Merge pull request #90 from comit-network/dependabot/cargo/rust_decimal-1.16.0
Bump rust_decimal from 1.15.0 to 1.16.0
3 years ago
dependabot[bot]
7bd2800f1a
Bump rust_decimal from 1.15.0 to 1.16.0
Bumps [rust_decimal](https://github.com/paupino/rust-decimal ) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/paupino/rust-decimal/releases )
- [Commits](https://github.com/paupino/rust-decimal/commits )
---
updated-dependencies:
- dependency-name: rust_decimal
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Mariusz
8bf305e579
Merge pull request #86 from comit-network/wallet-struct
Wrap bdk::wallet inside a struct
3 years ago
Mariusz Klochowicz
6356c783be
Wrap bdk::wallet inside a struct
Removes code duplication in maker and taker wallet initialisation and avoids
generics in the cfd actors.
3 years ago
Thomas Eizinger
66b5e31cec
Merge pull request #58 from comit-network/dependabot/cargo/serde_json-1.0.68
3 years ago
Thomas Eizinger
6f653e47b5
Merge pull request #43 from comit-network/dependabot/github_actions/dprint/check-2.0
3 years ago
Thomas Eizinger
36c33e3233
Merge pull request #44 from comit-network/dependabot/cargo/anyhow-1.0.44
3 years ago
Philipp Hoenisch
b0e31f0d34
Merge pull request #59 from bonomat/armv7
3 years ago
Philipp Hoenisch
5cc36f2942
Build CI for armv7
We cannot run the smoke tests for arm as all targets on Github are x86_64
3 years ago
Thomas Eizinger
b045f6a3ca
Merge pull request #79 from comit-network/frontend-proxy
3 years ago
Daniel Karzel
0a2e43ed64
Merge pull request #82 from comit-network/refactor-cfd-model
Refactor Cfd to be based on Order
3 years ago
Daniel Karzel
b60c55d031
Refactor Cfd to be based on Order
Flattening the Cfd out in the internal mode has caused duplication and confusion.
This refactor puts the Order into the Cfd to make relations clearer.
Note that once we have multiple leverage the leverage and liquidation price will have to move into the Cfd because they depend on the user's choice then.
This should be trivial to do.
3 years ago
Daniel Karzel
ee5e20b1e7
Merge pull request #78 from comit-network/prepare-db-script
Add script for preparing the DB for convenience
3 years ago
Thomas Eizinger
7ab1ee31ec
Rename the maker's feed endpoint to just /feed
3 years ago