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 one input.getCell
lookup per non-DID input on each step. input.getCell goes through the
client's cell cache, so repeated walks over the same chain are cheap.
Walk the DID cell chain backwards to produce the ordered list of operations applied to a DID.
Each
transferDidCkbconsumes the previous DID cell as an input and creates a new one with the same Type ID args; the genesis (createDidCkb/createDidCkbwith 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
getTransactioncall per step plus oneinput.getCelllookup per non-DID input on each step.input.getCellgoes through the client's cell cache, so repeated walks over the same chain are cheap.