-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps(dev): bump aegir from 39.0.13 to 40.0.11 (#26)
Bumps [aegir](https://github.com/ipfs/aegir) from 39.0.13 to 40.0.11. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md) - [Commits](ipfs/aegir@v39.0.13...v40.0.11) --- updated-dependencies: - dependency-name: aegir dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <alex@achingbrain.net>
- Loading branch information
1 parent
b103705
commit 37b6ba1
Showing
9 changed files
with
29 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,8 @@ | ||
import { noise } from '@chainsafe/libp2p-noise' | ||
import { yamux } from '@chainsafe/libp2p-yamux' | ||
import { tcp } from '@libp2p/tcp' | ||
import { MemoryBlockstore } from 'blockstore-core' | ||
import { MemoryDatastore } from 'datastore-core' | ||
import { createHelia } from 'helia' | ||
import { createLibp2p, type Libp2pOptions } from 'libp2p' | ||
import { identifyService } from 'libp2p/identify' | ||
import type { Helia } from '@helia/interface' | ||
|
||
export async function createHeliaNode (config: Libp2pOptions = {}): Promise<Helia> { | ||
const blockstore = new MemoryBlockstore() | ||
const datastore = new MemoryDatastore() | ||
|
||
const libp2p = await createLibp2p({ | ||
transports: [ | ||
tcp() | ||
], | ||
connectionEncryption: [ | ||
noise() | ||
], | ||
streamMuxers: [ | ||
yamux() | ||
], | ||
datastore, | ||
services: { | ||
identify: identifyService() | ||
}, | ||
...config | ||
}) | ||
|
||
const helia = await createHelia({ | ||
libp2p, | ||
blockstore, | ||
datastore | ||
}) | ||
export async function createHeliaNode (): Promise<Helia> { | ||
const helia = await createHelia() | ||
|
||
return helia | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"entryPoints": [ | ||
"./src/index.ts" | ||
] | ||
} |