Skip to content

Commit

Permalink
deps: update all example deps (#269)
Browse files Browse the repository at this point in the history
The ones that can be updated.
  • Loading branch information
achingbrain authored Jan 19, 2024
1 parent abdb7ac commit 1ec878d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
},
"dependencies": {
"@chainsafe/libp2p-gossipsub": "^11.0.1",
"@chainsafe/libp2p-noise": "^14.1.0",
"@chainsafe/libp2p-noise": "^15.0.0",
"@chainsafe/libp2p-yamux": "^6.0.1",
"@helia/dag-cbor": "^1.0.3",
"@helia/dag-cbor": "^2.0.1",
"@libp2p/autonat": "^1.0.5",
"@libp2p/identify": "^1.0.6",
"@libp2p/kad-dht": "^11.0.7",
"@libp2p/kad-dht": "^12.0.4",
"@libp2p/mdns": "^10.0.7",
"@libp2p/ping": "^1.0.6",
"@libp2p/tcp": "^9.0.7",
"@libp2p/webrtc": "^4.0.10",
"@libp2p/websockets": "^8.0.7",
"datastore-core": "^9.2.7",
"helia": "^2.1.0",
"helia": "^3.0.1",
"libp2p": "^1.0.10",
"multiformats": "^13.0.1"
}
Expand Down
12 changes: 6 additions & 6 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import { noise } from '@chainsafe/libp2p-noise'
import { yamux } from '@chainsafe/libp2p-yamux'
import { autoNAT as autoNATService } from '@libp2p/autonat'
import { identify as identifyService } from '@libp2p/identify'
import { kadDHT } from '@libp2p/kad-dht'
import { kadDHT, removePublicAddressesMapper } from '@libp2p/kad-dht'
import { mdns } from '@libp2p/mdns'
import { ping as pingService } from '@libp2p/ping'
import { tcp } from '@libp2p/tcp'
import { webRTC, webRTCDirect } from '@libp2p/webrtc'
import { webSockets } from '@libp2p/websockets'
import { MemoryDatastore } from 'datastore-core'
import { createHelia } from 'helia'
import { bitswap } from 'helia/block-brokers'
import { createLibp2p } from 'libp2p'

// @ts-check
Expand Down Expand Up @@ -61,7 +60,11 @@ export async function getHelia (clientName) {
ping: pingService({
protocolPrefix: 'ipfs'
}),
dht: kadDHT(),
dht: kadDHT({
protocol: '/ipfs/lan/kad/1.0.0',
peerInfoMapper: removePublicAddressesMapper,
clientMode: false
}),
pubsub: gossipsub(),
nat: autoNATService({
enabled: true
Expand All @@ -70,9 +73,6 @@ export async function getHelia (clientName) {
})

const helia = await createHelia({
blockBrokers: [
bitswap()
],
datastore,
libp2p
})
Expand Down

0 comments on commit 1ec878d

Please sign in to comment.