<jupyter_start><jupyter_text>Test of API for Permission Tree of Validators on 0L Using https://github.com/0L-Analytics/permission-tree-monitoring Credit to: https://github.com/0L-Analytics/permission-tree-monitoring/commits?author=agouin for building the API<jupyter_code>import requests<jupyter_output><empty_output><jupyter_text>Validator Permission Tree<jupyter_code>node_address = "64B21681CE1C34854498ED92D76432A2"
web_address = "https://0l.interblockcha.in:444/permission-tree/validator/"
print(web_address+node_address)
response = requests.get(web_address+node_address)

# /permission-tree/validator/
print(response)
response.json()
print(response.json())<jupyter_output>{'address': '64b21681ce1c34854498ed92d76432a2', 'parent': '00000000000000000000000000000000', 'version_onboarded': 0, 'children': [{'address': '84417cef5647097127e1bc24fd1002c6', 'parent': '64b21681ce1c34854498ed92d76432a2', 'epoch_onboarded': 18, 'version_onboarded': 4349485}, {'address': '1c03e956dd7afc612e4efe240c23365d', 'parent': '64b21681ce1c34854498ed92d76432a2', 'epoch_onboarded': 35, 'version_onboarded': 8818948}]}<jupyter_text>Permission Tree Stats<jupyter_code>stats_address = "https://0l.interblockcha.in:444/permission-tree/stats"
print(stats_address)
response = requests.get(stats_address)
print(response)
print(response.json())<jupyter_output>{'allAccountCount': 2790, 'allMinerCount': 2309, 'activeMinerCount': 1029}<jupyter_text>Miner Permission Tree<jupyter_code>miner_address = "1ee5432bd3c6374e33798c4c9edcd0cf"
web_address = "https://0l.interblockcha.in:444/permission-tree/miner/"
print(web_address+miner_address)
response = requests.get(web_address+miner_address)

# /permission-tree/validator/
print(response)
print(response.json())<jupyter_output>{'address': '1ee5432bd3c6374e33798c4c9edcd0cf', 'parent': 'b080a6e0464cca28ed6c7e116fecb837', 'epoch_onboarded': 21, 'version_onboarded': 5250021, 'has_tower': True, 'is_active': True, 'children': [{'address': 'e201921930972ecac3a4a38afa10c7fd', 'parent': '1ee5432bd3c6374e33798c4c9edcd0cf', 'epoch_onboarded': 21, 'version_onboarded': 5250261, 'has_tower': True, 'is_active': False}, {'address': '17cae8af525724f50475c4203f8255f9', 'parent': '1ee5432bd3c6374e33798c4c9edcd0cf', 'epoch_onboarded': 21, 'version_onboarded': 5250458, 'has_tower': True, 'is_active': True}, {'address': '356253dddaf8e591b450e45842f065b9', 'parent': '1ee5432bd3c6374e33798c4c9edcd0cf', 'epoch_onboarded': 21, 'version_onboarded': 5250701, 'has_tower': True, 'is_active': True}, {'address': '9b443b667d3dc0ec10da6d7284ac571c', 'parent': '1ee5432bd3c6374e33798c4c9edcd0cf', 'epoch_onboarded': 21, 'version_onboarded': 5250789, 'has_tower': True, 'is_active': False}, {'address': '46eab336f65114d9eef10c6df0bf1580', 'parent'[...]
{'fraction_non_alphanumeric': 0.14353026458861906, 'fraction_numerical': 0.17723812975715839, 'mean_word_length': 12.080568720379146, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '627109', 'license': 'MIT', 'n_tokens_mistral': 1368, 'n_tokens_neox': 1103, 'n_words': 141, 'path': 'api_test.ipynb', 'repo_name': '0L-Analytics/ol-analytical-research', 'size': '2759'}