@me2em/pact
    Preparing search index...

    Function assembleGenesis

    • Assembles the first event of a pact (PACTS §7.5): sq 0, ph ZERO32, every founder signs (co-signature). The result is verified against the empty prefix (B-7) and ready for the store's CAS-append with expectedHead ZERO32.

      Parameters

      Returns Event

      The GENESIS event.

      PactError MALFORMED @ assemble when founderKeys do not cover ft.p exactly (no one extra, none missing); verification failures propagate from finalize.

      const genesis = assembleGenesis({
      pid, ch,
      cn: { th: {}, im: 'bearer', w: false },
      ft: [{ p: alicePub, pp: aliceAnchorPub, an: 'identity' }],
      founderKeys: [alicePactKey],
      });
      await store.append(ZERO32, genesis);