Members on this page
Meshline.Sdk
Meshline.Models.Protocol
GroupMessageEnvelope Class
Contains a signed encrypted group message bound to one group and key epoch.
public sealed record GroupMessageEnvelope : Meshline.Models.Protocol.TypedProtocolModel, System.IEquatable<Meshline.Models.Protocol.GroupMessageEnvelope>
Inheritance System.Object → ProtocolModel → TypedProtocolModel → GroupMessageEnvelope
Implements System.IEquatable<GroupMessageEnvelope>
Constructors
GroupMessageEnvelope() Constructor
Contains a signed encrypted group message bound to one group and key epoch.
public GroupMessageEnvelope();
Properties
GroupMessageEnvelope.CreatedAt Property
The creation time, in Unix seconds.
public long CreatedAt { get; init; }
Property Value
GroupMessageEnvelope.DeviceSignature Property
The device signature over the model's device signing input.
public System.Collections.Immutable.ImmutableArray<byte> DeviceSignature { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.Byte>
GroupMessageEnvelope.Epoch Property
The group key epoch associated with this record.
public long Epoch { get; init; }
Property Value
GroupMessageEnvelope.GroupId Property
The group's canonical grp_ identifier.
public string GroupId { get; init; }
Property Value
GroupMessageEnvelope.MessageId Property
The message's canonical msg_ identifier.
public string MessageId { get; init; }
Property Value
GroupMessageEnvelope.Payload Property
The encrypted group-message content.
public Meshline.Models.Protocol.EncryptedPayload Payload { get; init; }
Property Value
Methods
GroupMessageEnvelope.GetSigningInput(NetworkContext) Method
Builds the canonical, network-bound bytes used to sign or verify this document.
public byte[] GetSigningInput(Meshline.Models.NetworkContext context);
Parameters
context NetworkContext
The network context bound into identifiers or signing input.
Returns
System.Byte[]
The canonical UTF-8 signing input bound to the network context, with the applicable signature fields omitted.
Exceptions
System.Text.Json.JsonException
The signing payload cannot be represented as canonical protocol JSON, contains conflicting extension fields, or already contains a root $context property.
GroupMessageEnvelope.Validate(NetworkContext) Method
Validates group message identifiers, epoch, time, encrypted payload, size, and signature length.
public override Meshline.Validation.ProtocolViolation? Validate(Meshline.Models.NetworkContext? context=null);
Parameters
context NetworkContext
The optional network context passed to nested validation when needed; field-only validation may ignore it.
Returns
ProtocolViolation
The first detected protocol violation, or null if the implemented checks pass.
Remarks
These checks do not verify the external device signature or establish current signer authorization. Verify the signature and the applicable device-state or resource authorization evidence separately.