1using System.Collections.ObjectModel;
2using System.Collections.Specialized;
3using System.ComponentModel;
5using CommunityToolkit.Maui.Layouts;
6using CommunityToolkit.Mvvm.ComponentModel;
7using CommunityToolkit.Mvvm.Input;
8using Microsoft.Maui.ApplicationModel;
37 private readonly ViewContractNavigationArgs? args;
40 private readonly
object refreshLock =
new();
41 private bool refreshInProgress;
42 private bool refreshQueued;
43 private Contract? pendingContractForRefresh;
44 private bool initialized;
48 [NotifyPropertyChangedFor(nameof(CanShowSignBar))]
49 private bool isAwaitingPostCreateCompletion;
52 private bool suppressNextRefreshCommand;
65 this.XmppUriClicked = this.CreateUriCommand(
UriScheme.Xmpp);
66 this.IotIdUriClicked = this.CreateUriCommand(
UriScheme.IotId);
67 this.IotScUriClicked = this.CreateUriCommand(
UriScheme.IotSc);
68 this.NeuroFeatureUriClicked = this.CreateUriCommand(
UriScheme.NeuroFeature);
69 this.IotDiscoUriClicked = this.CreateUriCommand(
UriScheme.IotDisco);
70 this.EDalerUriClicked = this.CreateUriCommand(
UriScheme.EDaler);
71 this.HyperlinkClicked =
new Command(async p => await this.ExecuteHyperlinkClicked(p));
73 this.contractSignedHandler =
new EventHandlerAsync<ContractSignedEventArgs>(this.OnContractSignedAsync);
74 this.contractUpdatedHandler =
new EventHandlerAsync<ContractReferenceEventArgs>(this.OnContractUpdatedAsync);
79 #region Initialization and Disposal
83 await base.OnInitializeAsync();
85 if (!this.ValidateArgs())
88 this.SubscribeToEvents();
93 await this.LoadContractAsync();
94 await this.InitializeUIAsync();
97 if (this.args?.PostCreateCompletion is not
null)
99 this.IsAwaitingPostCreateCompletion =
true;
102 Contract? Completed = await this.args.PostCreateCompletion.Task.ConfigureAwait(
false);
103 if (Completed is not
null)
106 await this.RefreshContractAsync(Completed);
115 this.IsAwaitingPostCreateCompletion =
false;
120 this.initialized =
true;
134 this.UnsubscribeFromEvents();
135 await base.OnDisposeAsync();
142 protected override void OnPropertyChanged(PropertyChangedEventArgs e)
144 base.OnPropertyChanged(e);
145 if (e.PropertyName == nameof(this.IsBusy))
146 this.OnPropertyChanged(nameof(this.CanSign));
150 [NotifyPropertyChangedFor(nameof(CanSign))]
151 [NotifyPropertyChangedFor(nameof(CanShowSignBar))]
155 private bool isRefreshing =
false;
157 public BindableObject? StateObject {
get;
set; }
160 [NotifyCanExecuteChangedFor(nameof(GoToParametersCommand))]
161 [NotifyCanExecuteChangedFor(nameof(BackCommand))]
162 private bool canStateChange;
168 [NotifyPropertyChangedFor(nameof(HasHumanReadableText))]
169 private VerticalStackLayout? humanReadableText;
171 public bool HasHumanReadableText => this.HumanReadableText is not
null;
173 public ObservableCollection<ObservableParameter> DisplayableParameters {
get; } =
new();
176 [NotifyPropertyChangedFor(nameof(ReadyToSign))]
177 [NotifyCanExecuteChangedFor(nameof(SignCommand))]
178 private bool isContractOk;
181 [NotifyPropertyChangedFor(nameof(HasProposalFriendlyName))]
182 [NotifyPropertyChangedFor(nameof(IsProposal))]
183 private string? proposalFriendlyName;
186 [NotifyPropertyChangedFor(nameof(HasProposalRole))]
187 private string? proposalRole;
190 [NotifyPropertyChangedFor(nameof(HasProposalMessage))]
191 [NotifyPropertyChangedFor(nameof(IsProposal))]
192 private string? proposalMessage;
194 public bool IsProposal =>
195 !
string.IsNullOrEmpty(this.ProposalRole) ||
196 !
string.IsNullOrEmpty(this.ProposalMessage) ||
197 !
string.IsNullOrEmpty(this.ProposalFriendlyName);
199 public bool HasProposalFriendlyName => !
string.IsNullOrEmpty(this.ProposalFriendlyName);
200 public bool HasProposalRole => !
string.IsNullOrEmpty(this.ProposalRole);
201 public bool HasProposalMessage => !
string.IsNullOrEmpty(this.ProposalMessage);
213 private bool canDeleteContract;
216 private bool canObsoleteContract;
222 public ObservableCollection<ObservableRole> SignableRoles {
get; } =
new();
224 private bool HasSignableRoles => this.SignableRoles.Count > 0;
225 private bool IsInSigningState => this.
Contract?.ContractState is ContractState.Approved or
ContractState.BeingSigned;
226 private bool AlreadySigned => this.
Contract?.
Roles.Any(r => r.Parts.Any(p => p.IsMe && p.HasSigned)) ==
true;
228 public bool CanSign => this.HasSignableRoles && this.IsInSigningState && !this.AlreadySigned;
231 public bool CanShowSignBar => !this.IsAwaitingPostCreateCompletion && this.CanSign;
233 public bool ReadyToSign => this.SelectedRole is not
null && this.IsContractOk;
241 if (
string.IsNullOrEmpty(MyLegalId))
247 OnPropertyChanged(nameof(ReadyToSign));
248 SignCommand.NotifyCanExecuteChanged();
251 [RelayCommand(AllowConcurrentExecutions =
false, CanExecute = nameof(ReadyToSign))]
252 public async Task SignAsync()
254 if (this.
Contract is
null || this.SelectedRole is
null)
257 await MainThread.InvokeOnMainThreadAsync(() => this.
SetIsBusy(
true));
262 await this.RefreshContractAsync(SignedContract);
273 await MainThread.InvokeOnMainThreadAsync(() => this.
SetIsBusy(
false));
279 #region Navigation Commands
281 [RelayCommand(CanExecute = nameof(CanStateChange))]
282 public async Task BackAsync()
293 await this.BackAsync();
296 [RelayCommand(CanExecute = nameof(CanStateChange))]
297 private Task GoToParametersAsync() => this.GoToStepAsync(
ViewContractStep.Parameters);
299 [RelayCommand(CanExecute = nameof(CanStateChange))]
300 private Task GoToRolesAsync() => this.GoToStepAsync(
ViewContractStep.Roles);
302 [RelayCommand(CanExecute = nameof(CanStateChange))]
303 private async Task GoToSignAsync()
306 await MainThread.InvokeOnMainThreadAsync(() =>
308 if (!
string.IsNullOrEmpty(this.ProposalRole))
309 this.SelectedRole = this.SignableRoles.FirstOrDefault(r => r.Name ==
this.ProposalRole);
310 else if (this.SignableRoles.Count == 1)
311 this.SelectedRole =
this.SignableRoles[0];
315 [RelayCommand(CanExecute = nameof(CanStateChange))]
316 private async Task GoToReviewAsync()
324 await this.ValidateParametersAsync();
326 this.HumanReadableText = HumanReadableText;
331 private async Task OpenServerSignatureAsync()
341 [RelayCommand(AllowConcurrentExecutions =
false)]
344 if (part is
null || this.
Contract is
null)
347 if (!part.CanSendProposal)
353 if (info is
null ||
string.IsNullOrEmpty(info.
BareJid))
368 if (
string.IsNullOrEmpty(friendlyTarget))
369 friendlyTarget = part.FriendlyName ?? info.BareJid ?? part.LegalId;
379 if (
string.IsNullOrEmpty(proposal))
400 #region Contract Management Commands
403 private async Task ObsoleteContractAsync()
418 private async Task DeleteContractAsync()
436 private async Task ShowDetailsAsync()
441 byte[] Xml = Encoding.UTF8.GetBytes(this.
Contract.
Contract.ForMachines.OuterXml);
448 if (!await
App.OpenUrlAsync(Slot.
GetUrl,
false))
449 await this.CopyAsync(Slot.
GetUrl);
459 #region Clipboard and Link Commands
461 [RelayCommand(AllowConcurrentExecutions =
false)]
462 private async Task ShareAsync()
480 private async Task CopyAsync(
object Item)
485 string Text = Item
switch
488 => $
"{Constants.UriSchemes.IotSc}:{this.Contract.ContractId}",
489 string Other => Other,
490 _ => Item?.ToString() ?? string.Empty
493 await Clipboard.SetTextAsync(Text);
507 private static Task OpenContractAsync(
object Item)
509 if (Item is
string Id)
511 return Task.CompletedTask;
515 private async Task OpenLinkAsync(
object Item)
517 if (Item is
string Url && !await
App.OpenUrlAsync(Url,
false))
518 await this.CopyAsync(Url);
520 await this.CopyAsync(Item);
525 #region State Navigation Helpers
530 private async Task GoToStepAsync(
ViewContractStep Step, Func<Task>? Prepare =
null)
533 if (Prepare is not
null) await Prepare();
534 await this.GoToStateAsync(Step);
539 if (this.StateObject is
null)
542 string NewState = Step.ToString();
543 if (NewState == this.CurrentState)
546 while (!this.CanStateChange)
547 await Task.Delay(100);
549 await MainThread.InvokeOnMainThreadAsync(async () =>
551 await StateContainer.ChangeStateWithAnimation(this.StateObject, NewState);
555 private Task SetCanStateChangeOnMainThreadAsync(
bool value)
557 return MainThread.InvokeOnMainThreadAsync(() =>
559 this.CanStateChange = value;
566 private readonly EventHandlerAsync<ContractReferenceEventArgs> contractUpdatedHandler;
567 private readonly EventHandlerAsync<ContractSignedEventArgs> contractSignedHandler;
569 private void SubscribeToEvents()
571 ServiceRef.XmppService.ContractUpdated += this.contractUpdatedHandler;
572 ServiceRef.XmppService.ContractSigned += this.contractSignedHandler;
573 this.SignableRoles.CollectionChanged += this.OnSignableRolesChanged;
576 private void UnsubscribeFromEvents()
578 ServiceRef.XmppService.ContractUpdated -= this.contractUpdatedHandler;
579 ServiceRef.XmppService.ContractSigned -= this.contractSignedHandler;
580 this.SignableRoles.CollectionChanged -= this.OnSignableRolesChanged;
583 private void OnSignableRolesChanged(
object? sender, NotifyCollectionChangedEventArgs e)
584 => MainThread.BeginInvokeOnMainThread(() =>
586 this.OnPropertyChanged(nameof(this.CanSign));
587 this.OnPropertyChanged(nameof(this.CanShowSignBar));
598 if (Current is
null || Incoming is
null)
601 bool UseIncoming =
false;
605 if (IncomingTs.HasValue && CurrentTs.HasValue)
607 UseIncoming = IncomingTs.Value > CurrentTs.Value;
611 DateTime? CurrentUpdated = Current.
Updated;
612 DateTime? IncomingUpdated = Incoming.
Updated;
613 if (IncomingUpdated.HasValue && CurrentUpdated.HasValue)
614 UseIncoming = IncomingUpdated.Value > CurrentUpdated.Value;
615 else if (IncomingUpdated.HasValue && !CurrentUpdated.HasValue)
622 this.RequestRefresh(Incoming);
624 await Task.CompletedTask;
629 if (e.
ContractId !=
this.Contract?.ContractId)
633 this.RequestRefresh(
null);
634 await Task.CompletedTask;
639 #region Private Helpers
644 private async Task ValidateParametersAsync()
658 if (FirstSignature.HasValue)
660 Variables[
"Now"] = FirstSignature.Value.ToLocalTime();
661 Variables[
"NowUtc"] = FirstSignature.Value.ToUniversalTime();
668 List<(
ObservableParameter Param,
bool IsValid,
string ValidationText)> ValidationResults = [];
682 bool IsValid =
false;
683 string ValidationText =
string.Empty;
687 IsValid = IsValid || ParamToValidate.Parameter.ErrorText ==
ContractStatus.ClientIdentityInvalid.ToString();
688 ValidationText = ParamToValidate.Parameter.ErrorText;
690 catch (Exception Ex2)
695 return (Param: ParamToValidate, IsValid, ValidationText);
698 (
ObservableParameter Param,
bool IsValid,
string ValidationText)[] Results = await Task.WhenAll(ValidationTasks);
705 private bool ValidateArgs()
707 return this.args is not
null && (this.args.Contract is not
null || this.args.ContractRef is not
null);
710 private async Task LoadContractAsync()
712 if (this.args!.ContractRef is
null)
720 if (this.args.ContractRef.ContractId is
null)
756 private async Task InitializeUIAsync()
758 await MainThread.InvokeOnMainThreadAsync(async () =>
760 this.ProposalFriendlyName = await this.ResolveProposalFriendlyNameAsync();
761 this.ProposalRole = this.args!.Role ??
string.Empty;
762 this.ProposalMessage = this.args!.Proposal ??
string.Empty;
765 await MainThread.InvokeOnMainThreadAsync(this.PrepareDisplayableParameters);
766 await MainThread.InvokeOnMainThreadAsync(this.PrepareSignableRoles);
767 await MainThread.InvokeOnMainThreadAsync(this.PreparePropertiesAsync);
769 MainThread.BeginInvokeOnMainThread(() =>
771 if (!
string.IsNullOrEmpty(this.ProposalRole))
772 this.SelectedRole = this.SignableRoles.FirstOrDefault(r => r.Name ==
this.ProposalRole);
773 else if (this.SignableRoles.Count == 1)
774 this.SelectedRole = this.SignableRoles[0];
775 this.OnPropertyChanged(nameof(this.CanSign));
776 this.OnPropertyChanged(nameof(this.ReadyToSign));
777 this.OnPropertyChanged(nameof(this.CanShowSignBar));
782 private async Task<string> ResolveProposalFriendlyNameAsync()
784 if (
string.IsNullOrEmpty(this.args!.Proposal) ||
string.IsNullOrEmpty(this.args.FromJID))
790 return !
string.IsNullOrEmpty(Info?.FriendlyName)
800 private void PrepareDisplayableParameters()
802 this.DisplayableParameters.Clear();
803 if (this.Contract?.Parameters is
null)
808 Vars[
"Duration"] = this.Contract.
Contract.Duration;
810 DateTime? FirstSignature = this.Contract.
Contract.FirstSignatureAt;
811 if (FirstSignature.HasValue)
813 Vars[
"Now"] = FirstSignature.Value.ToLocalTime();
814 Vars[
"NowUtc"] = FirstSignature.Value.ToUniversalTime();
825 this.DisplayableParameters.Add(
Parameter);
837 private void PrepareSignableRoles()
839 this.SignableRoles.Clear();
840 if (this.Contract is
null)
843 if (!
string.IsNullOrEmpty(this.ProposalRole))
846 if (
Role is not
null)
847 this.SignableRoles.Add(
Role);
852 if (!
Role.HasReachedMaxCount)
853 this.SignableRoles.Add(
Role);
858 if (
Role.Parts.Any(p => p.IsMe))
859 this.SignableRoles.Add(
Role);
863 private async Task PreparePropertiesAsync()
865 if (this.Contract is
null)
871 this.CanObsoleteContract = this.Contract.ContractState is ContractState.Approved or ContractState.BeingSigned or
ContractState.Signed;
874 if (this.args is not
null)
879 MainThread.BeginInvokeOnMainThread(() =>
881 this.CanDeleteContract = !this.args.IsReadOnly && !Binding;
886 this.CanDeleteContract =
false;
892 [RelayCommand(AllowConcurrentExecutions =
false)]
893 private Task RefreshContractAsync(
Contract? newContract)
896 if (this.suppressNextRefreshCommand)
898 this.suppressNextRefreshCommand =
false;
899 return Task.CompletedTask;
902 this.RequestRefresh(newContract);
903 return Task.CompletedTask;
907 private void RequestRefresh(
Contract? newContract)
909 lock (this.refreshLock)
911 if (newContract is not
null)
912 this.pendingContractForRefresh = newContract;
914 this.refreshQueued =
true;
917 if (this.refreshInProgress)
920 this.refreshInProgress =
true;
923 _ = this.ProcessRefreshQueueAsync();
926 private async Task ProcessRefreshQueueAsync()
931 while (!this.initialized || this.Contract is
null)
932 await Task.Delay(50);
937 lock (this.refreshLock)
939 if (!this.refreshQueued)
941 this.refreshInProgress =
false;
945 this.refreshQueued =
false;
946 ToUse = this.pendingContractForRefresh;
947 this.pendingContractForRefresh =
null;
950 await this.DoRefreshAsync(ToUse);
955 lock (this.refreshLock)
957 this.refreshInProgress =
false;
958 this.refreshQueued =
false;
959 this.pendingContractForRefresh =
null;
964 private async Task DoRefreshAsync(
Contract? newContract)
966 if (this.Contract is
null)
970 bool previousStateChange = this.CanStateChange;
971 await this.SetCanStateChangeOnMainThreadAsync(
false);
973 await MainThread.InvokeOnMainThreadAsync(() =>
975 if (!this.IsRefreshing)
977 this.suppressNextRefreshCommand =
true;
978 this.IsRefreshing =
true;
996 this.Contract.ContractId,
997 Guid.NewGuid().ToString(),
1000 MainThread.BeginInvokeOnMainThread(() =>
1002 this.IsRefreshing =
false;
1021 MainThread.BeginInvokeOnMainThread(() =>
1023 this.IsRefreshing =
false;
1028 if (newContract is
null || newContract.
ServerSignature.
Timestamp ==
this.Contract.Contract.ServerSignature.Timestamp)
1030 MainThread.BeginInvokeOnMainThread(() =>
1032 this.IsRefreshing =
false;
1034 await this.SetCanStateChangeOnMainThreadAsync(previousStateChange);
1042 await MainThread.InvokeOnMainThreadAsync(async () =>
1044 this.SelectedRole =
null;
1045 this.Contract = Wrapper;
1046 await this.Contract.InitializeAsync();
1049 await MainThread.InvokeOnMainThreadAsync(async () =>
1051 this.PrepareDisplayableParameters();
1052 this.PrepareSignableRoles();
1053 await this.PreparePropertiesAsync();
1054 this.OnPropertyChanged(nameof(this.CanSign));
1055 this.OnPropertyChanged(nameof(this.CanShowSignBar));
1061 if (Ref is not
null)
1067 await this.SetCanStateChangeOnMainThreadAsync(previousStateChange);
1068 await this.GoToStateAsync(CurrentStep);
1069 ServiceRef.
LogService.LogDebug($
"RefreshContractAsync completed for {this.Contract.ContractId}");
1071 MainThread.BeginInvokeOnMainThread(() =>
1073 this.IsRefreshing =
false;
1086 #region ILinkableView Implementation
1088 public override string? Link {
get; }
1093 #region Markdown Link Handlers
1095 public Command XmppUriClicked {
get; }
1096 public Command IotIdUriClicked {
get; }
1097 public Command IotScUriClicked {
get; }
1098 public Command NeuroFeatureUriClicked {
get; }
1099 public Command IotDiscoUriClicked {
get; }
1100 public Command EDalerUriClicked {
get; }
1101 public Command HyperlinkClicked {
get; }
1103 private async Task ExecuteUriClicked(
object? parameter,
UriScheme scheme)
1105 if (parameter is
string Uri)
1106 await
App.OpenUrlAsync(Uri);
1109 private async Task ExecuteHyperlinkClicked(
object? parameter)
1111 if (parameter is
string Url)
1112 await
App.OpenUrlAsync(Url);
Represents an instance of the Neuro-Access app.
static readonly TimeSpan UploadFile
Upload file timeout
const string IotSc
The IoT Smart Contract URI Scheme (iotsc)
A set of never changing property constants and helpful values.
A strongly-typed resource class, for looking up localized strings, etc.
static string Yes
Looks up a localized string similar to Yes.
static string ContractHasBeenObsoleted
Looks up a localized string similar to Contract has been obsoleted..
static string Cancel
Looks up a localized string similar to Cancel.
static string ContractVisibility_Public
Looks up a localized string similar to Public, not searchable.
static string ContractVisibility_PublicSearchable
Looks up a localized string similar to Public and searchable.
static string ContractVisibility_DomainAndParts
Looks up a localized string similar to Domain and parts.
static string RefreshContract_Forbidden_Description
Looks up a localized string similar to We couldn’t load the latest version of this contract....
static string ContractVisibility_CreatorAndParts
Looks up a localized string similar to Creator and parts.
static string ProposalDefaultMessage
Looks up a localized string similar to Hi, I would like to propose a contract with you....
static string ContractCouldNotBeFound
Looks up a localized string similar to Contract could not be found, it could have been deleted....
static string TagValueCopiedToClipboard
Looks up a localized string similar to Tag value copied to clipboard.
static string NetworkAddressOfContactUnknown
Looks up a localized string similar to Network address of contact unknown..
static string RefreshContract_Forbidden_Title
Looks up a localized string similar to Permission Required.
static string Send
Looks up a localized string similar to Send.
static string EnterProposal
Looks up a localized string similar to Enter the text to include in the proposal to {0},...
static string AreYouSureYouWantToDeleteContract
Looks up a localized string similar to Are you sure you want to delete this contract?...
static string ContractHasBeenDeleted
Looks up a localized string similar to Contract has been deleted..
static string AreYouSureYouWantToObsoleteContract
Looks up a localized string similar to Are you sure you want to obsolete this contract?...
static string ContractIdCopiedSuccessfully
Looks up a localized string similar to A link to the contract was copied to the clipboard....
static string RequestToAccessContract
Looks up a localized string similar to Request to access contract.
static string Ok
Looks up a localized string similar to OK.
static string No
Looks up a localized string similar to No.
static string Proposal
Looks up a localized string similar to Proposal.
static string SomethingWentWrong
Looks up a localized string similar to Something went wrong.
static string SuccessTitle
Looks up a localized string similar to Success.
static string ErrorTitle
Looks up a localized string similar to An error has occurred.
Contains a local reference to a contract that the user has created or signed.
async Task SetContract(Contract Contract)
Sets a parsed contract.
Base class that references services in the app.
static IAuthenticationService AuthenticationService
Authentication service.
static ILogService LogService
Log service.
static INetworkService NetworkService
Network service.
static IUiService UiService
Service serializing and managing UI-related tasks.
static INavigationService NavigationService
The navigation service for navigating between pages.
static ITagProfile TagProfile
TAG Profile service.
static IReportingStringLocalizer Localizer
Localization service
static IXmppService XmppService
The XMPP service for XMPP communication.
virtual void SetIsBusy(bool IsBusy)
Sets the IsBusy property.
The data model for a contract.
static async Task< string > GetName(Contract? Contract)
Gets a displayable name for a contract.
An observable object that wraps a Contract object. This allows for easier binding in the UI....
static async Task< ObservableContract > CreateAsync(Contract contract)
Creates a new instance of ObservableContract and initializes the roles and parameters.
An observable object that wraps a Waher.Networking.XMPP.Contracts.Parameter object....
Parameter Parameter
The wrapped parameter object
Part Part
The wrapped Part object
An observable object that wraps a Waher.Networking.XMPP.Contracts.Role object. This allows for easier...
async Task AddPart(string LegalId, bool Notify=true, bool AutoPetition=true, bool PresetFromArgs=false)
Adds a part with a given LegalId to the role.
void RemovePart(string LegalId, bool Notify=true)
Removes a part with a given LegalId from the role.
View model for displaying and managing a contract in the "View Contract" page.
ViewContractViewModel()
Default constructor. Retrieves navigation arguments and sets up commands.
override async Task OnDisposeAsync()
Method called when the view is disposed, and will not be used more. Use this method to unregister eve...
override async Task GoBack()
Method called when user wants to navigate to the previous screen.
override async Task OnInitializeAsync()
Method called when view is initialized for the first time. Use this method to implement registration ...
A view model that holds the XMPP state.
async Task OpenQrPopup(string? Title)
Open QR Popup
void GenerateQrCode(string Uri)
Generates a QR-code
Holds navigation parameters specific to views displaying a server signature.
A page that displays a server signature.
Boolean contractual parameter
Calculation contractual parameter
Contains the definition of a contract
Parameter[] Parameters
Defined parameters for the smart contract.
DateTime Updated
When the contract was last updated
Role[] Roles
Roles defined in the smart contract.
string ContractId
Contract identity
ServerSignature ServerSignature
Server signature attesting to the validity of the contents of the contract.
ContractVisibility Visibility
Contrat Visibility
Contract()
Contains the definition of a contract
Contract-reference parameter
Adds support for legal identities, smart contracts and signatures to an XMPP client.
Date contractual parameter
Date and Time contractual parameter
Duration contractual parameter
Event arguments for events referencing a contract.
string ContractId
ID of contract being signed.
Event arguments for contract signature events
Contract Contract
Contract that received a signature.
string LegalId
ID of legal identity signing the contract.
Geo-spatial contractual parameter
Numerical contractual parameter
Abstract base class for contractual parameters
abstract void Populate(Variables Variables)
Populates a variable collection with the value of the parameter.
string Role
Role of the part in the contract
bool CanRevoke
If parts having this role, can revoke their signature, once signed.
DateTime Timestamp
Timestamp of signature.
String-valued contractual parameter
Time contractual parameter
bool Ok
If the response is an OK result response (true), or an error response (false).
XmppException StanzaError
Any stanza error returned.
string ErrorText
Any error specific text.
Event arguments for HTTP File Upload callback methods.
Task PUT(byte[] Content, string ContentType, int Timeout)
Uploads file content to the server.
The requesting entity does not possess the necessary permissions to perform an action that only certa...
The addressed JID or item requested cannot be found; the associated error type SHOULD be "cancel".
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static Task< IEnumerable< object > > FindDelete(string Collection, params string[] SortOrder)
Finds objects in a given collection and deletes them in the same atomic operation.
static async Task Update(object Object)
Updates an object in the database.
This filter selects objects that have a named field equal to a given value.
NewContractStep
The different steps of creating a new contract.
ViewContractStep
The different steps of creating a new contract.
AuthenticationPurpose
Purpose for requesting the user to authenticate itself.
ContractParts
How the parts of the contract are defined.
ContractStatus
Validation Status of smart contract
ContractState
Recognized contract states