Remove signature from the AtomicSDK
Closed this issue · 0 comments
The function AtomicTransfer should receive the txs already signed, as the common case will be for no single entity to have all the related private keys to an atomic group. So this function should take care of:
- Set the RqOffset
- Set the AtomicGroupID
- Perform the HTTP POST
Of course all of this already happens, just need to change the interface of the function to have as input txs []common.PoolL2Tx.
Additionally, it would be nice to validate that:
- Txs are valid (signature is correct)
- The given set of transactions represent a single atomic group
This is actually same validations that the hermez-node will run. But I believe running the validations before sending the request may be easier to debug, and can give more info to users.
Keep in mind that the current code is actually working (I believe), so it's up to you to implement this or not, in this PR or in future ones. The only thing I would say it's mandatory is to don't sign the txs in this function, as this will make the SDK unusable
Related to #2 (comment)