-
Notifications
You must be signed in to change notification settings - Fork 6
Connect Helia Node with Infura Gateway #56
Comments
If the Infura IPFS gateway is running an IPFS node on a multiaddr you know, you can either dial the multiaddr after startup: import { createHelia } from 'helia'
const helia = await createHelia()
helia.libp2p.dial(multiaddr) or you can configure libp2p to bootstrap to the Infura node (e.g. connect on startup): import { createHelia } from 'helia'
import { bootstrap } from '@libp2p/bootstrap'
const helia = await createHelia({
libp2p: {
peerDiscovery: [
bootstrap({
list: [
multiaddr,
// ...other bootstrap nodes
]
})
]
}
}) See the default libp2p config and the default list of bootstrap nodes |
This still doesn't seem to be working, maybe it just doesn't work in the browser yet. Here's a test sandbox, using the same instance / transport as the helia instance that seems to be working on the page. The error I get is "PublishError.InsufficientPeers", even though there are plenty of peers. Also, this isn't to Infura gateways, just thought it might be the same issue. |
@TJKoury the browser usecase is not likely to succeed well yet. Follow ipfs/helia#182 for more details |
Tracked in ipfs/helia#182 |
Looking through the docs, I see the only way to instantiate a Helia node is with createHelia(), which takes a libp2p. Is it possible to connect it to an Infura IPFS gateway yet? I'm trying to understand how to pin data with Helia IPNS, but cannot find documentation to answer my question.
The text was updated successfully, but these errors were encountered: