IdA Node Management

returnNodes()

Return the complete list of nodes, the answer is an array:

['https://idanodejs01.scryptachain.org', 'https://idanodejs02.scryptachain.org']

checkNode(node)

Check that the node responds correctly. If not, send a reply false:

const scrypta = window.ScryptaCore
let node = await scrypta.checkNode('https://idanodejs01.scryptachain.org')
/*
Esempio di risposta positiva:
{"version":1000000,"protocolversion":70920,"walletversion":61000,"balance":50.55998489,"obfuscation_balance":0,"blocks":424073,"timeoffset":0,"connections":21,"proxy":"","difficulty":32391.37336531,"testnet":false,"keypoololdest":1568297083,"keypoolsize":1001,"paytxfee":0,"relayfee":0.0001,"staking status":"Staking Active","errors":"","indexed":424073,"toindex":0}
Esempio di risposta negativa:
false
*/

connectNode()

Combine the two previous methods by returning the first available node at random. This node can be used to call specific functions within it.

const scrypta = window.ScryptaCore
let node = await scrypta.connectNode()
/*
Esempio di risposta:
'https://idanodejs01.scryptachain.org'
*/