Implement handshakes and configuration API, analogous to dazeus/dazeus-core@d8b3d0433e9c5b707e8a4f21428227812da6e8a8 and dazeus/dazeus-core@1d1d9af399a7853d73eae632ea52da28099939d1.