Skip to content

Commit

Permalink
update helia
Browse files Browse the repository at this point in the history
  • Loading branch information
undyingwraith committed Jan 2, 2025
1 parent 49793e5 commit 833113d
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 44 deletions.
32 changes: 16 additions & 16 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@
]
},
"dependencies": {
"@chainsafe/libp2p-gossipsub": "^13.0.0",
"@chainsafe/libp2p-noise": "^15.0.0",
"@chainsafe/libp2p-gossipsub": "^14.1.0",
"@chainsafe/libp2p-noise": "^16.0.0",
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^3.0.0",
"@helia/unixfs": "^3.0.6",
"@libp2p/bootstrap": "^10.0.24",
"@libp2p/identify": "^2.0.2",
"@libp2p/peer-id": "^4.1.2",
"@libp2p/pnet": "^1.0.1",
"@libp2p/pubsub-peer-discovery": "^10.0.2",
"@libp2p/tcp": "^9.0.16",
"@libp2p/websockets": "^8.0.16",
"blockstore-fs": "^1.1.10",
"datastore-level": "^10.1.8",
"@helia/unixfs": "^4.0.1",
"@libp2p/bootstrap": "^11.0.16",
"@libp2p/identify": "^3.0.14",
"@libp2p/peer-id": "^5.0.9",
"@libp2p/pnet": "^2.0.16",
"@libp2p/pubsub-peer-discovery": "^11.0.1",
"@libp2p/tcp": "^10.0.14",
"@libp2p/websockets": "^9.1.0",
"blockstore-fs": "^2.0.2",
"datastore-level": "^11.0.1",
"electron-updater": "6.2.1",
"helia": "^4.2.2",
"helia": "^5.1.1",
"ipmc-core": "workspace:^",
"ipmc-interfaces": "workspace:^",
"ipmc-ui": "workspace:^",
"kubo-rpc-client": "^5.0.2",
"libp2p": "^1.3.0",
"multiformats": "^13.1.0",
"libp2p": "^2.4.2",
"multiformats": "^13.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"ts-node": "^10.9.2"
Expand All @@ -55,7 +55,7 @@
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
"@electron-toolkit/eslint-config-ts": "^2.0.0",
"@electron-toolkit/tsconfig": "^1.0.1",
"@helia/ipns": "^7.2.2",
"@helia/ipns": "^8.0.1",
"@preact/signals-react-transform": "^0.5.0",
"@rollup/plugin-commonjs": "^28.0.2",
"@types/node": "^20.17.10",
Expand Down
14 changes: 4 additions & 10 deletions packages/desktop/src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { identify, identifyPush } from '@libp2p/identify';
import { kadDHT, removePrivateAddressesMapper } from '@libp2p/kad-dht';
import { keychain } from '@libp2p/keychain';
import { mdns } from '@libp2p/mdns';
import { mplex } from '@libp2p/mplex';
import { peerIdFromString } from '@libp2p/peer-id';
import { ping } from '@libp2p/ping';
import { preSharedKey } from '@libp2p/pnet';
Expand Down Expand Up @@ -72,9 +71,7 @@ const nodeService: INodeService = {
transports: [
webSockets(),
tcp(),
circuitRelayTransport({
discoverRelays: 1,
}),
circuitRelayTransport(),
],
peerDiscovery: [
bootstrap({
Expand All @@ -88,19 +85,16 @@ const nodeService: INodeService = {
pubsubPeerDiscovery(),
mdns(),
],
connectionEncryption: [
connectionEncrypters: [
noise({
crypto: pureJsCrypto
}),
],
streamMuxers: [
yamux(),
mplex(),
],
services: {
relay: circuitRelayServer({
advertise: true,
}),
relay: circuitRelayServer(),
dht: kadDHT({
peerInfoMapper: removePrivateAddressesMapper,
validators: {
Expand Down Expand Up @@ -159,7 +153,7 @@ const nodeService: INodeService = {
},
async resolve(name) {
try {
return (await ipns(helia).resolve(peerIdFromString(name))).cid.toString();
return (await ipns(helia).resolve(peerIdFromString(name).publicKey!)).cid.toString();
} catch (ex) {
console.error(ex);
return (await ipns(helia).resolveDNSLink(name)).cid.toString();
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cli": "vite-node ./src/index.ts"
},
"dependencies": {
"@inquirer/prompts": "^7.2.0",
"@inquirer/prompts": "^7.2.1",
"chalk": "^5.4.0",
"cli-progress": "^3.12.0",
"fluent-ffmpeg": "^2.1.3",
Expand Down
8 changes: 4 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@helia/unixfs": "^3.0.6",
"@libp2p/pnet": "^1.0.1",
"@helia/unixfs": "^4.0.1",
"@libp2p/pnet": "^2.0.16",
"@mui/icons-material": "^6.2.1",
"@mui/material": "^6.2.1",
"@preact/signals-react": "^2.3.0",
"file-type": "^19.6.0",
"helia": "^4.2.2",
"helia": "^5.1.1",
"ipmc-core": "workspace:^",
"ipmc-interfaces": "workspace:^",
"minidenticons": "^4.2.1",
"multiformats": "^13.1.0",
"multiformats": "^13.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"shaka-player": "^4.12.5",
Expand Down
17 changes: 9 additions & 8 deletions packages/webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
"build": "vite build"
},
"dependencies": {
"@helia/ipns": "^7.2.2",
"@helia/unixfs": "^3.0.6",
"@libp2p/kad-dht": "12.0.9",
"blockstore-idb": "^1.1.8",
"@helia/ipns": "^8.0.1",
"@helia/unixfs": "^4.0.1",
"@libp2p/kad-dht": "14.1.6",
"@libp2p/webtransport": "^5.0.21",
"blockstore-idb": "^2.0.1",
"buffer": "^6.0.3",
"crypto": "^1.0.1",
"crypto-browserify": "^3.12.0",
"datastore-idb": "^2.1.9",
"helia": "^4.2.2",
"crypto-browserify": "^3.12.1",
"datastore-idb": "^3.0.1",
"helia": "^5.1.1",
"ipmc-core": "workspace:^",
"libp2p": "^1.3.0",
"libp2p": "^2.4.2",
"libp2p-pnet": "^0.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/webui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ export function App() {
}),
} : {}),
transports: [
circuitRelayTransport({
discoverRelays: 1
}),
circuitRelayTransport(),
webRTC(),
webRTCDirect(),
webTransport(),
Expand All @@ -98,7 +96,9 @@ export function App() {
yamux(),
mplex()
],
connectionEncryption: [noise()],
connectionEncrypters: [
noise(),
],
services: {
dht: kadDHT({
validators: {
Expand Down Expand Up @@ -153,7 +153,7 @@ export function App() {
},
async resolve(name) {
try {
return (await ipns(helia).resolve(peerIdFromString(name))).cid.toString();
return (await ipns(helia).resolve(peerIdFromString(name).publicKey!)).cid.toString();
} catch (ex) {
return (await ipns(helia).resolveDNSLink(name)).cid.toString();
}
Expand Down

0 comments on commit 833113d

Please sign in to comment.