Пример #1
0
 public static RequestMessage CreateSendSignedTransactionRequest(SignedTransaction transaction)
 {
     return(CreateRequest(new SendTransactionRequest
     {
         Transaction = ByteStreamConverter.ToBase64 <ByteStream>(stream => { stream.Write(transaction); })
     }));
 }
 public static NotificationMessage CreateTransactionReceivedNotification(SignedTransaction transaction)
 {
     return(CreateNotification(new API.Notifications.TransactionReceived
     {
         Transaction = ByteStreamConverter.ToBase64 <ByteStream>(stream => { stream.Write(transaction); })
     }));
 }
 public static NotificationMessage CreateSignedNewLedgerNotification(SignedLedger ledger)
 {
     return(CreateNotification(new API.Notifications.SignedNewLedger
     {
         Ledger = ByteStreamConverter.ToBase64 <ByteStream>(stream => { stream.Write(new SignedNewLedger(ledger)); })
     }));
 }
Пример #4
0
        public static GetTransactionsResponse CreateGetTransactionResponse(List <SignedTransaction> transactions = null)
        {
            var list = transactions == null ? null : transactions.Select(signed => ByteStreamConverter.ToBase64 <ByteStream>(stream => { stream.Write(signed); })).ToList();

            return(new GetTransactionsResponse {
                Transactions = list
            });
        }
Пример #5
0
 public static GetAccountResponse CreateGetAccountResponse(Account account)
 {
     return(ReferenceEquals(account, null) ? new GetAccountResponse() : new GetAccountResponse {
         Account = ByteStreamConverter.ToBase64 <ByteStream>(stream => { stream.Write(account); })
     });
 }