Bitcoin Forum
September 27, 2018, 10:12:02 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: IDEA: curl notify from wallet client (for developers)  (Read 1851 times)
icreator
Legendary
*
Offline Offline

Activity: 1288
Merit: 1002



View Profile WWW
September 28, 2013, 05:16:35 AM
 #1

For simple and quick notify by wallet client to others applications please add a new ability:

1. add a parameters in .conf file:
%A - abbreviation, for example BTC, CLR
%b - block hash
%t - list of new transactions
%N - full name of xcurr, for example 'Bitcoin', 'CopperLark'
%n - name for make URI, for example bitcoin, copperlark = <a href=bitcoin:1wer87...</a>

2. add command in bitcoin.conf:
# on new block received
curl_on_block =  http://127.0.0.1:8000/some_URL/%A/%b

3. add command in bitcoin.conf:
# on new transactions for this wallet received
curl_on_trans =  http://127.0.0.1:8000/some_URL/%A/%t

use for this abilities a curl lib from here http://curl.haxx.se/

Erachain Blockchain is fully ready for use Digital Ecosystem based on blockchain technology for business and government with low transaction costs, identification and built-in functions.
1538086322
Hero Member
*
Offline Offline

Posts: 1538086322

View Profile Personal Message (Offline)

Ignore
1538086322
Reply with quote  #2

1538086322
Report to moderator
Make a difference with your Ether.
Donate Ether for the greater good.
SPRING.WETRUST.IO
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1538086322
Hero Member
*
Offline Offline

Posts: 1538086322

View Profile Personal Message (Offline)

Ignore
1538086322
Reply with quote  #2

1538086322
Report to moderator
johba
Member
**
Offline Offline

Activity: 68
Merit: 10



View Profile WWW
September 29, 2013, 11:15:29 AM
 #2

Hi!

I'm not sure what you mean by wallet client, but you are referring to the bitcoind config file, so I'll talk about bitcoind.

If you check out this link: https://en.bitcoin.it/wiki/Running_Bitcoin you will find 3 notify commands to start bitcoind with.

like so for example:

./bitcoind  -blocknotify="echo '%s' | nc 127.0.0.1 4001"
              -walletnotify="echo '%s' | nc 127.0.0.1 4002"
              -alertnotify="echo '%s' | nc 127.0.0.1 4003"
              -daemon

netcat (nc) will write %s to a tcp port, %s is transaction id or block id. with those you can go ahead and query the api for details. I've put it into some code here: https://github.com/johannbarbie/BitcoindClient4J

Hope that's what you meant.
Pages: [1]
  Print  
 
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!