CCC Docs
    Preparing search index...

    Function getDidCkbHistory

    • Walk the DID cell chain backwards to produce the ordered list of operations applied to a DID.

      Each transferDidCkb consumes the previous DID cell as an input and creates a new one with the same Type ID args; the genesis (createDidCkb / createDidCkb with localId) has no DID input. We start from the live cell, read its tx, look for the prior DID cell among the inputs, and repeat. The first entry returned is the newest (most recent transfer); the last is the genesis.

      Cost: roughly one getTransaction call per step, plus up to one call per non-DID input on each step to verify it isn't the prior DID cell. For typical DIDs with a handful of updates that's a small handful of RPC calls.

      Parameters

      • props: { client: Client; id: BytesLike; liveCell?: Cell; maxSteps?: number }
        • client: Client
        • id: BytesLike
        • OptionalliveCell?: Cell

          Pre-resolved live cell; if omitted, we fetch it.

        • OptionalmaxSteps?: number

          Safety bound to prevent runaway walks. Default 50.

      Returns Promise<HistoryEntry[]>