"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("@0x/mesh-browser-lite/lib/mesh"), exports);
const wasm_buffer_1 = require("./generated/wasm_buffer");
// Start compiling the WebAssembly as soon as the script is loaded. This lets
// us initialize as quickly as possible.
const go = new Go();
WebAssembly.instantiate(wasm_buffer_1.wasmBuffer, go.importObject)
    .then((module) => {
    go.run(module.instance);
})
    .catch((err) => {
    // tslint:disable-next-line no-console
    console.error('Could not load Wasm');
    // tslint:disable-next-line no-console
    console.error(err);
    // If the Wasm bytecode didn't compile, Mesh won't work. We have no
    // choice but to throw an error.
    setImmediate(() => {
        throw err;
    });
});
//# sourceMappingURL=index.js.map