• Calculate claimable epoch for Nervos DAO withdrawal. This function determines the earliest epoch when a Nervos DAO withdrawal can be claimed based on the deposit and withdrawal epochs.

    Parameters

    Returns Epoch

    The epoch when the withdrawal can be claimed, represented as [number, index, length].

    const claimEpoch = calcDaoClaimEpoch(depositHeader, withdrawHeader);
    console.log(`Can claim at epoch: ${claimEpoch[0]}, index: ${claimEpoch[1]}, length: ${claimEpoch[2]}`);

    The Nervos DAO has a minimum lock period of 180 epochs (~30 days). This function calculates the exact epoch when the withdrawal becomes claimable based on the deposit epoch and withdrawal epoch timing.