mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-01-13 13:33:09 +00:00
* update to latest prettier * fix with prettier: added trailing comma * remove deps from test package, add sinon types, fix type hack in a test, update esling prettier config * update typescript eslint plugins * update package-locks
28 lines
627 B
TypeScript
28 lines
627 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;
|
|
}
|
|
}
|