Constructor for a Whiteflag message
the Whiteflag message type
the Whiteflag protocol version
Decodes an unencrypted binary encoded message
a binary encoded message
a new Whiteflag message object
FunctionEncodes the message, making the contents final encode
Optionalikm: Uint8Array<ArrayBufferLike>the input key material to derive the encryption key, if the message is to be encrypted
Optionaladdress: Uint8Array<ArrayBufferLike>the binary encoded originator address, if the message is to be encrypted
Optionaliv: Uint8Array<ArrayBufferLike>the initialisation vector, if required for the encryption method
this Whitedlag message object with the encoded message
FunctionReturns the value of the specified message field get
the name of the message field
the value of the message field
FunctionReturns the value of the metaheader field getMeta
the name of the metaheader field
the value of the metaheader field
FunctionIndicates if the message has already been encoded isEncoded
true if message has been encoded, else false
FunctionIndicates if the message is valid, i.e. if all fields contain valid values isValid
true if message is valid, else false
FunctionSets the value of the specified message field, if the message has not been encoded set
the name of the message field
the value to set
true if succesful, else false
FunctionSets the value of the specified metaheader field setMeta
the name of the metaheader field
the value to set
true if succesful, else false
FunctionReturns the Whiteflag message encoded as a hexadecimal string toHex
a hexadecimal string with the encoded message
FunctionReturns the Whiteflag message as a plain object toObject
the message as a plain object
FunctionReturns the Whiteflag message as a plain object toObject
the message as a plain object
FunctionReturns the Whiteflag message as a string toString
a concatinated string of field values
FunctionReturns the encoded Whiteflag message as a UInt8array toU8a
a UInt8array with the encoded message
FunctionReturns message validation errors validate
an array of validation errors
StaticfromFunctionCreates new Whiteflag message from a binary buffer fromBinary
a binary buffer with the encoded message
Optionalikm: Uint8Array<ArrayBufferLike>the input key material to derive the encryption key, if the message is encrypted
Optionaladdress: Uint8Array<ArrayBufferLike>the binary encoded originator address, if the message is encrypted
Optionaliv: Uint8Array<ArrayBufferLike>the initialisation vector, if required for the encryption method
a new Whiteflag message object with the decoded message
StaticfromCreates new Whiteflag message from a hexadecimal encoded string
atring with the hexadecimal encoded message
Optionalikm: stringthe hexadecimalinput key material to derive the encryption key, if the message is encrypted
Optionaladdress: stringthe hexadecimal encoded originator address, if the message is encrypted
Optionaliv: stringthe hexadecimal initialisation vector, if required for the encryption method
a new Whiteflag message object with the decoded message
StaticfromFunctionCreates new Whiteflag message from a plain object fromObject
a plain JavaScript object with message header and body
a new Whiteflag message
StaticfromFunctionCreates new Whiteflag message from a plain object fromObject
a plain JavaScript object with message header and body
a new Whiteflag message object
StaticfromCreates new Whiteflag message from a binary encoded message
a Uint8Array with the binary encoded message
Optionalikm: Uint8Array<ArrayBufferLike>the input key material to derive the encryption key, if the message is encrypted
Optionaladdress: Uint8Array<ArrayBufferLike>the binary encoded originator address, if the message is encrypted
Optionaliv: Uint8Array<ArrayBufferLike>the initialisation vector, if required for the encryption method
a new Whiteflag message object with the decoded message
A Whiteflag message as defined by the Whiteflag specification WfMessage
Wfversion
v1-draft.7
Wfreference
4 Message Format
Remarks
This class extends the core Whiteflag message class by adding metadata to the message, additional data conversions (such as to and from JSON), and specific Whiteflag protocol features. This allows the class to be used and integrated in larger functional applications in accordance with the Whiteflag specification.