Helps to ping working ipfs links
MIT License
This package helps to ping working IPFS gateway and returns it. Initially, it was made to check videos and replace broken links.
npm i ping-ipfs-gateway
const pingIPFS = require('ping-ipfs-gateway')
Use as a simple function.
pingIPFS()
There are three function parameters:
Default config:
[
'https://ipfs.io/ipfs/',
'https://crustipfs.live/ipfs/',
'https://crustipfs.info/ipfs/',
'https://gateway.pinata.cloud/ipfs/',
'https://gw.crust-gateway.com/ipfs/',
'https://gw.crust-gateway.xyz/ipfs/',
'https://gw.crust-gateway.cc/ipfs/'
]
Default - QmXCFbH7taH5WDBZa9MiFp4oVBFz2rtUupWCNTib69FP1Y
Default - 8000
Your function can look something like that:
await pingIPFS(config, 'QmYd1Mh2VHVyF3WgvFsN3NFkozXscnCVmEV2YG86UKtK3C')