Class: PreKeyRecordStructure
Defined in: WAProto/index.d.ts:39609
Represents a PreKeyRecordStructure.
Implements
Constructors
new PreKeyRecordStructure()
new PreKeyRecordStructure(
properties
?):PreKeyRecordStructure
Defined in: WAProto/index.d.ts:39615
Constructs a new PreKeyRecordStructure.
Parameters
properties?
Properties to set
Returns
Properties
id?
optional
id:null
|number
Defined in: WAProto/index.d.ts:39618
PreKeyRecordStructure id.
Implementation of
privateKey?
optional
privateKey:null
|Uint8Array
<ArrayBufferLike
>
Defined in: WAProto/index.d.ts:39624
PreKeyRecordStructure privateKey.
Implementation of
IPreKeyRecordStructure
.privateKey
publicKey?
optional
publicKey:null
|Uint8Array
<ArrayBufferLike
>
Defined in: WAProto/index.d.ts:39621
PreKeyRecordStructure publicKey.
Implementation of
IPreKeyRecordStructure
.publicKey
Methods
toJSON()
toJSON():
object
Defined in: WAProto/index.d.ts:39694
Converts this PreKeyRecordStructure to JSON.
Returns
object
JSON object
create()
static
create(properties
?):PreKeyRecordStructure
Defined in: WAProto/index.d.ts:39631
Creates a new PreKeyRecordStructure instance using the specified properties.
Parameters
properties?
Properties to set
Returns
PreKeyRecordStructure instance
decode()
static
decode(reader
,length
?):PreKeyRecordStructure
Defined in: WAProto/index.d.ts:39657
Decodes a PreKeyRecordStructure 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
PreKeyRecordStructure
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
static
decodeDelimited(reader
):PreKeyRecordStructure
Defined in: WAProto/index.d.ts:39666
Decodes a PreKeyRecordStructure message from the specified reader or buffer, length delimited.
Parameters
reader
Reader or buffer to decode from
Uint8Array
<ArrayBufferLike
> | Reader
Returns
PreKeyRecordStructure
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:39639
Encodes the specified PreKeyRecordStructure message. Does not implicitly verify messages.
Parameters
message
PreKeyRecordStructure 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:39647
Encodes the specified PreKeyRecordStructure message, length delimited. Does not implicitly verify messages.
Parameters
message
PreKeyRecordStructure message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
static
fromObject(object
):PreKeyRecordStructure
Defined in: WAProto/index.d.ts:39680
Creates a PreKeyRecordStructure message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
PreKeyRecordStructure
getTypeUrl()
static
getTypeUrl(typeUrlPrefix
?):string
Defined in: WAProto/index.d.ts:39701
Gets the default type url for PreKeyRecordStructure
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:39688
Creates a plain object from a PreKeyRecordStructure message. Also converts values to other types if specified.
Parameters
message
PreKeyRecordStructure
options?
IConversionOptions
Conversion options
Returns
object
Plain object
verify()
static
verify(message
):null
|string
Defined in: WAProto/index.d.ts:39673
Verifies a PreKeyRecordStructure message.
Parameters
message
Plain object to verify
Returns
null
| string
null
if valid, otherwise the reason why it is not