const endpoint = "https://ardr.nownodes.io/nxt";
const apiKey = "YOUR_API_KEY";
async function nownodesRequest(payload) {
const response = await fetch(endpoint, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"api-key": apiKey,
},
body: JSON.stringify(payload),
});
return response.json();
}
const result = await nownodesRequest({
"transactionBytes": "02000000000001e0217e022800df21142bd38c04bd5c5c342c6ca36802f9de89b75b2a0a8cbd32d29dca481e5c0069c38ab5c7abe500e40b540200000040420f000000000058cda06a138b59b46b19c5e5d06d65334ed338d0e48d9694ae5c119913d2a00c9b4871989dd367442d1dbd94d22336515135cc3bf35e7c952c244e9d1b6a5c9810851a0069fb1adac03af20c40000000017ac01a000001000000000000000000000000000000016059eed721ae4ad4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
});
console.log(result);