curl -s 'localhost:26657/broadcast_tx_commit?tx="zid=1 title=xyz"'
Can something be done like this?
I want to store multiple data in a single transaction, so can it be done using key value pairs or any other technique that would work?
curl -s 'localhost:26657/broadcast_tx_commit?tx="zid=1 title=xyz"'
Can something be done like this?
I want to store multiple data in a single transaction, so can it be done using key value pairs or any other technique that would work?
Yes, because it's up to you on how your application parses the transaction. If your application (sounds like a key-value database) can accept multiple key-value pairs separated by a space like in your example, then this'll work fine.
See the kvstore example. You could easily modify it to accept multiple key-value pairs.
Yes, here is the correct syntax to use it:
curl -s 'localhost:26657/broadcast_tx_commit?tx="zid=1"&tx="title=xyz"'
Since 'tx'
itself is a key in order to input multiple key you need to add it as a transaction itself.