Skip to main content

Creating the Polywrap client instance

Once the Polywrap JS client has been installed, the next step is to create a PolywrapClient instance:

import { PolywrapClient } from "@polywrap/client-js";
const client = new PolywrapClient();

At this point, you can already invoke wrappers. In the simple example below, we send one to the "hello world" wrapper.

client.invoke({
uri: "ens/rinkeby/helloworld.dev.polywrap.eth",
method: "logMessage",
args: {
message: "Hello World!"
}
});