# @nymproject/sdk-full-fat

> #### ⚠ WARNING: ESM with inline blobs ⚠ #### Please note: this is an ESM package targeting ES6. Use this when you have bundling issues. It includes inline blobs that will interfere with CSPs that disallow them.

Latest version **1.4.1** (published 2025-11-07) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @nymproject/sdk-full-fat
pnpm add @nymproject/sdk-full-fat
yarn add @nymproject/sdk-full-fat
bun add @nymproject/sdk-full-fat
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2025-11-07 |
| First published | 2023-08-07 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nym Technologies SA |
| Maintainers | nymtech, jstuczyn, mmsinclair, nymbot |

## Links

- npm: https://www.npmjs.com/package/@nymproject/sdk-full-fat
- npm.io page: https://npm.io/package/@nymproject/sdk-full-fat

## Recent versions

- 1.4.1 (latest) — 2025-11-07
- 1.4.1-rc3 — 2025-11-07
- 1.4.1-rc2 — 2025-11-07
- 1.4.1-rc1 — 2025-11-05
- 1.4.1-rc0 — 2025-11-04
- 1.4.0-rc.0 — 2025-01-15
- 1.2.4-rc.1 — 2023-11-14
- 1.2.4-rc.0 — 2023-11-07
- 1.2.3 — 2023-11-06
- 1.2.3-rc.0 — 2023-11-06
- 1.2.2 — 2023-11-03
- 1.2.1 — 2023-11-02
- 1.2.0 — 2023-10-11
- 1.2.0-rc.10 — 2023-10-02
- 1.2.0-rc.9 — 2023-09-22
- … 9 more at https://npm.io/package/@nymproject/sdk-full-fat/versions

## README

# Nym SDK (Typescript) - 🥛🥛🥛 Full Fat

#### ⚠ WARNING: ESM with inline blobs ⚠
#### Please note: this is an ESM package targeting ES6. Use this when you have bundling issues. It includes inline blobs that will interfere with CSPs that disallow them.

## Find the right package for you

Browsers:
- **`ESM` 🥛** - [@nymproject/sdk](https://www.npmjs.com/package/@nymproject/sdk), not bundled, use `import` syntax, you will need to bundle it
- **`ESM` 🥛🥛🥛** - [@nymproject/sdk-full-fat](https://www.npmjs.com/package/@nymproject/sdk-full-fat), use `import` syntax, pre-bundled with inlined workers and WASM bundles 
- **`CJS` 🥛** - [@nymproject/sdk](https://www.npmjs.com/package/@nymproject/sdk-commonjs), targets ES5, not bundled, you will need to bundle it
- **`CJS` 🥛🥛🥛** - [@nymproject/sdk-full-fat](https://www.npmjs.com/package/@nymproject/sdk-commonjs-full-fat), targets ES5, pre-bundled with inlined workers and WASM bundles

NodeJS:
- **`ESM`** - [@nymproject/sdk-nodejs](https://www.npmjs.com/package/@nymproject/sdk-nodejs), use `import` syntax in NodeJS 18 and later 
- **`CJS`** - [@nymproject/sdk-nodejs-cjs](https://www.npmjs.com/package/@nymproject/sdk-nodejs-cjs), use `require` syntax in older NodeJS versions

Why have all these variations? Each project is different, so hopefully we have something for you!

Choose a package depending on how your project is transpiled and packaged:

- `ESM`: use `import` syntax and have your bundler copy the WASM bundles into your output distribution
- `CJS`: you have an older project that needs ES5 Javascript
- `nodejs`: you want to write your project server-side or locally without the browser on NodeJS

And then, to use `*-full-fat` or not, how do I choose? We have `*-full-fat` packages that are pre-bundled by including all web-workers and WASM as inline Base64.

Use the `*-full-fat` packages when you have trouble changing your bundler settings, or you can use an open CSP.

----------------------------

## TL;DR

Include the SDK in your project:

```
npm install @nymproject/sdk
```

Open a connection to a Gateway on the Nym Mixnet:

```ts
import { createNymMixnetClient } from '@nymproject/sdk';

const main = async () => {
  const nym = await createNymMixnetClient();

  const nymApiUrl = 'https://validator.nymtech.net/api';

  // show message payload content when received 
  nym.events.subscribeToTextMessageReceivedEvent((e) => {
    console.log('Got a message: ', e.args.payload);
  });

  // start the client and connect to a gateway
  await nym.client.start({
    clientId: 'My awesome client',
    nymApiUrl,
  });

  // send a message to yourself
  const payload = 'Hello mixnet';
  const recipient = nym.client.selfAddress();
  nym.client.send({ payload, recipient });
  
};
```

This will start the WASM client on a worker thread, so that your code can stay nice and snappy.

Send a message to another user (you will need to know their address at a Gateway):

```ts
  const payload = 'Hello mixnet';
  const recipient = '<< RECIPIENT ADDRESS GOES HERE >>';
  await nym.client.send({ payload, recipient });
```

---
_Source: https://npm.io/package/@nymproject/sdk-full-fat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
