manuelmauro/algonaut

Add support for Boxes

manuelmauro opened this issue · 11 comments

Just Noticed this while posting some Pyteal code to Algonaut. Thanks for making it high priority!

Hi there! has there been any progress on this? Desperately needing support for boxes ASAP.

I think so. Consider checking the docs.rs. It could've been among the most recent commits made recently

Thanks @Sam2much96 for the reply. I have just checked the doc.rs ... I dont think its been commited... https://docs.rs/algonaut_model/0.4.2/algonaut_model/transaction/struct.ApiTransaction.html

Do you know when this would be implemented?

@manuelmauro do you have any update on this progress currently? desperately needing support for boxes

It isn't in any of the pull requests, open or closed unfortunately, but looking through the Source Code shows that there's code implemented to Search for Box Storages from a SmartContract's app ID. May i suggest you use the Python SDK for implementing the Box storages? or perhaps reconsider Global storage? because, whereas Algonaut cannot programmatically create box storages, it can Search through them. Also, seeing as how it wasn't included in the docs.rs, the documentation might need updating on Box storage implementation in Algonaut. Lastly, Mr Mauro is a Senior engineer at the Foundation, please avoid tagging him directly unless it involves testing data, or critical bugs.

Hey @Astewart1510! Support for boxes is certainly on top of my list. Unfortunately, being algonaut a personal project, I can't give a clear deadline on when I will get the time to implement it. @Sam2much96 thanks for helping out with your suggestions. Concerning the tagging though, please @Astewart1510 and everyone watching this project feel free to tag me directly for any matter!
Lastly, if someone feels like drafting a PR adding box support, I am happy to review and work on that together!

Thank you @manuelmauro for allowing me to tag you, you are so kind!
Thanks @Sam2much96 for the suggestions, you have been a huge help. Unfortunately for our project, we have to sign it in Rust because these are where our signing keys sit ( on our backend in a TEE).
So currently we are trying to create an unsigned transaction using the js-algosdk and then pass it into a rust programme (our backend) that uses the algonaut SDK to sign the transaction. To pass the unsigned transaction successfully from JS to rust we have to modify the exisitng txn that the js-algosdk produces and rename the field names to their codec property names "apid", "apaa", "apbx" etc, we found this is the only way to get the algonaut SDK to recognsize the transaction properties..
We then pass back the signed transaction to javascript to issue to the blockchain.

We can get all different types of transactions working but we cant get the box references right, we have tried to hack/stitch the box references into the algonaut SDK but unfortunately, when we issue the signed transaction to the blockchain, we keep receiving the error :

LOG: URLTokenBaseHTTPError: Network request error. Received status 400 (): At least one signature didn't pass verification
URLTokenBaseHTTPError: Network request error. Received status 400 (): At least one signature didn't pass verification

Or this error:
invalid : tx.Boxes[0].Index is 225020720. Exceeds len(tx.ForeignApps)

We just managed to figure it out. So all is good and well. 👍

Addressed by @k13n in #235 Thanks!

Sweet. Thanks for this @k13n