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)); }) })); }
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 }); }
public static GetAccountResponse CreateGetAccountResponse(Account account) { return(ReferenceEquals(account, null) ? new GetAccountResponse() : new GetAccountResponse { Account = ByteStreamConverter.ToBase64 <ByteStream>(stream => { stream.Write(account); }) }); }