mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-10 17:53:09 +00:00
* chore: update noise * update: package.lock * update: @chainsafe/libp2p-gossipsub * rm unwanted libp2p interface deps & bump up libp2p * refactor code for new deps * update: new package.lock * setup prettier, refactor eslint and rm trailing commas * update package.lock * fix build * import type for interface * fix imports for merge * update typedoc exports * add: CustomEvent import * use new libp2p interface * add aegir as dev dep for tests
28 lines
625 B
TypeScript
28 lines
625 B
TypeScript
import {
|
|
DecodedMessage as DecodedMessageV0,
|
|
proto
|
|
} from "@waku/core/lib/message/version_0";
|
|
import type { IDecodedMessage } from "@waku/interfaces";
|
|
|
|
export class DecodedMessage
|
|
extends DecodedMessageV0
|
|
implements IDecodedMessage
|
|
{
|
|
private readonly _decodedPayload: Uint8Array;
|
|
|
|
constructor(
|
|
pubSubTopic: string,
|
|
proto: proto.WakuMessage,
|
|
decodedPayload: Uint8Array,
|
|
public signature?: Uint8Array,
|
|
public signaturePublicKey?: Uint8Array
|
|
) {
|
|
super(pubSubTopic, proto);
|
|
this._decodedPayload = decodedPayload;
|
|
}
|
|
|
|
get payload(): Uint8Array {
|
|
return this._decodedPayload;
|
|
}
|
|
}
|