Installing the Polywrap JS client
#
IntroductionIf you're a JavaScript developer building Browser, Node.js, or React based apps, this guide is for you.
tip
In the future, JavaScript will be one of many supported languages. Our goal is to enable the use of Polywrap in every major programming language.
By the end of this document, you'll gain the following skills:
- How to instantiate the Polywrap client in your JavaScript App
- Invoke any wrapper using the Polywrap client
- Configure custom Polywrap URI redirects
- Build React apps with ease
If you get stuck during this guide, send us a message on our Discord!
#
PrerequisitesAs prerequisites for this guide, we recommend having familiarity with TypeScript. React will also be used in the latter sections.
#
InstallationTo use wrappers in your app, all you need is the Polywrap Client!
The Polywrap JavaScript Client works in both Node.js, and browser applications.
#
ExamplesSome example projects that integrate the JS client can be found here.
The next section assumes that you're integrating Polywrap into an existing app project. If you want a quick start with our template project, simply run:
Where
<project-name>
is replaced with a custom name of your choosing. For examplemy-wrapper
.This command will create a new project folder with a "Hello World" app that lets you interact with a simple Wasm wrapper at
ens/rinkeby/helloworld.dev.polywrap.eth
.