-
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 (#30)
* deps(dev): bump aegir from 39.0.13 to 40.0.11 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
ea21951
commit ea26a0b
Showing
8 changed files
with
29 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"entryPoints": [ | ||
"./src/index.ts", | ||
"./src/errors.ts" | ||
] | ||
} |
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