How to implement ICP convert cycles and top-up programmatically

Similar thread for JavaScript: How do i programmatically convert ICP to cycles?