Bitcoin Forum
May 14, 2024, 03:34:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: groovy - access wallet over JSON  (Read 1401 times)
berlinguyinca (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
July 13, 2011, 04:22:43 AM
 #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.
1715700899
Hero Member
*
Offline Offline

Posts: 1715700899

View Profile Personal Message (Offline)

Ignore
1715700899
Reply with quote  #2

1715700899
Report to moderator
1715700899
Hero Member
*
Offline Offline

Posts: 1715700899

View Profile Personal Message (Offline)

Ignore
1715700899
Reply with quote  #2

1715700899
Report to moderator
1715700899
Hero Member
*
Offline Offline

Posts: 1715700899

View Profile Personal Message (Offline)

Ignore
1715700899
Reply with quote  #2

1715700899
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
TeraPool
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
July 13, 2011, 05: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
berlinguyinca (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
July 13, 2011, 06: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.
willphase
Hero Member
*****
Offline Offline

Activity: 767
Merit: 500


View Profile
July 14, 2011, 08: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

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!