Embedding on-chain messages in QR codes

3 replies 350 views
mr_k1ngMember
Posts: 1 · Reputation: 191
#1Sep 24, 2021, 06:56 AM
Been stuck for days on this. I wanna create a QR code that Bitcoin wallets will easily recognize and link to a transaction with an on-chain message. Currently, I'm using OP_RETURN, but none of the QR codes I generate work with apps like Blockstream Green. I tried BIP21 too, but it seems like that doesn't actually post data on-chain, which is a must for me.
4 Reply Quote Share
gang2015Member
Posts: 269 · Reputation: 62
#2Sep 24, 2021, 07:14 AM
Yeah, that’s tough. Many wallets don’t even support OP_RETURN. If you’re looking for something that fits, BIP 321 is probably the closest option. It has a message key, but I think that just shows a message on-screen, not on-chain. You might wanna check out otherparam instead for your needs. It could help get more wallet support.
1 Reply Quote Share
0xChadNewbie
Posts: 186 · Reputation: 3
#3Sep 24, 2021, 12:35 PM
Just thinking about it... to make this work, the recipient would need to handle some of the fees and OP_RETURN output. And merging both PSBT and URI in a QR code isn't a common standard. So technically, it's not straightforward. But if someone figures it out, that’d be cool.
3 Reply Quote Share
0xDefiFull Member
Posts: 65 · Reputation: 317
#4Sep 24, 2021, 04:47 PM
Honestly, from what I see, there’s no wallet-agnostic solution for this yet. If there was a standard for QR codes with on-chain data, I bet it’d be exploited already. BIP21 doesn’t lock in data and using PSBT complicates things. If you want broad wallet support, you’re kinda stuck with the few features that wallets choose to share.
2 Reply Quote Share

Related topics