Skip to the content.

The independent participation pattern

Intent

Giving the counterparty the right to create an arbitrary amount of invitations to participate in the smart contract.

Consequences

Structure

Participants

Implementation

const start = zcf => {
  const offerHandler = seat => {
    //...
  };
  const publicFacet = Far('publicFacet', {
    makeInvitation: () => zcf.makeInvitation(offerHandler, 'description');
  });
  return harden({ publicFacet });
};
harden(start);
export { start };

The smart contract returns a publicFacet which contains a makeInvitation method to create invitations. This way, when the creator shares the publicFacet with the counterparty, the counterparty can create an arbitrary amount of invitations using the makeInvitation method.

Known uses