Compare commits

..

2 Commits

Author SHA1 Message Date
Derrick Hammer c6b595380a
*Add prettier 2023-02-01 08:47:29 -05:00
Derrick Hammer 4359c590ba
*Add init method 2023-02-01 08:47:19 -05:00
2 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,7 @@
"devDependencies": { "devDependencies": {
"@types/node": "^18.11.18", "@types/node": "^18.11.18",
"prettier": "^2.8.3", "prettier": "^2.8.3",
"pretty": "^2.0.0",
"typescript": "^4.9.5" "typescript": "^4.9.5"
} }
} }

View File

@ -28,9 +28,10 @@ export class SwarmClient extends Client {
return createSocket(resp.id); return createSocket(resp.id);
} }
async init(): Promise<ErrTuple> {
return this.callModuleReturn("init", { swarm: this.swarm });
}
async ready(): Promise<ErrTuple> { async ready(): Promise<ErrTuple> {
const dht = !this.useDefaultSwarm ? this.id : undefined;
return this.callModuleReturn("ready", { swarm: this.swarm }); return this.callModuleReturn("ready", { swarm: this.swarm });
} }