Members on this page
Meshline.Sdk
Meshline.Models.Protocol
ContactGrant Class
Authorizes a grantee to contact a grantor using signatures from the grantor's devices.
public sealed record ContactGrant : Meshline.Models.Protocol.TypedProtocolModel, System.IEquatable<Meshline.Models.Protocol.ContactGrant>
Inheritance System.Object → ProtocolModel → TypedProtocolModel → ContactGrant
Implements System.IEquatable<ContactGrant>
Constructors
ContactGrant() Constructor
Authorizes a grantee to contact a grantor using signatures from the grantor's devices.
public ContactGrant();
Properties
ContactGrant.ExpiresAt Property
The expiration time, in Unix seconds, or null when unavailable.
public System.Nullable<long> ExpiresAt { get; init; }
Property Value
ContactGrant.Grantee Property
The account receiving permission to contact the grantor.
public string Grantee { get; init; }
Property Value
ContactGrant.Grantor Property
The account granting permission to contact it.
public string Grantor { get; init; }
Property Value
ContactGrant.Signatures Property
Device signatures keyed by the grantor's device identifiers, using ordinal key comparison.
public System.Collections.Immutable.ImmutableDictionary<string,System.Collections.Immutable.ImmutableArray<byte>> Signatures { get; init; }
Property Value
System.Collections.Immutable.ImmutableDictionary<System.String,System.Collections.Immutable.ImmutableArray<System.Byte>>
Methods
ContactGrant.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.
ContactGrant.Validate(NetworkContext) Method
Validates grant identities, expiry, and the format of the device-signature map.
public override Meshline.Validation.ProtocolViolation? Validate(Meshline.Models.NetworkContext? context=null);
Parameters
context NetworkContext
The optional network context passed to nested validation when needed; field-only validation may ignore it.
Returns
ProtocolViolation
The first detected protocol violation, or null if the implemented checks pass.
Remarks
These checks do not verify the external device signature or establish current signer authorization. Verify the signature and the applicable device-state or resource authorization evidence separately.