public BlockchainTransactionService(BlockchainNetworkConnection blockchainNetworkConnection) { BlockchainNetworkConnection = blockchainNetworkConnection; TransactionClient = new TransactionClient(blockchainNetworkConnection); NemUtils = new NemUtils(blockchainNetworkConnection.NetworkType); BlockchainMessageService = new BlockchainMessageService(blockchainNetworkConnection); }
internal BlockchainTransactionService(BlockchainNetworkConnection blockchainNetworkConnection, BlockchainMessageService blockchainMessageService, TransactionClient transactionClient, NemUtils nemUtils) { BlockchainNetworkConnection = blockchainNetworkConnection; BlockchainMessageService = blockchainMessageService; TransactionClient = transactionClient; NemUtils = nemUtils; }
public IObservable <string> CreateAndAnnounceTransaction(ProximaxMessagePayloadModel messagePayload, string signerPrivateKey, string recipientPublicKey, string recipientAddress, int transactionDeadline, List <Mosaic> transactionMosaics, bool useBlockchainSecureMessage) { CheckParameter(signerPrivateKey != null, "signerPrivateKey is required"); CheckParameter(messagePayload != null, "messagePayload is required"); var message = BlockchainMessageService.CreateMessage(messagePayload, signerPrivateKey, recipientPublicKey, recipientAddress, useBlockchainSecureMessage); var recipient = GetRecipient(signerPrivateKey, recipientPublicKey, recipientAddress); var transaction = CreateTransaction(recipient, transactionDeadline, transactionMosaics, message); var signedTransaction = NemUtils.SignTransaction(signerPrivateKey, transaction); TransactionClient.Announce(signedTransaction, NemUtils.GetAddressFromPrivateKey(signerPrivateKey)); return(Observable.Return(signedTransaction.Hash)); }
internal RetrieveProximaxMessagePayloadService(BlockchainMessageService blockchainMessageService) { BlockchainMessageService = blockchainMessageService; }
public RetrieveProximaxMessagePayloadService(BlockchainNetworkConnection blockchainNetworkConnection) { BlockchainMessageService = new BlockchainMessageService(blockchainNetworkConnection); }