Skip to content
Meshline
SDK 1.1.0 · TypeView source on GitHub

Developer guide · API index

Members on this page

Meshline.Sdk

Meshline.Models.Protocol

ChannelPostEdit Class

Carries signed body and attachment updates for an existing channel post.

public sealed record ChannelPostEdit : Meshline.Models.Protocol.TypedProtocolModel, System.IEquatable<Meshline.Models.Protocol.ChannelPostEdit>

Inheritance System.Object → ProtocolModel → TypedProtocolModel → ChannelPostEdit

Implements System.IEquatable<ChannelPostEdit>

Constructors

ChannelPostEdit() Constructor

Carries signed body and attachment updates for an existing channel post.

public ChannelPostEdit();

Properties

ChannelPostEdit.Attachments Property

The update to the attachment list; the default value leaves the field unchanged.

public Meshline.Models.FieldUpdate<System.Collections.Immutable.ImmutableArray<Meshline.Models.Protocol.ContentReference>> Attachments { get; init; }

Property Value

Meshline.Models.FieldUpdate<System.Collections.Immutable.ImmutableArray<ContentReference>>

ChannelPostEdit.Body Property

The update to the message body; the default value leaves the field unchanged.

public Meshline.Models.FieldUpdate<Meshline.Models.Protocol.MessageBody> Body { get; init; }

Property Value

Meshline.Models.FieldUpdate<MessageBody>

ChannelPostEdit.ChannelId Property

The channel's canonical chan_ identifier.

public string ChannelId { get; init; }

Property Value

System.String

ChannelPostEdit.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>

ChannelPostEdit.TargetSequence Property

The original timeline sequence of the channel post being modified or reported.

public long TargetSequence { get; init; }

Property Value

System.Int64

Methods

ChannelPostEdit.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.

ChannelPostEdit.Validate(NetworkContext) Method

Validates the target post, field updates, 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.