How to pass message and signature into verifymessage when creating txfilter?

+3 votes
asked Jul 17, 2022 by anonymous

1 Answer

0 votes

I assume you're asking about where you put the data in the transaction, so that the transaction filter can then pick it up and pass it to verifymessage?

If so the simplest answer is to add it in data-only outputs, which can be read using getfiltertransaction in the filter.

For example if you're sending an asset in the transaction, use sendwithdata and pass something like this in the last parameter:

{"json":{"address":"...", "signature":"...", "message":"..."}}

Each ... above should be replaced by the appropriate piece of data.

answered Jul 17, 2022 by MultiChain
...