Skip to content
This repository was archived by the owner on Oct 21, 2023. It is now read-only.

Repository files navigation

DEPRECATED - elrond.js is now deprecated and no longer maintained. Please use @elrondnetwork/erdjs instead.**

NPM moduleJoin the communityFollow on Twitter

Javascript SDK for the Elrond 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

Installation

npm install --save elrondjs

Note: If using with React Native you will need to use a shim.

Usage

Example - Claiming rewards from the Mainnet delegation contract

import{Contract,ProxyProvider,BasicWallet}from'elrondjs';(async()=>{// create connection to networkconstproxy=newProxyProvider('https://api.elrond.com')// load walletconstwallet=BasicWallet.fromMnemonic('YOUR MNEMONIC HERE')// create contract interface// and tell it to use our provider and walletconstc=awaitContract.at('erd1qqqqqqqqqqqqqpgqxwakt2g7u9atsnr03gqcgmhcv38pt7mkd94q6shuwt',{provider: proxy,signer: wallet,sender: wallet.address(),})// make the claim!awaitc.invoke('claimRewards',[],{gasLimit: 250000000})})()

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

About

DEPRECATED - Javascript SDK for the Elrond blockchain.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Contributors

Languages