Post #14129

43ac6069caa4f7a3e183049ce399ccfa2cbc82e01912b0e8f58181cdd3e5d6e2
af0a83742307e4b701c164142796db1b982f38639f2c32dc77965abc0a6c3a35
Signature not verified

This entry might be using an old signature, or it was signed by a key that does not exist on the server.

{"entry_date":1554916195,"post_data":{"edit_count":2,"last_edit_date":1554916075,"last_edit_user_id":11,"message_sha512":"1b2e94a265a19dba266d8353628ef6e7a28e85d975b74f13145f52c0ba65194f1a26d4a4475383aa75925bd762569dd2dee6832ac58b07d3c29980cdda5b63d4","node_id":59,"post_date":1554914883,"thread_id":1837,"title_sha512":"4097ff711d6911af9411728fc61f5e1d01d8a0cd8423586932573abbad5126397301ec3a14e61aa7938021973059b5f77f370a8f7ffb819d42797a08b7c370bd","user_id":11},"post_link":"https:\/\/factomize.com\/forums\/index.php?threads\/1837#post-14129"}
The entry content as it exists in the database. This should be verified against the blockchain entry.
FactomJS Contribution - FactomEventEmitter
I contributed the new FactomEventEmitter class to the FactomJS library. FactomEventEmitter lets you listen for various Factom events without needing to handle polling logic yourself. It simplifies writing applications that react to on-chain events. The following snippet demonstrates the on-chain events you can listen to.

[CODE=javascript]const { FactomCli, FactomEventEmitter } = require('factom');
const cli = new FactomCli();
// Poll the blockchain every 10s
const emitter = new FactomEventEmitter(cli, { interval: 10000 });
emitter.on('newDirectoryBlock', (directoryBlock) => ...);
emitter.on('newFactoidBlock', (factoidBlock) => ...);
emitter.on('newAdminBlock', (adminBlock) => ...);
emitter.on('newEntryCreditBlock', (entryCreditBlock) => ...);
emitter.on('newChain', (entryBlock) => ...);
// Listen to any transaction involving a given Factoid address
emitter.on('FA29eyMVJaZ2tbGqJ3M49gANaXMXCjgfKcJGe5mx8p4iQFCvFDAC', (transaction) => ...);
// Listen to any new entries in a given chain
emitter.on('4060c0192a421ca121ffff935889ef55a64574a6ef0e69b2b4f8a0ab919b2ca4', (entryBlock) => ...);[/CODE]

[URL]https://github.com/PaulBernier/factomjs/blob/master/src/factom-event-emitter.js[/URL]

Thank you very much to [USER=10]@Paul Bernier[/USER] for providing thorough code review and feedback.
This is the raw content, without BBCode parsing.
Top