Esempio n. 1
0
class VersionSerializer(Serializer):
    """The version command serializer."""
    model_class = Version
    version = fields.Int32LEField()
    services = fields.UInt64LEField()
    timestamp = fields.Int64LEField()
    addr_recv = fields.NestedField(IPv4AddressSerializer)
    addr_from = fields.NestedField(IPv4AddressSerializer)
    nonce = fields.UInt64LEField()
    user_agent = fields.VariableStringField()
    start_height = fields.Int32LEField()
Esempio n. 2
0
class RejectSerializer(Serializer):
    model_class = Reject
    message = fields.VariableStringField()
    ccode = fields.FixedStringField(1)
    reason = fields.VariableStringField()
    data = fields.Hash()
Esempio n. 3
0
class TxOutSerializer(Serializer):
    """The transaction output serializer."""
    model_class = TxOut
    value = fields.Int64LEField()
    pk_script = fields.VariableStringField()
Esempio n. 4
0
class TxInSerializer(Serializer):
    """The transaction input serializer."""
    model_class = TxIn
    previous_output = fields.NestedField(OutPointSerializer)
    signature_script = fields.VariableStringField()
    sequence = fields.UInt32LEField()