open-index/open-npm huggingface dataset:
npm package: @lit-protocol/bls-sdk
Description: Read more about it here
Latest version: 6.11.5

# BLS-SDK

Read more about it here

https://github.com/LIT-Protocol/threshold_crypto_ui

# Installation

```
yarn add @lit-protocol/bls-sdk
```

# Usage

```js
import { initWasmBlsSdk } from '@lit-protocol/bls-sdk';

initWasmBlsSdk().then((exports) => {
  globalThis.wasmExports = exports;
  log(
    `✅ [BLS SDK] wasmExports loaded. ${
      Object.keys(exports).length
    } functions available. Run 'wasmExports' in the console to see them.`
  );
});
```

# Then

```js
// set decryption shares bytes in wasm
decryptionShares.forEach((s: any, idx: any) => {
  wasmExports.set_share_indexes(idx, s.shareIndex);

  const shareAsBytes = uint8arrayFromString(s.decryptionShare, 'base16');

  for (let i = 0; i < shareAsBytes.length; i++) {
    wasmExports.set_decryption_shares_byte(i, idx, shareAsBytes[i]);
  }
});
```
npm package: @lit-protocol/constants
Description: This submodule exports various constants values and errors that are used in Lit Protocol.
Latest version: 9.0.1

# Lit Protocol Constants

This submodule exports various constants values and errors that are used in Lit Protocol.

Note: This is the top-most package in the Lit Protocol SDK monorepo. It imports no other package and is potentially imported by all other packages.

### node.js / browser

```
yarn add @lit-protocol/constants
```

## Adding new Lit Protocol Constants

In files under `./src/lib` you can add any value there. Remember to define it `as const` to ensure it is immutable and allow TypeScript to better infer the derived types.

### Updating Lit supported chains

In file `./src/lib/constants/constants.ts` you can update the Lit supported chains.

1. Add the chain key to the corresponding chain key array based on the chain type (EVM, SVM or Cosmos)
2. Add chain data to the corresponding chain data object based on the chain type (EVM, SVM or Cosmos)

| Chain keys               | Chain data          |
| ------------------------ | ------------------- |
| `LIT_CHAINS_KEYS`        | `LIT_CHAINS`        |
| `LIT_SVM_CHAINS_KEYS`    | `LIT_SVM_CHAINS`    |
| `LIT_COSMOS_CHAINS_KEYS` | `LIT_COSMOS_CHAINS` |
npm package: @lit-protocol/contracts
Description: All configs are in the `./src/config` directory
Latest version: 0.9.1

# Configurations

All configs are in the `./src/config` directory

```bash
.
├── env.ts // 👈 to modify env vars
├── methods.ts // 👈 to add new ABI methods to extract
└── networks.ts // 👈 to add or modify a network
```

# Syncing Contract Addresses and ABIs

```shell
tsx ./src/sync.ts
```

or from monorepo root

```shell
nx run contracts:start
```
npm package: @lit-protocol/core
Description: This package provides foundational utilities and interfaces that power the core functionalities of the Lit Protocol SDK. It includes essential data structures, business logic, and shared configurations that other packages build upon.
Latest version: 7.4.0

# Core

This package provides foundational utilities and interfaces that power the core functionalities of the Lit Protocol SDK. It includes essential data structures, business logic, and shared configurations that other packages build upon.

## Installation

```bash
yarn add @lit-protocol/core
```

## Quick Start

```typescript
import { LitCore } from '@lit-protocol/core';

// Initialize core functionality
const litCore = new LitCore();

// Use core utilities
await litCore.connect();
```

## Key Features

- Core data structures and interfaces
- Shared configurations and constants
- Base classes for Lit Protocol functionality
- Essential utility functions
- Type definitions for core components

## Building

Run `nx build core` to build the library.

## Testing

Run `nx test core` to execute the unit tests via [Jest](https://jestjs.io).
npm package: @lit-protocol/domainwallet-sdk
Description: SDK for querying domain information from the Domain Registry.
Latest version: 0.2.1

# Domain Wallet SDK

SDK for querying domain information from the Domain Registry.

## Usage

query by Domain

```
const dwr = new DWR({
  litNetwork: 'habanero'
});
await dwr.connect();
const domainInfo = await dwr.getDomainInfo("foobar.domainwallet.id");
```

query by pkp tokenId
```
const tokenId = "<your pkp token id>"
const dwr = new DWR({
  litNetwork: 'habanero'
});
await dwr.connect();
const url = await dwr.getUrl(tokenId);
const domainInfo = dwr.getDomainInfo(url);
```
npm package: @lit-protocol/ecdsa-sdk
Description: Read more about it here:
Latest version: 6.11.5

# ECDSA-SDK

Read more about it here:

https://github.com/LIT-Protocol/lit-ecdsa-wasm-combine

# Quick Start

### node.js / browser

```
yarn add @lit-protocol/ecdsa-sdk
```

### Vanilla JS (UMD)

```js
<script src="https://cdn.jsdelivr.net/npm/@lit-protocol/ecdsa-sdk-vanilla/ecdsa-sdk.js"></script>
<script>
  console.log(LitJsSdk_ecdsaSdk);
</script>
```
npm package: @lit-protocol/encryption
Description: This submodule provides encryption and decryption of contents (string, file, etc.) respectively using a symmetric key, with the encrypted content returned as a Blob and the symmetric key as a Uint8Array
Latest version: 7.4.0

# Quick Start

This submodule provides encryption and decryption of contents (string, file, etc.) respectively using a symmetric key, with the encrypted content returned as a Blob and the symmetric key as a Uint8Array

### node.js / browser

```
yarn add @lit-protocol/encryption
```