Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 29a12e7baf | |
Derrick Hammer | c360b8b1ce | |
Derrick Hammer | b34b7a3a01 |
|
@ -1,3 +1,10 @@
|
|||
# [0.1.0-develop.27](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.26...v0.1.0-develop.27) (2023-09-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add eventemitter support on p2p service and have the handshakedone message emit peerConnected ([b34b7a3](https://git.lumeweb.com/LumeWeb/libs5/commit/b34b7a3a0172adf0b0ce1476f6c68912dcd05576))
|
||||
|
||||
# [0.1.0-develop.26](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.25...v0.1.0-develop.26) (2023-09-01)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.26",
|
||||
"version": "0.1.0-develop.27",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.26",
|
||||
"version": "0.1.0-develop.27",
|
||||
"dependencies": {
|
||||
"@noble/curves": "^1.1.0",
|
||||
"@noble/hashes": "^1.3.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.26",
|
||||
"version": "0.1.0-develop.27",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
|
|
|
@ -60,4 +60,5 @@ export default async function (
|
|||
p2p.sendPublicPeersToPeer(p, [peer]);
|
||||
}
|
||||
}
|
||||
p2p.emit("peerConnected", peer);
|
||||
}
|
||||
|
|
|
@ -26,8 +26,9 @@ import {
|
|||
createTransportSocket,
|
||||
} from "#transports/index.js";
|
||||
import messages from "#messages/index.js";
|
||||
import { EventEmitter } from "events";
|
||||
|
||||
export class P2PService {
|
||||
export class P2PService extends EventEmitter {
|
||||
private logger: Logger;
|
||||
private nodeKeyPair: KeyPairEd25519;
|
||||
private localNodeId?: NodeId;
|
||||
|
@ -39,6 +40,7 @@ export class P2PService {
|
|||
>;
|
||||
|
||||
constructor(node: S5Node) {
|
||||
super();
|
||||
this._node = node;
|
||||
this._networkId = node.config.p2p?.network;
|
||||
this.nodeKeyPair = node.config.keyPair;
|
||||
|
|
Loading…
Reference in New Issue