Factor out payload_kwargs generation from the LocalClient.pub