open-index/open-npm huggingface dataset:
npm package: @polyvharmony/common-libs
Description: polyv common-libs
Author: POLYV
Latest version: 1.0.3-dev.260313.2

POLYV 鸿蒙基础组件项目
===

### 1 简介
此项目是保利威鸿蒙基础组件 SDK

完整的业务项目见
- [直播多场景](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)
- [点播播放器](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/common-libs
```
npm package: @polyvharmony/httpdns-api
Description: httpdns-api
Author: POLYV
Latest version: 1.0.3

POLYV 鸿蒙 HttpDns 项目
===

### 1 简介
此项目是保利威鸿蒙 HttpDns SDK

完整的点播项目介绍见 [鸿蒙播放器项目](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

完整的直播项目介绍见 [鸿蒙多场景项目](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/httpdns-api
```
npm package: @polyvharmony/httpdns-impl-ali
Description: httpdns-impl-ali
Author: POLYV
Latest version: 1.0.3

POLYV 鸿蒙 HttpDns 项目
===

### 1 简介
此项目是保利威鸿蒙 HttpDns SDK

完整的点播项目介绍见 [鸿蒙播放器项目](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

完整的直播项目介绍见 [鸿蒙多场景项目](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/httpdns-impl-ali
```
npm package: @polyvharmony/httpdns-impl-local
Description: httpdns-impl-local
Author: POLYV
Latest version: 1.0.3

POLYV 鸿蒙 HttpDns 项目
===

### 1 简介
此项目是保利威鸿蒙 HttpDns SDK

完整的点播项目介绍见 [鸿蒙播放器项目](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

完整的直播项目介绍见 [鸿蒙多场景项目](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/httpdns-impl-local
```
npm package: @polyvharmony/live-scenes-foundation
Description: polyv live-scenes-foundation
Author: POLYV
Latest version: 1.5.0

POLYV 鸿蒙多场景项目
===

### 1 简介
此项目是保利威鸿蒙多场景 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/live-scenes-foundation
```

### 3 使用说明

多场景 SDK 需在模块 Ability 的 onWindowStageCreate 方法中进行初始化，您可以参考 demo 项目中的`PLVEntryAbility`类：

```ts
PLVLiveSceneSDK.init(context, windowStage)
```
npm package: @polyvharmony/live-scenes-sdk
Description: polyv live-scenes-sdk
Author: POLYV
Latest version: 1.5.0

POLYV 鸿蒙多场景项目
===

### 1 简介
此项目是保利威鸿蒙多场景 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/live-scenes-sdk
```

### 3 使用说明

多场景 SDK 需在模块 Ability 的 onWindowStageCreate 方法中进行初始化，您可以参考 demo 项目中的`PLVEntryAbility`类：

```ts
PLVLiveSceneSDK.init(context, windowStage)
```
npm package: @polyvharmony/media-cast
Description: polyv media-cast
Author: POLYV
Latest version: 1.0.1

POLYV 鸿蒙基础组件项目
===

### 1 简介

此项目是保利威鸿蒙基础组件 SDK

完整的业务项目见

- [直播多场景](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)
- [点播播放器](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/media-cast
```
npm package: @polyvharmony/media-player-business
Description: polyv media-player-business
Author: POLYV
Latest version: 2.7.2

POLYV 鸿蒙播放器项目
===

### 1 简介
此项目是保利威鸿蒙播放器 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/media-player-business
```
npm package: @polyvharmony/media-player-core-api
Description: polyv media-player-core-api
Author: POLYV
Latest version: 2.7.2

POLYV 鸿蒙播放器项目
===

### 1 简介
此项目是保利威鸿蒙播放器 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/media-player-core-api
```
npm package: @polyvharmony/media-player-core-ijk
Description: polyv media-player-core-ijk
Author: POLYV
Latest version: 2.7.2

POLYV 鸿蒙播放器项目
===

### 1 简介
此项目是保利威鸿蒙播放器 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/media-player-core-ijk
```
npm package: @polyvharmony/media-player-foundation
Description: polyv media-player-foundation
Author: POLYV
Latest version: 2.7.2

POLYV 鸿蒙播放器项目
===

### 1 简介
此项目是保利威鸿蒙播放器 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/media-player-foundation
```
npm package: @polyvharmony/media-player-sdk
Description: polyv media-player-sdk
Author: POLYV
Latest version: 2.7.2

POLYV 鸿蒙播放器项目
===

### 1 简介
此项目是保利威鸿蒙播放器 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/media-player-sdk
```
npm package: @polyvharmony/media-player-sdk-addon-business
Description: polyv media-player-sdk-addon-business
Author: POLYV
Latest version: 2.7.2

POLYV 鸿蒙播放器项目
===

### 1 简介
此项目是保利威鸿蒙播放器 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/media-player-sdk-addon-business
```
npm package: @polyvharmony/media-player-sdk-addon-cache-down
Description: polyv media-player-sdk-addon-cache-down
Author: POLYV
Latest version: 2.7.2

POLYV 鸿蒙播放器项目
===

### 1 简介
此项目是保利威鸿蒙播放器 SDK

完整的项目介绍见 [Github 仓库](https://github.com/polyv/polyv-harmony-media-player-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/media-player-sdk-addon-cache-down
```
npm package: @polyvharmony/rtc-core-artc
Description: rtc-core-artc
Author: POLYV
Latest version: 1.4.0-v4.4.2

POLYV 鸿蒙 RTC 项目
===

### 1 简介
此项目是保利威鸿蒙 RTC SDK

完整的项目介绍见 [鸿蒙多场景项目](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/rtc-core-artc
```
npm package: @polyvharmony/rtc-core-trtc
Description: rtc-core-trtc
Author: POLYV
Latest version: 1.4.0-v12.3.0.6950

POLYV 鸿蒙 RTC 项目
===

### 1 简介
此项目是保利威鸿蒙 RTC SDK

完整的项目介绍见 [鸿蒙多场景项目](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/rtc-core-trtc
```
npm package: @polyvharmony/rtc-core-vrtc
Description: rtc-core-vrtc
Author: POLYV
Latest version: 1.4.0-v3.60.151150

POLYV 鸿蒙 RTC 项目
===

### 1 简介
此项目是保利威鸿蒙 RTC SDK

完整的项目介绍见 [鸿蒙多场景项目](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/rtc-core-vrtc
```
npm package: @polyvharmony/rtc-sdk
Description: rtc-sdk
Author: POLYV
Latest version: 1.4.0

POLYV 鸿蒙 RTC 项目
===

### 1 简介
此项目是保利威鸿蒙 RTC SDK

完整的项目介绍见 [鸿蒙多场景项目](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo)

### 2 下载安装

```shell
ohpm install @polyvharmony/rtc-sdk
```
npm package: @polywrap/asyncify-js
Description: Async Wasm Imports Support Using Asyncify
Latest version: 0.12.2

# @polywrap/asyncify-js

A 0 dependency wrapper around the Node.JS & Browser `WebAssembly` instance, which adds support for [`asyncify`](https://emscripten.org/docs/porting/asyncify.html), enabling the use of async host import functions.

## Usage

```typescript
import { AsyncWasmInstance } from "@polywrap/asyncify-js";

// module.wasm must be asyncify enabled
const module: ArrayBuffer = getModule("./module.wasm");
const memory = new WebAssembly.Memory({ initial: 1 });

const instance = await AsyncWasmInstance.createInstance({
  module,
  imports: {
    my: {
      custom_import: async (arg: number): Promise<number> => {
        return await someAsyncCall(arg);
      }
    },
    env: {
      memory
    }
  }
});

await instance.exports.main();
```
npm package: @polywrap/cli-js
Description: Programmatically execute the Polywrap CLI
Latest version: 0.12.2

# @polywrap/cli-js

Programmatically execute the Polywrap CLI

# Description

It allows user execute Polywrap CLI commands programmatically, with simple and type-safe methods.

# Usage

Build a wrapper:
``` typescript
import { Commands } from "@polywrap/cli-js";

async function main() {
  const wrapperPath = "/path/to/wrapper";

  const res = await Commands.build(
    { }, // build command options
    { cwd: wrapperPath }
  );

  console.log(res.stdout);
  console.log(res.stderr);
  console.log(res.exitCode);
}
```

# Reference

TODO
npm package: @polywrap/client-js
Description: Polywrap JavaScript Client
Latest version: 0.12.2

# @polywrap/client-js
<a href="https://www.npmjs.com/package/@polywrap/client-js" target="_blank" rel="noopener noreferrer">
<img src="https://img.shields.io/npm/v/@polywrap/client-js.svg" alt="npm"/>
</a>

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

## Installation

```bash
npm install --save @polywrap/client-js
```

## Usage

### Instantiate

Use the PolywrapClient [constructor](#constructor) to instantiate the client with the default configuration bundle.

```ts
  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.

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

  const client = new PolywrapClient(config);
```

### Invoke

Invoke a wrapper.

```ts
  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
```ts
  /**
   * Instantiate a PolywrapClient
   *
   * @param config - a client configuration
   */
  constructor(config?: CoreClientConfig) 
```
npm package: @polywrap/concurrent-plugin-js
Description: Run wrap invocations concurrently using promises
Latest version: 0.12.0

# @polywrap/concurrent-plugin-js

The Concurrent plugin enables wraps running within the Polywrap client to run multiple invocations in parallel. This implementation utilizes JavaScript Promises for concurrent tasks.

## Interface

The Concurrent plugin implements an existing wrap interface at `wrapscan.io/polywrap/concurrent@1.0`.

## Usage

Add the concurrent plugin to the Polywrap client's configuration:
```typescript
import { PolywrapClient, ClientConfigBuilder } from "@polywrap/client-js";
import { concurrentPromisePlugin } from "@polywrap/concurrent-plugin-js";

const config = new ClientConfigBuilder()
  .addPackage(
    "wrapscan.io/polywrap/concurrent@1.0",
    concurrentPromisePlugin({ })
  )
  .build();

const client = new PolywrapClient();
```

Now wraps that depend upon the concurrent interface will be using the "concurrent promise plugin" implementation.

For more usage examples see `src/__tests__`.
npm package: @polywrap/datetime-plugin-js
Description: Polywrap Datetime Plugin
Latest version: 0.12.0

# @polywrap/datetime-plugin-js
The Datetime plugin implements the `datetime-interface` @ [wrapscan.io/polywrap/datetime@1.0](../../interface/) (see [./polywrap.graphql](./polywrap.graphql)). It provides access to the current unix timestamp of the host operating system.

## Usage
### 1. Configure Client
When creating your Polywrap JS client, add the datetime plugin:
```typescript
import { ClientConfigBuilder } from "@polywrap/client-config-builder-js";
import { PolywrapClient } from "@polywrap/client-js";
import { datetimePlugin } from "@polywrap/datetime-plugin-js";

const config = new ClientConfigBuilder()
  // 1. Add the plugin package @ an arbitrary URI
  .addPackage(
    "plugin/datetime",
    datetimePlugin({ })
  )
  // 2. Register this plugin as an implementation of the interface
  .addInterfaceImplementation(
    "wrapscan.io/polywrap/datetime@1.0",
    "plugin/datetime"
  )
  // 3. Redirect invocations @ the interface to the plugin (default impl)
  .addRedirect(
    "wrapscan.io/polywrap/datetime@1.0",
    "plugin/datetime"
  )
  .build();

const client = new PolywrapClient(config);
```

### 2. Invoke the Datetime Plugin
Invocations to the datetime plugin can be made via the interface URI (which will get redirected), or the plugin's URI directly:
```typescript
await client.invoke({
  uri: "wrapscan.io/polywrap/datetime@1.0" | "plugin/datetime",
  method: "currentTimestamp"
});
```
npm package: @polywrap/ens-resolver-plugin-js
Description: Polywrap ENS Javascript Plugin
Latest version: 0.9.7

# @polywrap/ens-resolver-plugin-js

ENS Resolver Plugin allows the Polywrap JS Client to resolve URIs from the [Ethereum Name Service](https://ens.domains/).

## Usage

``` typescript
import {
  initTestEnvironment,
  providers,
  ensAddresses,
  stopTestEnvironment,
  buildAndDeployWrapper,
} from "@polywrap/test-env-js";
import { ethereumPlugin, Connections, Connection } from "@polywrap/ethereum-plugin-js";
import { ipfsPlugin } from "@polywrap/ipfs-plugin-js";
import { ensPlugin } from "@polywrap/ens-plugin-js";

// query a wrapper with an ENS path
export async function foo({

  // spin up docker containers with Ganache and IPFS.
  await initTestEnvironment();

  // initialize Ethereum Connections store
  const connections: Connections = new Connections({
    networks: {
      testnet: new Connection({
        provider: providers.ethereum,
      }),
    },
    defaultNetwork: "testnet",
  });

  // initialize the client with eth, ipfs, ens plugins
  client = new PolywrapClient({
    plugins: [
      {
        uri: "wrap://ens/ethereum.polywrap.eth",
        plugin: ethereumPlugin({ connections }),
      },
      {
        uri: "wrap://ens/ipfs.polywrap.eth",
        plugin: ipfsPlugin({
          provider: providers.ipfs,
          fallbackProviders: defaultIpfsProviders,
        }),
      },
      {
        uri: "wrap://ens/ens.polywrap.eth",
        plugin: ensPlugin({
          addresses: {
            testnet: ensAddresses.ensAddress,
          },
        }),
      },
    ],
  });

  // get filesystem path
  const wrapperAbsPath = `/path/to/simple-storage`;

  // deploy a wrapper to IPFS
  let { ensDomain } = await buildAndDeployWrapper({
    wrapperAbsPath: wrapperAbsPath,
    ipfsProvider: providers.ipfs,
    ethereumProvider: providers.ethereum,
    ensName: "simple-storage.eth",
  });

  // get ENS URI
  const wrapperUriENS = `ens/testnet/${wrapperEnsDomain}`;

  // query the wrapper
  const schemaENS = await client.getManifest(wrapperUriENS)

  // we can also resolve an ENS URI in two steps
  // get IPFS URI
  const resolveUriResult = await client.resolveUri(wrapperUriEns);
  const wrapperUriIpfs = resolveUriResult.uri

  // query the wrapper
  const schemaIPFS = await resolveUriResult.wrapperIPFS?.getManifest(client);

  await stopTestEnvironment();
});
```

For more usage examples see `src/__tests__`.

## API

ENS Resolver Plugin conforms to a generic UriResolver interface that provides a tryResolveUri method to the Polywrap client and adds ENS resolution capability to every client method, e.g. getSchema, getManifest, resolveUri.
npm package: @polywrap/ethereum-plugin-js
Description: Polywrap Ethereum Javascript Plugin
Latest version: 0.9.7

# @polywrap/ethereum-plugin-js

The Ethereum plugin wrapper allows the Polywrap JS Client to interact with any [EVM based blockchain](https://ethereum.org/).

## Usage

``` typescript
import {
  ethereumPlugin,
  Connections,
  Connection
} from "@polywrap/ethereum-plugin-js";

export async function main() {

  const uri = "wrap://ens/ethereum.polywrap.eth"

  // initialize Ethereum Connections store
  const connections: Connections = new Connections({
    networks: {
      mainnet: new Connection({
        provider: "..."
      }),
      matic: new Connection({
        provider: window.ethereum
      })
    },
    defaultNetwork: "matic"
  });

  // initialize the client with the ethereum plugin
  client = new PolywrapClient({
    plugins: [
      {
        uri: uri,
        plugin: ethereumPlugin({ connections })
      }
    ]
  });

  // now you can invoke the ethereum plugin by its URI
  // NOTE: uses default network "matic"
  const getSignerAddress = await client.invoke<string>({
    uri,
    method: "getSignerAddress",
  });

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

  const address = getSignerAddress.value;

  // Get a balance from mainnet, by passing in the optional
  // "connection" argument.
  const getBalance = await client.invoke<string>({
    uri,
    method: "getBalance",
    args: {
      address: "0x...",
      connection: {
        networkNameOrChainId: "mainnet"
      }
    },
  });

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

  const balance = getBalance.value;

  console.log("Matic Signer: ", address);
  console.log("Mainnet Balance: ", balance);
}
```

For more usage examples see `src/__tests__`.

## API

Full API in `src/schema.graphql`
npm package: @polywrap/ethereum-provider-js
Description: Ethereum Provider JS Plugin
Latest version: 0.3.1

# @polywrap/ethereum-provider-js
The Ethereum Provider plugin implements the `ethereum-provider-interface` @ [ens/wraps.eth:ethereum-provider@2.0.0](https://app.ens.domains/name/wraps.eth/details) (see [../../interface/polywrap.graphql](../../interface/polywrap.graphql)). It handles Ethereum wallet transaction signatures and sends JSON RPC requests for the Ethereum wrapper.

## Usage
### 1. Configure Client
When creating your Polywrap JS client, add the ethereum provider plugin:
```typescript
import { PolywrapClient } from "@polywrap/client-js";
import { ethereumProviderPlugin } from "@polywrap/ethereum-provider-js";

const client = new PolywrapClient({
  // 1. Add the plugin package @ an arbitrary URI
  packages: [{
    uri: "plugin/ethereum-provider-js",
    package: ethereumProviderPlugin({ })
  }],
  // 2. Register this plugin as an implementation of the interface
  interfaces: [{
    interface: "ens/wraps.eth:ethereum-provider@2.0.0",
    implementations: ["plugin/ethereum-provider-js"]
  }],
});
```

### 2. Invoke The Ethereum Wrapper
Invocations to the Ethereum wrapper may trigger sub-invocations to the Ethereum Provider plugin:
```typescript
await client.invoke({
  uri: "ens/wraps.eth:ethereum@2.0.0",
  method: "getSignerAddress",
});
```
npm package: @polywrap/ethereum-wallet-js
Description: Ethereum Wallet JS Plugin
Latest version: 0.1.0

# @polywrap/ethereum-wallet-js
The Ethereum Wallet plugin implements the `ethereum-wallet-interface` @ [wrapscan.io/polywrap/ethereum-wallet@1.0](../../interface/) (see [../../interface/polywrap.graphql](../../interface/polywrap.graphql)). It handles Ethereum wallet transaction signatures and sends JSON RPC requests for the Ethereum wrapper.

## Usage
### 1. Configure Client
When creating your Polywrap JS client, add the ethereum wallet plugin:
```typescript
import { PolywrapClient } from "@polywrap/client-js";
import { ethereumWalletPlugin } from "@polywrap/ethereum-wallet-js";

const client = new PolywrapClient({
  // 1. Add the plugin package @ an arbitrary URI
  packages: [{
    uri: "plugin/ethereum-wallet",
    package: ethereumWalletPlugin({ })
  }],
  // 2. Register this plugin as an implementation of the interface
  interfaces: [{
    interface: "wrapscan.io/polywrap/ethereum-wallet@1.0",
    implementations: ["plugin/ethereum-wallet"]
  }],
});
```

### 2. Invoke The Ethereum Wrapper
Invocations to the Ethereum wrapper may trigger sub-invocations to the Ethereum Wallet plugin:
```typescript
await client.invoke({
  uri: "wrapscan.io/polywrap/ethers@1.0",
  method: "getSignerAddress",
});
```
npm package: @polywrap/file-system-plugin-js
Description: Polywrap File System Javascript Plugin
Latest version: 0.12.0

# @polywrap/file-system-plugin-js

The Filesystem plugin enables wraps running within the Polywrap client to interact with the local filesystem.

## Interface

The FileSystem plugin implements an existing wrap interface at `wrapscan.io/polywrap/file-system@1.0`.

## Usage

``` typescript
import { PolywrapClient, PolywrapClientConfigBuilder } from "@polywrap/client-js";
import { filesystemPlugin } from "@polywrap/file-system-plugin-js";

const config = new PolywrapClientConfigBuilder()
  .setPackage(
    "wrapscan.io/polywrap/file-system@1.0",
    fileSystemPlugin({ })
  )
  .build();

client.invoke<Uint8Array>({
  uri: "wrapscan.io/polywrap/file-system@1.0",
  method: "readFile",
  args: {
    path: "./file.txt"
  }
});
```

For more usage examples see `src/__tests__`.
npm package: @polywrap/fs-plugin-js
Description: Polywrap File System Javascript Plugin
Latest version: 0.9.7

# @polywrap/fs-plugin-js

Filesystem Plugin allows the Polywrap JS Client to interact with the local filesystem.

## Usage

``` typescript
import { PolywrapClient } from "@polywrap/client-js";
import { filesystemPlugin } from "@polywrap/fs-plugin-js";

// query a local wrapper
export async function foo({

  const filesystemPluginUri = "wrap://ens/fs.polywrap.eth";

  // initialize the client with eth, ipfs, ens plugins
  client = new PolywrapClient({
    plugins: [
      {
        uri: filesystemPluginUri,
        plugin: fileSystemPlugin({}),
      },
    ],
  });

  const sampleFilePath = path.resolve(__dirname, "samples/sample.txt");

  // and read from filesystem
  const response = await client.invoke<string>({
    filesystemPluginUri,
    method: "readFile",
    input: {
      path: sampleFilePath,
    },
  });

  // or instantiate the plugin
  const plugin = filesystemPlugin({});

  // and read from filesystem
  const response' = await plugin.readFile(
    { path: sampleFilePath, },
    client
  );
});
```

For more usage examples see `src/__tests__`.

## API

 - readFile
 - readFileAsString
 - writeFile
 - exists
 - mkdir
 - rm
 - rmdir
npm package: @polywrap/fs-resolver-plugin-js
Description: Polywrap File System URI Resolver Javascript Plugin
Latest version: 0.9.7

# @polywrap/fs-resolver-plugin-js

Filesystem Resolver Plugin allows the Polywrap JS Client to resolve URIs from the local filesystem.

## Usage

``` typescript
import { PolywrapClient } from "@polywrap/client-js";
import {
  initTestEnvironment,
  providers,
  ensAddresses,
  stopTestEnvironment,
  buildAndDeployWrapper,
} from "@polywrap/test-env-js";
import { filesystemResolverPlugin } from "@polywrap/fs-resolver-plugin-js";
import { filesystemPlugin } from "@polywrap/fs-plugin-js";
import { ethereumPlugin } from "@polywrap/ethereum-plugin-js";
import { ipfsPlugin } from "@polywrap/ipfs-plugin-js";
import { ensResolverPlugin } from "@polywrap/ens-resolver-plugin-js";

// query a local wrapper
export async function foo({

  // spin up docker containers with Ganache and IPFS.
  await initTestEnvironment();

  // initialize the client with fs plugins
  client = new PolywrapClient({
    plugins: [
      {
        uri: "wrap://ens/fs-resolver.polywrap.eth",
        plugin: fileSystemResolverPlugin({}),
      },
      {
        uri: "wrap://ens/fs.polywrap.eth",
        plugin: filesystemPlugin({}),
      }
    ],
  });

  // get filesystem path
  const wrapperPath = `/path/to/simple-storage`;

  // build locally
  await buildWrapper(wrapperPath);
  const buildPath = `${wrapperPath}/build`;

  // get filesystem URI
  const wrapperUriFS = `fs/${fsPath}`;

  // invoke wrapper from filesystem
  const deploy = await client.invoke<string>({
    uri: wrapperUriFS,
    method: "deployContract",
    args: {
      connection: {
        networkNameOrChainId: "testnet"
      }
    },
  });

  // query the wrapper
  const schemaFS = await client.getManifest(wrapperUriFS)

  await stopTestEnvironment();
});
```

For more usage examples see `src/__tests__`.

## API

Filesystem Resolver Plugin conforms to a generic UriResolver interface that provides tryResolveUri and getFile methods to the Polywrap client and adds filesystem resolution capability to every client method, e.g. getSchema, getManifest, resolveUri.
npm package: @polywrap/graph-node-plugin-js
Description: Polywrap Graph Node Javascript Plugin
Latest version: 0.6.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @polywrap/graph-node-plugin-js

Graph Node Plugin allows the Polywrap JS Client to send queries to the [Graph Node](https://github.com/graphprotocol/graph-node).

## Usage

``` typescript
import { graphNodePlugin } from "@polywrap/graph-node-plugin-js";
import { PolywrapClient } from "@polywrap/client-js";

export async function foo({

  const graphNodePluginURI = "ens/graph-node.polywrap.eth";
  const provider = "https://api.thegraph.com";

  // initialize client with the graph node plugin
  const client = new PolywrapClient({
    plugins: [{
      uri,
      plugin: graphNodePlugin({
        provider
      })
    }]
  });

  // and send invocations to the subgraph
  const response = await client.invoke({
    uri: graphNodePluginURI,
    method: "querySubgraph",
    args: {
      subgraphAuthor: "ensdomains",
      subgraphName: "ens",
      query: `{
        domains(first: 5) {
          id
          name
          labelName
          labelhash
        }
        transfers(first: 5) {
          id
          domain {
            id
          }
          blockNumber
          transactionID
        }
      }`
    }
  });

  // or instantiate the plugin
  const plugin = graphNodePlugin({
    provider
  });

  // and send invocations to the subgraph
  const response' = await plugin.querySubgraph({
    subgraphAuthor: "ensdomains",
    subgraphName: "ens",
    query: `{
      domains(first: 5) {
        id
        name
        labelName
        labelhash
      }
      transfers(first: 5) {
        id
        domain {
          id
        }
        blockNumber
        transactionID
      }
    }`,
  }, client)
});
```
For more usage examples see `src/__tests__`.

## API

Full API in `src/schema.graphql`
npm package: @polywrap/http-plugin-js
Description: Polywrap HTTP Javascript Plugin
Latest version: 0.12.0

# @polywrap/http-plugin-js

Http plugin currently supports two different methods `GET` and `POST`. Similar to calling axios, when defining request you need to specify a response type. Headers and query parameters may also be defined.

## Response Types

`TEXT` - The server will respond with text, the HTTP plugin will return the text as-is.

`BINARY` - The server will respond with binary data (_ArrayBuffer_), the HTTP plugin will encode as a **base64** string and return it.

## GET request

Below is sample invocation of the `GET` request with custom request headers and query parameters (`urlParams`).

```ts
const result = await client.invoke<Response>({
  uri: "wrapscan.io/polywrap/http@1.0",
  method: "get",
  args: {
    url: "http://www.example.com/api",
    request: {
      responseType: "TEXT",
      urlParams: [{key: "query", value: "foo"}],
      headers: [{key: "X-Request-Header", value: "req-foo"}],
    }
  }
})
```

## POST request

Below is sample invocation of the `POST` request with custom request headers and query parameters (`urlParams`). It is also possible to set request body as shown below.

```ts
const response = await polywrapClient.invoke<Response>({
  uri: "wrapscan.io/polywrap/http@1.0",
  method: "post",
  args: {
    url: "http://www.example.com/api",
    request: {
      responseType: "TEXT",
      urlParams: [{key: "query", value: "foo"}],
      headers: [{key: "X-Request-Header", value: "req-foo"}],
      body: "{data: 'test-request'}",
    }
  }
})
```
npm package: @polywrap/http-resolver-plugin-js
Description: Polywrap HTTP Javascript Plugin
Latest version: 0.9.7

# @polywrap/http-resolver-plugin-js

HTTP Resolver Plugin allows the Polywrap JS Client to resolve wrapper URIs using HTTP/S.

## Usage

``` typescript
import { PolywrapClient } from "@polywrap/client-js";
import {
  initTestEnvironment,
  providers,
  stopTestEnvironment,
  buildAndDeployWrapperToHttp,
} from "@polywrap/test-env-js";

import { httpResolverPlugin } from "@polywrap/http-resolver-plugin-js";

// query wrapper at HTTP URI
export async function foo({

  await initTestEnvironment();

  // deploy wrapper to local HTTP server
  let { uri } = await buildAndDeployWrapperToHttp({
    wrapperAbsPath: `/path/to/simple-storage`,
    httpProvider: providers.http,
    name: "simple-storage",
  });

  // get wrapper HTTP URI
  const wrapperUri = `http/${uri}`;

  // initialize client with the HTTP Resolver plugin
  client = new PolywrapClient({
    plugins: [
      {
        uri: "wrap://ens/http-uri-resolver.polywrap.eth",
        plugin: httpResolverPlugin({}),
      },
    ],
    interfaces: [
      {
        interface: new Uri("wrap://ens/uri-resolver.core.polywrap.eth"),
        implementations: [
          new Uri("wrap://ens/http-resolver.polywrap.eth"),
        ],
      }
    ]
  });

  // and query the wrapper over HTTP
  const response = await client.getManifest(wrapperUri)

  // we can resolve the HTTP URI in steps
  const resolveUriResult = await client.resolveUri(wrapperUri);
  const response' = await resolveUriResult.wrapper?.getManifest(client);

  await stopTestEnvironment();
})
```
For more usage examples see `src/__tests__`.

## API

HTTP Resolver Plugin conforms to a generic UriResolver interface that provides tryResolveUri and getFile methods to the Polywrap client and adds HTTP resolution capability to every client method, e.g. getManifest, resolveUri.
npm package: @polywrap/ipfs-plugin-js
Description: Polywrap IPFS Javascript Plugin
Latest version: 0.9.7

# @polywrap/ipfs-plugin-js

IPFS Plugin allows the Polywrap JS Client to interact with [IPFS](https://ipfs.io/).

## Usage

``` typescript
import { PolywrapClient } from "@polywrap/client-js";
import {
  initTestEnvironment,
  providers,
  stopTestEnvironment,
} from "@polywrap/test-env-js";
import { ipfsPlugin } from "@polywrap/ipfs-plugin-js";
import createIpfsClient from "@polywrap/ipfs-http-client-lite";

// IPFS
export async function foo({

  await initTestEnvironment();

  const ipfsPluginUri = "wrap://ens/ipfs.polywrap.eth";

  ipfs = createIpfsClient(providers.ipfs);
  const sampleFileTextContents = "Hello World!";
  const sampleFileBuffer = Buffer.from(sampleFileTextContents, "utf-8");
  let ipfsAddResult = await ipfs.add(sampleFileBuffer);

  // initialize client with the ipfs plugin
  client = new PolywrapClient({
    plugins: [
      {
        uri: ipfsPluginUri,
        plugin: ipfsPlugin({
          provider: providers.ipfs,
        }),
      },
    ],
  });

  // and query ipfs
  const response = await client.invoke<string>({
    ipfsPluginUri,
    method: "cat",
    input: {
      cid: sampleFileIpfsInfo.hash.toString(),
    },
  });

  // or instantiate the plugin
  const plugin = ipfsPlugin({
    provider: providers.ipfs,
  });

  // and query ipfs
  const response' = await plugin.cat(
    { cid: sampleFileIpfsInfo.hash.toString() },
    client
  );

  await stopTestEnvironment();
})
```

For more usage examples see `src/__tests__`.

## API

Full API in `src/schema.graphql`
npm package: @polywrap/ipfs-resolver-plugin-js
Description: Polywrap IPFS Javascript Plugin
Latest version: 0.9.7

# @polywrap/ipfs-resolver-plugin-js

IPFS Resolver Plugin allows the Polywrap JS Client to resolve wrapper URIs from IPFS.

## Usage

``` typescript
import { PolywrapClient } from "@polywrap/client-js";
import {
  initTestEnvironment,
  providers,
  stopTestEnvironment,
  buildAndDeployWrapper,
} from "@polywrap/test-env-js";

import { ipfsPlugin } from "@polywrap/ipfs-plugin-js";
import { ipfsResolverPlugin } from "@polywrap/ipfs-resolver-plugin-js";
import createIpfsClient from "@polywrap/ipfs-http-client-lite";

// query wrapper at IPFS path
export async function foo({

  await initTestEnvironment();

  ipfs = createIpfsClient(providers.ipfs);

  // deploy wrapper to IPFS
  let { ipfsCid } = await buildAndDeployWrapper({
    wrapperAbsPath: `/path/to/simple-storage`,
    ipfsProvider: providers.ipfs,
    ethereumProvider: providers.ethereum,
    ensName: "simple-storage.eth",
  });

  // get wrapper CID
  const wrapperIpfsCid = ipfsCid;

  // get wrapper IPFS URI
  const wrapperUri = `ipfs/${wrapperIpfsCid}`;

  // initialize client with the ipfs and resolver plugins
  client = new PolywrapClient({
    plugins: [
      {
        uri: "wrap://ens/ipfs.polywrap.eth",
        plugin: ipfsPlugin({
          provider: providers.ipfs,
        }),
      },
      {
        uri: "wrap://ens/ipfs-uri-resolver.polywrap.eth",
        plugin: ipfsResolverPlugin({}),
      },
    ],
  });

  // and query the wrapper at IPFS
  const response = await client.getManifest(wrapperUriENS)

  // we can also resolve the IPFS URI in steps
  // get IPFS URI
  const resolveUriResult = await client.resolveUri(wrapperUri);
  const response' = await resolveUriResult.wrapper?.getManifest(client);

  await stopTestEnvironment();
})
```
For more usage examples see `src/__tests__`.

## API

IPFS Resolver Plugin conforms to a generic UriResolver interface that provides tryResolveUri and getFile methods to the Polywrap client and adds IPFS resolution capability to every client method, e.g. getSchema, getManifest, resolveUri.
npm package: @polywrap/logger-plugin-js
Description: Logger plugin wrapper, for use with the JS Polywrap client.
Latest version: 0.12.0

# @polywrap/logger-plugin-js
The Logger plugin implements the `logger-interface` @ [wrapscan.io/polywrap/logger@1.0.0](../../interface/) (see [./polywrap.graphql](./polywrap.graphql)). By default, it logs all events using the Javascript `console` global object. You can circumvent this functionality by setting the `logFunc` property on the plugin's config (examples below).

## Usage
### 1. Configure Client
When creating your Polywrap JS client, add the logger plugin:
```typescript
import { PolywrapClient, ClientConfigBuilder } from "@polywrap/client-js";
import { loggerPlugin } from "@polywrap/logger-plugin-js";

const config = new ClientConfigBuilder()
  // 1. Add the plugin package @ an arbitrary URI
  .addPackage(
    "plugin/logger",
    loggerPlugin({ })
  )
  // 2. Register this plugin as an implementation of the interface
  .addInterfaceImplementation(
    "wrapscan.io/polywrap/logger@1.0",
    "plugin/logger"
  )
  // 3. Redirect invocations @ the interface to the plugin (default impl)
  .addRedirect(
    "wrapscan.io/polywrap/logger@1.0",
    "plugin/logger"
  )
  .build();

const client = new PolywrapClient(config));
```

### 2. Invoke The Logger
Invocations to the logger plugin can be made via the interface URI (which will get redirected), or the plugin's URI directly:
```typescript
await client.invoke({
  uri: "wrapscan.io/polywrap/logger@1.0" | "plugin/logger",
  method: "log",
  args: {
    level: "INFO",
    message: "foo bar baz"
  }
});
```

### 3. Customize The Logger
When adding the logger to your client, you can add your own custom log function:
```typescript
const config = new ClientConfigBuilder()
  .addPackage(
    "plugin/logger",
    loggerPlugin({
      logFunc: (level: string, message: string): void => {
        // add your own logic here...
      }
    })
  )
  .build();

const client = new PolywrapClient(config);
```

### 4. Add Multiple Loggers
Multiple logger implementations can be added to the client:
```typescript
const config = new ClientConfigBuilder()
  .addPackage(
    "plugin/logger",
    loggerPlugin({ })
  )
  .addPackage(
    "plugin/custom-logger",
    loggerPlugin({ logFunc: ... })
  )
  .addInterfaceImplementations(
    "wrapscan.io/polywrap/logger@1.0",
    ["plugin/logger", "plugin/custom-logger"]
  )
  .addRedirect(
    "wrapscan.io/polywrap/logger@1.0",
    "plugin/logger"
  )
  .build();

const client = new PolywrapClient(config);
```

### 5. Invoke All Logger Implementations
When you'd like to log something to more than one logger, you can invoke all implementations of the logger interface:
```typescript
const result = await client.getImplementations(
  "wrapscan.io/polywrap/logger@1.0"
);

const implementations: string[] = result.ok ? result.value : [];

for (const impl of implementations) {
  await client.invoke({
    uri: impl,
    method: "log",
    args: {
      level: "INFO",
      message: "message"
    }
  });
}
```
npm package: @polywrap/msgpack-js
Description: WRAP MsgPack Encoding
Latest version: 0.12.2

# @polywrap/msgpack-js

TypeScript / JavaScript implementation of the WRAP MsgPack encoding standard.

## Usage

```typescript
import { msgpackEncode, msgpackDecode } from "@polywrap/msgpack-js";

const test = {
  foo: 5,
  bar: [true, false],
  baz: {
    prop: "value"
  }
};

const encoded: Uint8Array = msgpackEncode(test);

const decoded = msgpackDecode(encoded);

expect(decoded).toEqual(test);
```
npm package: @polywrap/package-validation
Description: Polywrap Package Validator
Latest version: 0.12.2

# @polywrap/package-validation

## Description 

Utilities for the validation of WRAP packages. Allows to implement custom constraints to
check if a WRAP package is valid

The main two entities here are `WasmPackageValidator` and `FileSystemPackageReader`

## Usage

```typescript
import { WasmPackageValidator, FileSystemPackageReader } from "@polywrap/package-validation"

// Size unit is KB
const validator = new WasmPackageValidator({
    maxSize: 1_000_000,
    maxFileSize: 1_000_000,
    maxModuleSize: 1_000_000,
    maxNumberOfFiles: 10,
});

const reader = new FileSystemPackageReader("absolute/path/to/package/folder")
const result = await validator.validate(result)
```
npm package: @polywrap/polywrap-manifest-schemas
Description: Polywrap Manifest Schemas
Latest version: 0.12.2

# @polywrap/polywrap-manifest-schemas
Versioned formats of the various Polywrap toolchain manifests:
* [`polywrap`](./formats/polywrap/)
* [`polywrap.app`](./formats/polywrap.app/)
* [`polywrap.plugin`](./formats/polywrap.plugin/)
* [`polywrap.build`](./formats/polywrap.build/)
* [`polywrap.deploy`](./formats/polywrap.deploy/)
* [`polywrap.infra`](./formats/polywrap.infra/)
npm package: @polywrap/react
Description: Polywrap React Integration
Latest version: 0.11.0

# @polywrap/react

A React library that simplifies the integration of Polywrap wrappers into React applications. Instantiates the Polywrap Client, send WRAP invocations, and renders the results.

## Documentation
https://docs.polywrap.io/reference/clients/js/libraries/react

## Installation

```bash
npm install @polywrap/react
```

## Usage

### **PolywrapProvider**

Once installed, the first step is to add the `PolywrapProvider` to your DOM. This will instantiate an instance of the `PolywrapClient` for all queries within the nested DOM hierarchy to use.

To use the provider, simply wrap it around whatever DOM hierarchy you'd like to use Polywrap within:

```jsx
import React from 'react';
import { PolywrapProvider } from '@polywrap/react';

export const App: React.FC = () => {
  return (
    <PolywrapProvider>
        <HelloWorld />
    </PolywrapProvider>
  );
};
```

#### **PolywrapProvider Props**

The `PolywrapProvider` component's props are the same as the `PolywrapClient` constructor's arguments. For example, you can configure URI redirects like so:

```jsx
<PolywrapProvider redirects={ [] }/>
```

#### **Multiple PolywrapProviders**

If you need to use multiple providers, you can do so using the `createPolywrapProvider("...")` method, which accepts the name of your provider as an argument. For example:

```jsx
import { createPolywrapProvider } from '@polywrap/react';

const CustomPolywrapProvider = createPolywrapProvider('custom');

export const CustomProvider = ({ children }: { children: JSX.Element }) => {
  return (
    <CustomPolywrapProvider>
      {children}
    </CustomPolywrapProvider>
  );
};
```

### **usePolywrapClient**

You can obtain a copy of the client instance from your `PolywrapProvider` using the `usePolywrapClient` hook.

```jsx
const client = usePolywrapClient();
```

### **usePolywrapInvoke**

After enabling your React application with the PolywrapProvider, you may now use the `usePolywrapInvoke` hook to call into wrappers!

```jsx
const { execute, data, error, loading } = usePolywrapInvoke({
  uri: 'ens/helloworld.polytest.eth',
  method: "logMessage",
  args: {
    message: "Hello World!",
  },
});
```

By default, the `usePolywrapInvoke` hook uses the first PolywrapProvider found in the DOM's hierarchy. If you'd like to specify a specific provider to be used, simply set the `provider:` property:

```jsx
const { execute, data, error, loading } = usePolywrapInvoke({
  provider: "custom",
  uri: 'ens/helloworld.polytest.eth',
  method: "logMessage",
  args: {
    message: "Hello World!",
  },
});
```
npm package: @polywrap/schema-bind
Description: Polywrap Schema Binding
Latest version: 0.12.2

# @polywrap/schema-bind

Bind WRAP ABIs to a variety of supported languages through codegen.

## Usage

``` typescript
import { BindOptions, BindOutput, bindSchema } from "@polywrap/schema-bind";
import { parseSchema } from "@polywrap/schema-parse";

const schema = fetch("schema.graphql");
const abi = parseSchema(schema);

const input: BindOptions = {
  projectName: "Test",
  bindLanguage: "wasm-as",
  abi,
  schema,
  outputDirAbs: "/path/to/output/dir"
};

const output: BindOutput = bindSchema(input);
```

## Details

Polywrap uses MessagePack as a common data interchange format between languages. This allows Polywrap WASM modules, authored in different languages, to be run within a single host language (JS, Rust, Python, Go, C#, C++).

MessagePack encoded data is sent between module boundaries. Decoding of the message will happen in the destination environment, using generated binding code, created by this package.

## Supported Schema Types

| GraphQL Schema Type | [MessagePack Type](https://github.com/msgpack/msgpack/blob/master/spec.md#formats) | Description |
|-|-|-|
| UInt | uint 32 | 32-bit unsigned integer. |
| UInt8 | uint 8 | 8-bit unsigned integer. |
| UInt16 | uint 16 | 16-bit unsigned integer. |
| UInt32 | uint 32 | 32-bit unsigned integer. |
| Int | int 32 | 32-bit signed integer. |
| Int8 | int 8 | 8-bit signed integer. |
| Int16 | int 16 | 16-bit signed integer. |
| Int32 | int 32 | 32-bit signed integer. |
| String | fixstr or str 8/16/32 | UTF-8 string. |
| Boolean | bool | true or false stored as 1 byte. |
| Bytes | bin 8/16/32 | array of 8-bit unsigned integer. |
| BigInt | fixstr or str 8/16/32 | UTF-8 string. |
| BigNumber | fixstr or str 8/16/32 | UTF-8 string. |
| JSON | fixstr or str 8/16/32 | UTF-8 string. |
| [Type] | fixarray or array 16/32 | Array of elements. |
| Map | Msgpack extention type | Map of key-value pairs. |
| type CustomObject {<br/>&nbsp;&nbsp;prop: Type<br/>} | fixmap or map 16/32 | Structured object. |
npm package: @polywrap/schema-compose
Description: Polywrap Schema Composition
Latest version: 0.12.2

# Polywrap Schema Compose (@polywrap/schema-compose)

Composes GraphQL schema source and typings for passing to schema-bind.

## Usage

``` typescript
import path from "path";
import { readFileSync } from "fs";
import { ComposerOptions, ComposeFilter, composeSchema } from "@polywrap/schema-compose";
import { TypeInfo } from "@polywrap/schema-parse";

const schemaPath = "input/module.graphql"

const schema = readFileSync(schemaPath);

const resolveExternal = (uri: string): Promise<string> => {
  return Promise.resolve(readFileSync(`imports-ext/${uri}/schema.graphql`) || "");
};

const resolveLocal = (path: string): Promise<string> => {
  return Promise.resolve(readFileSync(path) || "");
};

const input: ComposerOptions = {
  schemas: [{
    schema,
    absolutePath,
  }],
  abiResolver: (
    importFrom: string,
    schemaFile: SchemaFile
  ) => Promise<Abi | SchemaFile> => {
    ...
  },
  output: ComposerFilter.All
};

const output: ComposerOutput = composeSchema(input);

const { schema: string, typeInfo: TypeInfo } = output;

```
npm package: @polywrap/schema-parse
Description: Polywrap Schema Parsing
Latest version: 0.12.2

# @polywrap/schema-parse

Parse & validate WRAP schemas, converting them into a WRAP ABI structure. Optionally perform transformations upon the WRAP ABI.

## Usage
```typescript
import {
  Abi,
  parseSchema,
  ParserOptions
} from "@polywrap/schema-parse";

const schema = readFileSync("module.graphql", "utf-8");
const options: ParserOptions = { };

const abi: Abi = parseSchema(schema, options);
```

### Options
```typescript
interface ParserOptions {
  // Disable schema validation
  noValidate?: boolean;
  // Use custom validators
  validators?: SchemaValidatorBuilder[];
  // Use custom extractors
  extractors?: SchemaExtractorBuilder[];
  // Use custom transformations
  transforms?: AbiTransforms[];
}
```

### ABI Transforms
ABI transformations can be used to modify the ABI structure. A variety of pre-defined transformations can be found in the ./src/transform/ directory.

Example:
```typescript
import {
  Abi,
  AbiTransforms,
  GenericDefinition,
  parseSchema
} from "@polywrap/schema-parse";

function extendType(extension: any): AbiTransforms {
  return {
    enter: {
      Abi: (abi: Abi) => ({
        ...abi,
        extension,
      }),
      GenericDefinition: (def: GenericDefinition) => ({
        ...def,
        ...extension,
      }),
    },
  };
}
```

Usage:
```typescript
parseSchema(schema, {
  transforms: [
    extendType({ newProp: "foo" })
  ]
});
```
npm package: @polywrap/sha3-plugin-js
Description: Polywrap SHA3 Javascript Plugin
Latest version: 0.6.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @polywrap/sha3-plugin-js

SHA3 Plugin provides the Polywrap JS Client with SHA-3 / Keccak / Shake hash functions.

## Usage

``` typescript
import { PolywrapClient } from "@polywrap/client-js"
import { sha3Plugin } from "@polywrap/sha3-plugin-js";

export async function foo({

  const sha3PluginUri = "wrap://ens/sha3.polywrap.eth";

  const client = new PolywrapClient({
    plugins: [
      {
        uri: sha3PluginUri,
        plugin: sha3Plugin({}),
      },
    ]
  });

  const response = await client.invoke<string>({
    uri: sha3PluginUri,
    method: "sha3_512",
    args: {
      message: "test message to hash"
    }
  })
})
```

## API

Full API in `src/schema.graphql`
npm package: @polywrap/test-env-js
Description: Polywrap Test Helpers
Latest version: 0.9.7

# @polywrap/test-env-js

Provides functions to setup a test environment with Polywrap CLI and Docker.

# Description

It allows user to initiate the test environment through a javascript function (it's the `infra` command in the CLI). It also exports the providers and ens addresses expected in the deployments (They are hard coded, because the initiation of the environment is deterministic)

# Usage

Initialization with the simple-storage wrapper.

``` typescript
import path from "path";
import { PolywrapClient } from "@polywrap/client-js";
import {
  buildWrapper,
  initTestEnvironment,
  stopTestEnvironment,
  providers,
  ensAddresses
} from "@polywrap/test-env-js";
import * as App from "../types/wrap";

// test wrapper in a test environment
export async function foo({
  // spin up docker containers for Ganache and IPFS.
  await initTestEnvironment();
  const CONNECTION = { networkNameOrChainId: "testnet" };

  // get path to the wrapper in testing
  const wrapperPath: string = path.join(path.resolve(__dirname), "..");

  // build current wrapper with CLI
  await buildWrapper(wrapperPath);

  // get URI to the local wrapper build
  const wrapperUri = `fs/${wrapperPath}/build`;

  // invoke the wrapper to deploy a contract to the test env
  const deployContractResponse = await App.SimpleStorage_Module.deployContract(
    { connection: CONNECTION },
    client,
    wrapperUri
  );
  const contractAddress = deployContractResponse.data as string;

  // invoke the wrapper to query a contract in the test env
  const response = await App.SimpleStorage_Module.getData(
    {
      address: contractAddr,
      connection: CONNECTION,
    },
    client,
    wrapperUri
  );
});

```

# API

- ensAddresses, providers - constant addresses and urls
- runCLI - run arbitrary Polywrap CLI commands
- initTestEnvironment - spin up Ganache and IPFS Docker instances 
- stopTestEnvironment - stop Docker
- buildWrapper - compile wasm and bindings
- buildAndDeployWrapper - deploy wrapper to the testnet ENS