The current API contains:
/**
* Serialize a public key
* @param pubKey public key to serialize
* @param flags serialization flags
* @return pubKey serialized as a byte array
*/
byte[] ecPubKeySerialize(P256k1PubKey pubKey, int flags);
The valid flags need to be documented and have simple Java constants defined for them. We can't use the generated headers in the FFM implementation, but we should be compatible with them.
Note: the serialize(boolean compressed) method of P256k1PubKey is easier-to-use and fully documented. It is the preferred way of serializing public keys IMO.