MCPcopy
hub / github.com/numbersprotocol/nit / getLatestCommitSummary

Function getLatestCommitSummary

src/nit.ts:416–422  ·  view source on GitHub ↗
(assetCid, blockchainInfo)

Source from the content-addressed store, hash-verified

414}
415
416export async function getLatestCommitSummary(assetCid, blockchainInfo) {
417 const commitBlockNumbers = await getCommitBlockNumbers(assetCid, blockchainInfo);
418 const commitAmount = commitBlockNumbers.length;
419 const events = await iterateCommitEvents(assetCid, blockchainInfo, commitAmount - 1, commitAmount);
420 const commitsSummary = await getCommitsSummary(events);
421 return commitsSummary.pop();
422}
423
424export async function getAssetTree(assetTreeCid) {
425 const assetTreeBytes = await ipfs.ipfsCat(assetTreeCid);

Callers 1

pullFunction · 0.85

Calls 3

getCommitBlockNumbersFunction · 0.85
iterateCommitEventsFunction · 0.85
getCommitsSummaryFunction · 0.85

Tested by

no test coverage detected