ssv-scanner
Version:
Tool for retrieving events data (cluster snapshots and owner nonce) from the SSV network contract.
24 lines (20 loc) • 623 B
text/typescript
import { ClusterScanner, NonceScanner } from 'ssv-scanner';
async function main() {
const params = {
network: '',
nodeUrl: '',
ownerAddress: '',
operatorIds: []
}
const clusterScanner = new ClusterScanner(params);
const result = await clusterScanner.run(params.operatorIds);
console.log(JSON.stringify({
'block': result.payload.Block,
'cluster snapshot': result.cluster,
'cluster': Object.values(result.cluster)
}, null, ' '));
const nonceScanner = new NonceScanner(params);
const nextNonce = await nonceScanner.run();
console.log('Next Nonce:', nextNonce);
}
void main();