Author

Topic: groovy - access wallet over JSON (Read 1415 times)

hero member
Activity: 767
Merit: 500
July 14, 2011, 03:58:18 PM
#4
Never worked with or even heard of Groovy, sorry.

Why don't you try to implement some of the simple PHP peices of code available out there? https://en.bitcoin.it/wiki/PHP_developer_intro

Because I really dislike php/perl and this script is going to be included in a grails based application. Which means it needs to run on the jam. So groovy/scala/java it is. And there is sadly not a single fully documented java example on the bit coin site as far as I can see.

there is a complete Java bitcoin client here:

http://code.google.com/p/bitcoinj/

Possible you're using the wrong auth method in your code... but I'm totally unfamiliar with 'Groovy'.

Will
newbie
Activity: 7
Merit: 0
July 13, 2011, 01:21:21 PM
#3
Never worked with or even heard of Groovy, sorry.

Why don't you try to implement some of the simple PHP peices of code available out there? https://en.bitcoin.it/wiki/PHP_developer_intro

Because I really dislike php/perl and this script is going to be included in a grails based application. Which means it needs to run on the jam. So groovy/scala/java it is. And there is sadly not a single fully documented java example on the bit coin site as far as I can see.
newbie
Activity: 42
Merit: 0
July 13, 2011, 12:41:42 PM
#2
Never worked with or even heard of Groovy, sorry.

Why don't you try to implement some of the simple PHP peices of code available out there? https://en.bitcoin.it/wiki/PHP_developer_intro
newbie
Activity: 7
Merit: 0
July 12, 2011, 11:22:43 PM
#1
hi,

I have a short question. I'm trying since 2-3 days now to access my local wallet using groovy and I'm sadly failling at this and running out of idea's by now. Does anybody has a simple groovy client?

I always get the error message: 'internal server error' without any details what is actually wrong.

my cleint:

Code:
  def authSite = new HTTPBuilder('http://127.0.0.1:8332/',JSON)
        authSite.auth.basic 'username', 'password'

        authSite.get(path: 'getbalance',
                query: [:]) { resp, json ->

            println resp.status

            json.each {  // iterate over JSON 'status' object in the response:
                println it
            }
        }


if I use the bitcoind tool on the command line, it works fine. So I'm sure the daemon is running.

thanks,

g.
Jump to: