Bitcoin Forum
June 25, 2018, 04:34:54 PM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Bitcoind tx management - need help with json-rpc  (Read 1209 times)
Jr. Member
Offline Offline

Activity: 52
Merit: 0

View Profile
February 17, 2012, 10:58:29 PM


I am building my own web app capable of bitcoin funds management throught Bitcoind json-rpc communication, and i meet some problems with possibilities of functions.
All i can do now is creating new addresses by getnewaddress function, which returns me new address for [user] specified parameter. Thats cool.

However problems persist in: transactions handling:

1. i can't see anywhere TxIn's and TxOuts in any of these functions, and showing addresses from/to will be nice for users instead of "Last payments received for addr XYZ -> 1. FROM Huh TO XYZ". How i should handle transactions properly to let users see all information about them - from/to addresses and amounts?
2. gettransaction returns only info about tx for addresses that i own in wallet.. why?? getblock lets me receive all blocks but can't get every single transaction?

So how is or functioning without these possibilities? they made own parser for file where block chain is stored or is here other app allowing me to get that info?

I will really appreciate any info because i need to build my app soon.
Automated Bitcoin Fork Extraction Tool WE DO TOUGH WALLETS: BCH | BTG | BCD | SBTC | UBTC | B2X | BCX | BTF Electrum 2FA, Trezor, Ledger, SegWit, Bech32
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Hero Member
Offline Offline

Posts: 1529944494

View Profile Personal Message (Offline)

Reply with quote  #2

Report to moderator
Offline Offline

Activity: 874
Merit: 1000

View Profile
February 17, 2012, 11:12:47 PM

perhaps what you are trying to figure out can be learned from abe?;all
Jr. Member
Offline Offline

Activity: 52
Merit: 0

View Profile
February 18, 2012, 03:25:48 AM

ty honestly for reply, you saved my life : o  that was that thing i was looking for!
Offline Offline

Activity: 26
Merit: 0

View Profile WWW
February 20, 2012, 08:35:24 AM

I can also recommend you have a look at libcoin:

libcoin is a radical refactoring of bitcoin, turning all the basic stuff into a chain agnostic library. All the global variables are gone and so is the untraditional multithreading stuff and the strong coupling to a specific chain (aka bitcoin). It is highly modular, and you can easily build extensions - like e.g. run with two wallets.

libcoin comes with two applications:
* bitcoind - which is a 100% bitcoind compatible clone - just based on libcoin - it can be up to 3.5 times faster in initial chain download and is much faster and reliable when it comes to serving RPC.
* coinexplorer - a block explorer running on your machine - this enables you to query transactions that are not in you wallet, and to query addresses and see their entire history - just like

There are also a handful of examples e.g. the simple client - write a full bitcoin client in 20 lines of code - see below.

I should note that libcoin is production quality software - I have heavily loaded servers running rock stable for weeks.



int main(int argc, char* argv[])
    Node node; // deafult chain is bitcoin
    Wallet wallet(node); // add the wallet
    thread nodeThread(&Node::run, &node); // run this as a background thread
    Server server;
    // Register Server methods.
    server.registerMethod(method_ptr(new Stop(server)));
    // Register Node methods.
    server.registerMethod(method_ptr(new GetBlockCount(node)));
    server.registerMethod(method_ptr(new GetConnectionCount(node)));
    server.registerMethod(method_ptr(new GetDifficulty(node)));
    server.registerMethod(method_ptr(new GetInfo(node)));
    // Register Wallet methods. - note that we don't have any auth, so anyone (on localhost) can read your balance!
    server.registerMethod(method_ptr(new GetBalance(wallet)));
    server.registerMethod(method_ptr(new SendToAddress(wallet)), Auth("username","password"));;

Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!