Submit transaction with verification of the signature by the dApp

Hi guys,

i am trying to solve the use case in pyTeal: Let user sign the transaction by any wallet provider. Make other user use this byte array as the input in the app call. I would like to check also in the dApp the information from that transaction, for example appArgs or note field.

What are my options?

I do not see the option in the teal opcodes or in the pyteal to submit any tx to the blockchain from byte array. Is there?

I can do the Ed25519Verify_Bare, however we loose the ability to check rekeyed accounts, and i believe that wallets are not yet ready to sign arbitrary bytes (they are ment to sign txs). We want as wide support of the wallets as possible… Also there is issue with nonce which we would have to somehow store on the blockchain and make sure it is not used more than once. If there would be ability to submit tx by the dApp, the uniqueness of tx id would ensure also this issue.

I assume i cannot put it in the group as I believe that group id is calculated from the hash of tx list. If I would be able to make the first transaction with the group id of arbitrary bytes, sign it, and second transaction to be added to the same group, this might also solve this issue. However I believe this is not possible. Or is it?

@fabrice Any suggestions pls?

I have created feature request in algod. Submit transaction with verification of the signature by the dApp · Issue #4762 · algorand/go-algorand · GitHub

I wrote a few comments below.
But what is your more detailed use case?

One thing you can always do is have the first user sign a transaction that then records in a box (or local storage depending on requirements) the thing you want to sign in the first place.
Then, the other user can call the dApp which can easily read this data (and be sure it was approved/signed by the first user).

In other words, instead of passing the signed data off-chain, you pass it on-chain.

Would this work in your use case?

There is no such option

Yes, most wallets only allow signing transactions

1 Like