BtcSerializer

trait BtcSerializer[T]
class Object
trait Matchable
class Any
object Addr.type
object Block.type
object BlockHeader.type
object Getblocks.type
object Getdata.type
object Getheaders.type
object Headers.type
object Inventory.type
object InventoryVector.type
object MerkleBlock.type
object Message.type
object NetworkAddress.type
object OutPoint.type
object Reject.type
object ScriptWitness.type
object Transaction.type
object TxIn.type
object TxOut.type
object Version.type

Value members

Abstract methods

def read(in: InputStream, protocolVersion: Long): T

read a message from a stream

read a message from a stream

Value parameters:
in

input stream / byte array / bytevector / hex string

protocolVersion

(optional) protocol version

Returns:

a deserialized message

Source:
Protocol.scala
def write(t: T, out: OutputStream, protocolVersion: Long): Unit

write a message to a stream

write a message to a stream

Value parameters:
out

output stream

t

message

Source:
Protocol.scala

Concrete methods

def read(in: InputStream): T
def read(in: Array[Byte], protocolVersion: Long): T
def read(in: Array[Byte]): T
def read(in: String, protocolVersion: Long): T
def read(in: String): T
def read(in: ByteVector): T
def validate(t: T): Unit
def write(t: T, out: OutputStream): Unit
def write(t: T, protocolVersion: Long): ByteVector

write a message to a byte array

write a message to a byte array

Value parameters:
t

message

Returns:

a serialized message

Source:
Protocol.scala