Events are used inside Ark Core to trigger blockchain actions and the delivery of webhook payloads. Additionally, custom plugins can utilize the event emitter package to trigger their own actions in response to blockchain events.

Conceptually, this feature is similar to the Hooks implementation in WordPress, as well as to the lifecycle hook access provided by JavaScript frameworks such as Vue and React. All of these systems expose The primary difference is that, because of the need for strict protocols around blockchain data creation and retrieval, Ark events are strictly reactionary. In other words, Ark Core events are not capable of changing data at runtime. The transaction.applied event, for instance, passes a complete transaction instance, not raw transaction data that can be altered in the style of a WordPress Filter.

Another way to think of the Event API is in the context of a publish-subscribe pattern. In this pattern, Ark Core packages can act both as publishers and subscribers of events.

The list of events published by Ark Core packages can be found in core-blockchain's getEventsmethod: