Proof of Data Segment Inclusion (PoDSI) is like a certificate of authenticity. It assures that your file is safely tucked inside a special package, known as a "deal", made by the Lighthouse Node. This node combines several files, gives them a unique ID, offers proof of their inclusion, and even throws a mini-proof of the entire package's structure.
The time between uploading and being able to get your PoDSI varies from testnet from mainnet. Ideally it would be 6hr in testnet and 1 day in mainnet. You can get the PoDSI for your file by calling the getProof function in one of the following ways:
via Axios in node.js
let response =awaitaxios.get("https://api.lighthouse.storage/api/lighthouse/get_proof", { params: { cid: lighthouse_cid, network:"testnet"// Change the network to mainnet when ready }})
or via curl
# Assumes that uploaded your file to mainnet.# Alternatively, if you are using testnet, add &network=testnet to the end of the URL.curlhttps://api.lighthouse.storage/api/lighthouse/get_proof?cid=<puppy_CID>
curl example:
# An example of how to get the PoDSI for a file uploaded to testnetcurl https://api.lighthouse.storage/api/lighthouse/get_proof?cid=QmPCM9nLb4CdtWH9M5iD4oi32ARtaFxgUfgr1eMViU8dfZ&network=testnet
The response, an example of a PoDSI proof on Calibration, should look something like this:
The dealId provides details about the file's storage deal. If the "dealId" is null, it means that the storage deal has been initiated but the miner hasn't started the sealing process yet.
The storageProvider details about SP with which your deal has been made.
The proof contains information that can be used to confirm whether your file was included in a specific aggregated data bundle.
CID information
To get information about cid "QmPCM9nLb4CdtWH9M5iD4oi32ARtaFxgUfgr1eMViU8dfZ", you would use the following: