Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: galaxyAbstractor on June 02, 2011, 01:48:50 PM



Title: Firefox addon
Post by: galaxyAbstractor on June 02, 2011, 01:48:50 PM
I am currently creating a firefox addon which you should be able to easily donate bitcoins to site owners that provides bitcoin address. I have encountered some obstacles though:

1. How would I send the JSON-RPC calls in javascript? Send an HTTP POST request to the port on localhost?

2. How do I explain to the user that he needs to put an autostart command to start bitcoin as a server? Is it even possible to run both a client and a server at the same time? The addon should be easy to use for everyone, and explaining to them how they have to do a .bat file with some random code and place it in the autostart folder, how would that be easy?


Title: Re: Firefox addon
Post by: Maged on June 02, 2011, 05:54:45 PM
2. How do I explain to the user that he needs to put an autostart command to start bitcoin as a server? Is it even possible to run both a client and a server at the same time? The addon should be easy to use for everyone, and explaining to them how they have to do a .bat file with some random code and place it in the autostart folder, how would that be easy?
I'm pretty sure that addons have full read/write access to the filesystem. As such, just configure bitcoin.conf appropriately (or read in the values for the rpcuser/rpcpassword if they are already set).


Title: Re: Firefox addon
Post by: galaxyAbstractor on June 02, 2011, 05:56:51 PM
2. How do I explain to the user that he needs to put an autostart command to start bitcoin as a server? Is it even possible to run both a client and a server at the same time? The addon should be easy to use for everyone, and explaining to them how they have to do a .bat file with some random code and place it in the autostart folder, how would that be easy?
I'm pretty sure that addons have full read/write access to the filesystem. As such, just configure bitcoin.conf appropriately (or read in the values for the rpcuser/rpcpassword if they are already set).

I talked with the help channel and they told me that it is possible to gain filesystem access and to execute programs, but they said it is very hard to get such an addon approved. Ahh maybe I'll go that way and distribute the addon myself if they don't approve it


Title: Re: Firefox addon
Post by: Maged on June 02, 2011, 06:55:44 PM
2. How do I explain to the user that he needs to put an autostart command to start bitcoin as a server? Is it even possible to run both a client and a server at the same time? The addon should be easy to use for everyone, and explaining to them how they have to do a .bat file with some random code and place it in the autostart folder, how would that be easy?
I'm pretty sure that addons have full read/write access to the filesystem. As such, just configure bitcoin.conf appropriately (or read in the values for the rpcuser/rpcpassword if they are already set).

I talked with the help channel and they told me that it is possible to gain filesystem access and to execute programs, but they said it is very hard to get such an addon approved. Ahh maybe I'll go that way and distribute the addon myself if they don't approve it
There is no reason to execute programs. Just read/write to the bitcoin.conf file.


Title: Re: Firefox addon
Post by: galaxyAbstractor on June 02, 2011, 07:01:35 PM
2. How do I explain to the user that he needs to put an autostart command to start bitcoin as a server? Is it even possible to run both a client and a server at the same time? The addon should be easy to use for everyone, and explaining to them how they have to do a .bat file with some random code and place it in the autostart folder, how would that be easy?
I'm pretty sure that addons have full read/write access to the filesystem. As such, just configure bitcoin.conf appropriately (or read in the values for the rpcuser/rpcpassword if they are already set).

I talked with the help channel and they told me that it is possible to gain filesystem access and to execute programs, but they said it is very hard to get such an addon approved. Ahh maybe I'll go that way and distribute the addon myself if they don't approve it
There is no reason to execute programs. Just read/write to the bitcoin.conf file.

But I want to use the JSON-RCP API to make payments, and for that the bitcoin program needs to be run with the -server argument, right?


Title: Re: Firefox addon
Post by: keine-ahnung on June 02, 2011, 09:55:34 PM
"server=1" in bitcoin.conf will cause bitcoin to act as it was started with -server


Title: Re: Firefox addon
Post by: mwally on June 03, 2011, 12:32:58 AM
I am currently creating a firefox addon which you should be able to easily donate bitcoins to site owners that provides bitcoin address.

What about a new robots.txt directive for bitcoin donations?  It could be something as simple as:

Code:
User-agent: *
Disallow: /files/
Disallow: /admin/

Sitemap: http://example.com/sitemap.xml
Donations: 171RLtavSkiKoDGSboatMNJ9dqpvjYSesR

Perhaps the word 'Donations' here is inappropriate, as Bitcoin has many uses, but it could be a simple way for webmasters to broadcast their Bitcoin addresses in a universal, simple way.



Title: Re: Firefox addon
Post by: galaxyAbstractor on June 05, 2011, 05:07:31 PM
"server=1" in bitcoin.conf will cause bitcoin to act as it was started with -server

I see. But will the client and server be able to be ran at the same time?


Title: Re: Firefox addon
Post by: keine-ahnung on June 06, 2011, 11:54:33 AM
server=1 doesn't disable the GUI, it just enables the RPC-interface, so their is no need to run bitcoin twice.


Title: Re: Firefox addon
Post by: galaxyAbstractor on June 06, 2011, 10:46:33 PM
server=1 doesn't disable the GUI, it just enables the RPC-interface, so their is no need to run bitcoin twice.

Ah yeah I just had the impression that with server it meant like something like httpd, mysqld etc, which doesn't have a GUI. It's clear now :P