1using System.Diagnostics.CodeAnalysis;
2using System.Reflection;
43 [DefaultImplementation(typeof(XmppService))]
109 Task<(
bool Succeeded,
string? ErrorMessage,
string[]? Alternatives)>
TryConnect(
string domain,
bool isIpAddress,
string hostName,
int portNumber,
110 string languageCode, Assembly appAssembly, Func<XmppClient, Task> connectedFunc);
127 Task<(
bool Succeeded,
string? ErrorMessage,
string[]? Alternatives)>
TryConnectAndCreateAccount(
string domain,
bool isIpAddress,
string hostName,
128 int portNumber,
string userName,
string password,
string languageCode,
string ApiKey,
string ApiSecret,
129 Assembly appAssembly, Func<XmppClient, Task> connectedFunc);
146 int portNumber,
string userName,
string password,
string passwordMethod,
string languageCode, Assembly appAssembly,
147 Func<XmppClient, Task> connectedFunc);
169 #region Components & Services
197 #region IQ Stanzas (Information Query)
229 string Body,
string Subject,
string Language,
string ThreadId,
string ParentThreadId,
230 EventHandlerAsync<DeliveryEventArgs>? DeliveryCallback,
object?
State);
241 event EventHandlerAsync<PresenceEventArgs> OnPresenceSubscribe;
243 event EventHandlerAsync<PresenceEventArgs> OnPresenceUnsubscribed;
315 #region Push Notification
353 string MessageVariable,
string PatternMatchingScript,
string ContentScript);
377 Task<object>
PostToProtectedApi(
string LocalResource,
object Data, params KeyValuePair<string, string>[] Headers);
381 #region HTTP File Upload
398 #region Personal Eventing Protocol (PEP)
405 void RegisterPepHandler(Type PersonalEventType, EventHandlerAsync<PersonalEventNotificationEventArgs> Handler);
413 bool UnregisterPepHandler(Type PersonalEventType, EventHandlerAsync<PersonalEventNotificationEventArgs> Handler);
417 #region Thing Registries & Discovery
473 out
string? PartitionId, [NotNullWhen(
true)] out
MetaDataTag[]? Tags);
481 Task<NodeResultEventArgs>
ClaimThing(
string DiscoUri,
bool MakePublic);
492 Task<bool>
Disown(
string RegistryJid,
string ThingJid,
string SourceId,
string Partition,
string NodeId);
530 #region Legal Identities
662 #region Smart Contracts
729 DateTime? SignBefore,
730 bool CanActAsTemplate);
921 void IsFriendResponse(
string ProvisioningServiceJID,
string JID,
string RemoteJID,
string Key,
bool IsFriend,
922 RuleRange Range, EventHandlerAsync<IqResultEventArgs> Callback,
object?
State);
936 void CanControlResponseAll(
string ProvisioningServiceJID,
string JID,
string RemoteJID,
string Key,
bool CanControl,
937 string[]? ParameterNames,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
object?
State);
952 bool CanControl,
string[]? ParameterNames,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
object?
State);
967 bool CanControl,
string[]? ParameterNames,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
object?
State);
983 bool CanControl,
string[]? ParameterNames,
string Token,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1000 bool CanControl,
string[]? ParameterNames,
string Token,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1017 bool CanControl,
string[]? ParameterNames,
string Token,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1033 void CanReadResponseAll(
string ProvisioningServiceJID,
string JID,
string RemoteJID,
string Key,
bool CanRead,
1083 bool CanRead,
FieldType FieldTypes,
string[]? FieldNames,
string Token,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1101 bool CanRead,
FieldType FieldTypes,
string[]? FieldNames,
string Token,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1119 bool CanRead,
FieldType FieldTypes,
string[]? FieldNames,
string Token,
IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1132 void DeleteDeviceRules(
string ServiceJID,
string DeviceJID,
string NodeId,
string SourceId,
string Partition,
1133 EventHandlerAsync<IqResultEventArgs> Callback,
object?
State);
1212 Task<string>
TryDecryptMessage(
byte[] EncryptedMessage,
byte[] PublicKey, Guid TransactionId,
string RemoteEndpoint,
bool LocalIsRecipient =
false);
1274 Task<string>
CreateFullEDalerPaymentUri(
string ToBareJid, decimal Amount, decimal? AmountExtra,
string Currency,
int ValidNrDays,
string Message);
1442 #region Neuro-Features
1717 Task<PubSubPageResult?>
GetItemsPageAsync(
string NodeId,
string? ServiceAddress =
null,
string? After =
null,
string? Before =
null,
int? Index =
null,
int? Max =
null);
1762 Task<SubscriptionEventArgs>
UnsubscribeAsync(
string NodeId,
string? Jid =
null,
string? SubscriptionId =
null);
1767 Task<SubscriptionEventArgs?>
TryUnsubscribeAsync(
string NodeId,
string? Jid =
null,
string? SubscriptionId =
null);
1772 Task<ItemResultEventArgs>
PublishAsync(
string NodeId,
string? ItemId =
null,
string PayloadXml =
"");
1777 Task<ItemResultEventArgs?>
TryPublishAsync(
string NodeId,
string? ItemId =
null,
string PayloadXml =
"");
Contains information about a balance.
Contains information about a pending payment.
Represents a transaction in the eDaler network.
Abstract base class for eDaler URIs
Represent an attachment to a LegalIdentity.
The data model for registering an identity.
Event arguments for token events.
Contains the definition of a contract
Adds support for legal identities, smart contracts and signatures to an XMPP client.
Abstract base class for contractual parameters
Class defining a part in a contract
Contains information about a service provider.
Abstract base class of signatures
Abstract base class for all search operators.
Contains information about a thing in a search result.
Event arguments for node callback events.
Contains information about the configuration of a node.
Contains options for a node subscription
Maintains information about an item in the roster.
Contains information about an identity of an entity.
Contains information about an item of an entity.
Manages an XMPP client connection. Implements XMPP, as defined in https://tools.ietf....
Represents a case-insensitive string.
Static class that dynamically manages types and interfaces available in the runtime environment.
Contains a reference to a thing
A service that can be loaded and unloaded at will. Typically during startup and shutdown of an applic...
Represents an abstraction of a connection to an XMPP Server.
RosterItem? GetRosterItem(string BareJid)
Gets a roster item.
Task< object > PostToProtectedApi(string LocalResource, object Data, params KeyValuePair< string, string >[] Headers)
Performs an HTTP POST to a protected API on the server, over the current XMPP connection,...
void BuyEDalerFailed(string TransactionId, string Message)
Registers an initiated payment as failed.
void SellEDalerGetOptionsCompleted(string TransactionId, IDictionary< CaseInsensitiveString, object >[] Options)
Registers an initiated getting of payment options for selling eDaler as completed.
Task< bool > DiscoverServices(XmppClient? Client=null)
Run this method to discover services for any given XMPP server.
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs > PurgeNodeAsync(string NodeId)
Purges (deletes all items from) a node; throws on failure.
Task< TokenEvent[]> GetNeuroFeatureEvents(string TokenId, int Offset, int MaxCount)
Gets events relating to a specific token.
Task< KeyValuePair< string, TemporaryFile > > GetAttachment(string Url, SignWith SignWith, TimeSpan Timeout)
Gets an attachment for a contract.
string BareJid
The Bare Jid of the current connection, or null.
Task< CreationAttributesEventArgs > GetNeuroFeatureCreationAttributes()
Gets token creation attributes from the broker.
Task SavePrivateXml(XmlElement Xml)
Saves Private XML to the server. Private XML are separated by Local Name and Namespace of the root el...
void SendMessage(QoSLevel QoS, MessageType Type, string Id, string To, string CustomXml, string Body, string Subject, string Language, string ThreadId, string ParentThreadId, EventHandlerAsync< DeliveryEventArgs >? DeliveryCallback, object? State)
Sends a message
Task< NodeResultEventArgs > ClaimThing(string DiscoUri, bool MakePublic)
Claims a think in accordance with parameters defined in a iotdisco claim URI.
Task< ServiceProviderWithLegalId[]> GetServiceProvidersForPeerReviewAsync()
Gets available service providers for buying eDaler.
Task< string > CreateFullEDalerPaymentUri(LegalIdentity To, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays)
Creates a full payment URI.
Task< Balance > GetEDalerBalance()
Gets the current account balance.
Task<(SearchResultThing[], bool)> Search(int Offset, int MaxCount, string? RegistryJid, params SearchOperator[] Operators)
Searches for devices in accordance with settings in a iotdisco-URI.
Task SendPetitionContractResponse(CaseInsensitiveString ContractId, string PetitionId, string RequestorFullJid, bool Response)
Sends a response to a petitioning contract request.
void CanControlResponseCaller(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on the JID of the caller.
Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnectAndConnectToAccount(string domain, bool isIpAddress, string hostName, int portNumber, string userName, string password, string passwordMethod, string languageCode, Assembly appAssembly, Func< XmppClient, Task > connectedFunc)
To be used during the second phase of the startup/registration procedure. Tries to connect (and then ...
Task< PubSubItem[]?> GetLatestItemsAsync(string NodeId, int Count)
Retrieves the latest Count items for a specified node, or null on failure.
Task< LegalIdentity[]> GetLegalIdentities(XmppClient? client=null)
Returns a list of legal identities.
Task< TokensEventArgs > GetNeuroFeatures()
Gets available tokens
Task< Contract > GetContract(CaseInsensitiveString ContractId)
Gets the contract with the specified id.
ISniffer[] RemoteSniffers
Any remote sniffers used for remote debugging.
Task DeletePrivateXml(string LocalName, string Namespace)
Deletes private XML previously saved to the account.
Task< string?> GetApiToken(int Seconds)
Gets a token for use with APIs that are either distributed or use different protocols,...
Task< IqResultEventArgs > RetractAsync(string NodeId, string ItemId)
Retracts (deletes) a specific item from a node; throws on failure.
void CanReadResponseDevice(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on a device token.
Task< bool > TryGenerateAndChangePassword()
Generates and changes the password of the account.
EventHandlerAsync< LegalIdentityEventArgs > IdentityApplicationChanged
An event that fires when an ID Application has changed.
Task< IBuyEDalerServiceProvider[]> GetServiceProvidersForBuyingEDalerAsync()
Gets available service providers for buying eDaler.
Task< IqResultEventArgs?> TryRetractAsync(string NodeId, string ItemId)
Attempts to retract an item; returns result or null on error.
void BuyEDalerGetOptionsFailed(string TransactionId, string Message)
Registers an initiated getting of payment options for buying eDaler as failed.
void CanReadResponseDomain(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on the domain of the caller.
Task< string[]> GetSignedContractReferences()
Gets references to signed contracts.
bool TryDecodeIoTDiscoDirectURI(string DiscoUri, [NotNullWhen(true)] out string? Jid, out string? SourceId, out string? NodeId, out string? PartitionId, [NotNullWhen(true)] out MetaDataTag[]? Tags)
Tries to decode an IoTDisco Direct Reference URI (subset of all possible IoTDisco URIs).
RosterItem[] Roster
Items in the roster.
Task< bool > HasPrivateKey(CaseInsensitiveString legalIdentityId)
Checks if the client has access to the private keys of the specified legal identity.
Task< VerticalStackLayout > GenerateNeuroFeatureProfilingReportMaui(string TokenId)
Generates a Maui report for a timing diagram corresponding to the token.
EventHandlerAsync< SignaturePetitionEventArgs > PetitionForSignatureReceived
An event that fires when a petition for a signature is received.
Task GenerateNewKeys()
Generates new keys
Task<(AccountEvent[], bool)> GetEDalerAccountEvents(int MaxCount, DateTime From)
Gets account events available for the wallet.
Task< TokenEvent[]> GetNeuroFeatureEvents(string TokenId)
Gets events relating to a specific token.
bool TryParseEDalerUri(string Uri, out EDalerUri Parsed, out string Reason)
Tries to parse an eDaler URI.
DateTime LastNeuroFeatureEvent
Timepoint of last Neuro-Feature token event.
Task< SubscriptionEventArgs > UnsubscribeAsync(string NodeId, string? Jid=null, string? SubscriptionId=null)
Unsubscribes from a node for the current or specified JID/subscription ID; throws on failure.
Task< string > CreateFullEDalerPaymentUri(string ToBareJid, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays)
Creates a full payment URI.
Task< LegalIdentity > CompromiseLegalIdentity(CaseInsensitiveString legalIdentityId)
Marks the legal identity as compromised.
DateTime LastEDalerEvent
Timepoint of last eDaler event.
Task AddPushNotificationRule(MessageType MessageType, string LocalName, string Namespace, string Channel, string MessageVariable, string PatternMatchingScript, string ContentScript)
Adds a push-notification rule in the broker.
Task< bool > ImportSigningKeys(XmlElement Xml)
Imports keys
Task< LegalIdentity > GetLegalIdentity(CaseInsensitiveString legalIdentityId)
Gets a specific legal identity.
Task< PaymentTransaction > InitiateSellEDaler(string ServiceId, string ServiceProvider, decimal Amount, string Currency)
Initiates the selling of eDaler using a service provider that does not use a smart contract.
void CanReadResponseAll(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, for all future requests.
Task< string > GenerateNeuroFeatureStateDiagramReport(string TokenId)
Generates a XAML report for a state diagram corresponding to the token.
Task< string > GenerateNeuroFeatureProfilingReport(string TokenId)
Generates a XAML report for a timing diagram corresponding to the token.
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> DeleteNodeAsync(string NodeId, string? RedirectUri=null)
Deletes an existing PubSub node with optional redirect URI, or null on failure.
Task< OptionsTransaction > InitiateBuyEDalerGetOptions(string ServiceId, string ServiceProvider)
Initiates the process of getting available options for buying of eDaler using a service provider that...
Task< SearchResultThing[]> GetAllMyDevices()
Gets the full list of my devices.
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> TryCreateNodeAsync(string NodeId, NodeConfiguration? Config=null)
Attempts to create a new PubSub node; returns result or null on error.
Task UnloadFast()
Perform a shutdown in critical situations. Attempts to shut down XMPP connection as fast as possible.
Task ReportNewPushNotificationToken(string Token, PushMessagingService Service, ClientType ClientType)
Reports a new push-notification token to the broker.
Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnectAndCreateAccount(string domain, bool isIpAddress, string hostName, int portNumber, string userName, string password, string languageCode, string ApiKey, string ApiSecret, Assembly appAssembly, Func< XmppClient, Task > connectedFunc)
To be used during the second phase of the startup/registration procedure. Tries to connect (and then ...
EventHandlerAsync< ContractProposalEventArgs > ContractProposalReceived
Event raised when a contract proposal has been received.
void CanControlResponseService(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on a service token.
Task< VerticalStackLayout > GenerateNeuroFeatureStateDiagramReportMaui(string TokenId)
Generates a MAUI report for a state diagram corresponding to the token.
EventHandlerAsync< LegalIdentityPetitionResponseEventArgs > PetitionedIdentityResponseReceived
An event that fires when a petitioned identity response is received.
void IsFriendResponse(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool IsFriend, RuleRange Range, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Is Friend" question.
EventHandlerAsync< ContractPetitionEventArgs > PetitionForContractReceived
An event that fires when a petition for a contract is received.
void GetControlForm(string To, string Language, EventHandlerAsync< DataFormEventArgs > Callback, object? State, params ThingReference[] Nodes)
Gets a control form from an actuator.
Task< TokensEventArgs > GetNeuroFeaturesForContract(string ContractId)
Gets tokens created by a smart contract
void SellEDalerGetOptionsFailed(string TransactionId, string Message)
Registers an initiated getting of payment options for selling eDaler as failed.
Balance? LastEDalerBalance
Last reported balance
Task< CurrentStateEventArgs > GetNeuroFeatureCurrentState(string TokenId)
Gets the current state of a Neuro-Feature token.
void RequestRevokePresenceSubscription(string BareJid)
Requests a previous presence subscription request revoked.
Task PetitionContract(CaseInsensitiveString ContractId, string PetitionId, string Purpose)
Petitions a contract with the specified id and purpose.
Task<(AccountEvent[], bool)> GetEDalerAccountEvents(int MaxCount)
Gets account events available for the wallet.
bool IsIoTDiscoDirectURI(string DiscoUri)
Checks if a URI is a direct reference URI.
Task< string[]> GetCreatedContractReferences()
Gets references to created contracts.
Task< bool > Disown(string RegistryJid, string ThingJid, string SourceId, string Partition, string NodeId)
Disowns a thing
void BuyEDalerCompleted(string TransactionId, decimal Amount, string Currency)
Registers an initiated payment as completed.
Task< bool > NewPushNotificationToken(TokenInformation TokenInformation)
Registers a new token.
Task< LegalIdentity > ObsoleteLegalIdentity(CaseInsensitiveString legalIdentityId)
Marks the legal identity as obsolete.
Task< byte[]> Sign(byte[] data, SignWith signWith)
Signs binary data with the corresponding private key.
bool FileUploadIsSupported
Returns true if file upload is supported, false otherwise.
bool TryDecodeIoTDiscoSearchURI(string DiscoUri, [NotNullWhen(true)] out SearchOperator[]? Operators, out string? RegistryJid)
Tries to decode an IoTDisco Search URI (subset of all possible IoTDisco URIs).
bool? ValidateSignature(LegalIdentity legalIdentity, byte[] data, byte[] signature)
Validates a signature of binary data.
Task< string > GenerateNeuroFeaturePresentReport(string TokenId)
Generates a XAML present report for a token.
void AddRosterItem(RosterItem Item)
Adds an item to the roster. If an item with the same Bare JID is found in the roster,...
Task<(decimal, string, PendingPayment[])> GetPendingEDalerPayments()
Gets pending payments
Task< Contract > SignContract(Contract Contract, string Role, bool Transferable)
Signs a given contract.
Task< string[]> GetNeuroFeatureReferencesForContract(string ContractId, int Offset, int MaxCount)
Gets token references created by a smart contract
Task SelectPeerReviewService(string ServiceId, string ServiceProvider)
Selects a peer-review service as default, for the account, when sending a peer-review request to the ...
Task< string > GenerateNeuroFeatureHistoryReport(string TokenId)
Generates a XAML history report for a token.
Task AddTransferCode(string Code)
Registers a Transfer ID Code
Task SendPetitionSignatureResponse(CaseInsensitiveString LegalId, byte[] Content, byte[] Signature, string PetitionId, string RequestorFullJid, bool Response)
Sends a response to a petitioning signature request.
EventHandlerAsync< VariablesUpdatedEventArgs > NeuroFeatureVariablesUpdated
Event raised when variables have been updated in a state-machine.
Task< string > CreateFullEDalerPaymentUri(string ToBareJid, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays, string Message)
Creates a full payment URI.
void RequestPresenceSubscription(string BareJid)
Requests subscription of presence information from a contact.
Task< SubscriptionEventArgs?> TrySubscribeAsync(string NodeId, string? Jid=null, SubscriptionOptions? Options=null)
Attempts to subscribe to a node; returns result or null on error.
Task< IdApplicationAttributesEventArgs > GetIdApplicationAttributes()
Gets important attributes for a successful ID Application.
Task< SensorDataClientRequest > RequestSensorReadout(string Destination, ThingReference[] Nodes, FieldType Types)
Requests a sensor data readout.
Task AddNeuroFeatureTextNote(string TokenId, string TextNote)
Adds a text note on a token.
EventHandlerAsync< NeuroFeatures.EventArguments.TokenEventArgs > NeuroFeatureRemoved
Event raised when a token has been removed from the wallet.
EventHandlerAsync< RosterItem > OnRosterItemAdded
Event raised when a roster item has been added to the roster.
Task< Contract > ObsoleteContract(CaseInsensitiveString ContractId)
Obsoletes a contract.
EventHandlerAsync< SignaturePetitionResponseEventArgs > PetitionedPeerReviewIdResponseReceived
An event that fires when a petitioned peer review response is received.
bool SupportsPushNotification
If push notification is supported.
void CanControlResponseUser(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on a user token.
Task< LegalIdentity > AddLegalIdentity(RegisterIdentityModel Model, bool GenerateNewKeys, params LegalIdentityAttachment[] Attachments)
Adds a legal identity.
Task< string > TryDecryptMessage(byte[] EncryptedMessage, byte[] PublicKey, Guid TransactionId, string RemoteEndpoint, bool LocalIsRecipient=false)
Tries to decrypt an encrypted private message.
Task< Contract > DeleteContract(CaseInsensitiveString ContractId)
Deletes a contract.
Task< HttpFileUploadEventArgs > RequestUploadSlotAsync(string FileName, string ContentType, long ContentSize)
Uploads a file to the upload component.
void DeleteDeviceRules(string ServiceJID, string DeviceJID, string NodeId, string SourceId, string Partition, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Deletes the rules of a device.
Task< IdentityStatus > ValidateIdentity(LegalIdentity Identity)
Validates a legal identity.
DateTime GetTimeOfLastContractEvent(CaseInsensitiveString ContractId)
Gets the timestamp of the last event received for a given contract ID.
EventHandlerAsync< LegalIdentityPetitionEventArgs > PetitionForIdentityReceived
An event that fires when a petition for an identity is received.
Task< PubSubItem?> GetItemAsync(string NodeId, string ItemId)
Retrieves a single item by ID for a specified node, or null on failure.
Task< ItemResultEventArgs?> TryPublishAsync(string NodeId, string? ItemId=null, string PayloadXml="")
Attempts to publish an item; returns result or null on error.
EventHandlerAsync< ContractSignedEventArgs > ContractSigned
Event raised when contract was signed.
void SellEDalerCompleted(string TransactionId, decimal Amount, string Currency)
Registers an initiated payment as completed.
Task ClearPushNotificationRules()
Clears configured push notification rules in the broker.
bool TryDecodeIoTDiscoClaimURI(string DiscoUri, [NotNullWhen(true)] out MetaDataTag[]? Tags)
Tries to decode an IoTDisco Claim URI (subset of all possible IoTDisco URIs).
void RegisterPepHandler(Type PersonalEventType, EventHandlerAsync< PersonalEventNotificationEventArgs > Handler)
Registers an event handler of a specific type of personal events.
bool IsIoTDiscoClaimURI(string DiscoUri)
Checks if a URI is a claim URI.
Task< VerticalStackLayout > GenerateNeuroFeatureHistoryReportMaui(string TokenId)
Generates a MAUI history report for a token.
EventHandlerAsync< NewStateEventArgs >? NeuroFeatureStateUpdated
Event raised when a state-machine has received a new state.
Task< TokensEventArgs > GetNeuroFeatures(int Offset, int MaxCount)
Gets a section of available tokens
string ProvisioningServiceJid
JID of provisioning service.
EventHandlerAsync< XmppState > ConnectionStateChanged
An event that triggers whenever the connection state to the XMPP server changes.
bool IsOnline
Determines whether the connection to the XMPP server is live or not.
Task< PubSubPageResult?> GetItemsPageAsync(string NodeId, string? ServiceAddress=null, string? After=null, string? Before=null, int? Index=null, int? Max=null)
Retrieves a page of items for a specified node using XEP-0059 result set management parameters.
Task<(SearchResultThing[], string?, bool)> Search(int Offset, int MaxCount, string DiscoUri)
Searches for devices in accordance with settings in a iotdisco-URI.
Task< bool > ChangePassword(string NewPassword)
Changes the password of the account.
void CanReadResponseCaller(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on the JID of the caller.
Task AddNeuroFeatureXmlNote(string TokenId, string XmlNote, bool Personal)
Adds a xml note on a token.
Task< PubSubItem[]?> GetItemsAsync(string NodeId, string[] ItemIds)
Retrieves specific items by ID for a specified node, or null on failure.
Task< LegalIdentity > AddLegalIdentity(Property[] Props, bool GenerateNewKeys, params LegalIdentityAttachment[] Attachments)
Adds a legal identity.
Task<(SearchResultThing[], string?)> SearchAll(string DiscoUri)
Searches for all devices in accordance with settings in a iotdisco-URI.
void BuyEDalerGetOptionsCompleted(string TransactionId, IDictionary< CaseInsensitiveString, object >[] Options)
Registers an initiated getting of payment options for buying eDaler as completed.
Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnect(string domain, bool isIpAddress, string hostName, int portNumber, string languageCode, Assembly appAssembly, Func< XmppClient, Task > connectedFunc)
To be used during the very first phase of the startup/registration procedure. Tries to connect (and t...
EventHandlerAsync< ContractPetitionResponseEventArgs > PetitionedContractResponseReceived
An event that fires when a petitioned contract response is received.
void CanControlResponseDomain(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on the domain of the caller.
bool UnregisterPepHandler(Type PersonalEventType, EventHandlerAsync< PersonalEventNotificationEventArgs > Handler)
Unregisters an event handler of a specific type of personal events.
void CanControlResponseAll(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, for all future requests.
Task< SubscriptionEventArgs?> TryUnsubscribeAsync(string NodeId, string? Jid=null, string? SubscriptionId=null)
Attempts to unsubscribe from a node; returns result or null on error.
string? LatestError
The latest generic xmpp error, if any.
EventHandlerAsync< NeuroFeatures.EventArguments.TokenEventArgs > NeuroFeatureAdded
Event raised when a token has been added to the wallet.
Task ExportSigningKeys(XmlWriter Output)
Exports Keys to XML.
void RequestPresenceSubscription(string BareJid, string CustomXml)
Requests subscription of presence information from a contact.
EventHandlerAsync< SignaturePetitionEventArgs > PetitionForPeerReviewIdReceived
An event that fires when a petition for peer review is received.
Task< TokenTotalsEventArgs > GetNeuroFeatureTotals()
Gets the value totals of tokens available in the wallet, grouped and ordered by currency.
string CreateIncompleteEDalerPayMeUri(string BareJid, decimal? Amount, decimal? AmountExtra, string Currency, string Message)
Creates an incomplete PayMe-URI.
EventHandlerAsync< RosterItem > OnRosterItemUpdated
Event raised when a roster item has been updated in the roster.
EventHandlerAsync< LegalIdentityEventArgs > LegalIdentityChanged
An event that fires when a legal identity changes.
EventHandlerAsync< PresenceEventArgs > OnPresence
Event raised when a new presence stanza has been received.
Task< SensorDataClientRequest > RequestSensorReadout(string Destination, FieldType Types)
Requests a sensor data readout.
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> TryPurgeNodeAsync(string NodeId)
Attempts to purge a node; returns result or null on error.
Task< VerticalStackLayout > GenerateNeuroFeaturePresentReportMaui(string TokenId)
Generates a MAUI present report for a token.
string? LatestConnectionError
The latest generic xmpp connection error, if any.
Task PetitionPeerReviewId(CaseInsensitiveString LegalId, LegalIdentity Identity, string PetitionId, string Purpose)
Sends a petition to a third-party to review a legal identity.
Task< ISellEDalerServiceProvider[]> GetServiceProvidersForSellingEDalerAsync()
Gets available service providers for selling eDaler.
Task< string[]> GetNeuroFeatureReferences(int Offset, int MaxCount)
Gets references to a section of available tokens
Task< bool > WaitForConnectedState(TimeSpan timeout)
Can be used to await the server's connection state, i.e. skipping all intermediate states but XmppSta...
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> TryDeleteNodeAsync(string NodeId, string? RedirectUri=null)
Attempts to delete a PubSub node; returns result or null on error.
Task< string[]> GetNeuroFeatureReferencesForContract(string ContractId)
Gets token references created by a smart contract
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> CreateNodeAsync(string NodeId, NodeConfiguration? Config=null)
Creates a new PubSub node with optional configuration, or null on failure.
Task AddNeuroFeatureTextNote(string TokenId, string TextNote, bool Personal)
Adds a text note on a token.
void CanControlResponseDevice(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on a device token.
Task< ServiceDiscoveryEventArgs > SendServiceDiscoveryRequest(string FullJid)
Performs a Service Discovery on a remote entity.
Task< SearchResultThing[]> SearchAll(string RegistryJid, params SearchOperator[] Operators)
Searches for all devices in accordance with settings in a iotdisco-URI.
string CreateIncompleteEDalerPayMeUri(LegalIdentity To, decimal? Amount, decimal? AmountExtra, string Currency, string PrivateMessage)
Creates an incomplete PayMe-URI.
bool IsIoTDiscoSearchURI(string DiscoUri)
Checks if a URI is a search URI.
void CanReadResponseService(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on a service token.
Task< string[]> GetNeuroFeatureReferences()
Gets references to available tokens
Task SendPetitionIdentityResponse(CaseInsensitiveString LegalId, string PetitionId, string RequestorFullJid, bool Response)
Sends a response to a petitioning identity request.
EventHandlerAsync< SignaturePetitionResponseEventArgs > SignaturePetitionResponseReceived
Event raised when a response to a signature petition has been received.
Task< bool > IsContact(CaseInsensitiveString legalIdentityId)
Checks if a legal identity is in the contacts list.
void GetCertificate(string Token, EventHandlerAsync< CertificateEventArgs > Callback, object? State)
Gets the certificate the corresponds to a token. This certificate can be used to identify services,...
void RemoveRosterItem(string BareJid)
Removes an item from the roster.
Task AddNeuroFeatureXmlNote(string TokenId, string XmlNote)
Adds a xml note on a token.
Task< SubscriptionEventArgs > SubscribeAsync(string NodeId, string? Jid=null, SubscriptionOptions? Options=null)
Subscribes to a node for the current or specified JID with options; throws on failure.
Task SavePrivateXml(string Xml)
Saves Private XML to the server. Private XML are separated by Local Name and Namespace of the root el...
Task< Contract > CreateContract(CaseInsensitiveString TemplateId, Part[] Parts, Parameter[] Parameters, ContractVisibility Visibility, ContractParts PartsMode, Duration Duration, Duration ArchiveRequired, Duration ArchiveOptional, DateTime? SignAfter, DateTime? SignBefore, bool CanActAsTemplate)
Creates a new contract.
Task< LegalIdentity > AddPeerReviewIdAttachment(LegalIdentity Identity, LegalIdentity ReviewerLegalIdentity, byte[] PeerSignature)
Adds an attachment for the peer review.
void SellEDalerFailed(string TransactionId, string Message)
Registers an initiated payment as failed.
XmppState State
The current state of the connection to the XMPP server.
Task PetitionIdentity(CaseInsensitiveString LegalId, string PetitionId, string Purpose)
Petitions a legal identity.
Task< Token > GetNeuroFeature(string TokenId)
Gets a specific token.
EventHandlerAsync< RosterItem > OnRosterItemRemoved
Event raised when a roster item has been removed from the roster.
Task< ItemResultEventArgs > PublishAsync(string NodeId, string? ItemId=null, string PayloadXml="")
Publishes an item on a node with optional item ID and payload XML; throws on failure.
Task SendContractProposal(Contract Contract, string Role, string To, string Message)
Sends a contract proposal to a recipient.
void CanReadResponseUser(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on a user token.
Task< Item[]?> GetAllNodeIdsAsync()
Returns all node IDs from the PubSub service, or null on failure.
Task< XmlElement > IqSetAsync(string To, string Xml)
Performs an asynchronous IQ Set request/response operation.
EventHandlerAsync< BalanceEventArgs > EDalerBalanceUpdated
Event raised when balance has been updated.
Task< PubSubItem[]?> GetItemsAsync(string NodeId)
Retrieves all items for a specified node, or null on failure.
Task< PaymentTransaction > InitiateBuyEDaler(string ServiceId, string ServiceProvider, decimal Amount, string Currency)
Initiates the buying of eDaler using a service provider that does not use a smart contract.
Task<(SearchResultThing[], bool)> GetMyDevices(int Offset, int MaxCount)
Gets a (partial) list of my devices.
void RequestPresenceUnsubscription(string BareJid)
Requests unssubscription of presence information from a contact.
Task< OptionsTransaction > InitiateSellEDalerGetOptions(string ServiceId, string ServiceProvider)
Initiates the process of getting available options for selling of eDaler using a service provider tha...
Task< TokensEventArgs > GetNeuroFeaturesForContract(string ContractId, int Offset, int MaxCount)
Gets tokens created by a smart contract
string RegistryServiceJid
JID of thing registry service.
Task< XmlElement?> LoadPrivateXml(string LocalName, string Namespace)
Loads private XML previously stored, given the local name and namespace of the XML.
Task< string > CreateFullEDalerPaymentUri(LegalIdentity To, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays, string PrivateMessage)
Creates a full payment URI.
Task< EDaler.Transaction > SendEDalerUri(string Uri)
Sends an eDaler URI to the eDaler service.
EventHandlerAsync< ContractReferenceEventArgs > ContractUpdated
Event raised when contract was updated.
Interface for sniffers. Sniffers can be added to ICommunicationLayer classes to eavesdrop on communic...
Interface for thing references.
delegate Task EventHandlerAsync(object Sender, EventArgs e)
Asynchronous version of EventArgs.
SignWith
Options on what keys to use when signing data.
ContractParts
How the parts of the contract are defined.
ContractVisibility
Visibility types for contracts.
RuleRange
Range of a rule change
ClientType
Type of client requesting notification.
PushMessagingService
Push messaging service used.
QoSLevel
Quality of Service Level for asynchronous messages. Support for QoS Levels must be supported by the r...
MessageType
Type of message received.
XmppState
State of XMPP connection.
FieldType
Field Type flags
Represents a duration value, as defined by the xsd:duration data type: http://www....