Compare commits

..

No commits in common. "cf27a6518f4e9ffd603469070c6fb44e145c0055" and "92bc8e5ce8df5e5ae55f3cf0ad9befae24e02f3e" have entirely different histories.

2 changed files with 13 additions and 4 deletions

View File

@ -5,7 +5,7 @@
"main": "dist/index.js", "main": "dist/index.js",
"dependencies": { "dependencies": {
"@lumeweb/libkernel-universal": "git+https://git.lumeweb.com/LumeWeb/libkernel-universal.git", "@lumeweb/libkernel-universal": "git+https://git.lumeweb.com/LumeWeb/libkernel-universal.git",
"@noble/hashes": "^1.3.0", "@noble/hashes": "^1.2.0",
"@siaweb/libweb": "git+https://git.lumeweb.com/LumeWeb/libsiaweb.git", "@siaweb/libweb": "git+https://git.lumeweb.com/LumeWeb/libsiaweb.git",
"async-mutex": "^0.4.0", "async-mutex": "^0.4.0",
"b4a": "^1.6.3", "b4a": "^1.6.3",
@ -16,8 +16,8 @@
}, },
"devDependencies": { "devDependencies": {
"@types/b4a": "^1.6.0", "@types/b4a": "^1.6.0",
"@types/node": "^18.15.11", "@types/node": "^18.13.0",
"prettier": "^2.8.7", "prettier": "^2.8.4",
"pretty": "^2.0.0", "pretty": "^2.0.0",
"typescript": "^4.9.5" "typescript": "^4.9.5"
} }

View File

@ -191,7 +191,8 @@ export class Socket extends Client {
this._remotePublicKey = info.remotePublicKey; this._remotePublicKey = info.remotePublicKey;
this._rawStream = info.rawStream; this._rawStream = info.rawStream;
await this.swarm.emitAsync("setup");
Protomux.from(this, { slave: true });
} }
on<T extends EventEmitter.EventNames<string | symbol>>( on<T extends EventEmitter.EventNames<string | symbol>>(
event: T, event: T,
@ -252,6 +253,14 @@ export class Socket extends Client {
this.ensureEvent(event as string); this.ensureEvent(event as string);
this.eventUpdates[event].push(update); this.eventUpdates[event].push(update);
} }
public async syncProtomux(action: string, id: number) {
return this.callModuleReturn("syncProtomux", {
id: this.id,
action,
data: id,
});
}
} }
export const MODULE = "_AVKgzVYC8Sb_qiTA6kw5BDzQ4Ch-8D4sldQJl8dXF9oTw"; export const MODULE = "_AVKgzVYC8Sb_qiTA6kw5BDzQ4Ch-8D4sldQJl8dXF9oTw";