Delegated spend vs Hidden Spend

Hi Guys,

Can anyone provide me with an explanation of how to return the unused coin amount to the original wallet when performing a delegated spend?

Thanks

Dan

If I understand your question correctly, you could just calculate the change amount and create a new coin with those amount.

(CREATE_COIN TO_PUZZLE_HASH amount)
(CREATE_COIN ORIGINAL_PUZZLE_HASH change_amount)