{"id":1990743,"url":"https://github.com/eosauthority/eosio-watcher-plugin","last_synced_at":"2025-03-13T17:34:06.092Z","repository":{"id":40408088,"uuid":"142461047","full_name":"eosauthority/eosio-watcher-plugin","owner":"eosauthority","description":"EOSIO watcher plugin: HTTP POST to endpoint for on chain actions","archived":false,"fork":false,"pushed_at":"2022-04-11T22:33:11.000Z","size":28,"stargazers_count":66,"open_issues_count":7,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-07-31T16:33:31.198Z","etag":null,"topics":["eos","eos-blockchain","eos-resources","eos-tutorials"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eosauthority.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-26T15:38:37.000Z","updated_at":"2024-06-14T06:59:59.000Z","dependencies_parsed_at":"2022-09-16T09:52:44.607Z","dependency_job_id":null,"html_url":"https://github.com/eosauthority/eosio-watcher-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eosauthority%2Feosio-watcher-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eosauthority%2Feosio-watcher-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eosauthority%2Feosio-watcher-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eosauthority%2Feosio-watcher-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eosauthority","download_url":"https://codeload.github.com/eosauthority/eosio-watcher-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221391522,"owners_count":16811438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eos","eos-blockchain","eos-resources","eos-tutorials"],"created_at":"2024-01-20T15:38:29.824Z","updated_at":"2024-10-25T05:31:01.799Z","avatar_url":"https://github.com/eosauthority.png","language":"C++","funding_links":[],"categories":["Push Plugins:"],"sub_categories":[],"readme":"# EOSIO Watcher Plugin by EOS Authority\nThe watcher plugin is useful to watch for specific actions on the chain and then send them to an HTTP url. \nThe HTTP POST is called as soon as the action is seen on the chain!\n\n\n# Watcher plugin features\n## Filter and get notifications for actions on any account\nYou can either get notifications for all actions on a account, or any specific actions. You get notifications in a form of http POST call to the url you specify. \n\n**NOTE:** in case of forks plugin can end up sending notifications for same transaction twice. That's because notifications are sent as soon as block is accepted (so there is no guarantee block is not on a fork). Receiver of notifications should handle the duplicate notification appropriately.\n\n## Age limit for actions\nUsually you don't want to receive notifications for actions which happened months ago, just because your nodeos is resyncing. To prevent this you can specify age limit for blocks, which are filtered for actions you want to receive. This is by default set to 1 minute, but is configurable.\n\n## Flexible configuration\nFeatures just mentioned are configurable through options to nodeos (built with watcher_plugin) or in your config.ini. Use `nodeos --help` to see help for options.\n\n## Asynchronous http calls\nNotifications are sent asynchronously, which means it does not interfere with normal operation of nodeos, even in case of unreliable http connection to the notification receiver.\n\n## Retry on failed calls\nTo make sure no action is missed, even when a connection to the receiver is lost, on failed first attempt to send, plugin retries once more before giving up.\n\n# Installation instructions\n\n## Requirements\n- Works on any EOSIO node that runs v1.1.0 and up.\n\n## Building the plugin [Install on your nodeos server]\n### EOSIO v1.2.0 and up\nYou need to statically link this plugin with nodeos. To do that, pass the following flag to cmake command when building eosio:\n```\n-DEOSIO_ADDITIONAL_PLUGINS=\u003cpath-to-eosio-watcher-plugin\u003e\n```\n### EOSIO v1.1.0 and up\n1. Remove or comment out this line in CMakeLists.txt:\n```\neosio_additional_plugin(watcher_plugin)\n```\n\n2. Copy this repo to `\u003ceosio-source-dir\u003e/plugins/` You should now have `\u003ceosio-source-dir\u003e/plugins/watcher_plugin`\n3. Add the following line to `\u003ceosio-source-dir\u003e/plugins/CMakeLists.txt` with other `add_subdirectory` items\n  ```\n  add_subdirectory(watcher_plugin)\n  ```\n\n4. Add the following line to the bottom of `\u003ceosio-source-dir\u003e/programs/nodeos/CMakeLists.txt`\n  ```\n  target_link_libraries( nodeos PRIVATE -Wl,${whole_archive_flag} watcher_plugin -Wl,${no_whole_archive_flag})\n  ```\n5. Build and install nodeos as usual. You could even just `cd \u003ceosio-source-dir\u003e/build` and then `sudo make install`\n\n# How to setup on your nodeos\n\nEnable this plugin using `--plugin` option to nodeos or in your config.ini. Use `nodeos --help` to see options used by this plugin.\n\n## Edit your nodeos config.ini (probably easier)\n```\n#Enable plugin\nplugin = eosio::watcher_plugin\n#Set account:action so eosauthority:spaceinvader or just eosauthority: for all actions on eosauthority\nwatch = eosauthority:\n#watch multiple if required \nwatch = b1:\n#watch multiple if required \nwatch = eosabc:forum\n#http endpoint for each action seen on the chain. JSON array if you there are multiple actions in one block.\n#see sample json example. All \"watch\" above will be sent to this URL and the URL can handle processing as required\nwatch-receiver-url = http://127.0.0.1:8082/blockchain_action\n#Age limit in seconds for blocks to send notifications. No age limit if set to negative.\n#Used to prevent old actions from trigger HTTP request while on replay (seconds)\nwatch-age-limit = 5\n ```\n## Check if the plugin has loaded\n- You should see an entry for watcher_plugin in the logs when you restart nodeos. \n- Your HTTP endpoint should receive POST requests as in [our sample JSON](sample-post.json)\n- Thats it, you should be all set to get realtime actions on the chain.\n\n# Feedback \u0026 development\n- This plugin is used on production with space invaders. https://eosauthority.com/space/\n- You also use this plugin to setup realtime alerts similar to https://eosauthority.com/alerts \n- Any suggestions and pull requests are welcome :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feosauthority%2Feosio-watcher-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feosauthority%2Feosio-watcher-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feosauthority%2Feosio-watcher-plugin/lists"}