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

Add endpoint / field to inform about the locked wallet #33

Closed
cstenglein opened this issue Oct 18, 2021 · 3 comments
Closed

Add endpoint / field to inform about the locked wallet #33

cstenglein opened this issue Oct 18, 2021 · 3 comments
Labels
enhancement New feature or request REST An issue only appearing when using the REST interface v0.5.0-beta

Comments

@cstenglein
Copy link
Collaborator

On startup when auto-unlock is not enabled, the Lightning wallet is locked.

I would like to have an extra endpoint or a field in ln_info_lite to see if the wallet is locked.

@fusion44 fusion44 added enhancement New feature or request REST An issue only appearing when using the REST interface v0.5.0-beta labels Oct 21, 2021
@fusion44
Copy link
Owner

fusion44 commented Nov 18, 2021

I don't really want to add a field to ln_info_lite because you only can get this info when the wallet is unlocked.

Proposal:

All endpoints, while locked, will return http status 409 Conflict with a detail message that the wallet is locked. Additionally, when establishing the SSE connection, clients will receive a new event type called wallet_status with one boolean field locked. This way there is no additional endpoint needed, just to see whether the wallet is locked or not.

@cstenglein
Copy link
Collaborator Author

The SSE event sounds awesome!

I'm not sure if the 409 conflict though. How about 423 Locked :)

& a question: What endpoints won't work when the wallet is locked? Am I able to receive on-chain transactions etc.?

@fusion44
Copy link
Owner

See #34 for progress on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request REST An issue only appearing when using the REST interface v0.5.0-beta
Projects
None yet
Development

No branches or pull requests

2 participants