linkResolverFromNodeLoader static method
Adapts a CID-based node loader — e.g. IPLDHandler.getNode, the
same block-fetch path used by selector execution — into an
IPLDLinkResolver. Loader exceptions propagate and are reported as
resolution failures at the link's path.
Implementation
static IPLDLinkResolver linkResolverFromNodeLoader(
Future<IPLDNode?> Function(CID cid) loadNode,
) {
return (link) => loadNode(
CID.v1(link.codec, Multihash.decode(Uint8List.fromList(link.multihash))),
);
}