Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/polywrap/javascript-client
https://github.com/polywrap/javascript-client
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/polywrap/javascript-client
- Owner: polywrap
- License: mit
- Created: 2023-03-21T15:11:37.000Z (almost 2 years ago)
- Default Branch: origin-dev
- Last Pushed: 2023-10-31T14:47:50.000Z (about 1 year ago)
- Last Synced: 2024-11-01T10:35:27.422Z (2 months ago)
- Language: TypeScript
- Size: 20.3 MB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-polywrap - JavaScript / TypeScript
README
![polywrap-banner](https://raw.githubusercontent.com/polywrap/branding/master/assets/banner.png)
# Javascript Client
Implementation of the Polywrap client in JavaScript.
## Installation
```
npm install @polywrap/client
# or
yarn add @polywrap/client
```## Getting Started
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.
```typescript
import {
PolywrapClient,
PolywrapClientConfigBuilder
} from "@polywrap/client";const builder = new PolywrapClientConfigBuilder();
builder.addBundle("sys");
const client = new PolywrapClient(builder.build());const result = await client.invoke({
uri: "wrapscan.io/polywrap/[email protected]",
method: "info",
args: {
message: "Hello from hello world wrap!",
}
});if (!result.ok) {
throw Error("Log message error: " + result.error);
}
```
# Resources
- [Javascript Client Reference Documentation](https://polywrap.github.io/javascript-client/)
- [Polywrap Documentation](https://docs.polywrap.io/)
- [Examples](./examples/)
- [Features supported](https://github.com/polywrap/client-readiness/tree/main/clients/js/src/features)# Support
For any questions or problems, please visit our [Discord](https://discord.polywrap.io).