Add blockstack transaction generation support to blockstack.js #382


#1

Hi @aaron,

I’m looking to create a provenance record for art work and secure/time stamp a hash of this record in bitcoin with a provably un-spendable output asking the user to pay a minimal fee.

Is there a way to interact with the users wallet to find an unspent output, create a raw transaction with the hash stored in op_return and change address and then ask the user to sign it and broadcast it?

Many thanks, Mike.


#2

Hi @mikecohen.id

There’s not a way to do this exactly, but there are ways to broadcast a provenance record from a client application given a user’s private keys.

You could use transactions.makeUpdate:

Passing the provenance record as the zonefile contents. This would create an UPDATE record in the blockchain, which contains a hash of the zone file contents, and broadcasts the corresponding zone file in the Atlas peer network.