0.12.2 • Published 9 months ago

@polywrap/client-js v0.12.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@polywrap/client-js

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) 
0.12.0

10 months ago

0.12.1

9 months ago

0.12.2

9 months ago

0.12.0-pre.1

10 months ago

0.11.0

11 months ago

0.10.1

1 year ago

0.10.0-pre.14

1 year ago

0.10.0

1 year ago

0.9.7

1 year ago

0.10.0-pre.13

1 year ago

0.10.0-pre.12

1 year ago

0.10.0-pre.11

1 year ago

0.10.0-pre.10

1 year ago

0.9.6

1 year ago

0.9.5

1 year ago

0.10.0-pre.8

1 year ago

0.10.0-pre.7

1 year ago

0.10.0-pre.6

1 year ago

0.10.0-pre.3

1 year ago

0.10.0-pre.4

1 year ago

0.10.0-pre.1

1 year ago

0.10.0-pre.5

1 year ago

0.9.4

2 years ago

0.9.3

2 years ago

0.10.0-pre.0

2 years ago

0.9.0

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.8.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago