re: piping chocolate

I wold like it to harden like royal icing does for making decoraions like fowers as well is there anything i can use for this or can i make chocolate royal icing using egg whites and cocoa powder
thank you so much for answering my questions