 files[i].hex;
            const data = hexToBytes(hex);
            const mimetype = ec.encode(files[i].mimetype);

            const script = [
                pubkey,
                'OP_CHECKSIG',
                'OP_0',
                'OP_IF',
                ec.encode('ord'),
                '01',
                mimetype,
                'OP_0',
                data,
                'OP_ENDIF'
            ];

            const leaf = await BTON.Tap.getLeaf(BTON.Script.encode(script));
            co