Author

Topic: Flattr like functionality using "open with..." filetype mime (Read 1193 times)

hero member
Activity: 900
Merit: 1000
Crypto Geek
Could the XML file be signed in such a way that a bitcoin client could check the authentisity?

I'm not the most technical person here. MD5 hash should be possible yeah guys?

That mime looks like it should work straightway. Reliant on a domain name though... feels like more points of failure with a browser involved. I really meant take it straight to Bitcoin. On the other hand, that would be useful straightaway. I think better, if using a browser address to take it to Bitcoin first, pass that address and then open a browser window from there. 
legendary
Activity: 1288
Merit: 1080
The .bitcoin file could look like this :

Code:
1Hy9dexzNzjvQYkYy6zKRVZMU8k2j5vuPt;1; some comment

The associated command would be :

Code:
#!/bin/bash

if [[ -z "$1" ]]
then echo "usage: $0 bitcoin-file" ; exit 1
elif
    addr="$(cut -d\; -f1 $1)"
    [[ ! "$addr" =~ ^[0-9a-zA-Z]{35}$" ]] ||
    wget -O - -q http://blockexplorer.com/address/$addr |
    grep -i -q "Invalid address"
then echo "Wrong bitcoin address or file format" ; exit 2
elif
   amount="$(cut -d\; -f2 $1)"
   [[ ! "$amount" =~ ^[1-9]+$|^0\.[0-9]+$ ]]
then echo "wrong format for amount" ; exit 3
elif
   comment="$(cut -d\; -f3 $1)"
   zenity --question --text "Do you want to send $amount to $addr with \"$comment\" as a comment ?"
then bitcoind sendtoaddress $addr $amount "$comment"
fi


This version requires the zenity package
legendary
Activity: 1708
Merit: 1010
Could the XML file be signed in such a way that a bitcoin client could check the authentisity?
hero member
Activity: 900
Merit: 1000
Crypto Geek
 
 If we had a filetype, such as .bitcoin,
we could have that filetype open bitcoin to send a payment without needing to copy and paste the address.

 You could have the payment to info stored in an xml file:

- amount to pay
- address to pay to
- comment (this could be used to identify the product or tip in the case of a flattr type setup)

 Of course, the file would have to be rigorously checked to avoid abuse.
Jump to: