Compare commits
No commits in common. "v0.1.0-develop.23" and "v0.1.0-develop.22" have entirely different histories.
v0.1.0-dev
...
v0.1.0-dev
|
@ -1,5 +1,3 @@
|
||||||
# [0.1.0-develop.23](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.22...v0.1.0-develop.23) (2023-09-01)
|
|
||||||
|
|
||||||
# [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)
|
# [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)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.23",
|
"version": "0.1.0-develop.22",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.23",
|
"version": "0.1.0-develop.22",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@noble/curves": "^1.1.0",
|
"@noble/curves": "^1.1.0",
|
||||||
"@noble/hashes": "^1.3.1",
|
"@noble/hashes": "^1.3.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.23",
|
"version": "0.1.0-develop.22",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -209,24 +209,13 @@ export class RegistryService {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public listen(
|
public listen(pk: Uint8Array): EventEmitter {
|
||||||
pk: Uint8Array,
|
|
||||||
cb: (sre: SignedRegistryEntry) => void,
|
|
||||||
): ((() => void) | EventEmitter)[] {
|
|
||||||
const key = new Multihash(pk).toString();
|
const key = new Multihash(pk).toString();
|
||||||
if (!this.streams[key]) {
|
if (!this.streams[key]) {
|
||||||
this.streams[key] = new EventEmitter();
|
this.streams[key] = new EventEmitter();
|
||||||
this.sendRegistryRequest(pk);
|
this.sendRegistryRequest(pk);
|
||||||
}
|
}
|
||||||
const stream = this.streams[key] as EventEmitter;
|
return this.streams[key];
|
||||||
|
|
||||||
const done = () => {
|
|
||||||
stream.off("event", cb);
|
|
||||||
};
|
|
||||||
|
|
||||||
stream.on("event", cb);
|
|
||||||
|
|
||||||
return [done, stream];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public deserializeRegistryEntry(event: Uint8Array): SignedRegistryEntry {
|
public deserializeRegistryEntry(event: Uint8Array): SignedRegistryEntry {
|
||||||
|
|
Loading…
Reference in New Issue