AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
344 stars 44 forks source link

unified RPC/websockets client #472

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

Provides a united client for both the RPC and websocket connections. Some redundant API methods that were available over both ws and rpc were consolidated to just the RPC versions.

This PR is currently branched off of dimalinux/status-subscribe-after-restart. Assuming that PR is merged first, I'll rebase this PR off of the master branch. Alternatively, we could merge this PR into the other one.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 33.03% and project coverage change: +0.73 :tada:

Comparison is base (f41c9af) 58.29% compared to head (e480bb6) 59.02%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #472 +/- ## ========================================== + Coverage 58.29% 59.02% +0.73% ========================================== Files 128 128 Lines 12307 12182 -125 ========================================== + Hits 7174 7191 +17 + Misses 4387 4245 -142 Partials 746 746 ``` | [Impacted Files](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [rpc/net.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjL25ldC5nbw==) | `55.97% <ø> (+1.13%)` | :arrow_up: | | [rpcclient/addresses.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L2FkZHJlc3Nlcy5nbw==) | `72.72% <0.00%> (ø)` | | | [rpcclient/cancel.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L2NhbmNlbC5nbw==) | `78.57% <0.00%> (ø)` | | | [rpcclient/database.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L2RhdGFiYXNlLmdv) | `0.00% <0.00%> (ø)` | | | [rpcclient/discover.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L2Rpc2NvdmVyLmdv) | `40.00% <0.00%> (ø)` | | | [rpcclient/get\_offers.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L2dldF9vZmZlcnMuZ28=) | `72.72% <0.00%> (ø)` | | | [rpcclient/make\_offer.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L21ha2Vfb2ZmZXIuZ28=) | `83.33% <0.00%> (ø)` | | | [rpcclient/peers.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L3BlZXJzLmdv) | `0.00% <0.00%> (ø)` | | | [rpcclient/query.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L3F1ZXJ5Lmdv) | `0.00% <0.00%> (ø)` | | | [rpcclient/swap.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L3N3YXAuZ28=) | `24.74% <0.00%> (ø)` | | | ... and [9 more](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/472/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.