@arcanicanis congrats! that is a whole lot of code to write from scratch. we would definitely recommend starting from an IPLD library (giving multiformats, CID, dag-cbor), and probably not using OpenSSL for the crypto bits. there are better or worse EC crypto libs, but encoding and low-S signature issues are common.
bluesky opened up self-control of PLC identities initially created through the app, including fully removing rotation keys. this was necessary to enable account migration.