diff --git a/packages/interface-pubsub/src/index.ts b/packages/interface-pubsub/src/index.ts index 10b1c5121..651a8eb0b 100644 --- a/packages/interface-pubsub/src/index.ts +++ b/packages/interface-pubsub/src/index.ts @@ -27,15 +27,22 @@ export const StrictNoSign = 'StrictNoSign' export type SignaturePolicy = typeof StrictSign | typeof StrictNoSign -export interface Message { +export interface StrictSignMessage { from: PeerId topic: string data: Uint8Array - sequenceNumber?: bigint - signature?: Uint8Array - key?: Uint8Array + sequenceNumber: bigint + signature: Uint8Array + key: Uint8Array } +export interface StrictNoSignMessage { + topic: string + data: Uint8Array +} + +export type Message = StrictSignMessage | StrictNoSignMessage + export interface PubSubRPCMessage { from?: Uint8Array topic?: string