elective-stereophonic
elective-stereophonic
NXT / Ardor equivalent of Bitcoin -walletnotify flag?
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Nxt Client: Nxt 1.11.15

Author Topic: NXT / Ardor equivalent of Bitcoin -walletnotify flag?  (Read 1222 times)

box1413

  • Hero Member
  • *****
  • Karma: +101/-4
  • Offline Offline
  • Posts: 687
    • View Profile
NXT / Ardor equivalent of Bitcoin -walletnotify flag?
« on: June 12, 2017, 09:23:35 pm »

https://bitcoin.stackexchange.com/questions/24457/how-do-i-use-walletnotify

I'm trying to monitor a bunch of nxt address for incoming / outgoing transactions, but right now I have it in cron where it checks every 5 minutes. There is a bitcoin -walletnotify flag in Bitcoincore software that runs a custom script you specific on any address with activity.

Is there an NXT equivalent? I want to build an ardor explorer
Logged

Riker

  • Core Dev
  • Hero Member
  • *****
  • Karma: +439/-42
  • Offline Offline
  • Posts: 1795
    • View Profile
Re: NXT / Ardor equivalent of Bitcoin -walletnotify flag?
« Reply #1 on: June 13, 2017, 05:38:54 am »

Take a look at the eventRegister and eventWait APIs.
Javadoc is here /html/doc/nxt/http/EventRegister.html and /html/doc/nxt/http/EventWait.html
Logged
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651

box1413

  • Hero Member
  • *****
  • Karma: +101/-4
  • Offline Offline
  • Posts: 687
    • View Profile
Re: NXT / Ardor equivalent of Bitcoin -walletnotify flag?
« Reply #2 on: June 13, 2017, 03:47:01 pm »

i dont see those html files in my nxt install directory. or do you mean they are elsewhere?

is there an example script of how to monitor multiple nxt addresses for activity?
Logged

box1413

  • Hero Member
  • *****
  • Karma: +101/-4
  • Offline Offline
  • Posts: 687
    • View Profile
Re: NXT / Ardor equivalent of Bitcoin -walletnotify flag?
« Reply #3 on: June 13, 2017, 03:50:09 pm »

nvm i found it: https://demo.nxt.org/doc/nxt/http/EventRegister.html

Any javascript example of how to make use of this? Right now I just have cron run my php script that queries the nrs blockchain and compares the addresses last 100 transactions to the previous 5 minutes it grabbed it.
Logged
 

elective-stereophonic
elective-stereophonic
assembly
assembly