Build the migration witness payload that authorizes a did:plc -> did:ckb
import. Pure: takes a tx hash + signing material, returns a typed
DidCkbWitness that the caller wraps in a WitnessArgs.outputType field.
Per WIP-02 §3.1.1 we send only the genesis operation in history. The
contract recomputes the genesis CID over the CBOR-encoded op, verifies the
self-signature inside it, then verifies sig against
history[0].rotationKeys[rotationKeyIndex].
selfSigIndex defaults to 0 because PLC genesis ops are conventionally
self-signed by the first rotation key; override if the genesis you're
migrating used a different one.
Build the migration witness payload that authorizes a did:plc -> did:ckb import. Pure: takes a tx hash + signing material, returns a typed
DidCkbWitnessthat the caller wraps in aWitnessArgs.outputTypefield.Per WIP-02 §3.1.1 we send only the genesis operation in
history. The contract recomputes the genesis CID over the CBOR-encoded op, verifies the self-signature inside it, then verifiessigagainsthistory[0].rotationKeys[rotationKeyIndex].selfSigIndexdefaults to 0 because PLC genesis ops are conventionally self-signed by the first rotation key; override if the genesis you're migrating used a different one.