@0x/mesh-browser
which includes the WebAssembly bytecode and a lightweight wrapper around it. This package is used exactly the same way as any other NPM package and using it feels exactly like using a native TypeScript/JavaScript library. To find more information on optimizing the startup time of using Mesh in the browser, refer to the next section on the @0x/mesh-browser-lite
package.@0x/mesh-browser
package -- the @0x/mesh-browser-lite
package -- that provides an identical abstraction around a browser-based Mesh node without requiring that Wasm bytecode be bundled with the rest of the webpage's code. Additionally, this package makes use of the WebAssembly's streaming functionality, which could provide a speedup to load times for users of browser-based Mesh.@0x/mesh-browser
package. WebAssembly binaries for each version of 0x-mesh that has an associated @0x/mesh-browser-lite
package can be found in the 0x-mesh release notes. The user will need to serve the appropriate binary on a server or CDN of their choice. The package gives users the option of providing a URL to the loadMeshStreamingWithURLAsync
function or a Response
object to the loadMeshStreamingAsync
function in their application. The URL or Response
option should be chosen in such a way that they load the Mesh Binary that is being served.@0x/mesh-browser
NPM package, simply run:yarn
:@0x/mesh-browser-lite
NPM package can be installed by running:yarn
:@0x/mesh-browser
package is available at@0x/mesh-browser-lite
package is available at@0x/mesh-browser
and the @0x/mesh-browser-lite
packages, respectively.