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

TypedProtocolModel Class

Adds a protocol type discriminator and network-bound signing input to a protocol model.

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

Inheritance System.Object → ProtocolModel → TypedProtocolModel

Derived
↳ AccountContactSync
↳ AccountDeviceState
↳ AccountGroupHistorySecretSync
↳ AccountGroupPrivateStateRequest
↳ AccountGroupPrivateStateSync
↳ AccountProfile
↳ AccountRoute
↳ ChannelDescriptor
↳ ChannelPost
↳ ChannelPostDelete
↳ ChannelPostEdit
↳ ContactConsent
↳ ContactGrant
↳ ContactInvite
↳ DeviceCertificate
↳ DeviceStateChanged
↳ DirectMessage
↳ GroupApplication
↳ GroupCreate
↳ GroupInvite
↳ GroupKeyRotated
↳ GroupManagementOperation
↳ GroupMemberNicknameUpdate
↳ GroupMemberRecoveryRequest
↳ GroupMessage
↳ GroupMessageEnvelope
↳ MessageEnvelope
↳ RelayDescriptor
↳ SignedDeviceStateQuery

Implements System.IEquatable<TypedProtocolModel>

Constructors

TypedProtocolModel(string) Constructor

Initializes a new instance of TypedProtocolModel.

public TypedProtocolModel(string type);

Parameters

type System.String

The protocol discriminator to serialize as $type.

Properties

TypedProtocolModel.Type Property

The protocol discriminator serialized as $type.

public string Type { get; }

Property Value

System.String

Methods

TypedProtocolModel.GetSigningInput(NetworkContext, string[]) Method

Builds the canonical, network-bound bytes used to sign or verify this document.

protected internal byte[] GetSigningInput(Meshline.Models.NetworkContext context, params string[] excludedProperties);

Parameters

context NetworkContext

The network context bound into identifiers or signing input.

excludedProperties System.String[]

Serialized property names to omit from the signing input, typically signature fields.

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.

System.InvalidOperationException
An excluded property name does not identify exactly one serialized property.