from urllib.request import urlopen
from pathlib import Path
import base64,hashlib,json
base='https://threshold-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()=='487860d36f66041e18d77eaf7ca5bfbefb08b5c5dfc612acd3234e3af3b80212'
Path(manifest['filename']).write_bytes(data)
