Exemple #1
0
        public async Task PublishTransactionAsync(byte[] signedTransaction)
        {
            if (signedTransaction == null)
            {
                throw new ArgumentNullException(nameof(signedTransaction));
            }

            var client  = WalletService.NewClient(_channel);
            var request = new PublishTransactionRequest
            {
                SignedTransaction = ByteString.CopyFrom(signedTransaction),
            };
            await client.PublishTransactionAsync(request, cancellationToken : _tokenSource.Token);
        }
Exemple #2
0
        public async Task <Blake256Hash> PublishTransactionAsync(byte[] signedTransaction)
        {
            if (signedTransaction == null)
            {
                throw new ArgumentNullException(nameof(signedTransaction));
            }

            var client  = new WalletService.WalletServiceClient(_channel);
            var request = new PublishTransactionRequest
            {
                SignedTransaction = ByteString.CopyFrom(signedTransaction),
            };
            var response = await client.PublishTransactionAsync(request, cancellationToken : _tokenSource.Token);

            return(new Blake256Hash(response.TransactionHash.ToByteArray()));
        }
Exemple #3
0
        public async Task<Blake256Hash> PublishTransactionAsync(byte[] signedTransaction)
        {
            if (signedTransaction == null)
                throw new ArgumentNullException(nameof(signedTransaction));

            var client = new WalletService.WalletServiceClient(_channel);
            var request = new PublishTransactionRequest
            {
                SignedTransaction = ByteString.CopyFrom(signedTransaction),
            };
            var response = await client.PublishTransactionAsync(request, cancellationToken: _tokenSource.Token);
            return new Blake256Hash(response.TransactionHash.ToByteArray());
        }
Exemple #4
0
        public async Task PublishTransactionAsync(byte[] signedTransaction)
        {
            if (signedTransaction == null)
                throw new ArgumentNullException(nameof(signedTransaction));

            var client = WalletService.NewClient(_channel);
            var request = new PublishTransactionRequest
            {
                SignedTransaction = ByteString.CopyFrom(signedTransaction),
            };
            await client.PublishTransactionAsync(request, cancellationToken: _tokenSource.Token);
        }