const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sql: 'SELECT transaction_hash, from_address, value FROM agent.ethereum_transactions LIMIT 5',
max_rows: 1000
})
};
fetch('https://api.asksurf.ai/gateway/v1/onchain/sql', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));