Added implementations (and not tests yet) for getchaintxstats, savemempool, logging, uptime, combinerawtransaction, estimatefee, abortrescan, getaccount, getaccountaddress, getreceivedbyaccount, importpubkey, listaccounts, listreceivedbyaccount, listwallets, move, rescanblockchain, and setaccount

This commit is contained in:
nkohen 2018-06-18 15:18:53 -05:00
parent 61148955b3
commit b4c3e2ac57
3 changed files with 32 additions and 2 deletions

View File

@ -261,6 +261,14 @@ case class ReceivedAddress(
txids: Vector[DoubleSha256Digest])
extends NetworkResult
case class ReceivedAccount(
involvesWatchonly: Option[Boolean],
account: String,
amount: Bitcoins,
confirmations: Int,
lable: Option[String]
) extends NetworkResult
case class GetTransactionResult(
amount: Bitcoins,
fee: Option[Bitcoins],
@ -470,3 +478,12 @@ case class GetTxOutResult(
value: Bitcoins,
scriptPubKey: RpcScriptPubKey,
coinbase: Boolean) extends NetworkResult
case class GetChainTxStatsResult(
time: UInt32,
txcount: Int,
window_block_count: Int,
window_tx_count: Option[Int],
window_interval: Option[UInt32],
txrate: Option[BigDecimal]
) extends NetworkResult

View File

@ -70,3 +70,8 @@ case class ImportMultiResult(success: Boolean, error: Option[ImportMultiError])
case class ImportMultiError(code: Int, message: String) extends WalletResult
case class DumpWalletResult(filename: File)
case class RescanBlockChainResult(
start_height: Option[Int],
stop_height: Option[Int]
) extends WalletResult

View File

@ -154,6 +154,9 @@ object JsonSerializers {
implicit val receivedAddressReads: Reads[ReceivedAddress] =
Json.reads[ReceivedAddress]
implicit val receivedAccountReads: Reads[ReceivedAccount] =
Json.reads[ReceivedAccount]
implicit val TransactionDetailsReads: Reads[TransactionDetails] =
Json.reads[TransactionDetails]
implicit val getTransactionResultReads: Reads[GetTransactionResult] =
@ -229,6 +232,8 @@ object JsonSerializers {
implicit val getTxOutResultReads: Reads[GetTxOutResult] =
Json.reads[GetTxOutResult]
implicit val getChainTxStatsResultReads: Reads[GetChainTxStatsResult] = Json.reads[GetChainTxStatsResult]
// Mining Models
implicit val miningInfoReads: Reads[GetMiningInfoResult] =
Json.reads[GetMiningInfoResult]
@ -263,6 +268,9 @@ object JsonSerializers {
implicit val dumpWalletResultReads: Reads[DumpWalletResult] = Json.reads[DumpWalletResult]
implicit val rescanBlockChainResultReads: Reads[RescanBlockChainResult] =
Json.reads[RescanBlockChainResult]
// Map stuff
implicit def mapDoubleSha256DigestReads: Reads[
Map[DoubleSha256Digest, GetMemPoolResult]] =