Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 8e1dee22b4 | |
Derrick Hammer | 04c388248c | |
Derrick Hammer | a75c57b1e8 |
|
@ -1,3 +1,10 @@
|
|||
# [0.1.0-develop.22](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.21...v0.1.0-develop.22) (2023-09-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* port listen method ([a75c57b](https://git.lumeweb.com/LumeWeb/libs5/commit/a75c57b1e826a9f26fe25ec10873c0be81f7be5a))
|
||||
|
||||
# [0.1.0-develop.21](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.20...v0.1.0-develop.21) (2023-09-01)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.21",
|
||||
"version": "0.1.0-develop.22",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.21",
|
||||
"version": "0.1.0-develop.22",
|
||||
"dependencies": {
|
||||
"@noble/curves": "^1.1.0",
|
||||
"@noble/hashes": "^1.3.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.21",
|
||||
"version": "0.1.0-develop.22",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
|
|
|
@ -209,6 +209,15 @@ export class RegistryService {
|
|||
return null;
|
||||
}
|
||||
|
||||
public listen(pk: Uint8Array): EventEmitter {
|
||||
const key = new Multihash(pk).toString();
|
||||
if (!this.streams[key]) {
|
||||
this.streams[key] = new EventEmitter();
|
||||
this.sendRegistryRequest(pk);
|
||||
}
|
||||
return this.streams[key];
|
||||
}
|
||||
|
||||
public deserializeRegistryEntry(event: Uint8Array): SignedRegistryEntry {
|
||||
const dataLength = event[42];
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue