Bitcoin Forum

Bitcoin => Project Development => Topic started by: DigitalPirateman on September 07, 2014, 08:40:13 PM



Title: QR code scanner help and question.
Post by: DigitalPirateman on September 07, 2014, 08:40:13 PM
Okay I have a project i been working on i am holding the coin value on to printed qr codes kinda like a paper wallet but once the user scans the code on like a android wallet they get the coin. I am developing this project for my own altcoin but this questions is a valid question for any qr code project I just need to know how to hold the value of the coin onto the QR code. I am asking in this format because I don't want to give away to much detail on the marketing project I just need to know how to get the value on the code for pre receiving

Thanks in advance.


Title: Re: QR code scanner help and question.
Post by: cloverme on September 08, 2014, 03:57:03 AM
It sounds like you want to display the private key in the QR code, then write the code to import it.

https://en.bitcoin.it/wiki/How_to_import_private_keys





Title: Re: QR code scanner help and question.
Post by: DigitalPirateman on September 08, 2014, 06:35:08 AM
That might work but my issue is how would I do that for my coin we are currently getting a block explorer for our coin the best way I thought to really help the coin go well was to basically put the qr code on something with our coin logo and by that time I hope to have the mobile wallets running like via android phone. And when they ask what the f is a (ourcoin) and we say well its like bitcoin but its it own coin. And if they are still confused well that's when we show them how it work. I would say detail to detail on my plans but I still need to prefect it myself. I hope to spread the news of my coin and bitcoin together.


Title: Re: QR code scanner help and question.
Post by: cloverme on September 08, 2014, 02:56:45 PM
You have to use the QR code to represent what you want it to for your coin on your own blockchain... so public key would be for balance and transaction history, private key to send the value.

Here's an example of how it's implemented at blockchain with paper QR codes:
https://blockchain.info/wallet/paper-tutorial



Title: Re: QR code scanner help and question.
Post by: Newar on September 09, 2014, 02:09:10 PM
[...] I just need to know how to hold the value of the coin onto the QR code. [...]
Not quite sure what you are looking for, but QR codes with values (amounts) look like this for bitcoin:
Code:
bitcoin:1NeWArjoPgAXeZxXo9U699mqgqQ6sLdYFB?amount=1


Title: Re: QR code scanner help and question.
Post by: Miitch on September 09, 2014, 02:40:09 PM
once the user scans the code on like a android wallet they get the coin
This is functionality you need to write into your program. QR codes are just stores for text data. If you write a specification for data storage then your app can sort it out when it scans it in. Maybe separate the relevant fields with a pipe | symbol or a comma? Then when you import it you can explode it into an array and work with it from there. The first variable could be the address, the second variable the amount, etc etc. I would be hesitant to hard code the amount into the QR code though because theoretically couldn't the amount increase/decrease as that address is used actively on the network? Accepting the QR code data as 'fact' would open your alt coin up to very VERY VERY easy scamming!