CCC Docs
    Preparing search index...

    Function calcDaoClaimEpoch

    • 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 [integer, numerator, denominator].

      const epoch = calcDaoClaimEpoch(depositHeader, withdrawHeader);
      console.log(`Can claim at epoch: ${epoch.integer}, numerator: ${epoch.numerator}, denominator: ${epoch.denominator}`);

      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.