The ePUAP Client has been released to NuGet. It allows your app to perform the SSO but it also shows how to sign arbitrary XML documents using AddDocumentToSigning/GetSignedDocument functions.
The documentation as well as an example application are provided at the GitHub project page.
I hope this would be usedful for anyone who wants to learn how ePUAP integration works. The next step is Węzeł Krajowy.