NoteStream
NoteStream copied to clipboard
Make stream creation and sending of ZkAsset atomic
Currently to create a stream requires 2 transactions (1 through sdk to send the ZkAsset to the contract, 1 to give the stream parameters). This leads to the possible situation of the second transaction failing which locks the note on the contract unless the user manually generates the second transaction again.
Once the proof generated by the aztec sdk's ZkAsset.send method is able to be exported, we should combine these two transaction calls to prevent locked funds.
This is hard requirement before launching on mainnet as currently it's trivial for a malicious party to drain a stream in their favour by submitting a new stream creation transaction for the same notehash.
Seems like AZTEC have silently added the proof export option
http://docs.aztecprotocol.com/#/SDK/zkAsset/Main%20APIs/.send
All that remains is generating the required signature