mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-20 02:11:40 +01:00
Added setban, getblock and decodescript functionality. Changed all Arrays to Vectors
This commit is contained in:
parent
8d56ebdcda
commit
260f554ced
@ -25,10 +25,10 @@ case class GetNetworkInfoResult(
|
||||
timeoffset: Int,
|
||||
networkactive: Boolean,
|
||||
connections: Int,
|
||||
networks: Array[Network],
|
||||
networks: Vector[Network],
|
||||
relayfee: Bitcoins,
|
||||
incrementalfee: Bitcoins,
|
||||
localadresses: Option[Array[NetworkAddress]],
|
||||
localadresses: Option[Vector[NetworkAddress]],
|
||||
warnings: String) extends NetworkResult
|
||||
|
||||
case class Network(
|
||||
@ -68,7 +68,7 @@ case class ValidateAddressResult(
|
||||
isscript: Option[Boolean],
|
||||
script: Option[ScriptPubKey],
|
||||
hex: Option[String],
|
||||
addresses: Option[Array[Address]],
|
||||
addresses: Option[Vector[Address]],
|
||||
sigrequired: Option[Int],
|
||||
pubkey: Option[ECPublicKey],
|
||||
iscompressed: Option[Boolean],
|
||||
@ -87,7 +87,7 @@ case class NodeBan(
|
||||
case class Node(
|
||||
addednode: InetAddress,
|
||||
connected: Option[Boolean],
|
||||
addresses: Option[Array[NodeAddress]]
|
||||
addresses: Option[Vector[NodeAddress]]
|
||||
) extends NetworkResult
|
||||
case class NodeAddress(
|
||||
address: InetAddress,
|
||||
@ -109,7 +109,7 @@ case class GetMemPoolEntryResult(
|
||||
ancestorcount: Int,
|
||||
ancestorsize: Int,
|
||||
ancestorfees: Int,
|
||||
depends: Option[Array[DoubleSha256Digest]]
|
||||
depends: Option[Vector[DoubleSha256Digest]]
|
||||
) extends NetworkResult
|
||||
|
||||
case class GetMemPoolInfoResult(
|
||||
|
@ -5,9 +5,10 @@ import java.net.InetAddress
|
||||
import org.bitcoins.core.crypto.{DoubleSha256Digest, ECPublicKey, Sha256Hash160Digest}
|
||||
import org.bitcoins.core.currency.Bitcoins
|
||||
import org.bitcoins.core.number.{Int32, UInt32}
|
||||
import org.bitcoins.core.protocol.{Address, P2PKHAddress}
|
||||
import org.bitcoins.core.protocol.{Address, P2PKHAddress, P2SHAddress}
|
||||
import org.bitcoins.core.protocol.blockchain.{Block, BlockHeader}
|
||||
import org.bitcoins.core.protocol.script.ScriptPubKey
|
||||
import org.bitcoins.core.protocol.transaction.{TransactionInput, TransactionOutput}
|
||||
import org.bitcoins.rpc.jsonmodels._
|
||||
import org.bitcoins.rpc.serializers.JsonReaders._
|
||||
import play.api.libs.json.{Json, Reads}
|
||||
@ -27,6 +28,9 @@ object JsonSerializers {
|
||||
implicit val sha256Hash160DigestReads: Reads[Sha256Hash160Digest] = Sha256Hash160DigestReads
|
||||
implicit val eCPublicKeyReads: Reads[ECPublicKey] = ECPublicKeyReads
|
||||
implicit val p2PKHAddressReads: Reads[P2PKHAddress] = P2PKHAddressReads
|
||||
implicit val p2SHAddressReads: Reads[P2SHAddress] = P2SHAddressReads
|
||||
implicit val transactionInputReads: Reads[TransactionInput] = TransactionInputReads
|
||||
implicit val transactionOutputReads: Reads[TransactionOutput] = TransactionOutputReads
|
||||
|
||||
// Network Models
|
||||
implicit val networkReads: Reads[Network] = Json.reads[Network]
|
||||
|
Loading…
Reference in New Issue
Block a user