Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init core status api generation #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

tonyimpervious
Copy link
Contributor

@tonyimpervious tonyimpervious commented Sep 8, 2022

TODO:

  • Key status
  • Relay status
  • Lightning status

@tonyimpervious tonyimpervious mentioned this pull request Sep 8, 2022
@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Merging #17 (6d329cf) into master (3d43455) will increase coverage by 0.12%.
The diff coverage is 23.75%.

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   14.09%   14.22%   +0.12%     
==========================================
  Files          40       41       +1     
  Lines        6618     6693      +75     
==========================================
+ Hits          933      952      +19     
- Misses       5544     5599      +55     
- Partials      141      142       +1     
Impacted Files Coverage Δ
comm/comm.go 12.61% <0.00%> (-0.21%) ⬇️
comm/websocket.go 18.24% <0.00%> (-1.33%) ⬇️
core/comm.go 0.00% <0.00%> (ø)
core/core.go 0.00% <ø> (ø)
core/id.go 15.51% <0.00%> (ø)
core/key.go 0.00% <0.00%> (ø)
core/lightning.go 0.00% <0.00%> (ø)
lightning/node/lnd.go 6.04% <0.00%> (-0.10%) ⬇️
lightning/lightning.go 15.82% <73.07%> (+5.90%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tonyimpervious
Copy link
Contributor Author

Done with this. The responses basically look like:

{
    "keyStatus": {
        "status": "READY"
    },
    "lightningStatus": {
        "nodeStatusList": [
            {
                "pubkey": "02c92b69bdbd1c1a17f7d88bc1e51b4961581ae3dec75335d4852ab8d6f2bbca02",
                "active": false
            }
        ]
    },
    "communicationStatus": {
        "websocketConnections": [
            "did:peer:1zQmX9pDkNmRWiTwZohLhTwPSLJNoCSDeUAZwozXycjmg9e6"
        ]
    }
}

Two notes: With lightning, the daemon technically has support for multiple lightning nodes, so this lists the pubkey and whether or not the connection is active with the lightning node.

With the "relay check", the daemon does not treat relays any different than normal peers when it comes to connections. The daemon is very indifferent to have 0, 1, or many relays that the user might want to check on. So, this lists all peers that there's a web socket connection with. If the browser wants to decide whether or not the connection to the user's relay is good, you'll have to do client side filtering with the relay DID that the browser has configured for the user.

@markhandlersec let me know if that makes sense and if that is acceptable.

@tonyimpervious tonyimpervious marked this pull request as ready for review September 12, 2022 18:03
@markhandlersec
Copy link
Contributor

let me know if that makes sense and if that is acceptable.

@tonyimpervious love it! @markcryptohash and I are reviewing it right now, will approve afterwards. 👊

@stewIMP
Copy link
Contributor

stewIMP commented Oct 5, 2022

works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants