Yay, so now I can send a properly signed friend request and serve the incoming webfinger request for the actor. Now I wish half of this wasn't hardcoded mess, but hey, at least I'm learning. Now on to proper user models and how to represent actors.
And hereby thank you @t for the little-boxes library, it helps an awful lot in understanding what's what.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!