How to create a robust onchain wallet