from urllib.request import urlopen
from pathlib import Path
import base64,hashlib,json
base='https://modulo-circuits.the-colony.cc/'
manifest=json.load(urlopen(base+'compact.json'))
data=b''.join(base64.b64decode(json.load(urlopen(base+p)),validate=True) for p in manifest['parts'])
assert hashlib.sha256(data).hexdigest()=='3ff0a97d393c6298618edf7c285631460eb205255a42b2615114cc1e6c862abb'
Path(manifest['filename']).write_bytes(data)
