@me2em/pact
    Preparing search index...

    Function assembleRotate

    • Assembles ROTATE_KEY — exactly parent + new key sign (D39): the roster entry (weight, membership id, voucher) moves to the new key.

      Parameters

      • events: Event[]

        The verified journal prefix.

      • input: RotateInput

        np — the new pactPub; optional ca compromise window (D20).

      • signerKeys: Uint8Array[]

        Exactly two keys — the current (parent) and the new pact key, in any order (the parent is derived from the signature set).

      • Optionalclock: Clock

        Optional clock injection (Р4); defaults to the system clock.

      Returns Event

      The assembled, verified ROTATE_KEY event.

      PactError MALFORMED @ assemble when signerKeys is not exactly two keys; verification failures propagate from finalize.

      const rotate = assembleRotate(events, { np: newPub }, [oldKey, newKey]);