-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Memo to be added to transaction #58
Comments
I think the biggest consideration is whether we should add a different How do you feel about a new type instead of |
Creating a new OP_RETURN operation type sounds good to me. |
Sorry for the delay here (holiday break). This ticket is in our internal system and we will try to respond soon! |
Great. There were a couple things we were considering. The simplest way we can see to implement it is to handle OP_RETURN operations as OUTPUT in the construction service, and let the user parse the OP_RETURN from block and block/transaction or do a separate PR for it. If we create an OP_RETURN operation type, would the intention be that the new type and decoded memos are saved to the DB, requiring everyone to resync? Or would all of this be handled on the fly? For example, no changes to the DB, on block and block/transaction requests, it checks for an OP_RETURN, updates the return type from OUTPUT -> OP_RETURN, and decodes the memo? |
Is your feature request related to a problem? Please describe.
Memos can be attached to Bitcoin transactions, but at the moment Rosetta Bitcoin doesn't have code to handle OP_RETURN.
Describe the solution you'd like
Allow a memo to be added to a Bitcoin transaction as an additional output operation.
A very simple idea would be to add a
Memo
field toOperation.Metadata
. Then in theconstruction_service
payloads function, do a check if the output is a memo and usetxscript.NullDataScript([]byte(metadata.Memo))
instead oftxscript.PayToAddrScript(addr)
.Would gladly give this a shot at doing a PR. If you think it should go in a different direction, please share, any guidance more than welcome.
The text was updated successfully, but these errors were encountered: