Skip to content

Event for disconnection of lnd ? #72

@iangregsondev

Description

@iangregsondev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions