예제 #1
0
 public BlockchainTransactionService(BlockchainNetworkConnection blockchainNetworkConnection)
 {
     BlockchainNetworkConnection = blockchainNetworkConnection;
     TransactionClient           = new TransactionClient(blockchainNetworkConnection);
     NemUtils = new NemUtils(blockchainNetworkConnection.NetworkType);
     BlockchainMessageService = new BlockchainMessageService(blockchainNetworkConnection);
 }
예제 #2
0
 internal BlockchainTransactionService(BlockchainNetworkConnection blockchainNetworkConnection,
                                       BlockchainMessageService blockchainMessageService,
                                       TransactionClient transactionClient, NemUtils nemUtils)
 {
     BlockchainNetworkConnection = blockchainNetworkConnection;
     BlockchainMessageService    = blockchainMessageService;
     TransactionClient           = transactionClient;
     NemUtils = nemUtils;
 }
예제 #3
0
        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);
 }