provideEndoBootstrap = async (
  powers,
  { cancel, gracePeriodMs, gracePeriodElapsed, specials },
) => {
  const { persistence: persistencePowers } = powers;
  const { rootNonce: endoFormulaNumber, isNewlyCreated } =
    await persistencePowers.provideRootNonce();
  const daemonCore = await makeDaemonCore(powers, endoFormulaNumber, {
    cancel,
    gracePeriodMs,
    gracePeriodElapsed,
    specials,
  });
  const isInitialized = !isNewlyCreated;
  if (isInitialized) {
    const endoId = formatId({
      number: endoFormulaNumber,
      node: daemonCore.nodeId,
    });
    return /** @type {Promise<FarRef<EndoBootstrap>>} */ (
      daemonCore.provide(endoId)
    );
  } else {
    const { value: endoBootstrap } =
      await daemonCore.formulateEndo(endoFormulaNumber);
    return endoBootstrap;
  }
}
@param {DaemonicPowers} powers
@param {object} args
@param {(error: Error) => void} args.cancel
@param {number} args.gracePeriodMs
@param {Promise<never>} args.gracePeriodElapsed
@param {Specials} args.specials
@returns {Promise<FarRef<EndoBootstrap>>}