Implementation of the Polywrap client in JavaScript.
npm install @polywrap/client
# or
yarn add @polywrap/client
Create a new Polywrap client config builder instance, add the bundles you want to use, and then create a new Polywrap client instance with the config.
import{PolywrapClient,PolywrapClientConfigBuilder}from"@polywrap/client";constbuilder=newPolywrapClientConfigBuilder();builder.addBundle("sys");constclient=newPolywrapClient(builder.build());constresult=awaitclient.invoke<boolean>({uri: "wrapscan.io/polywrap/logging@1.0.0",method: "info",args: {message: "Hello from hello world wrap!",}});if(!result.ok){throwError("Log message error: "+result.error);}For any questions or problems, please visit our Discord.
