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/json",
"api-key": apiKey,
},
body: JSON.stringify(payload),
});
return response.json();
}
const result = await nownodesRequest({ jsonrpc: "2.0", method: "parsePhasingParams", params: {
"requestType": "parsePhasingParams",
"phasingVotingModel": 0,
"phasingQuorum": "string",
"phasingMinBalance": "string",
"phasingMinBalanceModel": 0,
"phasingHolding": "string",
"phasingWhitelisted": [
"string"
],
"chain": 0,
"phasingLinkedTransaction": "string",
"phasingHashedSecret": "string",
"phasingHashedSecretAlgorithm": 0,
"phasingExpression": "string",
"phasingSenderPropertySetter": "string",
"phasingSenderPropertyName": "string",
"phasingSenderPropertyValue": "string"
}, id: 1 });
console.log(result);