Skip to main content
Checks the remaining timelock on a given node.

Method Signature

async checkTimelock(nodeId: string): Promise<{
  nodeTimelock: number;
  refundTimelock: number;
}>

Parameters

nodeId
string
required
The ID of the node to check

Returns

timelocks
object
required
Object containing:
  • nodeTimelock: Remaining blocks for the node transaction
  • refundTimelock: Remaining blocks for the refund transaction

Example

const timelocks = await wallet.checkTimelock("node-id-here");
console.log("Node timelock:", timelocks.nodeTimelock, "blocks");
console.log("Refund timelock:", timelocks.refundTimelock, "blocks");