MCPcopy Index your code
hub / github.com/numbersprotocol/nit / pull

Function pull

src/nit.ts:299–307  ·  view source on GitHub ↗
(assetCid: string, blockchainInfo)

Source from the content-addressed store, hash-verified

297}
298
299export async function pull(assetCid: string, blockchainInfo) {
300 const latestCommit = await getLatestCommitSummary(assetCid, blockchainInfo);
301 if (latestCommit != null) {
302 const assetTree = await getAssetTree(latestCommit.commit.assetTreeCid);
303 return assetTree;
304 } else {
305 return null
306 }
307}
308
309//export async function add(assetCid, assetUpdates, blockchainInfo) {
310// const latestAssetTree = await pull(assetCid, blockchainInfo);

Callers

nothing calls this directly

Calls 2

getLatestCommitSummaryFunction · 0.85
getAssetTreeFunction · 0.85

Tested by

no test coverage detected