Comments (12)
Also get the same behaviour. Previously by making the datastore persistant the peerid would persist between if recreating the client from the same directory. The new behaviour (since the keychgain no longer is shipped with the client) is that the peer id is not persisted even if that is the case.
Looking at the code that did the peerId load from datastore previously, and now is removed. Perhaps this change of behaviour should be documented in the migration guide on how to recover your previous PeerId given that it will now by default not be exported https://github.com/libp2p/js-libp2p/blob/main/doc/migrations/v0.46-v1.0.0.md#keychain.
Here is the previous code that will allow you to export the PeerId before creating the client, if you want to persist the PeerId. I suggest you to write that as pre-loading step before creating your client and pass the peerId to createLibp2p
instead.
js-libp2p/packages/libp2p/src/libp2p.ts
Line 415 in fb8a6f1
from js-libp2p.
If the solution is to use the @libp2p/keychain library, I would appreciate a code example on how to generate a key and pass it on to createLibp2p()
.
If the data is generated by datastore
or some other part of libp2p, I just need an example of how to find it and extract it. It's easy enough to write a JSON object to file. I just need some idea of how to go feeding some persisted private key to createLibp2p()
.
from js-libp2p.
Related Issues (20)
- Immediate timeout when dialling a previously dialled peer after stopping/starting libp2p
- feat: Add new logging options to the components HOT 1
- Is Circuit Relay V1 Supported? HOT 3
- SyntaxError: The requested module '@multiformats/multiaddr-matcher' does not provide an export named 'IP_OR_DOMAIN' HOT 4
- Possible unhandleable crash in kad-dht HOT 1
- bug: Can't auto dial another browser witch only announced /p2p-circuit/webrtc HOT 2
- bug: webrtc-signaling proto ID does not match spec HOT 2
- Package subpath './peer-job-queue' is not defined by "exports" for circuit-relay HOT 4
- @libp2p/autonat import { CodeError, ERR_TIMEOUT } from '@libp2p/interface/errors'; HOT 4
- @libp2p/identify import { CodeError, ERR_NOT_FOUND } from '@libp2p/interface/errors'; HOT 5
- feat: Ensure services indicate their dependencies through identifiers
- deps: @libp2p/webrtc depends on deprecated packages
- abstract-stream: should support undefined logger HOT 3
- logger: please export createDisabledLogger HOT 9
- Error trying to connect to peer node : 'maConn.log is not a function' HOT 3
- libp2p http transport example
- Where is this error being thrown?
- `mss.handle` never resolves when `optimisticSelect` HOT 11
- Keychain depends on IPFS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-libp2p.