# @effectai/effect-js

> Effect Network Javscript/Typescript SDK (for [https://effect.network](https://effect.network))

Latest version **0.3.59** (published 2023-10-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @effectai/effect-js
pnpm add @effectai/effect-js
yarn add @effectai/effect-js
bun add @effectai/effect-js
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.59 |
| Published | 2023-10-19 |
| First published | 2021-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 126 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 59 |
| Author | Effect-AI |
| Maintainers | arawak, jeisses, laurensv |
| Keywords | effect, efx, future, work, ai, crypto, blockchain, microtask, task, micro-task |

## Links

- npm: https://www.npmjs.com/package/@effectai/effect-js
- Repository: https://github.com/effectai/effect-js
- Homepage: https://github.com/effectai/effect-js#readme
- Issues: https://github.com/effectai/effect-js/issues
- npm.io page: https://npm.io/package/@effectai/effect-js

## Dependencies (5)

- [ajv](https://npm.io/package/ajv.md) ^8.12.0
- [atomicassets](https://npm.io/package/atomicassets.md) ^1.5.1
- [@wharfkit/session](https://npm.io/package/@wharfkit/session.md) ^1.0.0
- [@wharfkit/antelope](https://npm.io/package/@wharfkit/antelope.md) ^0.8.0
- [@wharfkit/wallet-plugin-privatekey](https://npm.io/package/@wharfkit/wallet-plugin-privatekey.md) ^1.0.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.3.59 (latest) — 2023-10-19
- 0.3.55 (rc) — 2023-09-25
- 0.3.14 (next) — 2022-10-02
- 0.0.33 (umd) — 2021-11-10
- 0.0.26 (es) — 2021-11-09
- 0.3.58 — 2023-10-18
- 0.3.57 — 2023-10-18
- 0.3.56 — 2023-10-17
- 0.3.54 — 2023-09-25
- 0.3.53 — 2023-09-19
- 0.3.52 — 2023-09-18
- 0.3.50 — 2023-09-18
- 0.3.49 — 2023-09-18
- 0.3.48 — 2023-09-14
- 0.3.47 — 2023-09-14
- … 188 more at https://npm.io/package/@effectai/effect-js/versions

## README

# 🔥 @effectai/effect-js

<p align="center"><img src="https://effect.network/img/logo/logo.png" width="400px"></p>

Effect Network SDK for integration with [https://effect.network](https://effect.network)

## ✒️ Installation

The official distribution for the package is available at [npm](https://www.npmjs.com/package/@effectai/effect-js).
Note that the module available under the `@effectai/effect-js` namespace is for ECMAScript modules, if you want to use the module in a CommonJS environment (require), you can use the `@effectai/effect-js@cjs` module.
Note, that if you are using NodeJS, the minimum version required is `v18`.

### ESM

```bash
npm i @effectai/effect-js
```

```js
import { EffectSdk } from "@effectai/effect-js";
```

### CommonJS

```bash
npm i @effectai/effect-js@cjs
```

```js
const { EffectSdk } = require("@effectai/effect-js");
```

## Quickstart

Take a look at the quick start [guide](https://developer.effect.network/quickstart/) to understand how to install and use the library.

## SDK-Reference

The SDK reference is available here: [SDK-Reference](https://effectai.github.io/effect-js/)

## 🦋 Development

The best way to get to know how this module works is by adding features while you can run it. So there are some examples provided to provide an idea of how to create a transaction with the Effect Network.

Clone the project

```bash
git clone https://github.com/effectai/effect-js.git
```

Install dependencies and dev-dependencies

```bash
npm ci
```

It is now possible to start compiling the typescript files to the module spec of your choice, for now, the following module specs are supported: [ESM, CommonJS]

```bash
npm run build # esmodules
npm run build:cjs # commonjs
```

Link it. Now it is possible to use `npm link` to link the compiled typescript code to your project, from the directory of your project, run the following command.

```bash
npm link /path/to/effect-js/
```

From your project folder, you should be able to import the compiled code from `effect-js`. Depending on your environment, use `import` or `require` as [described above](## ✒️ Installation).

## 🧪 Testing

The testing framework used for this project is [ViTest](https://vitest.dev) and is configured to run the tests in the `test` directory.
Remember to copy the `test/.env.test.example` file to `test/.env.test` and fill in the values for your environment.
Currently, these variables are required:

- `VITE_EOSACC=yourEosAccountName`
- `VITE_EOSPERM=yourEosAccountPermission`
- `VITE_EOSPK=yourEosAccountPrivateKey`

```bash
cp test/.env.test.example test/.env.test

npm run test
# OR
npm run test:watch
```

## 🗞 Publishing

Run the following command to build the source, increment the version, and publish the `dist` transpile code and types to the npm repository, assuming you have the correct credentials.

Make sure the git is clean, and everything has been committed, and run the following.

```bash
npm run publish:public
```

Running `publish:next` will publish a pre-release of the SDK to the npm repository. Users will need to explicitly opt-in to use it.

```bash
npm run publish:next
```

---
_Source: https://npm.io/package/@effectai/effect-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
