Socket Event Forwarder is an Ark.io bridgechain plugin for forwarding real-time blockchain events through socket.io protocol. It is designed to be installed on a relay node. It was developed by Friends of Little Yus member @emsy. We use this plugin on all of our relay nodes for monitoring special blockchain transactions, events, and node status.
Plugin Source: github.com/e-m-s-y/socket-event-forwarder
See document SOCKET EVENT FORWARDER – INSTALLATION & USER GUIDE for more information.
ARK example
Connecting…
Source code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://cdn.socket.io/4.0.1/socket.io.js"></script>
</head>
<body>
<p id="log">Connecting...</p>
</body>
<script>
const socket = io('https://arksocket.littleyus.com', {
transports: ['websocket']
});
socket.on('connect', function() {
document.getElementById('log').innerHTML = 'Connected to server!';
});
socket.on('block.applied', function(data) {
document.getElementById('log').innerHTML += '<br/>' + JSON.stringify(data);
});
</script>
</html>
Endpoints
We have multiple public endpoints available for use.
ARK mainnet -> https://arksocket.littleyus.com (use https://cdn.socket.io/4.0.1/socket.io.js)
Compendia mainnet -> https://bindsocket.littleyus.com (use https://cdn.socket.io/socket.io-2.3.1.js)
Radians testnet -> https://socket.radians.nl (use https://cdn.socket.io/socket.io-2.3.1.js)
Make sure use the correct script source in the head tag. ARK mainnet runs on a newer version of the plugin which requires socket.io version 4.0.0+ whilst Compendia and Radians run on older versions hence a different script source is required.