mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 22:56:52 +01:00
Added functionality for many rpc calls (still no tests for them though)
This commit is contained in:
parent
9238f46d31
commit
e392c5c9b6
4 changed files with 260 additions and 161 deletions
|
@ -2,13 +2,13 @@ package org.bitcoins.rpc.jsonmodels
|
|||
|
||||
import java.net.InetAddress
|
||||
|
||||
import org.bitcoins.core.crypto.{DoubleSha256Digest, ECPublicKey, Sha256Hash160Digest}
|
||||
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.number.{ Int32, UInt32 }
|
||||
import org.bitcoins.core.protocol.blockchain.Block
|
||||
import org.bitcoins.core.protocol.{Address, BitcoinAddress}
|
||||
import org.bitcoins.core.protocol.{ Address, BitcoinAddress }
|
||||
import org.bitcoins.core.protocol.script.ScriptPubKey
|
||||
import org.bitcoins.core.protocol.transaction.TransactionInput
|
||||
import org.bitcoins.core.protocol.transaction.{ Transaction, TransactionInput }
|
||||
|
||||
sealed abstract class NetworkResult
|
||||
|
||||
|
@ -62,140 +62,210 @@ case class GetBlockHeaderResult(
|
|||
nextblockhash: Option[DoubleSha256Digest]) extends NetworkResult
|
||||
|
||||
case class ValidateAddressResult(
|
||||
isvalid: Boolean,
|
||||
address: Option[Address],
|
||||
scriptPubKey: Option[ScriptPubKey],
|
||||
ismine: Option[Boolean],
|
||||
iswatchonly: Option[Boolean],
|
||||
isscript: Option[Boolean],
|
||||
script: Option[ScriptPubKey],
|
||||
hex: Option[String],
|
||||
addresses: Option[Vector[Address]],
|
||||
sigrequired: Option[Int],
|
||||
pubkey: Option[ECPublicKey],
|
||||
iscompressed: Option[Boolean],
|
||||
account: Option[String],
|
||||
hdkeypath: Option[String],
|
||||
hdmasterkeyid: Option[Sha256Hash160Digest]
|
||||
) extends NetworkResult
|
||||
isvalid: Boolean,
|
||||
address: Option[Address],
|
||||
scriptPubKey: Option[ScriptPubKey],
|
||||
ismine: Option[Boolean],
|
||||
iswatchonly: Option[Boolean],
|
||||
isscript: Option[Boolean],
|
||||
script: Option[ScriptPubKey],
|
||||
hex: Option[String],
|
||||
addresses: Option[Vector[Address]],
|
||||
sigrequired: Option[Int],
|
||||
pubkey: Option[ECPublicKey],
|
||||
iscompressed: Option[Boolean],
|
||||
account: Option[String],
|
||||
hdkeypath: Option[String],
|
||||
hdmasterkeyid: Option[Sha256Hash160Digest]) extends NetworkResult
|
||||
|
||||
case class NodeBan(
|
||||
address: InetAddress,
|
||||
banned_until: UInt32,
|
||||
ban_created: UInt32,
|
||||
ban_reason: String
|
||||
) extends NetworkResult
|
||||
address: InetAddress,
|
||||
banned_until: UInt32,
|
||||
ban_created: UInt32,
|
||||
ban_reason: String) extends NetworkResult
|
||||
|
||||
case class Node(
|
||||
addednode: InetAddress,
|
||||
connected: Option[Boolean],
|
||||
addresses: Option[Vector[NodeAddress]]
|
||||
) extends NetworkResult
|
||||
addednode: InetAddress,
|
||||
connected: Option[Boolean],
|
||||
addresses: Option[Vector[NodeAddress]]) extends NetworkResult
|
||||
case class NodeAddress(
|
||||
address: InetAddress,
|
||||
connected: String
|
||||
) extends NetworkResult
|
||||
address: InetAddress,
|
||||
connected: String) extends NetworkResult
|
||||
|
||||
case class GetMemPoolEntryResult(
|
||||
size: Int,
|
||||
fee: Bitcoins,
|
||||
modifiedfee: Bitcoins,
|
||||
time: UInt32,
|
||||
height: Int,
|
||||
startingpriority: BigDecimal,
|
||||
currentpriority: BigDecimal,
|
||||
descendantcount: Int,
|
||||
descendantsize: Int,
|
||||
descendantfees: Int,
|
||||
ancestorcount: Int,
|
||||
ancestorsize: Int,
|
||||
ancestorfees: Int,
|
||||
depends: Option[Vector[DoubleSha256Digest]]
|
||||
) extends NetworkResult
|
||||
size: Int,
|
||||
fee: Bitcoins,
|
||||
modifiedfee: Bitcoins,
|
||||
time: UInt32,
|
||||
height: Int,
|
||||
startingpriority: BigDecimal,
|
||||
currentpriority: BigDecimal,
|
||||
descendantcount: Int,
|
||||
descendantsize: Int,
|
||||
descendantfees: Int,
|
||||
ancestorcount: Int,
|
||||
ancestorsize: Int,
|
||||
ancestorfees: Int,
|
||||
depends: Option[Vector[DoubleSha256Digest]]) extends NetworkResult
|
||||
|
||||
case class GetMemPoolInfoResult(
|
||||
size: Int,
|
||||
bytes: Int,
|
||||
usage: Int,
|
||||
maxmempool: Int,
|
||||
mempoolminfee: Bitcoins,
|
||||
minrelaytxfee: Bitcoins
|
||||
) extends NetworkResult
|
||||
size: Int,
|
||||
bytes: Int,
|
||||
usage: Int,
|
||||
maxmempool: Int,
|
||||
mempoolminfee: Bitcoins,
|
||||
minrelaytxfee: Bitcoins) extends NetworkResult
|
||||
|
||||
case class GetTxOutSetInfoResult(
|
||||
height: Int,
|
||||
bestblock: DoubleSha256Digest,
|
||||
transactions: Int,
|
||||
txouts: Int,
|
||||
bytes_serialized: Int,
|
||||
hash_serialized: DoubleSha256Digest,
|
||||
total_amount: Bitcoins
|
||||
) extends NetworkResult
|
||||
height: Int,
|
||||
bestblock: DoubleSha256Digest,
|
||||
transactions: Int,
|
||||
txouts: Int,
|
||||
bytes_serialized: Int,
|
||||
hash_serialized: DoubleSha256Digest,
|
||||
total_amount: Bitcoins) extends NetworkResult
|
||||
|
||||
case class GetBlockResult(
|
||||
hash: DoubleSha256Digest,
|
||||
confirmations: Int,
|
||||
strippedsize: Int,
|
||||
size: Int,
|
||||
weight: Int,
|
||||
height: Int,
|
||||
version: Int,
|
||||
versionHex: Int32,
|
||||
merkleroot: DoubleSha256Digest,
|
||||
tx: Vector[DoubleSha256Digest],
|
||||
time: UInt32,
|
||||
mediantime: UInt32,
|
||||
nonce: UInt32,
|
||||
bits: UInt32,
|
||||
difficulty: BigDecimal,
|
||||
chainwork: String,
|
||||
previousblockhash: Option[DoubleSha256Digest],
|
||||
nextblockhash: Option[DoubleSha256Digest]
|
||||
) extends NetworkResult
|
||||
hash: DoubleSha256Digest,
|
||||
confirmations: Int,
|
||||
strippedsize: Int,
|
||||
size: Int,
|
||||
weight: Int,
|
||||
height: Int,
|
||||
version: Int,
|
||||
versionHex: Int32,
|
||||
merkleroot: DoubleSha256Digest,
|
||||
tx: Vector[DoubleSha256Digest],
|
||||
time: UInt32,
|
||||
mediantime: UInt32,
|
||||
nonce: UInt32,
|
||||
bits: UInt32,
|
||||
difficulty: BigDecimal,
|
||||
chainwork: String,
|
||||
previousblockhash: Option[DoubleSha256Digest],
|
||||
nextblockhash: Option[DoubleSha256Digest]) extends NetworkResult
|
||||
|
||||
case class GetBlockWithTransactionsResult(
|
||||
hash: DoubleSha256Digest,
|
||||
confirmations: Int,
|
||||
strippedsize: Int,
|
||||
size: Int,
|
||||
weight: Int,
|
||||
height: Int,
|
||||
version: Int,
|
||||
versionHex: Int32,
|
||||
merkleroot: DoubleSha256Digest,
|
||||
tx: Vector[RpcTransaction],
|
||||
time: UInt32,
|
||||
mediantime: UInt32,
|
||||
nonce: UInt32,
|
||||
bits: UInt32,
|
||||
difficulty: BigDecimal,
|
||||
chainwork: String,
|
||||
previousblockhash: Option[DoubleSha256Digest],
|
||||
nextblockhash: Option[DoubleSha256Digest]
|
||||
) extends NetworkResult
|
||||
hash: DoubleSha256Digest,
|
||||
confirmations: Int,
|
||||
strippedsize: Int,
|
||||
size: Int,
|
||||
weight: Int,
|
||||
height: Int,
|
||||
version: Int,
|
||||
versionHex: Int32,
|
||||
merkleroot: DoubleSha256Digest,
|
||||
tx: Vector[RpcTransaction],
|
||||
time: UInt32,
|
||||
mediantime: UInt32,
|
||||
nonce: UInt32,
|
||||
bits: UInt32,
|
||||
difficulty: BigDecimal,
|
||||
chainwork: String,
|
||||
previousblockhash: Option[DoubleSha256Digest],
|
||||
nextblockhash: Option[DoubleSha256Digest]) extends NetworkResult
|
||||
|
||||
case class RpcTransaction(
|
||||
txid: DoubleSha256Digest,
|
||||
hash: DoubleSha256Digest,
|
||||
version: Int,
|
||||
size: Int,
|
||||
vsize: Int,
|
||||
locktime: UInt32,
|
||||
vin: Vector[TransactionInput],
|
||||
vout: Vector[RpcTransactionOutput],
|
||||
hex: Block
|
||||
) extends NetworkResult
|
||||
txid: DoubleSha256Digest,
|
||||
hash: DoubleSha256Digest,
|
||||
version: Int,
|
||||
size: Int,
|
||||
vsize: Int,
|
||||
locktime: UInt32,
|
||||
vin: Vector[TransactionInput],
|
||||
vout: Vector[RpcTransactionOutput],
|
||||
hex: Block) extends NetworkResult
|
||||
|
||||
case class RpcTransactionOutput(
|
||||
value: Bitcoins,
|
||||
n: Int,
|
||||
scriptPubKey: RpcScriptPubKey
|
||||
) extends NetworkResult
|
||||
value: Bitcoins,
|
||||
n: Int,
|
||||
scriptPubKey: RpcScriptPubKey) extends NetworkResult
|
||||
|
||||
case class RpcScriptPubKey(
|
||||
asm: String,
|
||||
hex: String,
|
||||
reqSigs: Int,
|
||||
scriptType: String,
|
||||
addresses: Vector[BitcoinAddress]
|
||||
) extends NetworkResult
|
||||
asm: String,
|
||||
hex: String,
|
||||
reqSigs: Int,
|
||||
scriptType: String,
|
||||
addresses: Vector[BitcoinAddress]) extends NetworkResult
|
||||
|
||||
case class ListSinceBlockResult(
|
||||
transactions: Vector[Payment],
|
||||
lastblock: DoubleSha256Digest) extends NetworkResult
|
||||
|
||||
case class Payment( // TODO: Get around the limit for parameters
|
||||
involvesWatchonly: Option[Boolean],
|
||||
account: String,
|
||||
address: Option[BitcoinAddress],
|
||||
category: String,
|
||||
amount: Bitcoins,
|
||||
vout: Option[Int],
|
||||
fee: Option[Bitcoins],
|
||||
confirmations: Option[Int],
|
||||
generated: Option[Boolean],
|
||||
blockhash: Option[DoubleSha256Digest],
|
||||
blockindex: Option[Int],
|
||||
blocktime: Option[UInt32],
|
||||
txid: Option[DoubleSha256Digest],
|
||||
walletconflicts: Option[Vector[DoubleSha256Digest]],
|
||||
time: UInt32,
|
||||
timereceived: Option[UInt32],
|
||||
bip125_replaceable: String,
|
||||
comment: Option[String],
|
||||
to: Option[String],
|
||||
label: Option[String],
|
||||
trusted: Option[Boolean],
|
||||
otheraccount: Option[String],
|
||||
abandoned: Option[Boolean]) extends NetworkResult
|
||||
|
||||
case class ReceivedAddress(
|
||||
involvesWatchonly: Option[Boolean],
|
||||
address: BitcoinAddress,
|
||||
account: String,
|
||||
amount: Bitcoins,
|
||||
confirmations: Int,
|
||||
label: String,
|
||||
txids: Vector[DoubleSha256Digest]) extends NetworkResult
|
||||
|
||||
case class GetTransactionResult(
|
||||
amount: Bitcoins,
|
||||
fee: Option[Bitcoins],
|
||||
confirmations: Int,
|
||||
generated: Option[Boolean],
|
||||
blockhash: Option[DoubleSha256Digest],
|
||||
blockIndex: Option[Int],
|
||||
blockTime: Option[UInt32],
|
||||
txid: DoubleSha256Digest,
|
||||
walletconflicts: Vector[DoubleSha256Digest],
|
||||
time: UInt32,
|
||||
timereceived: UInt32,
|
||||
bip125_replaceable: String,
|
||||
comment: Option[String],
|
||||
to: Option[String],
|
||||
details: Vector[TransactionDetails],
|
||||
hex: Transaction) extends NetworkResult
|
||||
|
||||
case class TransactionDetails(
|
||||
involvesWatchonly: Option[Boolean],
|
||||
account: String,
|
||||
address: Option[BitcoinAddress],
|
||||
category: String,
|
||||
amount: Bitcoins,
|
||||
vout: Int,
|
||||
fee: Option[Bitcoins],
|
||||
abandoned: Option[Boolean]) extends NetworkResult
|
||||
|
||||
case class UnspentOutput( // Naming?
|
||||
txid: DoubleSha256Digest,
|
||||
vout: Int,
|
||||
address: Option[BitcoinAddress],
|
||||
account: Option[String],
|
||||
scriptPubKey: Option[ScriptPubKey],
|
||||
reedemScript: Option[ScriptPubKey],
|
||||
amount: Bitcoins,
|
||||
confirmations: Int,
|
||||
spendable: Boolean,
|
||||
solvable: Boolean) extends NetworkResult
|
||||
|
||||
case class LockUnspentOutputParameter(txid: DoubleSha256Digest, vout: Int) extends NetworkResult
|
||||
|
||||
case class SignRawTransactionResult(hex: Transaction, complete: Boolean) extends NetworkResult
|
|
@ -1,47 +1,49 @@
|
|||
package org.bitcoins.rpc.jsonmodels
|
||||
|
||||
import org.bitcoins.core.crypto.{DoubleSha256Digest, Sha256Hash160Digest}
|
||||
import org.bitcoins.core.crypto.{ DoubleSha256Digest, Sha256Hash160Digest }
|
||||
import org.bitcoins.core.currency.Bitcoins
|
||||
import org.bitcoins.core.number.UInt32
|
||||
import org.bitcoins.core.protocol.{Address, P2PKHAddress, P2SHAddress}
|
||||
import org.bitcoins.core.protocol.{ Address, P2PKHAddress, P2SHAddress }
|
||||
import org.bitcoins.core.protocol.script.ScriptPubKey
|
||||
import org.bitcoins.core.protocol.transaction.Transaction
|
||||
|
||||
sealed abstract class WalletResult
|
||||
|
||||
case class GetWalletInfoResult(
|
||||
walletname: String,
|
||||
walletversion: Int,
|
||||
balance: Bitcoins,
|
||||
unconfirmed_balance: Bitcoins,
|
||||
immature_balance: Bitcoins,
|
||||
txcount: Int,
|
||||
keypoololdest: UInt32,
|
||||
keypoolsize: Int,
|
||||
keypoolsize_hd_internal: Int,
|
||||
paytxfee: Bitcoins,
|
||||
hdmasterkeyid: Sha256Hash160Digest,
|
||||
unlocked_until: Option[Int]
|
||||
) extends WalletResult
|
||||
walletname: String,
|
||||
walletversion: Int,
|
||||
balance: Bitcoins,
|
||||
unconfirmed_balance: Bitcoins,
|
||||
immature_balance: Bitcoins,
|
||||
txcount: Int,
|
||||
keypoololdest: UInt32,
|
||||
keypoolsize: Int,
|
||||
keypoolsize_hd_internal: Int,
|
||||
paytxfee: Bitcoins,
|
||||
hdmasterkeyid: Sha256Hash160Digest,
|
||||
unlocked_until: Option[Int]) extends WalletResult
|
||||
case class BumpFeeResult(
|
||||
txid: DoubleSha256Digest,
|
||||
origfee: Bitcoins,
|
||||
fee: Bitcoins,
|
||||
warnings: String
|
||||
) extends WalletResult
|
||||
txid: DoubleSha256Digest,
|
||||
origfee: Bitcoins,
|
||||
fee: Bitcoins,
|
||||
warnings: String) extends WalletResult
|
||||
|
||||
case class CreateMultiSigResult(address: Address, redeemScript: ScriptPubKey) extends WalletResult
|
||||
|
||||
case class DecodeScriptResult(
|
||||
asm: String,
|
||||
typeOfScript: Option[String],
|
||||
reqSigs: Option[Int],
|
||||
addresses: Option[Vector[P2PKHAddress]],
|
||||
p2sh: P2SHAddress
|
||||
) extends WalletResult
|
||||
asm: String,
|
||||
typeOfScript: Option[String],
|
||||
reqSigs: Option[Int],
|
||||
addresses: Option[Vector[P2PKHAddress]],
|
||||
p2sh: P2SHAddress) extends WalletResult
|
||||
|
||||
case class FundRawTransactionResult(
|
||||
hex: Transaction,
|
||||
fee: Bitcoins,
|
||||
changepos: Int
|
||||
) extends WalletResult
|
||||
hex: Transaction,
|
||||
fee: Bitcoins,
|
||||
changepos: Int) extends WalletResult
|
||||
|
||||
case class RpcAccount(
|
||||
involvesWatchonly: Boolean,
|
||||
account: String,
|
||||
amount: Bitcoins,
|
||||
confirmations: Int) extends WalletResult
|
|
@ -2,17 +2,17 @@ package org.bitcoins.rpc.serializers
|
|||
|
||||
import java.net.InetAddress
|
||||
|
||||
import org.bitcoins.core.crypto.{DoubleSha256Digest, ECPublicKey, Sha256Hash160Digest}
|
||||
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, BitcoinAddress, P2PKHAddress, P2SHAddress}
|
||||
import org.bitcoins.core.protocol.blockchain.{Block, BlockHeader, MerkleBlock}
|
||||
import org.bitcoins.core.number.{ Int32, UInt32 }
|
||||
import org.bitcoins.core.protocol.{ Address, BitcoinAddress, P2PKHAddress, P2SHAddress }
|
||||
import org.bitcoins.core.protocol.blockchain.{ Block, BlockHeader, MerkleBlock }
|
||||
import org.bitcoins.core.protocol.script.ScriptPubKey
|
||||
import org.bitcoins.core.protocol.transaction.{Transaction, TransactionInput, TransactionOutPoint, TransactionOutput}
|
||||
import org.bitcoins.core.protocol.transaction.{ Transaction, TransactionInput, TransactionOutPoint, TransactionOutput }
|
||||
import org.bitcoins.rpc.jsonmodels._
|
||||
import org.bitcoins.rpc.serializers.JsonReaders._
|
||||
import org.bitcoins.rpc.serializers.JsonWriters._
|
||||
import play.api.libs.json.{Json, Reads, Writes, __}
|
||||
import play.api.libs.json.{ Json, Reads, Writes, __ }
|
||||
import play.api.libs.functional.syntax._
|
||||
|
||||
object JsonSerializers {
|
||||
|
@ -39,6 +39,8 @@ object JsonSerializers {
|
|||
|
||||
implicit val bitcoinsWrites: Writes[Bitcoins] = BitcoinsWrites
|
||||
implicit val bitcoinAddressWrites: Writes[BitcoinAddress] = BitcoinAddressWrites
|
||||
implicit val doubleSha256DigestWrites: Writes[DoubleSha256Digest] = DoubleSha256DigestWrites
|
||||
implicit val scriptPubKeyWrites: Writes[ScriptPubKey] = ScriptPubKeyWrites
|
||||
|
||||
// Network Models
|
||||
implicit val networkReads: Reads[Network] = Json.reads[Network]
|
||||
|
@ -69,6 +71,20 @@ object JsonSerializers {
|
|||
implicit val rpcTransactionReads: Reads[RpcTransaction] = Json.reads[RpcTransaction]
|
||||
implicit val getBlockWithTransactionsResultReads: Reads[GetBlockWithTransactionsResult] = Json.reads[GetBlockWithTransactionsResult]
|
||||
|
||||
implicit val paymentReads: Reads[Payment] = Json.reads[Payment]
|
||||
implicit val listSinceBlockResultReads: Reads[ListSinceBlockResult] = Json.reads[ListSinceBlockResult]
|
||||
|
||||
implicit val receivedAddressReads: Reads[ReceivedAddress] = Json.reads[ReceivedAddress]
|
||||
|
||||
implicit val TransactionDetailsReads: Reads[TransactionDetails] = Json.reads[TransactionDetails]
|
||||
implicit val getTransactionResultReads: Reads[GetTransactionResult] = Json.reads[GetTransactionResult]
|
||||
|
||||
implicit val unspentOutputReads: Reads[UnspentOutput] = Json.reads[UnspentOutput]
|
||||
|
||||
implicit val lockUnspentParameterWrites: Writes[LockUnspentOutputParameter] = Json.writes[LockUnspentOutputParameter]
|
||||
|
||||
implicit val signRawTransactionResultReads: Reads[SignRawTransactionResult] = Json.reads[SignRawTransactionResult]
|
||||
|
||||
// Mining Models
|
||||
implicit val miningInfoReads: Reads[GetMiningInfoResult] = Json.reads[GetMiningInfoResult]
|
||||
|
||||
|
@ -81,11 +97,12 @@ object JsonSerializers {
|
|||
|
||||
implicit val decodeScriptResultReads: Reads[DecodeScriptResult] = (
|
||||
(__ \ "asm").read[String] and
|
||||
(__ \ "type").readNullable[String] and
|
||||
(__ \ "reqSigs").readNullable[Int] and
|
||||
(__ \ "addresses").readNullable[Vector[P2PKHAddress]] and
|
||||
(__ \ "p2sh").read[P2SHAddress]
|
||||
)(DecodeScriptResult)
|
||||
(__ \ "type").readNullable[String] and
|
||||
(__ \ "reqSigs").readNullable[Int] and
|
||||
(__ \ "addresses").readNullable[Vector[P2PKHAddress]] and
|
||||
(__ \ "p2sh").read[P2SHAddress])(DecodeScriptResult)
|
||||
|
||||
implicit val fundRawTransactionResultReads: Reads[FundRawTransactionResult] = Json.reads[FundRawTransactionResult]
|
||||
|
||||
implicit val rpcAccoutReads: Reads[RpcAccount] = Json.reads[RpcAccount]
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
package org.bitcoins.rpc.serializers
|
||||
|
||||
import org.bitcoins.core.crypto.DoubleSha256Digest
|
||||
import org.bitcoins.core.currency.Bitcoins
|
||||
import org.bitcoins.core.protocol.BitcoinAddress
|
||||
import org.bitcoins.core.protocol.script.ScriptPubKey
|
||||
import play.api.libs.json._
|
||||
|
||||
object JsonWriters {
|
||||
|
@ -12,4 +14,12 @@ object JsonWriters {
|
|||
implicit object BitcoinAddressWrites extends Writes[BitcoinAddress] {
|
||||
def writes(o: BitcoinAddress) = JsString(o.value)
|
||||
}
|
||||
|
||||
implicit object DoubleSha256DigestWrites extends Writes[DoubleSha256Digest] {
|
||||
def writes(o: DoubleSha256Digest) = JsString(o.hex)
|
||||
}
|
||||
|
||||
implicit object ScriptPubKeyWrites extends Writes[ScriptPubKey] {
|
||||
def writes(o: ScriptPubKey) = JsString(o.hex)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue