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

    Function requireSuccess

    • Narrows to a success or throws a plain Error naming the rejection — for hosts and tests where a decline is unexpected. Deliberately not an EconomyError: an assertion failure has no fault code or retry policy.

      Parameters

      Returns Success

      const outcome = await economy.submit(operation);
      const { transaction } = requireSuccess(outcome);
      // transaction.id names the posting whether the outcome was committed or a duplicate replay