# @sei-js/core

> TypeScript library for front end integrations with Sei

Latest version **3.2.1** (published 2024-02-01) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @sei-js/core
pnpm add @sei-js/core
yarn add @sei-js/core
bun add @sei-js/core
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.2.1 |
| Published | 2024-02-01 |
| First published | 2022-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 22 |
| Unpacked size | 451.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 67 |
| Maintainers | limmingjun, besated, carsonfalcon |
| Keywords | sei, javascript, typescript |

## Links

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

## Dependencies (22)

- [bech32](https://npm.io/package/bech32.md) ^2.0.0
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [moment](https://npm.io/package/moment.md) ^2.30.1
- [sha.js](https://npm.io/package/sha.js.md) ^2.4.11
- [process](https://npm.io/package/process.md) ^0.11.10
- [xstream](https://npm.io/package/xstream.md) ^11.14.0
- [elliptic](https://npm.io/package/elliptic.md) ^6.5.4
- [@cosmjs/math](https://npm.io/package/@cosmjs/math.md) ^0.29.5
- [@cosmjs/amino](https://npm.io/package/@cosmjs/amino.md) ^0.29.5
- [@cosmjs/utils](https://npm.io/package/@cosmjs/utils.md) ^0.29.5
- [@sei-js/proto](https://npm.io/package/@sei-js/proto.md) ^3.1.0
- [readonly-date](https://npm.io/package/readonly-date.md) ^1.0.0
- [@cosmjs/crypto](https://npm.io/package/@cosmjs/crypto.md) ^0.29.5
- [@cosmjs/encoding](https://npm.io/package/@cosmjs/encoding.md) ^0.29.5
- [@cosmjs/json-rpc](https://npm.io/package/@cosmjs/json-rpc.md) ^0.29.5
- [@cosmjs/stargate](https://npm.io/package/@cosmjs/stargate.md) ^0.29.5
- [@noble/secp256k1](https://npm.io/package/@noble/secp256k1.md) 1.7.1
- [@keplr-wallet/types](https://npm.io/package/@keplr-wallet/types.md) ^0.11.41
- [@cosmjs/proto-signing](https://npm.io/package/@cosmjs/proto-signing.md) ^0.29.5
- [@cosmjs/tendermint-rpc](https://npm.io/package/@cosmjs/tendermint-rpc.md) ^0.29.5
- [@ethersproject/keccak256](https://npm.io/package/@ethersproject/keccak256.md) ^5.7.0
- [@cosmjs/cosmwasm-stargate](https://npm.io/package/@cosmjs/cosmwasm-stargate.md) ^0.29.5

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.2.1 (latest) — 2024-02-01
- 0.0.0-internal-20240130201751 (internal) — 2024-01-30
- 0.0.0-beta-20230202171917 (beta) — 2023-02-02
- 1.1.3 (next) — 2023-01-20
- 3.2.0 — 2024-02-01
- 0.0.0-internal-20240130023001 — 2024-01-30
- 0.0.0-internal-20240130021541 — 2024-01-30
- 0.0.0-internal-20240130012423 — 2024-01-30
- 0.0.0-internal-20240130005251 — 2024-01-30
- 3.1.3 — 2024-01-08
- 0.0.0-internal-20240108174901 — 2024-01-08
- 0.0.0-internal-20240105075910 — 2024-01-05
- 0.0.0-internal-20240104185656 — 2024-01-04
- 0.0.0-internal-20240104081628 — 2024-01-04
- 0.0.0-internal-20240103233730 — 2024-01-03
- … 175 more at https://npm.io/package/@sei-js/core/versions

## README

# @sei-js/core

A library for Sei written in Typescript.

## Installation

```shell
yarn add @sei-js/core

# or

npm install @sei-js/core
```

## Getting Started

### Connecting to a wallet

In order to interact with a Sei node, you'll need a wallet to sign transactions. The wallet extensions that are currently supported can be found in `SUPPORTED_WALLETS`.

```javascript
import { connect, SUPPORTED_WALLETS } from '@sei-js/core';

// Connecting to a Keplr wallet
const { connectedWallet, offlineSigner } = await connect('keplr', 'atlantic-2');
```

### Client

#### LCD Query Client

The LCD query client can be used to query data via REST endpoints.

```javascript
import { getQueryClient } from '@sei-js/core';

const queryClient = await getQueryClient(REST_URL);
// Getting the market summary from the Sei dex module
queryClient.seiprotocol.seichain.dex.getMarketSummary(params);
// Getting user balances from the Cosmos bank module
queryClient.cosmos.bank.v1beta1.allBalances({ address });
```

#### Signing Client

The signing client can be used to create, sign, and broadcast transactions.

```javascript
import { getSigningClient } from '@sei-js/core';

const client = await getSigningClient({
  rpcEndpoint,
  signer, // OfflineSigner
});
```


#### CosmWasmClient and SigningCosmWasmClient

The `SeiSigningCosmWasmClient` and `SeiCosmWasmClient` can be used to interact with CosmWasm smart contracts. Typically, you need the `SeiSigningCosmWasmClient` to execute contract messages and the `SeiCosmWasmClient` to query contract state, though contract states can also be queried using the signing client.

```typescript
import { getSigningCosmWasmClient, getCosmWasmClient, connect } from '@sei-js/core';

const cosmWasmClient = await getCosmWasmClient(RPC_URL);

const { offlineSigner } = await connect('keplr', 'atlantic-2');
const signingCosmWasmClient = await getSigningCosmWasmClient(RPC_URL, offlineSigner);
```

## Related packages

[@sei-js/react](https://www.npmjs.com/package/@sei-js/react) - A react helper library for common @sei-js/core functions

[@sei-js/proto](https://www.npmjs.com/package/@sei-js/proto) - TypeScript library for Sei protobufs generated using Telescope

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