Members on this page
Meshline.Sdk
Meshline.Models.Protocol
RelayDescriptor Class
Contains a relay's signed identity, endpoints, capabilities, and expiration time.
public sealed record RelayDescriptor : Meshline.Models.Protocol.TypedProtocolModel, System.IEquatable<Meshline.Models.Protocol.RelayDescriptor>
Inheritance System.Object → ProtocolModel → TypedProtocolModel → RelayDescriptor
Implements System.IEquatable<RelayDescriptor>
Constructors
RelayDescriptor() Constructor
Contains a relay's signed identity, endpoints, capabilities, and expiration time.
public RelayDescriptor();
Properties
RelayDescriptor.Capabilities Property
The protocol capability identifiers advertised by the relay.
public System.Collections.Immutable.ImmutableArray<string> Capabilities { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.String>
RelayDescriptor.Endpoints Property
The relay's advertised HTTPS, optional WSS, and libp2p TCP endpoints.
public System.Collections.Immutable.ImmutableArray<string> Endpoints { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.String>
RelayDescriptor.ExpiresAt Property
The expiration time, in Unix seconds.
public long ExpiresAt { get; init; }
Property Value
RelayDescriptor.PublicKey Property
The relay's Neo signing public key.
public System.Collections.Immutable.ImmutableArray<byte> PublicKey { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.Byte>
RelayDescriptor.RelayId Property
The relay's lowercase Neo script hash, including the 0x prefix.
public string RelayId { get; init; }
Property Value
RelayDescriptor.RelaySignature Property
The relay signature over the model's relay signing input.
public System.Collections.Immutable.ImmutableArray<byte> RelaySignature { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.Byte>
Methods
RelayDescriptor.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.
RelayDescriptor.Validate(NetworkContext) Method
Validates relay identity, endpoints, capabilities, expiry, and the relay signature.
public override Meshline.Validation.ProtocolViolation? Validate(Meshline.Models.NetworkContext? context);
Parameters
context NetworkContext
The required network context for identity and signature validation.
Returns
ProtocolViolation
The first detected protocol violation, or null if the implemented checks pass.
Exceptions
System.ArgumentNullException
context is null.
System.Security.Cryptography.CryptographicException
The cryptographic provider cannot perform account or relay signature verification; ordinary invalid signatures are returned as protocol violations.