Closed jeffro256 closed 8 months ago
Example usage (replacing serialization_demo_utils):
BLOB_SERIALIZER(sp::jamtis::address_index_t);
BLOB_SERIALIZER(sp::jamtis::address_tag_t);
BLOB_SERIALIZER(sp::jamtis::encrypted_address_tag_t);
BLOB_SERIALIZER(sp::jamtis::encoded_amount_t);
BEGIN_SERIALIZE_OBJECT_FN(sp::SpCoinbaseEnoteCore)
FIELD_F(onetime_address)
VARINT_FIELD_F(amount)
END_SERIALIZE()
BEGIN_SERIALIZE_OBJECT_FN(sp::SpEnoteCore)
FIELD_F(onetime_address)
FIELD_F(amount_commitment)
END_SERIALIZE()
BEGIN_SERIALIZE_OBJECT_FN(sp::SpEnoteImageCore)
FIELD_F(masked_address)
FIELD_F(masked_commitment)
FIELD_F(key_image)
END_SERIALIZE()
BEGIN_SERIALIZE_OBJECT_FN(sp::SpEnoteImageCore)
FIELD_F(masked_address)
FIELD_F(masked_commitment)
FIELD_F(key_image)
END_SERIALIZE()
BEGIN_SERIALIZE_OBJECT_FN(sp::BulletproofPlus2)
FIELD_F(A)
FIELD_F(A1)
FIELD_F(B)
FIELD_F(r1)
FIELD_F(s1)
FIELD_F(d1)
FIELD_F(L)
FIELD_F(R)
END_SERIALIZE()
... continue pattern here
We can serialize directly from seraphis types non-intrusively and don't need all the extra types and boilerplate eventually
That should make things much easier. Thanks.
You should parallel-PR this to the monero repo.
Fixed comments, thanks @UkoeHB
Useful for PR #25