# @concordium/web-sdk

Latest version **12.0.2** (published 2026-01-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @concordium/web-sdk
pnpm add @concordium/web-sdk
yarn add @concordium/web-sdk
bun add @concordium/web-sdk
```

## Health

**Score 65/100 (B)** — status: stable.

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

Warnings: low downloads; large bundle.

## Facts

| | |
|---|---|
| Version | 12.0.2 |
| Published | 2026-01-26 |
| First published | 2022-05-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 17 |
| Unpacked size | 125.4 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 30 |
| Maintainers | limemloh, soerenbz, opsnpm, concordium-ci, concordium-npm-ci |

## Links

- npm: https://www.npmjs.com/package/@concordium/web-sdk
- Repository: https://github.com/Concordium/concordium-node-sdk-js
- npm.io page: https://npm.io/package/@concordium/web-sdk

## Dependencies (17)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [cbor2](https://npm.io/package/cbor2.md) ^1.12.0
- [big.js](https://npm.io/package/big.js.md) ^6.2.0
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [hash.js](https://npm.io/package/hash.js.md) ^1.1.7
- [bs58check](https://npm.io/package/bs58check.md) ^3.0.1
- [iso-3166-1](https://npm.io/package/iso-3166-1.md) ^2.1.1
- [json-bigint](https://npm.io/package/json-bigint.md) ^1.0.0
- [@scure/bip39](https://npm.io/package/@scure/bip39.md) ^1.2.1
- [@grpc/grpc-js](https://npm.io/package/@grpc/grpc-js.md) ^1.14.0
- [@noble/hashes](https://npm.io/package/@noble/hashes.md) ^1.3.2
- [@types/big.js](https://npm.io/package/@types/big.js.md) ^6.2.0
- [@noble/ed25519](https://npm.io/package/@noble/ed25519.md) ^2.0.0
- [@protobuf-ts/runtime-rpc](https://npm.io/package/@protobuf-ts/runtime-rpc.md) ^2.8.2
- [@concordium/rust-bindings](https://npm.io/package/@concordium/rust-bindings.md) ^4.0.1
- [@protobuf-ts/grpc-transport](https://npm.io/package/@protobuf-ts/grpc-transport.md) ^2.9.1
- [@protobuf-ts/grpcweb-transport](https://npm.io/package/@protobuf-ts/grpcweb-transport.md) ^2.9.1

## Recent versions

- 12.0.2 (latest) — 2026-01-26
- 13.0.0-alpha.1 (alpha) — 2026-06-19
- 12.0.0-devnet-p10.0 (devnet) — 2025-12-01
- 7.0.4-rc.3 (beta) — 2023-11-10
- 6.1.0-alpha.1 (web3Id-alpha) — 2023-08-09
- 13.0.0-alpha.0 — 2026-06-10
- 12.1.0-alpha.5 — 2026-05-27
- 12.1.0-alpha.4 — 2026-05-11
- 12.1.0-alpha.1 — 2026-04-20
- 12.0.1 — 2026-01-15
- 11.1.1 — 2026-01-14
- 12.0.0 — 2026-01-09
- 11.1.0 — 2026-01-07
- 11.1.0-alpha.7 — 2025-12-16
- 11.1.0-alpha.6 — 2025-12-01
- … 100 more at https://npm.io/package/@concordium/web-sdk/versions

## README

# concordium-web-sdk

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](https://github.com/Concordium/.github/blob/main/.github/CODE_OF_CONDUCT.md)

Wrappers for interacting with the Concordium node, for the web environment.

Please see the
[documentation](https://docs.concordium.com/concordium-node-sdk-js/latest/index.html)
for more information

**Table of Contents:**

<!--toc:start-->
- [concordium-web-sdk](#concordium-web-sdk)
  - [ConcordiumGRPCWebClient](#concordiumgrpcwebclient)
  - [ConcordiumGRPCNodeClient](#concordiumgrpcnodeclient)
  - [React Native](#react-native)
<!--toc:end-->

## ConcordiumGRPCWebClient

The SDK provides a gRPC client, which can interact with the [Concordium
Node](https://github.com/Concordium/concordium-node) using gRPC-web.

For an overview of the endpoints, [click
here](https://docs.concordium.com/concordium-node-sdk-js/latest/classes/grpc.ConcordiumGRPCClient.html).

To create a client, the `ConcordiumGRPCWebClient` class can be used. It
requires the address and port of the concordium node.

```ts
import { ConcordiumGRPCWebClient } from '@concordium/web-sdk';
...
return new ConcordiumGRPCWebClient(
    address,
    port,
    { timeout: 15000 }
);
```

The fourth argument is additional options. In the example
above we sat the timeout for a call to the node to 15
seconds. The options allowed here are those allowed by the
[grpcweb-transport](https://www.npmjs.com/package/@protobuf-ts/grpcweb-transport).

## ConcordiumGRPCNodeClient

_Note that this can ONLY be used in a nodeJS environment_

The SDK provides a gRPC client, which can interact with the [Concordium
Node](https://github.com/Concordium/concordium-node) using gRPC.

For an overview of the endpoints, [click
here](https://docs.concordium.com/concordium-node-sdk-js/latest/classes/grpc.ConcordiumGRPCClient.html).

To create a client, the `ConcordiumGRPCNodeClient` class can be used. It
requires the address and port of the concordium node.

```ts
import { ConcordiumGRPCNodeClient, credentials } from '@concordium/web-sdk/nodejs';
...
const creds = ...; // e.g. credentias.createInsecure();
return new ConcordiumGRPCWebClient(
    address,
    port,
    creds,
    { timeout: 15000 }
);
```

Like with the grpc web client, the fourth argument is additional options.

## React native

To use the SDK in a react native context, it is required to include some polyfills for functionality used in the SDK.
The list of polyfills to be installed in the project alongside `@concordium/web-sdk` include:

```json
{
    ...
    "dependencies": {
        "@azure/core-asynciterator-polyfill": "...",
        "@stardazed/streams-polyfill": "...",
        "react-native-get-random-values": "...",
        "react-native-polyfill-globals": "...",
        "text-encoding": "..."
}
}
```

### Installation

```bash
yarn add @concordium/web-sdk react-native-polyfill-globals react-native-get-random-values text-encoding @azure/core-asynciterator-polyfill @stardazed/streams-polyfill # or npm install
npx pod-install # if building for ios, adds native modules from dependencies to project.
```

### Building App

The initial app build may take a significant amount of RAM (up to 10Gb), due to converted wasm module to js code.
If you encounter the error `Reached heap limit Allocation failed - JavaScript heap out of memory`
You need to increase memory limit `NODE_OPTIONS=--max-old-space-size`

Example of start script in `package.json`

```json
{
    "start": "NODE_OPTIONS=--max-old-space-size=12288 react-native start"
}
```

### Adding polyfill to app

```js
// polyfill.js
import '@stardazed/streams-polyfill';
import '@azure/core-asynciterator-polyfill';
import { polyfill as polyfillEncoding } from 'react-native-polyfill-globals/src/encoding'; // Requires peer dependency `text-encoding`
import { polyfill as polyfillCrypto } from 'react-native-polyfill-globals/src/crypto'; // Requires peer dependency `react-native-get-random-values`

polyfillEncoding();
polyfillCrypto();
```

```js
// index.js
import { AppRegistry } from 'react-native';

import './polyfill'; // polyfills must be added before ./App

import App from './App';
import { name as appName } from './app.json';

AppRegistry.registerComponent(appName, () => App);
```

This ensures the native modules required by the SDK are present.

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