Events
Events are part of the public publish / subscribe API of a blockchain application.
For mor information about the public application endpoints, check out the RPC API for Lisk nodes page |
Module- and plugin-specific events
Modules and plugins often expose additional events to the application. All actions and events registered with the application are available as RPC endpoints.
The actions and events are described on the reference pages for the different modules, see Modules overview and Plugins overview.
Application events
app:network:event
Fired when the application receives a P2P event from the network.
Returns
Example output
{
"event":"postBlock",
"data":
{
"block":"0ad301080210fc88ad8e06189e192220454717ffe85ae4877656962acb065eb316dcd9118a024f9f70a5c335368f03f52a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8553220fd0ec19ef02054efd85dd2693ced1e28654f6e29638d5bb5de75f1dd75ab179a3880cab5ee01421808a51810bf181a10c43fe38f9ecdcf87a52615111054a1ff4a408e1897e9535be3be53f68ed7604af51852530eee6acdb7ac0ab647a2f14a23ad326253a2f7b44041efee7dbf776c1687c945115aaf83ee1a03167707c9a9840f"
}
}
app:transaction:new
Fired when the node receives a new transaction.
Returns
Example output
{
"transaction":"0802100018022080ade2042a200fe9a3f1a21b5530f27f87a414b549e79a940bf24fdf2b2f05e7f22aeeecc86a321e088094ebdc0312147c1facd5a55044f4b2ec3329b8ae8382959d4d7e1a003a4068baa1de9f102a3aad4ef7df411280f9aed93c4236922734515bb1984dffed1139ed8c9db073e79c5c535f376a63657d589f330b2480260617873740b0941d09"
}
app:chain:fork
Fired when the node received a block from the forked chain.
Returns
Example output
{
"block":"0acc01080210f3ebccfe051802222088b1bad7200b0d813d5bef7982b6f8e2cb407b39731c949c7e27bf70ff0083e32a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8553220c395ed88399c1a8d48a0134a9e42fa7d769faaf3ba8ed332b9f0923eb22197b538004216080010001a1037b33154dad7b5f5ac28078fa09c41fd4a406aa158238ce2ee516182ca4613a87b1078b580c9f97e18a5652277107e8a777b185dd5c4b7529fa99d20c6a539543dd2894bb82f04c0e3a8141e364a782fbd07",
"accounts":
[ "0a14e2950a9f07b44e724df2129360cc140293c08308120208001a020800220208002a3a0a190a0a67656e657369735f35371800200228003080a094a58d1d121d0a14e2950a9f07b44e724df2129360cc140293c083081080a094a58d1dc23e020a00" ]
}
app:chain:validators:change
Fired when the node updates the validator set.
Returns
Example output
{ validators: [
{
address: 'b42580bf7501c6c69a37603b0d010077abb20ab6',
isConsensusParticipant: true,
minActiveHeight: 1
},
// ...
{
address: '8d146ccb9835beccd3b5646ba04c3942ec11636b',
isConsensusParticipant: true,
minActiveHeight: 1
}
]
}
app:block:new
Fired when a new block is added to the blockchain.
Returns
Example output
{
"block":"0acc01080210f3ebccfe051802222088b1bad7200b0d813d5bef7982b6f8e2cb407b39731c949c7e27bf70ff0083e32a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8553220c395ed88399c1a8d48a0134a9e42fa7d769faaf3ba8ed332b9f0923eb22197b538004216080010001a1037b33154dad7b5f5ac28078fa09c41fd4a406aa158238ce2ee516182ca4613a87b1078b580c9f97e18a5652277107e8a777b185dd5c4b7529fa99d20c6a539543dd2894bb82f04c0e3a8141e364a782fbd07",
"accounts":
[ "0a14e2950a9f07b44e724df2129360cc140293c08308120208001a020800220208002a3a0a190a0a67656e657369735f35371800200228003080a094a58d1d121d0a14e2950a9f07b44e724df2129360cc140293c083081080a094a58d1dc23e020a00" ]
}
app:block:delete
Emitted when a block is deleted from the blockchain.
Returns
Example output
{
"block":"0acc01080210f3ebccfe051802222088b1bad7200b0d813d5bef7982b6f8e2cb407b39731c949c7e27bf70ff0083e32a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8553220c395ed88399c1a8d48a0134a9e42fa7d769faaf3ba8ed332b9f0923eb22197b538004216080010001a1037b33154dad7b5f5ac28078fa09c41fd4a406aa158238ce2ee516182ca4613a87b1078b580c9f97e18a5652277107e8a777b185dd5c4b7529fa99d20c6a539543dd2894bb82f04c0e3a8141e364a782fbd07",
"accounts":
[ "0a14e2950a9f07b44e724df2129360cc140293c08308120208001a020800220208002a3a0a190a0a67656e657369735f35371800200228003080a094a58d1d121d0a14e2950a9f07b44e724df2129360cc140293c083081080a094a58d1dc23e020a00" ]
}