when recipe is created:
- save asset IDs for all the of the transfer nfts
when user checks eligibility
- save a log
- wallet
- recipe
- burned asset IDs
- status: eligible
when user starts burn to mint process:
- update the log
- transfer asset ID from that list
- and update that to “processing”
- transfer asset ID from that list
maybe i can just send assetids to burn / mint from the frontend and get the transactions back
if it needs to get retried then sure, build it again
and whatever we need to save, we can save in the end of the process
minting flow: user checks eligibility:
- send a req to backend to start a log
- query for their wallet nft details for that recipe, and grab the valid asset IDs
- send back logid and eligibility list
- send a build txn req to backend
- saves a log saying these assetIds are about to be burned
- saves an assetId from the list to this user
- builds the txn for all of those assetIds
- sends txn back to frontend
- frontend sends all of them and collects the txn signatures as they finalize
- if a txn fails, we retry it by building it again via the backend by sending it another req to retry
- once all of these are finalized
- send a build txn for the “transfer” to backend
- get the saved assetId for this wallet from this current “log”
- check all of the sigs for finality with the assetIds saved in the log
- build the txn and send it
- if transfer fails, send a retry to build the same
- make sure assetID is not transferred
- make sure sigs are finalized
- build, sign and send
- save log as “finished”
to test:
- keypair exporting fine ? or not
- does drafts open
- recipe create api endpoints with multiple requirements