Simplifies contract functions for Orchestration by wrapping a simpler function with all the tools it needs in order to use Orchestration.

const contract = (zcf, privateArgs, zone, tools) => { ... };
export const start = withOrchestration(contract);
  • Type Parameters

    • CT extends Record<string, unknown>
    • PA extends OrchestrationPowers & {
          marshaller: {
              fromCapData: FromCapData<unknown>;
              serialize: ToCapData<unknown>;
              toCapData: ToCapData<unknown>;
              unserialize: FromCapData<unknown>;
          };
      }
    • R

    Parameters

    • contractFn: ((zcf: ZCF<CT>, privateArgs: PA, zone: Zone, tools: OrchestrationTools) => Promise<R>)
        • (zcf, privateArgs, zone, tools): Promise<R>
        • Parameters

          • zcf: ZCF<CT>
          • privateArgs: PA
          • zone: Zone
          • tools: OrchestrationTools

          Returns Promise<R>

    Returns ((zcf: ZCF<CT>, privateArgs: PA, baggage: Baggage) => Promise<R>)

    a Zoe start function

      • (zcf, privateArgs, baggage): Promise<R>
      • Parameters

        Returns Promise<R>