Javascript
For successful transaction processing, please include a system transfer tip to one of our designated tip addresses
JavaScript (using fetch)
async function makeRequest() {
const url = "http://lon.block0.wtf/";
const payload = {
base64_tx: "<BASE64_ENCODED_TRANSACTION>"
};
try {
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const data = await response.text();
console.log(`Status: ${response.status}`);
console.log(`Response: ${data}`);
} catch (error) {
console.error("Error:", error);
}
}
Javascript (using axios)
const axios = require('axios');
async function makeRequestWithAxios() {
const url = "http://lon.block0.wtf/";
const payload = {
base64_tx: "<BASE64_ENCODED_TRANSACTION>"
};
try {
const response = await axios.post(url, payload, {
headers: {
"Content-Type": "application/json"
}
});
console.log(`Status: ${response.status}`);
console.log(`Response: ${response.data}`);
} catch (error) {
console.error("Error:", error.message);
}
}
If you're sending with blockhash in your TX, please ensure to use commitment level finalized.
Last updated