Create post request skeletons
ADD
WalletWasabi/WabiSabi/Backend/PostRequests/PostRequestHandler.cs
+using NBitcoin;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.WabiSabi.Models;
+
+namespace WalletWasabi.WabiSabi.Backend.PostRequests
+{
+ public class PostRequestHandler
+ {
+ public InputsRegistrationResponse RegisterInput(InputsRegistrationRequest request)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void RemoveInput(InputsRemovalRequest request)
+ {
+ throw new NotImplementedException();
+ }
+
+ public ConnectionConfirmationResponse ConfirmConnection(ConnectionConfirmationRequest request)
+ {
+ throw new NotImplementedException();
+ }
+
+ public CredentialReissuanceResponse ReissueCredentials(CredentialReissuanceRequest request)
+ {
+ throw new NotImplementedException();
+ }
+
+ public OutputRegistrationResponse RegisterOutput(OutputRegistrationRequest request)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SignTransaction(TransactionSignaturesRequest request)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/ConnectionConfirmationRequest.cs
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.Crypto.ZeroKnowledge;
+using WalletWasabi.WabiSabi.Crypto;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class ConnectionConfirmationRequest
+ {
+ public ConnectionConfirmationRequest(Guid roundId, Guid aliceId, IEnumerable<RegistrationRequestMessage> zeroCredentialRequests, IEnumerable<RegistrationRequestMessage> realCredentialRequests)
+ {
+ RoundId = roundId;
+ AliceId = aliceId;
+ RealCredentialRequests = realCredentialRequests;
+ ZeroCredentialRequests = zeroCredentialRequests;
+ }
+
+ public Guid RoundId { get; }
+
+ public Guid AliceId { get; }
+ public IEnumerable<RegistrationRequestMessage> RealCredentialRequests { get; }
+ public IEnumerable<RegistrationRequestMessage> ZeroCredentialRequests { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/ConnectionConfirmationResponse.cs
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.WabiSabi.Crypto;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class ConnectionConfirmationResponse
+ {
+ public ConnectionConfirmationResponse(IEnumerable<RegistrationResponseMessage> zeroCredentials, IEnumerable<RegistrationResponseMessage> realCredentials)
+ {
+ ZeroCredentials = zeroCredentials;
+ RealCredentials = realCredentials;
+ }
+
+ public IEnumerable<RegistrationResponseMessage> ZeroCredentials { get; }
+
+ public IEnumerable<RegistrationResponseMessage> RealCredentials { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/CredentialReissuanceRequest.cs
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.WabiSabi.Crypto;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class CredentialReissuanceRequest
+ {
+ public CredentialReissuanceRequest(IEnumerable<RegistrationRequestMessage> zeroCredentialRequests, IEnumerable<RegistrationRequestMessage> realCredentialRequests)
+ {
+ ZeroCredentialRequests = zeroCredentialRequests;
+ RealCredentialRequests = realCredentialRequests;
+ }
+
+ public IEnumerable<RegistrationRequestMessage> ZeroCredentialRequests { get; }
+ public IEnumerable<RegistrationRequestMessage> RealCredentialRequests { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/CredentialReissuanceResponse.cs
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.WabiSabi.Crypto;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class CredentialReissuanceResponse
+ {
+ public CredentialReissuanceResponse(IEnumerable<RegistrationResponseMessage> zeroCredentials, IEnumerable<RegistrationResponseMessage> realCredentials)
+ {
+ ZeroCredentials = zeroCredentials;
+ RealCredentials = realCredentials;
+ }
+
+ public IEnumerable<RegistrationResponseMessage> ZeroCredentials { get; }
+
+ public IEnumerable<RegistrationResponseMessage> RealCredentials { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/InputRoundSignaturePair.cs
+using NBitcoin;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class InputRoundSignaturePair
+ {
+ public InputRoundSignaturePair(OutPoint input, byte[] roundSignature)
+ {
+ Input = input;
+ RoundSignature = roundSignature;
+ }
+
+ public OutPoint Input { get; }
+
+ public byte[] RoundSignature { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/InputWitnessPair.cs
+using NBitcoin;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class InputWitnessPair
+ {
+ public InputWitnessPair(OutPoint input, WitScript witness)
+ {
+ Input = input;
+ Witness = witness;
+ }
+
+ public OutPoint Input { get; }
+ public WitScript Witness { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/InputsRegistrationRequest.cs
+using NBitcoin;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.WabiSabi.Crypto;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class InputsRegistrationRequest
+ {
+ public InputsRegistrationRequest(Guid roundId, IEnumerable<InputRoundSignaturePair> inputRoundSignaturePairs, IEnumerable<RegistrationRequestMessage> zeroCredentialRequests)
+ {
+ RoundId = roundId;
+ InputRoundSignaturePairs = inputRoundSignaturePairs;
+ ZeroCredentialRequests = zeroCredentialRequests;
+ }
+
+ public Guid RoundId { get; }
+ public IEnumerable<InputRoundSignaturePair> InputRoundSignaturePairs { get; }
+ public IEnumerable<RegistrationRequestMessage> ZeroCredentialRequests { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/InputsRegistrationResponse.cs
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.WabiSabi.Crypto;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class InputsRegistrationResponse
+ {
+ public InputsRegistrationResponse(Guid aliceId, RegistrationResponseMessage zeroCredentials)
+ {
+ AliceId = aliceId;
+ ZeroCredentials = zeroCredentials;
+ }
+
+ public Guid AliceId { get; }
+ public RegistrationResponseMessage ZeroCredentials { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/InputsRemovalRequest.cs
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class InputsRemovalRequest
+ {
+ public InputsRemovalRequest(Guid aliceId)
+ {
+ AliceId = aliceId;
+ }
+
+ public Guid AliceId { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/OutputRegistrationRequest.cs
+using NBitcoin;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.Crypto.ZeroKnowledge;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class OutputRegistrationRequest
+ {
+ public OutputRegistrationRequest(Guid roundId, TxOut output, IEnumerable<Credential> presentedCredentials)
+ {
+ RoundId = roundId;
+ Output = output;
+ PresentedCredentials = presentedCredentials;
+ }
+
+ public Guid RoundId { get; }
+
+ public TxOut Output { get; }
+ public IEnumerable<Credential> PresentedCredentials { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/OutputRegistrationResponse.cs
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class OutputRegistrationResponse
+ {
+ public OutputRegistrationResponse(byte[] unsignedTransactionSecret)
+ {
+ UnsignedTransactionSecret = unsignedTransactionSecret;
+ }
+
+ public byte[] UnsignedTransactionSecret { get; }
+ }
+}

ADD
WalletWasabi/WabiSabi/Models/TransactionSignaturesRequest.cs
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WalletWasabi.WabiSabi.Models
+{
+ public class TransactionSignaturesRequest
+ {
+ public TransactionSignaturesRequest(Guid roundId, Guid aliceId, IEnumerable<InputWitnessPair> inputWitnessPairs)
+ {
+ RoundId = roundId;
+ AliceId = aliceId;
+ InputWitnessPairs = inputWitnessPairs;
+ }
+
+ public Guid RoundId { get; }
+
+ public Guid AliceId { get; }
+ public IEnumerable<InputWitnessPair> InputWitnessPairs { get; }
+ }
+}

Create post request skeletons