Transactions
Connection
import WebSocket from 'ws';
const ws = new WebSocket('wss://mainnet.vechain.org/subscriptions/txpool');
ws.onmessage = (message) => {
console.log('New pending transaction', message.data);
}await fetch(`https://mainnet.vechain.org/transactions/${txId}?pending=true`).then(res => res.json())const tx = await thor.transactions.getTransaction(addedTx.id, {
pending: true,
});Example Project
Last updated
Was this helpful?