{"_id":"@completium/event-listener","_rev":"4-5bdbfcf1ef37849a62cab38f0b126eac","name":"@completium/event-listener","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@completium/event-listener","version":"0.0.1","description":"Detects events emitted by smart contracts on the Tezos blockchain, and executes registered event handler functions.","main":"build/src/index.js","types":"build/src/index.d.ts","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/completium/event-listener.git"},"keywords":["archetype","tezos","smart-contract","completium","event","blockchain"],"license":"MIT","bugs":{"url":"https://github.com/completium/event-well-crank/issues"},"homepage":"https://github.com/completium/event-well-crank","scripts":{"build":"npx tsc --outDir build","test":"ts-mocha --timeout 0 --slow 99999999999999999999 ./tests/test.spec.ts","bind":"archetype --target bindings-ts ./tests/contracts/testevent.arl > ./tests/test_bindings_gen.ts","deploy":"mocha --timeout 0 --slow 99999999999999999999 ./tests/deploy.js"},"dependencies":{"@taquito/michel-codec":"^14.0.0","@taquito/rpc":"^14.0.0","@taquito/taquito":"^14.0.0","@taquito/utils":"^14.0.0","typescript":"^4.6.2"},"devDependencies":{"@completium/completium-cli":"^0.4.33","@types/expect":"^24.3.0","@types/mocha":"^10.0.0","bignumber.js":"^9.0.2","ts-mocha":"^10.0.0"},"gitHead":"593c46d236b72119f5daca44eb0dccc0659ad5dc","_id":"@completium/event-listener@0.0.1","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-hye27ehZHAbf5I/gG0terULdlNosHO/VtvaqC4tVf59vM10jXMRDB91oJjchNGv1xZYclUXtoatw9UxVXmEQig==","shasum":"590051e7645ab10a8f1a148f00914ed0b30959af","tarball":"https://registry.npmjs.org/@completium/event-listener/-/event-listener-0.0.1.tgz","fileCount":18,"unpackedSize":23708,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVCH6N0aYVg4nAy1nFnW0W+bdmtwXvHWzZrjoqpm2d/gIgS9d/ZVF6br21b27EIIlXTn9PL2ZSGnqgawxR1UyezKE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRTOEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRmxAAn+4gAxKgt3eCa1fvoWe/sdDvB/260FbyVZBDVn2uAgVzq4lQ\r\nrW0gzkTpjoDz074OaPxbxmvnQyhR17LciKdkuJOqqXWRtWe8xZGoIL/f07Dq\r\ndEZu+o+ihttxG8q/kCNnbCay9/JrlRBOizOyCmpLVhAeZAkh2QWnebFpJij+\r\nh85LqYpqOXGAx87IDUTm9w/pqI2LkO0R9mivpmSP5IfaLytVpj4kydsqB0DZ\r\ndTIe0We78Q1i7HFoCSWZ2ccBLt8bU+tD+3vMIlNaLbCyC3Z06gpR/0H0g1/V\r\ncd1EeTdUbTbBpduThvzhoFMO2IChVZJ3XYegL7kXjQgHDsXrAtrVEoF/yXjr\r\nEtFwGTa9ZOULexQuBevo3peS+CGhlJ1igG851iMy9LVAlVHDo9bCJn0CCNSo\r\naDNRX7uGUDa+L00fKwvrfTWTu8fqt1KFnm94Os1F/ffhVCVRTFWkS7ppGYH5\r\ngVHeMoEvulCV78iktgEL9u917hQ0frXMQ24P6ZhXVI3I7CL/Z7ZZLI/VrnsD\r\nrzgIOWsd1f6biBHJHs5vav0mk4Ko/wRorv7hZNfx+wQWRCsI8Xu8JHWi4cYi\r\n01cnJflDLgWXqBWMhnZzZqsEwAP+BXe4Lqe98I+CP5CqznzEUIPd8kMMN0NJ\r\n4CGQOJce9aVzeZEGZ13ppzqHtan+9S8iJno=\r\n=cTtT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"benoitedukera","email":"benoit.rognier@edukera.com"},"directories":{},"maintainers":[{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},{"name":"benoitedukera","email":"benoit.rognier@edukera.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-listener_0.0.1_1665479555873_0.8276583613405919"},"_hasShrinkwrap":false},"0.0.2":{"name":"@completium/event-listener","version":"0.0.2","description":"Detects events emitted by smart contracts on the Tezos blockchain, and executes registered event handler functions.","main":"build/src/index.js","types":"build/src/index.d.ts","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/completium/event-listener.git"},"keywords":["archetype","tezos","smart-contract","completium","event","blockchain"],"license":"MIT","bugs":{"url":"https://github.com/completium/event-well-crank/issues"},"homepage":"https://github.com/completium/event-well-crank","scripts":{"build":"npx tsc --outDir build","test":"ts-mocha --timeout 0 --slow 99999999999999999999 ./tests/test.spec.ts","bind":"archetype --target bindings-ts ./tests/contracts/testevent.arl > ./tests/test_bindings_gen.ts","deploy":"mocha --timeout 0 --slow 99999999999999999999 ./tests/deploy.js"},"dependencies":{"@taquito/michel-codec":"^14.0.0","@taquito/rpc":"^14.0.0","@taquito/taquito":"^14.0.0","@taquito/utils":"^14.0.0","typescript":"^4.6.2"},"devDependencies":{"@completium/completium-cli":"^0.4.33","@types/expect":"^24.3.0","@types/mocha":"^10.0.0","bignumber.js":"^9.0.2","ts-mocha":"^10.0.0"},"gitHead":"166e0b6d4b249b9d9ba1861e182ed3b17e49fcb9","_id":"@completium/event-listener@0.0.2","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-ujr6hRdoABJ8UW8Wksg6AI+bBjTQl3A4K6T3zjMOdTscqkBjtwu+zu5uprKJJzOyPZrJQhJjoXWqzlk3WLvXwA==","shasum":"314d2ed253bc6d2f2de3469f586bab11f295ff19","tarball":"https://registry.npmjs.org/@completium/event-listener/-/event-listener-0.0.2.tgz","fileCount":18,"unpackedSize":23660,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6ScJ9IFgs4c3K6mJHPBxY2sJMqtDMpqZNKLDvwDahuAIgGt7TORuZWZ87iLsjFBjrluF1Niau1EXFYJ3wyTCbFeQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRUCYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXzBAAjQUi8toTPqpjDCmKPvoCRYO3CfE+NUVm96RTUVRom5PWdjxD\r\nR/GsRyFjIq7H2VETUrX7ghOGlX0HHlbtjrJOzJJFHrrABNA65YlnNu5rOy3Y\r\nA5dYug1wvtDIZVIvrhF1evHQ+0gitpEKInJqMWfTVBDDRomxmUr2uiSay6Gh\r\np6JE7yc7hWb53ca2jS+Vpd1ahdU0E6U9WbBq5hlgpOzgBjTcsZNF0ZAgxjU+\r\nHEyr7eE5OUgJedtbR99pTsBmp284HhIYOalxdHb8AP30mV8/5EEdPfB6uYe/\r\n9vh8qbrYPqqaOiOjAhRuYLAPhR5llcKmXfsJTWZn9ekUPnv6wAGCThCSCtKM\r\nuTBUzJNeaFbmHw+O8+/4mgYqZGKx3srXBpsek1qAjVhDtzYI0TvcRX1iMdK8\r\nd/qApHAUrKx/4+XRd+V3d3ql7zASnH83dmkPkXDsChnVl5PPYyBtWGO532fl\r\nGF7nuwSl2lpTKo+IFLH9oEB59vSGTeEXelGBHlsfbNvsSuNM/MsMrhLOLiYN\r\nK2h35B5DcsGF//lMcS9rM5iLsub7VBLmjLTB1OWOHe4MmqI9YvDopm7hvX9p\r\n4DgbfMEbNw2zwvEVpNXUl3YUR5ZeAHu2WV8PXzJEA9WQlYHKLIt9ENHyRETp\r\nd1Nf9d6QhKCzUQ1LAlibhDAujluvvbE0ygI=\r\n=2j2f\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"benoitedukera","email":"benoit.rognier@edukera.com"},"directories":{},"maintainers":[{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},{"name":"benoitedukera","email":"benoit.rognier@edukera.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-listener_0.0.2_1665482904086_0.6351774852157976"},"_hasShrinkwrap":false},"0.0.3":{"name":"@completium/event-listener","version":"0.0.3","description":"Detects events emitted by smart contracts on the Tezos blockchain, and executes registered event handler functions.","main":"build/src/index.js","types":"build/src/index.d.ts","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/completium/event-listener.git"},"keywords":["archetype","tezos","smart-contract","completium","event","blockchain"],"license":"MIT","bugs":{"url":"https://github.com/completium/event-well-crank/issues"},"homepage":"https://github.com/completium/event-well-crank","scripts":{"build":"rm -fr build && npx tsc --outDir build","test":"ts-mocha --timeout 0 --slow 99999999999999999999 ./tests/test.spec.ts","bind":"archetype --target bindings-ts ./tests/contracts/testevent.arl > ./tests/test_bindings_gen.ts","deploy":"mocha --timeout 0 --slow 99999999999999999999 ./tests/deploy.js"},"dependencies":{"@taquito/michel-codec":"^14.0.0","@taquito/rpc":"^14.0.0","@taquito/taquito":"^14.0.0","@taquito/utils":"^14.0.0","typescript":"^4.6.2"},"devDependencies":{"@completium/completium-cli":"^0.4.33","@types/expect":"^24.3.0","@types/mocha":"^10.0.0","bignumber.js":"^9.0.2","ts-mocha":"^10.0.0"},"gitHead":"af2968cf124327aedadb25eab05f81bffd0bb674","_id":"@completium/event-listener@0.0.3","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-6lG+/Lr8fEaay0Ng8HdnLZGFcDoFvA7ONlSnClHBfpErTMLirYd/XW+ng+YTNjt9mQmO/ikFvP1HCuB7/toqaA==","shasum":"c033ee6efd14d7fb3024014ae61f9947b41d814a","tarball":"https://registry.npmjs.org/@completium/event-listener/-/event-listener-0.0.3.tgz","fileCount":18,"unpackedSize":23605,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQ1GkThdl61+jWnaDd899MvQOVt2vezhwhI7GWHNqnpAIgBM7CPqGJHSXk7Mq4/Yj0qzQLLLMdIhAVey1QArNwywE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSCGHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdLg//Yt26GuKPTY+tYeuh+9i4nQbW2Cl5MBp6KZGqYuPJ3CLLUidT\r\neesCvQm3EYXitQQ9I5R34FFNcWd0Llj7hDDJQTLMZbjedUbCPiOotbgHcStI\r\nIyn2WehpTg37p658UKtY6EDfPbGYAuZn0t6jvnCUBtdDoDMzzgsD6N4Nk44Q\r\nVX+QOUKoGbW3dze/+6hw1lR+lQzqdewn3QZdPUK0BN9tTTxJHXeLWQ59v6WE\r\nqAv09HYaYBLbJ9SpOSYQuzNNFD5Px0ino6apI3F2LjyRmzboGd9L0Pz1Pn28\r\n0+3bWInx50/woK2O2F9EhFOuaKsGFY9b6lVXzep+5qVavNrtTfHzUM04GN3y\r\n9ARWh/IqKVHQctmBrJpkBtD7mfENL8R2rRUWi1rKXWY4Oda5yVM9BrLYQ2vd\r\nqfdqZsrWiTVP6jxicN9japVdkDMQIwVrJq/IrXwCQCGa6HOvmLRbUSir5tLo\r\nMcUJrTAIIB05VHkepNih3M9dS0Fwxdoiu6ShscG0dY2QS73QG0Jjd6KFr+Af\r\novXUrbB8cm5SaN9gxnP4/ZdGeLjP7mdt6dc50ZFY7/1qKq5ejJJybeTF7I1o\r\nrxuNOatm3T3IWZS7euVPQqYE4SmQUIHlfMS1XY9h5Nd3FmgwIqxCt9NA6+NU\r\nRQz5cU3J6aKFfwvGnYmqRXvhW4u5+ndz9oA=\r\n=3koe\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},"directories":{},"maintainers":[{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},{"name":"benoitedukera","email":"benoit.rognier@edukera.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-listener_0.0.3_1665671559506_0.06053468970546971"},"_hasShrinkwrap":false},"0.0.4":{"name":"@completium/event-listener","version":"0.0.4","description":"Detects events emitted by smart contracts on the Tezos blockchain, and executes registered event handler functions.","main":"build/src/index.js","types":"build/src/index.d.ts","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/completium/event-listener.git"},"keywords":["archetype","tezos","smart-contract","completium","event","blockchain"],"license":"MIT","bugs":{"url":"https://github.com/completium/event-well-crank/issues"},"homepage":"https://github.com/completium/event-well-crank","scripts":{"build":"rm -fr build && npx tsc --outDir build","test":"ts-mocha --timeout 0 --slow 99999999999999999999 ./tests/test.spec.ts","bind":"archetype --target bindings-ts ./tests/contracts/testevent.arl > ./tests/test_bindings_gen.ts","deploy":"mocha --timeout 0 --slow 99999999999999999999 ./tests/deploy.js","postpublish":"PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags"},"dependencies":{"@taquito/michel-codec":"^14.0.0","@taquito/rpc":"^14.0.0","@taquito/taquito":"^14.0.0","@taquito/utils":"^14.0.0","typescript":"^4.6.2"},"devDependencies":{"@completium/completium-cli":"^0.4.33","@types/expect":"^24.3.0","@types/mocha":"^10.0.0","bignumber.js":"^9.0.2","ts-mocha":"^10.0.0"},"gitHead":"65cba844107130f89a3b0b0db19bd715eef4f27a","_id":"@completium/event-listener@0.0.4","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-c9EqhT3bad1RB4WJ+Oih9WaXlxl/CFOHc1EuDN8oKihPo/nMIlAS0EN7FjnLdnOs6YZA0pebt5IyJswCBVBgBQ==","shasum":"221fb48d63d436c817662f6a455156061499e49f","tarball":"https://registry.npmjs.org/@completium/event-listener/-/event-listener-0.0.4.tgz","fileCount":18,"unpackedSize":23811,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9XpmTC46hfTovIgW/HDCk83IkLTpdQFh1tI68TVDvTQIhAJDB+ouiIn/mcztTXQTpDmlVN2XdqKY6tleHmWnUGwIG"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSCKEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoalg/+MMg/AfcCe5n2h3hZ2DC8UlPp86eNNSf3/P/QtH2bPaO2e03N\r\n7j2+2G1qimSDIm1TeMnJnVLLjdYt7xNJkuxrKnlnvMT4n/a2vts2YYjISgKk\r\njDNrSlGIIwRrIZvuVOLeeHM2PtTsrz+lPV4bt/Y8Yrs947lU89N2BpRcjpkZ\r\n7mlu9KlCd3h+XSOhHEl1ZUMdhEK9klFEo6r4GnezJfqyLF58aQvdP+VNg0d0\r\nEsyl1/xzNEfQCa9livfaawhZ8jONgSW40qrleNHaRb38bg9TW8VvsSipOmFq\r\nLJI1K2FRdEdxViEi1e/9X9qS3O43+y1InwEjw9cfNSTWEr/iISw1oA2ImPyw\r\nqH9CUPsyXxkxw++wyH3ug3Dg8Qy3F3MKj2El/B9ErHmHw4N3OMLxQyxPZfxg\r\n0USvGj9STbD0XuXHxGiOGCxyJx4GOJZqM13hSEvXyuwcz87JQafGzT22HvsZ\r\nc/bw9Rj3yRybYUbfPMW18yWnNNUa5aT7MeZfEZ/PzCz3rAfd0aVYQ6IMnzDi\r\nheqzc6AfAVB19qaeeI1fYsMCqnqh1rczO/SdVQqSDP6XLiFB6+795DRvzmYM\r\nBribwor/kHFFGjZUUzyR/hWN7LAuzQzIgJNFCa5op9D0HIWld5Ktj2HpjN5T\r\nRZit/aV+G3nf+jp2TXZ4tgu8FqeUH1y8y9Q=\r\n=mNvq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},"directories":{},"maintainers":[{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},{"name":"benoitedukera","email":"benoit.rognier@edukera.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-listener_0.0.4_1665671812371_0.09836583378346164"},"_hasShrinkwrap":false},"0.0.5":{"name":"@completium/event-listener","version":"0.0.5","description":"Detects events emitted by smart contracts on the Tezos blockchain, and executes registered event handler functions.","main":"build/src/index.js","types":"build/src/index.d.ts","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/completium/event-listener.git"},"keywords":["archetype","tezos","smart-contract","completium","event","blockchain"],"license":"MIT","bugs":{"url":"https://github.com/completium/event-well-crank/issues"},"homepage":"https://github.com/completium/event-well-crank","scripts":{"build":"rm -fr build && npx tsc --outDir build","test":"ts-mocha --timeout 0 --slow 99999999999999999999 ./tests/test.spec.ts","bind":"archetype --target bindings-ts ./tests/contracts/testevent.arl > ./tests/test_bindings_gen.ts","deploy":"mocha --timeout 0 --slow 99999999999999999999 ./tests/deploy.js","postpublish":"PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags"},"dependencies":{"@taquito/michel-codec":"^14.0.0","@taquito/rpc":"^14.0.0","@taquito/taquito":"^14.0.0","@taquito/utils":"^14.0.0","typescript":"^4.6.2"},"devDependencies":{"@completium/completium-cli":"^0.4.33","@types/expect":"^24.3.0","@types/mocha":"^10.0.0","bignumber.js":"^9.0.2","ts-mocha":"^10.0.0"},"_id":"@completium/event-listener@0.0.5","gitHead":"953510d366a98bf5c3078ff3e20906fed225a078","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-KsbWqtv2sDLT0iF60XpQmfZHn4KGGFPSFiRTfV9cu5ofbO6njA9CW93hDEb2qIi+2Qklq/Bz0RYE22fic+UbSw==","shasum":"74f3b467273d8dea5cf6f2e28ea8e78879135b34","tarball":"https://registry.npmjs.org/@completium/event-listener/-/event-listener-0.0.5.tgz","fileCount":18,"unpackedSize":23658,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAmqMsLtBcCvY+R+CiVj0RNbsPEwKlVX9HQSCGtlbuKtAiBPZU09LzsXnenHwh8pOP9AVyuuKGZCVAWxia3WmQpzDg=="}]},"_npmUser":{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},"directories":{},"maintainers":[{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},{"name":"benoitedukera","email":"benoit.rognier@edukera.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-listener_0.0.5_1700238086550_0.7366163937563344"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-11T09:12:35.812Z","0.0.1":"2022-10-11T09:12:36.026Z","modified":"2023-11-17T16:21:26.931Z","0.0.2":"2022-10-11T10:08:24.262Z","0.0.3":"2022-10-13T14:32:39.725Z","0.0.4":"2022-10-13T14:36:52.521Z","0.0.5":"2023-11-17T16:21:26.708Z"},"maintainers":[{"name":"guillaumeedukera","email":"guillaume.duhamel@edukera.com"},{"name":"benoitedukera","email":"benoit.rognier@edukera.com"}],"description":"Detects events emitted by smart contracts on the Tezos blockchain, and executes registered event handler functions.","homepage":"https://github.com/completium/event-well-crank","keywords":["archetype","tezos","smart-contract","completium","event","blockchain"],"repository":{"type":"git","url":"git+https://github.com/completium/event-listener.git"},"bugs":{"url":"https://github.com/completium/event-well-crank/issues"},"license":"MIT","readme":"# Event Listener\n\n`@completium/event-listener` detects events emitted by smart contracts on the [Tezos](https://tezos.com/) blockchain, and executes registered event handler functions.\n\n## API\n\n### `register`\n\nRegisters an event handler for a specific contract. It takes 3 arguments:\n* the address of the emitter contract\n* the function to create an event from its packed version\n* the *event handler* function that takes 2 arguments:\n  * the emitted event\n  * the event data (optional)\n\nThe function to create the event may be automatically generated (see [Bindings](#bindings) below).\n\nThe event data provides information about the emitted event:\n* date\n* block hash\n* operation hash\n* source of the event (account address at the source of the event emission)\n\n### `startEventListener`\n\nStarts the listener process. It takes an optional `EventListenerOptions` object with optional fields:\n\n| Field | Type | Default | Desc |\n| -- | -- | -- | -- |\n| `bottom` | `string` | `head~4` | block hash to start crawling from |\n| `delay` | `number` | `2000` | number of milliseconds between two lookups of the event well contract |\n| `horizon` | `number` | `3` | number of blocks to look back (the higher, the higher the probability to read the main branch) |\n| `endpoint` | `string` | `https://mainnet.api.tez.ie` | endpoint used by the event crank |\n| `verbose` | `boolean` | `false` | flag to turn crank's verbose mode on/off |\n\n### `stopEventListener`\n\nStops the event listener.\n\n## Bindings\n\n[`@completium/completium-cli`](https://www.npmjs.com/package/@completium/completium-cli) generates the TS bindings from an [Archetype](https://archetype-lang.org) contract. It generates for each event emitted by a contract:\n* the event type\n* the `register` event function\n\nThe completium CLI command to generate the bindings:\n\n```bash\n$ completium-cli generate bindings-ts mycontract.arl > mycontract-bindings.ts\n```\n\n## Example\n\nThis example illustrates how to emit event from a smart contract and how to receive them in a Dapp.\n\n### Emit event\n\nDeclare the event type with the `event` declaration and emit an event with the `emit` instruction:\n\n```typescript\narchetype event_demo\n\nevent TestEvent {\n  val: string\n}\n\nentry emit_event(v : string) {\n  if length(v) > 20 then\n    emit<TestEvent>({ val })\n}\n```\n\nDeploy the contract on the testnet with the following command:\n```bash\n$ completium-cli set endpoint https://ithacanet.ecadinfra.com\n$ completium-cli deploy event_demo.arl\n```\n\n### Receive event\n\nGenerate bindings with the following command:\n```bash\n$ completium-cli generate bindings-ts event_demo > bindings-event_demo.ts\n```\n\nIt generates the following two elements:\n* `EventDemo`\n* `register_TestEvent`\n\nThese elements may be used to implement the event receiver application which registers an event handler and starts the cranks. Say the event demo contract deployed above is at address `KT19EAMugKU416cbA9jL1XcukWArfpv4dLYA`\n```typescript\nimport { runCrank } from '@completium/event-listener';\nimport { register_TestEvent, TestEvent } from './bindings-event_demo';\n\nconst handleTestEvent = (e : TestEvent) => {\n  console.log(`Test Event received with value \"${e.val}\"!`);\n}\n\nconst run = async () => {\n  register_TestEvent('KT19EAMugKU416cbA9jL1XcukWArfpv4dLYA', handleTestEvent);\n  runEventListener({\n    endpoint: 'https://ithacanet.ecadinfra.com',\n  })\n}\n\nawait run()\n```\n\n### Execute\n\nCompile and run the application above. Then call the contract with the following command:\n\n```bash\n$ completium-cli call event_demo --arg `{ \"v\" : \"This is a long enough string.\" }`\n```\n\nAfter a few blocks generation, the application prints the following message:\n\n```\nTest Event received with value \"This is a long enough string.\"!\n```\n","readmeFilename":"README.md"}