Compare commits
2 Commits
8ec7444770
...
9e8665338b
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 9e8665338b | |
Derrick Hammer | 7fa2a83141 |
|
@ -14,6 +14,7 @@ export declare class SwarmClient extends Client {
|
|||
removeRelay(pubkey: string): Promise<void>;
|
||||
clearRelays(): Promise<void>;
|
||||
getRelays(): Promise<string[]>;
|
||||
join(topic: Buffer): void;
|
||||
}
|
||||
export declare class Socket extends Client {
|
||||
private id;
|
||||
|
@ -23,7 +24,6 @@ export declare class Socket extends Client {
|
|||
off(type: string, listener: any): this;
|
||||
write(message: string | Buffer): void;
|
||||
end(): void;
|
||||
join(topic: Buffer): void;
|
||||
private ensureEvent;
|
||||
private trackEvent;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAoB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,WAAY,SAAQ,MAAM;IACrC,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,EAAE,CAAa;IAEvB,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;gBAEW,aAAa,UAAO;IAKnB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAa5D,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC;IAGzB,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;IAInB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAG5B,SAAS,IAAI,OAAO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AAG,OAAO,CAAC,IAAI,CAAC;IAI1C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAG5B,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI3C,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAG1B;AAED,qBAAa,MAAO,SAAQ,MAAM;IAChC,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,YAAY,CAAqC;gBAE7C,EAAE,EAAE,MAAM;IAKtB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI;IAiB/D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI;IAStC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIrC,GAAG,IAAI,IAAI;IAUX,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,UAAU;CAInB;AAID,eAAO,MAAM,YAAY,+BAA4C,CAAC"}
|
|
@ -39,6 +39,9 @@ export class SwarmClient extends Client {
|
|||
async getRelays() {
|
||||
return this.callModuleReturn("getRelays", { swarm: this.swarm });
|
||||
}
|
||||
join(topic) {
|
||||
this.callModule("join", { id: this.id, topic });
|
||||
}
|
||||
}
|
||||
export class Socket extends Client {
|
||||
id;
|
||||
|
@ -75,9 +78,6 @@ export class Socket extends Client {
|
|||
}
|
||||
});
|
||||
}
|
||||
join(topic) {
|
||||
this.callModule("join", { id: this.id, topic });
|
||||
}
|
||||
ensureEvent(event) {
|
||||
if (!(event in this.eventUpdates)) {
|
||||
this.eventUpdates[event] = [];
|
||||
|
|
|
@ -49,6 +49,10 @@ export class SwarmClient extends Client {
|
|||
public async getRelays(): Promise<string[]> {
|
||||
return this.callModuleReturn("getRelays", { swarm: this.swarm });
|
||||
}
|
||||
|
||||
join(topic: Buffer): void {
|
||||
this.callModule("join", { id: this.id, topic });
|
||||
}
|
||||
}
|
||||
|
||||
export class Socket extends Client {
|
||||
|
@ -100,10 +104,6 @@ export class Socket extends Client {
|
|||
);
|
||||
}
|
||||
|
||||
join(topic: Buffer): void {
|
||||
this.callModule("join", { id: this.id, topic });
|
||||
}
|
||||
|
||||
private ensureEvent(event: string): void {
|
||||
if (!(event in this.eventUpdates)) {
|
||||
this.eventUpdates[event] = [];
|
||||
|
|
Loading…
Reference in New Issue