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

Event for disconnection of lnd ? #72

Open
iangregsondev opened this issue Feb 18, 2020 · 0 comments
Open

Event for disconnection of lnd ? #72

iangregsondev opened this issue Feb 18, 2020 · 0 comments

Comments

@iangregsondev
Copy link

iangregsondev commented Feb 18, 2020

Hi,

I was wondering if there was some kind of discconection event / connection event so that we know when lnd is down ?

i.e. after this

(async () => {
  const lnRpcClient = await createLnRpc(config);

Is there a subscription that informs me that the lnRpc is down - hence the rpc is down, so I can re-act inside of my code ?

Specifically I want to work with typescript, but i was wondering if something existed in another library I found (but only javasript) - that gives the following

// Do something cool if we detect that the wallet is locked.
grpc.on(`locked`, () => console.log('wallet locked!'))

// Do something cool when the wallet gets unlocked.
grpc.on(`active`, () => console.log('wallet unlocked!'))

// Do something cool when the connection gets disconnected.
grpc.on(`disconnected`, () => console.log('disconnected from lnd!'))

Thanks in advance

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

No branches or pull requests

1 participant