New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@polywrap/client-js

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polywrap/client-js

Polywrap JavaScript Client

  • 0.12.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
101
increased by62.9%
Maintainers
2
Weekly downloads
 
Created
Source

@polywrap/client-js

npm

The Polywrap client extends the PolywrapCoreClient to provide UX features, such as an additional constructor and additional configuration options.

Installation

npm install --save @polywrap/client-js

Usage

Instantiate

Use the PolywrapClient constructor to instantiate the client with the default configuration bundle.

  import { PolywrapClient } from "@polywrap/client-js";

  const client = new PolywrapClient();

Configure

Use the @polywrap/client-config-builder-js package to build a custom configuration for your project.

  const config = new PolywrapClientConfigBuilder().addDefaults().build();

  const client = new PolywrapClient(config);

Invoke

Invoke a wrapper.

  const result = await client.invoke({
    uri: "wrapscan.io/polywrap/logging@1",
    method: "info",
    args: {
      message: "Hello World!"
    }
  });

  if (!result.ok) throw result.error;

  const value = result.value;

Reference

Configuration

Below you will find a reference of object definitions which can be used to configure the Polywrap client. Please note that the intended way of configuring the client is to use the PolywrapClientConfigBuilder, as explained above.

PolywrapClient

Constructor

  /**
   * Instantiate a PolywrapClient
   *
   * @param config - a client configuration
   */
  constructor(config?: CoreClientConfig) 

FAQs

Package last updated on 21 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc