Depositing via Contract Account

I’m creating a wallet to implement some personal preferences. I’d like an internal function which checks the ETH balance of the wallet, and if over some threshold, deposits into eth-01.tornadocash.eth. I’m looking for guidance on whether this is possible, and how best to do so.

I can only find material on how to deposit/withdraw from Tornado cash using either a web browser or CLI. I gather that I’d have to create a commitment, which is a PedersenHash of a nullifier + secret, but cannot find additional details on how to do so. Ideally, I’d like to also utilize a Note Account in the wallet to store encrypted on-chain backups of private notes.

It’d be great if there were an interface somewhere that I could easily copy to help integrate into my wallet, but I cannot confirm whether Tornado Cash supports this kind of interaction. Could someone please clear this up for me?

The best solution would simply reference an existing guide or implementation that demonstrates this.