mirror of
https://github.com/logos-messaging/js-noise.git
synced 2026-01-02 05:33:09 +00:00
fix lint
This commit is contained in:
parent
fa5cc104a1
commit
64e59328fa
12
src/codec.ts
12
src/codec.ts
@ -47,8 +47,7 @@ export class NoiseHandshakeEncoder implements IEncoder {
|
||||
public pubsubTopic: string,
|
||||
private hsStepResult: HandshakeStepResult,
|
||||
public ephemeral: boolean = true
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
async toWire(message: IMessage): Promise<Uint8Array | undefined> {
|
||||
const protoMessage = await this.toProtoObj(message);
|
||||
@ -80,8 +79,7 @@ export class NoiseHandshakeDecoder implements IDecoder<NoiseHandshakeMessage> {
|
||||
* @param contentTopic content topic on which the encoded WakuMessages were sent
|
||||
*/
|
||||
|
||||
constructor(public contentTopic: string, public pubsubTopic: string) {
|
||||
}
|
||||
constructor(public contentTopic: string, public pubsubTopic: string) {}
|
||||
|
||||
fromWireToProtoObj(bytes: Uint8Array): Promise<IProtoMessage | undefined> {
|
||||
const protoMessage = WakuMessage.decode(bytes);
|
||||
@ -149,8 +147,7 @@ export class NoiseSecureTransferEncoder implements IEncoder {
|
||||
private hsResult: HandshakeResult,
|
||||
public ephemeral: boolean = true,
|
||||
public metaSetter?: IMetaSetter
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
async toWire(message: IMessage): Promise<Uint8Array | undefined> {
|
||||
const protoMessage = await this.toProtoObj(message);
|
||||
@ -201,8 +198,7 @@ export class NoiseSecureTransferDecoder implements IDecoder<NoiseSecureMessage>
|
||||
* @param hsResult handshake result obtained after the handshake is successful
|
||||
*/
|
||||
|
||||
constructor(public contentTopic: string, public pubsubTopic: string, private hsResult: HandshakeResult) {
|
||||
}
|
||||
constructor(public contentTopic: string, public pubsubTopic: string, private hsResult: HandshakeResult) {}
|
||||
|
||||
fromWireToProtoObj(bytes: Uint8Array): Promise<IProtoMessage | undefined> {
|
||||
const protoMessage = WakuMessage.decode(bytes);
|
||||
|
||||
@ -293,7 +293,12 @@ export class WakuPairing {
|
||||
|
||||
this.eventEmitter.emit("pairingComplete");
|
||||
|
||||
return WakuPairing.getSecureCodec(this.contentTopic, this.pubsubTopic, this.handshakeResult, this.encoderParameters);
|
||||
return WakuPairing.getSecureCodec(
|
||||
this.contentTopic,
|
||||
this.pubsubTopic,
|
||||
this.handshakeResult,
|
||||
this.encoderParameters
|
||||
);
|
||||
}
|
||||
|
||||
private async responderHandshake(): Promise<[NoiseSecureTransferEncoder, NoiseSecureTransferDecoder]> {
|
||||
@ -357,7 +362,12 @@ export class WakuPairing {
|
||||
|
||||
this.eventEmitter.emit("pairingComplete");
|
||||
|
||||
return WakuPairing.getSecureCodec(this.contentTopic, this.pubsubTopic, this.handshakeResult, this.encoderParameters);
|
||||
return WakuPairing.getSecureCodec(
|
||||
this.contentTopic,
|
||||
this.pubsubTopic,
|
||||
this.handshakeResult,
|
||||
this.encoderParameters
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user