Merge pull request #1108 from waku-org/fix/expose-codec-types

This commit is contained in:
fryorcraken.eth 2022-12-20 22:56:57 +11:00 committed by GitHub
commit 68423196ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- Export `Encoder` and `Decoder` types.
## [0.0.7] - 2022-12-19
### Fixed

View File

@ -27,7 +27,7 @@ export { DecodedMessage, generatePrivateKey, getPublicKey };
const log = debug("waku:message-encryption:ecies");
class Encoder implements IEncoder {
export class Encoder implements IEncoder {
constructor(
public contentTopic: string,
private publicKey: Uint8Array,
@ -90,7 +90,7 @@ export function createEncoder(
return new Encoder(contentTopic, publicKey, sigPrivKey, ephemeral);
}
class Decoder extends DecoderV0 implements IDecoder<DecodedMessage> {
export class Decoder extends DecoderV0 implements IDecoder<DecodedMessage> {
constructor(contentTopic: string, private privateKey: Uint8Array) {
super(contentTopic);
}

View File

@ -26,7 +26,7 @@ export { DecodedMessage, generateSymmetricKey };
const log = debug("waku:message-encryption:symmetric");
class Encoder implements IEncoder {
export class Encoder implements IEncoder {
constructor(
public contentTopic: string,
private symKey: Uint8Array,
@ -88,7 +88,7 @@ export function createEncoder(
return new Encoder(contentTopic, symKey, sigPrivKey, ephemeral);
}
class Decoder extends DecoderV0 implements IDecoder<DecodedMessage> {
export class Decoder extends DecoderV0 implements IDecoder<DecodedMessage> {
constructor(contentTopic: string, private symKey: Uint8Array) {
super(contentTopic);
}