newTransaction

Arguments

collId: string

Request

// Send Event
socket.send(JSON.stringify({
  "event": "newTransaction",
  "payload": {
		collId: "Collection ID"
  }
}));


// Start listening to incoming messages
socket.addEventListener('message', (event) => {
  // Check if the incoming event has data attached to it
  const event_stringified = event?.data?.toString();
  if (event_stringified !== '' && event_stringified !== null) {
    console.log(JSON.parse(event_stringified)); 
  }
});

Response

{
  status: 'ok',
  type: 'newTransaction',
  data: { tx: { tx: [Object], mint: [Object], instr: null } }
}
{
  status: 'ok',
  type: 'newTransaction',
  data: { tx: { tx: [Object], mint: [Object], instr: null } }
}