@pwngh/economy-lab
    Preparing search index...

    Function boot

    • The day-one door: openPorts, createEconomy, and (unless worker: false) a worker bound to that economy over the same bag. Anything a bad env would make openPorts throw, boot throws too, so a misconfigured deploy dies at startup.

      Parameters

      Returns Promise<Boot>

      const { economy, worker } = await boot(process.env);
      const stop = worker?.start(30_000); // payout, outbox, and checkpoint sweeps every 30s
      const outcome = await economy.submit(
      topUp({ idempotencyKey: 'idem_1', actor: systemActor('store'), userId: 'usr_1',
      amount: credits(1_200), source: 'card' }),
      );