Replace on_send_callback with something a bit clearer so that we can sign messages