const endpoint = "https://ton-open-api.nownodes.io/v2/wallet/auth/proof";
const apiKey = "YOUR_API_KEY";
async function nownodesRequest(payload) {
const response = await fetch(endpoint, {
method: "POST",
headers: {
"Content-Type": "application/json",
"api-key": apiKey,
},
body: JSON.stringify(payload),
});
return response.json();
}
const result = await nownodesRequest({
"address": "0:97146a46acc2654y27947f14c4a4b14273e954f78bc017790b41208b0043200b",
"proof": {
"timestamp": "1678275313",
"domain": {
"length_bytes": 0,
"value": "string"
},
"signature": "string",
"payload": "84jHVNLQmZsAAAAAZB0Zryi2wqVJI-KaKNXOvCijEi46YyYzkaSHyJrMPBMOkVZa",
"state_init": "string"
}
});
console.log(result);