Skip to content
Meshline
SDK 1.1.0 · TypeView source on GitHub

Developer guide · API index

Members on this page

Meshline.Sdk

Meshline.Components

GroupManager Class

Manages encrypted groups, membership, invitations, messages, and group key distribution.

public sealed class GroupManager : Meshline.Components.ClientComponent

Inheritance System.Object → ClientComponent → GroupManager

Exceptions

System.ArgumentNullException
The network context in options is null. The options argument is null.

System.ArgumentException
The configured account identifier is invalid.

System.NotSupportedException
The configured account identifier uses an unsupported account namespace.

Constructors

GroupManager(ClientOptions, DatabaseOptions, RelayClientPool, DeviceManager, MessageManager, ISecretProtector) Constructor

Manages encrypted groups, membership, invitations, messages, and group key distribution.

public GroupManager(Meshline.Models.Client.ClientOptions options, Meshline.Storage.DatabaseOptions databaseOptions, Meshline.Transport.RelayClientPool relayClients, Meshline.Components.DeviceManager deviceManager, Meshline.Components.MessageManager messageManager, Meshline.Interactions.ISecretProtector secretProtector);

Parameters

options ClientOptions

The network and account configuration for this component.

databaseOptions DatabaseOptions

The SQLite database configuration; create its parent directory and apply migrations before initialization.

relayClients RelayClientPool

The shared relay pool. The application owns it and must dispose it after all dependent components.

deviceManager DeviceManager

The device component sharing this network, account, database, and relay pool.

messageManager MessageManager

The message component providing the account-message stream and shared local state.

secretProtector ISecretProtector

The application-owned protector used to store and restore local secrets.

Exceptions

System.ArgumentNullException
The network context in options is null. The options argument is null.

System.ArgumentException
The configured account identifier is invalid.

System.NotSupportedException
The configured account identifier uses an unsupported account namespace.

Methods

GroupManager.ApplyToGroupAsync(GroupInvite, CancellationToken) Method

Submits a signed admission application using an invitation and a group-specific member encryption key.

public System.Threading.Tasks.Task ApplyToGroupAsync(Meshline.Models.Client.GroupInvite invite, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

invite GroupInvite

The signed invitation authorizing the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

Remarks

Admission remains pending until an authorized group administrator approves it. The operation retains the local member key needed to receive the group's encrypted secrets.
The hosting relay checks its accepted invitation by ID. Local validation checks the supplied document's fields and recipient, not its signature independently.

GroupManager.ApproveApplicationsAsync(GroupRef, IReadOnlyList<string>, CancellationToken) Method

Approves pending applicants and distributes the current client secret to their member encryption keys.

public System.Threading.Tasks.Task ApproveApplicationsAsync(Meshline.Models.Client.GroupRef group, System.Collections.Generic.IReadOnlyList<string> accounts, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accounts System.Collections.Generic.IReadOnlyList<System.String>

The account identifiers affected by the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable. A selected request is missing, changed during paging, or expired, or the current client secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The account list is empty or contains duplicates, or the resulting signed approval violates protocol constraints.

System.ArgumentOutOfRangeException
A selected request has a relay-provided timestamp outside the supported DateTimeOffset range.

System.UnauthorizedAccessException
The local device lacks current authorization to enqueue group-key synchronization to the account's other devices.

GroupManager.ApproveKeyRecoveryAsync(GroupRef, IReadOnlyList<string>, CancellationToken) Method

Approves member key recovery and distributes the current client secret to the replacement keys.

public System.Threading.Tasks.Task ApproveKeyRecoveryAsync(Meshline.Models.Client.GroupRef group, System.Collections.Generic.IReadOnlyList<string> accounts, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accounts System.Collections.Generic.IReadOnlyList<System.String>

The account identifiers affected by the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable. A selected request is missing, changed during paging, or expired, or the current client secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The account list is empty or contains duplicates, or the resulting signed approval violates protocol constraints.

System.ArgumentOutOfRangeException
A selected request has a relay-provided timestamp outside the supported DateTimeOffset range.

System.UnauthorizedAccessException
The local device lacks current authorization to enqueue group-key synchronization to the account's other devices.

GroupManager.BanAsync(GroupRef, IReadOnlyList<string>, CancellationToken) Method

Bans the selected accounts through the group's signed management chain.

public System.Threading.Tasks.Task BanAsync(Meshline.Models.Client.GroupRef group, System.Collections.Generic.IReadOnlyList<string> accounts, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accounts System.Collections.Generic.IReadOnlyList<System.String>

The account identifiers affected by the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

GroupManager.CloseGroupAsync(GroupRef, CancellationToken) Method

Closes the group through a signed management-chain operation.

public System.Threading.Tasks.Task CloseGroupAsync(Meshline.Models.Client.GroupRef group, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

Remarks

Closure changes group lifecycle state. Previously decrypted messages can remain in local storage; callers must not assume closed-group history remains retrievable from the relay.

GroupManager.CreateGroupAsync(string, GroupCreateOptions, CancellationToken) Method

Creates an encrypted group and its initial member key and secret state on a hosting relay.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupInfo> CreateGroupAsync(string relayId, Meshline.Models.Client.GroupCreateOptions options, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

relayId System.String

The relay's canonical lowercase Neo script-hash identifier.

options GroupCreateOptions

The new group name, capacity, description, and invitation policy.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupInfo>
The created group's state and the local account's ownership information.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The relay identifier or requested group name, description, capacity, or invitation policy violates protocol constraints.

System.ArgumentOutOfRangeException
The requested member capacity exceeds the hosting relay limit.

System.UnauthorizedAccessException
The local device lacks current authorization to enqueue group-key synchronization to the account's other devices.

GroupManager.CreateInviteAsync(GroupRef, string, DateTimeOffset, CancellationToken) Method

Creates a group invitation restricted to one account.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupInvite> CreateInviteAsync(Meshline.Models.Client.GroupRef group, string inviteeAccountId, System.DateTimeOffset expiresAt, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

inviteeAccountId System.String

The account permitted to use the targeted invitation.

expiresAt System.DateTimeOffset

The future expiration time of the invitation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupInvite>
The signed group invitation with its hosting relay reference.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component or a component used by the operation has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The expiration, invitee, usage limit, or resulting signed invitation violates protocol constraints.

System.ArgumentOutOfRangeException
The invitation lifetime exceeds the hosting relay limit.

System.UnauthorizedAccessException
The current membership, group status, or invitation policy does not permit creating this invitation.

GroupManager.CreateInviteAsync(GroupRef, DateTimeOffset, Nullable<long>, CancellationToken) Method

Creates a shareable group invitation with optional use limits.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupInvite> CreateInviteAsync(Meshline.Models.Client.GroupRef group, System.DateTimeOffset expiresAt, System.Nullable<long> maxUses=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

expiresAt System.DateTimeOffset

The future expiration time of the invitation.

maxUses System.Nullable<System.Int64>

An optional positive limit on uses of a shareable invitation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupInvite>
The signed group invitation with its hosting relay reference.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component or a component used by the operation has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The expiration, invitee, usage limit, or resulting signed invitation violates protocol constraints.

System.ArgumentOutOfRangeException
The invitation lifetime exceeds the hosting relay limit.

System.UnauthorizedAccessException
The current membership, group status, or invitation policy does not permit creating this invitation.

GroupManager.GetApplicationsAsync(GroupRef, PageRequest, CancellationToken) Method

Reads and verifies a relay-backed page of pending group admission applications.

public System.Threading.Tasks.Task<Meshline.Models.Client.Page<Meshline.Models.Client.GroupApplicationInfo>> GetApplicationsAsync(Meshline.Models.Client.GroupRef group, Meshline.Models.Client.PageRequest? page=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

page PageRequest

The requested page size and previous continuation cursor, or null for the first default-sized page.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<Meshline.Models.Client.Page<GroupApplicationInfo>>
A page of verified admission applications and an optional relay continuation cursor.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or its signing device is uninitialized, the local device or secret protector is unavailable, or the relay cannot establish the required session.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

System.ArgumentOutOfRangeException
A relay-provided Unix timestamp is outside the range supported by DateTimeOffset.

GroupManager.GetBansAsync(GroupRef, string, CancellationToken) Method

Opens a snapshot reader for locally stored banned account identifiers in a group.

public System.Threading.Tasks.Task<Meshline.Storage.QueryReader<string>> GetBansAsync(Meshline.Models.Client.GroupRef group, string? search=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

search System.String

An optional substring of the account identifier. Null or empty text disables this filter.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<Meshline.Storage.QueryReader<System.String>>
A snapshot reader for the matching local results. The caller must dispose the reader after use.

Exceptions

System.OperationCanceledException
The operation observes cancellation of cancellationToken. Disposal of the component or relay session can also cancel pending work.

System.InvalidOperationException
This component or a required component has not completed initialization.

System.ObjectDisposedException
This component or a component used by the operation has been disposed.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Remarks

This query reads local storage without fetching missing relay history. Its snapshot is fixed when opened; dispose the reader promptly and open a new reader to observe later changes.

GroupManager.GetGroupAsync(GroupInvite, CancellationToken) Method

Resolves group state from its hosting relay and returns the local account's membership information.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupInfo> GetGroupAsync(Meshline.Models.Client.GroupInvite invite, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

invite GroupInvite

The signed invitation authorizing the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupInfo>
The resolved group state or invitation preview with the locally known membership information.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
The supplied invitation or returned state fails protocol validation, or the group is already bound to another relay.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

System.UnauthorizedAccessException
The invitation is restricted to another account.

Remarks

Validates the supplied invitation's fields and recipient, then retrieves a preview using its ID. The hosting relay checks the invitation it previously accepted. This does not independently verify the supplied document's signature or apply for membership automatically.

GroupManager.GetGroupAsync(GroupRef, CancellationToken) Method

Resolves group state from its hosting relay and returns the local account's membership information.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupInfo> GetGroupAsync(Meshline.Models.Client.GroupRef group, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupInfo>
The resolved group state or invitation preview with the locally known membership information.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

Remarks

The group-reference overload synchronizes group state. The invitation overload retrieves a preview using the invitation ID, whose applicability is checked by the hosting relay; it does not apply for membership automatically.

GroupManager.GetGroupsAsync(Nullable<GroupMembershipState>, Nullable<GroupRole>, string, CancellationToken) Method

Opens a snapshot reader for locally known groups matching the membership, role, and relay filters.

public System.Threading.Tasks.Task<Meshline.Storage.QueryReader<Meshline.Models.Client.GroupInfo>> GetGroupsAsync(System.Nullable<Meshline.Models.Client.GroupMembershipState> membership=null, System.Nullable<Meshline.Models.Protocol.GroupRole> role=null, string? relayId=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

membership System.Nullable<GroupMembershipState>

An optional local membership-state filter.

role System.Nullable<GroupRole>

An optional group role filter; null includes all values.

relayId System.String

An optional hosting relay filter; null includes all values.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<Meshline.Storage.QueryReader<GroupInfo>>
A snapshot reader for the matching local results. The caller must dispose the reader after use.

Exceptions

System.OperationCanceledException
The operation observes cancellation of cancellationToken. Disposal of the component or relay session can also cancel pending work.

System.InvalidOperationException
This component or a required component has not completed initialization.

System.ObjectDisposedException
This component or a component used by the operation has been disposed.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

System.ArgumentOutOfRangeException
The membership or role filter is not a defined enum value.

Remarks

This query reads local storage without fetching missing relay history. Its snapshot is fixed when opened; dispose the reader promptly and open a new reader to observe later changes.

GroupManager.GetInviteAsync(GroupInviteRef, CancellationToken) Method

Resolves and verifies a hosted group invitation and its use count.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupInviteInfo> GetInviteAsync(Meshline.Models.Client.GroupInviteRef invite, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

invite GroupInviteRef

The group, relay, and invitation identifiers to resolve or revoke.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupInviteInfo>
The verified invitation with its hosting relay and observed use count.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or its signing device is uninitialized, the local device or secret protector is unavailable, or the relay cannot establish the required session.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

GroupManager.GetInvitesAsync(GroupRef, PageRequest, CancellationToken) Method

Reads and verifies a relay-backed page of invitations for a group.

public System.Threading.Tasks.Task<Meshline.Models.Client.Page<Meshline.Models.Client.GroupInviteInfo>> GetInvitesAsync(Meshline.Models.Client.GroupRef group, Meshline.Models.Client.PageRequest? page=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

page PageRequest

The requested page size and previous continuation cursor, or null for the first default-sized page.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<Meshline.Models.Client.Page<GroupInviteInfo>>
A page of verified invitations and an optional relay continuation cursor.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or its signing device is uninitialized, the local device or secret protector is unavailable, or the relay cannot establish the required session.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

GroupManager.GetKeyRecoveryRequestsAsync(GroupRef, PageRequest, CancellationToken) Method

Reads and verifies a relay-backed page of pending group member key recovery requests.

public System.Threading.Tasks.Task<Meshline.Models.Client.Page<Meshline.Models.Client.GroupKeyRecoveryInfo>> GetKeyRecoveryRequestsAsync(Meshline.Models.Client.GroupRef group, Meshline.Models.Client.PageRequest? page=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

page PageRequest

The requested page size and previous continuation cursor, or null for the first default-sized page.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<Meshline.Models.Client.Page<GroupKeyRecoveryInfo>>
A page of verified recovery requests and an optional relay continuation cursor.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or its signing device is uninitialized, the local device or secret protector is unavailable, or the relay cannot establish the required session.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

System.ArgumentOutOfRangeException
A relay-provided Unix timestamp is outside the range supported by DateTimeOffset.

GroupManager.GetMembersAsync(GroupRef, Nullable<GroupRole>, string, CancellationToken) Method

Opens a snapshot reader for locally known group members matching the role and search filters.

public System.Threading.Tasks.Task<Meshline.Storage.QueryReader<Meshline.Models.Client.GroupMemberInfo>> GetMembersAsync(Meshline.Models.Client.GroupRef group, System.Nullable<Meshline.Models.Protocol.GroupRole> role=null, string? search=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

role System.Nullable<GroupRole>

An optional group role filter; null includes all values.

search System.String

An optional substring of the account identifier or nickname. Null or empty text disables this filter.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<Meshline.Storage.QueryReader<GroupMemberInfo>>
A snapshot reader for the matching local results. The caller must dispose the reader after use.

Exceptions

System.OperationCanceledException
The operation observes cancellation of cancellationToken. Disposal of the component or relay session can also cancel pending work.

System.InvalidOperationException
This component or a required component has not completed initialization.

System.ObjectDisposedException
This component or a component used by the operation has been disposed.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

System.ArgumentOutOfRangeException
The role filter is not a defined enum value.

Remarks

This query reads local storage without fetching missing relay history. Its snapshot is fixed when opened; dispose the reader promptly and open a new reader to observe later changes.

GroupManager.GetMessagesAsync(string, string, CancellationToken) Method

Opens a snapshot reader for locally stored decrypted group messages matching the supplied filters.

public System.Threading.Tasks.Task<Meshline.Storage.QueryReader<Meshline.Models.Client.GroupMessageInfo>> GetMessagesAsync(string? groupId=null, string? sender=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

groupId System.String

An optional group identifier filter; null includes all values.

sender System.String

An optional sender account filter; null includes all senders.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<Meshline.Storage.QueryReader<GroupMessageInfo>>
A snapshot reader for the matching local results. The caller must dispose the reader after use.

Exceptions

System.OperationCanceledException
The operation observes cancellation of cancellationToken. Disposal of the component or relay session can also cancel pending work.

System.InvalidOperationException
This component or a required component has not completed initialization.

System.ObjectDisposedException
This component or a component used by the operation has been disposed.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Remarks

This query reads local storage without fetching missing relay history. Its snapshot is fixed when opened; dispose the reader promptly and open a new reader to observe later changes.

GroupManager.LeaveGroupAsync(GroupRef, CancellationToken) Method

Leaves a group through its signed management chain.

public System.Threading.Tasks.Task LeaveGroupAsync(Meshline.Models.Client.GroupRef group, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

GroupManager.RejectApplicationsAsync(GroupRef, IReadOnlyList<string>, CancellationToken) Method

Rejects pending admission applications for the selected accounts.

public System.Threading.Tasks.Task RejectApplicationsAsync(Meshline.Models.Client.GroupRef group, System.Collections.Generic.IReadOnlyList<string> accounts, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accounts System.Collections.Generic.IReadOnlyList<System.String>

The account identifiers affected by the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

System.ArgumentException
The generated request contains a group, invitation, or account identifier that violates protocol constraints.

GroupManager.RejectKeyRecoveryAsync(GroupRef, IReadOnlyList<string>, CancellationToken) Method

Rejects pending member key recovery requests for the selected accounts.

public System.Threading.Tasks.Task RejectKeyRecoveryAsync(Meshline.Models.Client.GroupRef group, System.Collections.Generic.IReadOnlyList<string> accounts, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accounts System.Collections.Generic.IReadOnlyList<System.String>

The account identifiers affected by the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

System.ArgumentException
The generated request contains a group, invitation, or account identifier that violates protocol constraints.

GroupManager.RemoveMembersAsync(GroupRef, IReadOnlyList<string>, CancellationToken) Method

Removes the selected accounts from group membership through its signed management chain.

public System.Threading.Tasks.Task RemoveMembersAsync(Meshline.Models.Client.GroupRef group, System.Collections.Generic.IReadOnlyList<string> accounts, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accounts System.Collections.Generic.IReadOnlyList<System.String>

The account identifiers affected by the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

GroupManager.RequestKeyRecoveryAsync(GroupRef, CancellationToken) Method

Generates a replacement member encryption key and requests recovery of the account's group access.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupKeyRecoveryInfo> RequestKeyRecoveryAsync(Meshline.Models.Client.GroupRef group, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupKeyRecoveryInfo>
The accepted recovery request and its relay-assigned expiration time.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentOutOfRangeException
A relay-provided Unix timestamp is outside the range supported by DateTimeOffset.

System.ArgumentException
The resulting signed recovery request violates protocol constraints.

GroupManager.RevokeInviteAsync(GroupInviteRef, CancellationToken) Method

Revokes a hosted group invitation through the relay.

public System.Threading.Tasks.Task RevokeInviteAsync(Meshline.Models.Client.GroupInviteRef invite, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

invite GroupInviteRef

The group, relay, and invitation identifiers to resolve or revoke.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

System.ArgumentException
The generated request contains a group, invitation, or account identifier that violates protocol constraints.

GroupManager.RotateSecretAsync(GroupRef, bool, CancellationToken) Method

Prepares and commits a new group client secret, optionally rotating the owner's member encryption key.

public System.Threading.Tasks.Task RotateSecretAsync(Meshline.Models.Client.GroupRef group, bool rotateOwnerMemberKey=false, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

rotateOwnerMemberKey System.Boolean

Whether to replace the owner's group-specific encryption key as part of rotation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. A pending rotation must be retried with its original owner-key rotation choice.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

System.UnauthorizedAccessException
Only the current owner of an active group can rotate the client secret. The local device lacks current authorization to enqueue group-key synchronization to the account's other devices.

Remarks

The operation prepares encrypted secret boxes and then commits a signed management update. Persisted preparation supports recovery from interrupted publication.

GroupManager.SendMessageAsync(GroupRef, GroupMessageDraft, CancellationToken) Method

Encrypts and submits a group message and synchronizes its accepted timeline entry.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupMessageInfo> SendMessageAsync(Meshline.Models.Client.GroupRef group, Meshline.Models.Client.GroupMessageDraft draft, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

draft GroupMessageDraft

The plaintext message body, attachment references, and optional reply information to send.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupMessageInfo>
The accepted group message as verified and materialized in local storage.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The message body, attachments, reply reference, or resulting envelope violates protocol constraints.

GroupManager.SetNicknameAsync(GroupRef, string, CancellationToken) Method

Sends an encrypted group update assigning or clearing the current account's nickname.

public System.Threading.Tasks.Task SetNicknameAsync(Meshline.Models.Client.GroupRef group, string? nickname, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

nickname System.String

The current member's group nickname, or null to clear it.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The nickname or resulting encrypted nickname update violates protocol constraints.

GroupManager.SetRoleAsync(GroupRef, string, GroupRole, CancellationToken) Method

Changes a group member's role through its signed management chain.

public System.Threading.Tasks.Task SetRoleAsync(Meshline.Models.Client.GroupRef group, string accountId, Meshline.Models.Protocol.GroupRole role, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accountId System.String

The account's CAIP-10 identifier.

role GroupRole

The group role to assign or select.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

GroupManager.TransferOwnershipAsync(GroupRef, string, CancellationToken) Method

Transfers group ownership to the selected member through its signed management chain.

public System.Threading.Tasks.Task TransferOwnershipAsync(Meshline.Models.Client.GroupRef group, string accountId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accountId System.String

The account's CAIP-10 identifier.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

GroupManager.UnbanAsync(GroupRef, IReadOnlyList<string>, CancellationToken) Method

Clears bans for the selected accounts through the group's signed management chain.

public System.Threading.Tasks.Task UnbanAsync(Meshline.Models.Client.GroupRef group, System.Collections.Generic.IReadOnlyList<string> accounts, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

accounts System.Collections.Generic.IReadOnlyList<System.String>

The account identifiers affected by the operation.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
The supplied group fields, account list, invitation, or message content violates the operation's protocol constraints.

GroupManager.UpdateGroupAsync(GroupRef, GroupUpdate, CancellationToken) Method

Applies group metadata changes through a signed management-chain operation.

public System.Threading.Tasks.Task<Meshline.Models.Client.GroupInfo> UpdateGroupAsync(Meshline.Models.Client.GroupRef group, Meshline.Models.Client.GroupUpdate update, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

update GroupUpdate

The field assignments and deletions to apply; unspecified fields remain unchanged.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task<GroupInfo>
The updated locally synchronized group information.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding. The group is not writable by this account or the required group history or secret is unavailable.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation. The management chain or requested membership, role, capacity, or actor authorization conflicts with verified group state.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The relay does not host groups, or the verified management history contains an unsupported operation.

System.ArgumentException
A required group field is deleted, or the resulting signed update violates protocol constraints.

GroupManager.WithdrawKeyRecoveryAsync(GroupRef, CancellationToken) Method

Withdraws the current account's pending group member key recovery request.

public System.Threading.Tasks.Task WithdrawKeyRecoveryAsync(Meshline.Models.Client.GroupRef group, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

group GroupRef

The group identifier and hosting relay.

cancellationToken System.Threading.CancellationToken

A token that can cancel the operation.

Returns

System.Threading.Tasks.Task
A task that completes when the operation finishes.

Exceptions

System.OperationCanceledException
The operation is canceled through cancellationToken, a component or relay lifetime ends, or a relay request times out.

System.InvalidOperationException
This component or a required component has not completed initialization. No usable local device or session is available, or an earlier operation must be confirmed before proceeding.

System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.

System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.

RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.

System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.

System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.

System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.

Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.

Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.

System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.

System.NotSupportedException
The hosting relay does not advertise group hosting.

System.ArgumentException
The generated request contains a group, invitation, or account identifier that violates protocol constraints.

Events

GroupManager.ApplicationsChanged Event

Occurs when the relay announces changed group admission applications.

public event EventHandler<GroupApplicationsChangedEventArgs>? ApplicationsChanged;

Event Type

System.EventHandler<GroupApplicationsChangedEventArgs>

GroupManager.GroupChanged Event

Occurs when locally synchronized group properties or membership information changes.

public event EventHandler<GroupChangedEventArgs>? GroupChanged;

Event Type

System.EventHandler<GroupChangedEventArgs>

GroupManager.KeyRecoveryChanged Event

Occurs when the relay announces changed group member key recovery requests.

public event EventHandler<GroupKeyRecoveryChangedEventArgs>? KeyRecoveryChanged;

Event Type

System.EventHandler<GroupKeyRecoveryChangedEventArgs>

GroupManager.TimelineChanged Event

Occurs when decrypted group messages become available in the local timeline.

public event EventHandler<GroupTimelineChangedEventArgs>? TimelineChanged;

Event Type

System.EventHandler<GroupTimelineChangedEventArgs>