Skip to main content

Class: SignalMessage

Defined in: WAProto/index.d.ts:39819

Represents a SignalMessage.

Implements

Constructors

new SignalMessage()

new SignalMessage(properties?): SignalMessage

Defined in: WAProto/index.d.ts:39825

Constructs a new SignalMessage.

Parameters

properties?

ISignalMessage

Properties to set

Returns

SignalMessage

Properties

ciphertext?

optional ciphertext: null | Uint8Array<ArrayBufferLike>

Defined in: WAProto/index.d.ts:39837

SignalMessage ciphertext.

Implementation of

ISignalMessage.ciphertext


counter?

optional counter: null | number

Defined in: WAProto/index.d.ts:39831

SignalMessage counter.

Implementation of

ISignalMessage.counter


previousCounter?

optional previousCounter: null | number

Defined in: WAProto/index.d.ts:39834

SignalMessage previousCounter.

Implementation of

ISignalMessage.previousCounter


ratchetKey?

optional ratchetKey: null | Uint8Array<ArrayBufferLike>

Defined in: WAProto/index.d.ts:39828

SignalMessage ratchetKey.

Implementation of

ISignalMessage.ratchetKey

Methods

toJSON()

toJSON(): object

Defined in: WAProto/index.d.ts:39907

Converts this SignalMessage to JSON.

Returns

object

JSON object


create()

static create(properties?): SignalMessage

Defined in: WAProto/index.d.ts:39844

Creates a new SignalMessage instance using the specified properties.

Parameters

properties?

ISignalMessage

Properties to set

Returns

SignalMessage

SignalMessage instance


decode()

static decode(reader, length?): SignalMessage

Defined in: WAProto/index.d.ts:39870

Decodes a SignalMessage message from the specified reader or buffer.

Parameters

reader

Reader or buffer to decode from

Uint8Array<ArrayBufferLike> | Reader

length?

number

Message length if known beforehand

Returns

SignalMessage

SignalMessage

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited()

static decodeDelimited(reader): SignalMessage

Defined in: WAProto/index.d.ts:39879

Decodes a SignalMessage message from the specified reader or buffer, length delimited.

Parameters

reader

Reader or buffer to decode from

Uint8Array<ArrayBufferLike> | Reader

Returns

SignalMessage

SignalMessage

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode()

static encode(message, writer?): Writer

Defined in: WAProto/index.d.ts:39852

Encodes the specified SignalMessage message. Does not implicitly verify messages.

Parameters

message

ISignalMessage

SignalMessage message or plain object to encode

writer?

Writer

Writer to encode to

Returns

Writer

Writer


encodeDelimited()

static encodeDelimited(message, writer?): Writer

Defined in: WAProto/index.d.ts:39860

Encodes the specified SignalMessage message, length delimited. Does not implicitly verify messages.

Parameters

message

ISignalMessage

SignalMessage message or plain object to encode

writer?

Writer

Writer to encode to

Returns

Writer

Writer


fromObject()

static fromObject(object): SignalMessage

Defined in: WAProto/index.d.ts:39893

Creates a SignalMessage message from a plain object. Also converts values to their respective internal types.

Parameters

object

Plain object

Returns

SignalMessage

SignalMessage


getTypeUrl()

static getTypeUrl(typeUrlPrefix?): string

Defined in: WAProto/index.d.ts:39914

Gets the default type url for SignalMessage

Parameters

typeUrlPrefix?

string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject()

static toObject(message, options?): object

Defined in: WAProto/index.d.ts:39901

Creates a plain object from a SignalMessage message. Also converts values to other types if specified.

Parameters

message

SignalMessage

SignalMessage

options?

IConversionOptions

Conversion options

Returns

object

Plain object


verify()

static verify(message): null | string

Defined in: WAProto/index.d.ts:39886

Verifies a SignalMessage message.

Parameters

message

Plain object to verify

Returns

null | string

null if valid, otherwise the reason why it is not