# elrondjs

> Javascript SDK for the Elrond blockchain with Typescript support.

Latest version **2.7.0** (published 2021-02-01) · ISC license · 0 weekly downloads

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

## Install

```sh
npm install elrondjs
pnpm add elrondjs
yarn add elrondjs
bun add elrondjs
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.7.0 |
| Published | 2021-02-01 |
| First published | 2020-11-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12.0.0 |
| Dependencies | 11 |
| Unpacked size | 803.2 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | erdDEV team |
| Maintainers | hiddentao |

## Links

- npm: https://www.npmjs.com/package/elrondjs
- Repository: https://github.com/erdDEVcode/elrondjs
- Homepage: https://elrondjs.erd.dev
- Issues: https://github.com/erdDEVcode/elrondjs/issues
- npm.io page: https://npm.io/package/elrondjs

## Dependencies (11)

- [axios](https://npm.io/package/axios.md) ^0.21.0
- [bip39](https://npm.io/package/bip39.md) ^3.0.2
- [bech32](https://npm.io/package/bech32.md) ^1.1.3
- [bigval](https://npm.io/package/bigval.md) ^1.3.1
- [buffer](https://npm.io/package/buffer.md) ^6.0.2
- [keccak](https://npm.io/package/keccak.md) ^3.0.1
- [scryptsy](https://npm.io/package/scryptsy.md) ^2.1.0
- [tweetnacl](https://npm.io/package/tweetnacl.md) ^1.0.3
- [decimal.js](https://npm.io/package/decimal.js.md) ^10.2.1
- [ed25519-hd-key](https://npm.io/package/ed25519-hd-key.md) ^1.1.2
- [@elrondnetwork/hw-app-elrond](https://npm.io/package/@elrondnetwork/hw-app-elrond.md) ^0.1.17

## Recent versions

- 2.7.0 (latest) — 2021-02-01
- 2.6.0 — 2021-01-29
- 2.5.0 — 2021-01-20
- 2.4.1 — 2021-01-14
- 2.4.0 — 2021-01-14
- 2.3.2 — 2021-01-13
- 2.3.1 — 2021-01-11
- 2.3.0 — 2021-01-09
- 2.2.0 — 2021-01-08
- 2.1.0 — 2021-01-07
- 2.0.1 — 2021-01-07
- 2.0.0 — 2021-01-06
- 1.12.1 — 2020-12-30
- 1.12.0 — 2020-12-29
- 1.11.1 — 2020-12-22
- … 18 more at https://npm.io/package/elrondjs/versions

## README

<p align="center">
  <img width="250" height="250" src="https://raw.githubusercontent.com/erdDEVcode/elrondjs/master/assets/logo.png">
</p>

# elrond.js

[![NPM module](https://badge.fury.io/js/elrondjs.svg)](https://badge.fury.io/js/elrondjs)
[![Join the community](https://img.shields.io/badge/Chat%20on-Telegram-brightgreen.svg?color=0088cc)](https://t.me/erdDEV)
[![Follow on Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/erd_dev)

Javascript SDK for the [Elrond](https://elrond.com) blockchain.

Features:

* Generate and load wallets (Ledger wallets too!)
* Sign and broadcast transactions
* Query the blockchain and work with smart contracts
* Cross-platform: Node.js, Browser, Web workers and React Native.
* Typescript definitions 🔥
* Full [documentation](https://elrondjs.erd.dev)

## Installation

_Note: Node 12 or above is required to use elrondjs_

```
npm install --save elrondjs
```

## Usage

**Example - Claiming rewards from the Mainnet delegation contract**

```js
import { Contract, ProxyProvider, BasicWallet } from 'elrondjs'

(async () => {
  // create connection to network
  const proxy = new ProxyProvider('https://api.elrond.com')

  // load wallet
  const wallet = BasicWallet.fromMnemonic('YOUR MNEMONIC HERE'),

  // create contract interface
  // and tell it to use our provider and wallet
  const c = await Contract.at('erd1qqqqqqqqqqqqqpgqxwakt2g7u9atsnr03gqcgmhcv38pt7mkd94q6shuwt', {
    provider: proxy,
    signer: wallet,
  })

  // make the claim!
  await c.invoke('claimRewards', [], {
    gasLimit: 250000000
  })
})()
```

For usage and full documentation see https://elrondjs.erd.dev.

## Contributors guide

To build the lib and watch for changes:

```
npm run dev
```

To build the lib for production:

```
npm run build
```

To build the docs:

```
npm run build-docs
```

To publish a new release:

```
npm run release
```

To run the tests, first run `npm run devnet` in a separate terminal to start a local test network. Then run:

```
npm test
```


## License

ISC

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