Thanks to visit codestin.com
Credit goes to github.com

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

DEPRECATED - Javascript SDK for the Elrond blockchain.

License

Notifications You must be signed in to change notification settings

erdDEVcode/elrondjs

 
 

Repository files navigation

elrond.js

Javascript SDK for the Elrond blockchain.

Features:

  • Generate and load wallets, 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

MORE COMING SOON

Installation

npm install --save elrondjs

Usage

Example - Claiming rewards from the Mainnet staking contract:

import Elrond from '@elrondnetwork/elrond-core-js'
import { Contract, ProxyProvider, ElrondWallet } from 'elrondjs'

// create wallet
const wallet = ElrondWallet.generateRandom(),

// get contract
const c = Contract.at('0x....', {
  provider: new ProxyProvider('https://api.elrond.com'),
  signer: w,
})

// make the call
try {
  await c.callFunction('claimRewards', [], {
    gasLimit: 250000
  })
} catch (err) {
  console.error('Transaction failed', err.transactionReceipt)
}

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

License

MIT

About

DEPRECATED - Javascript SDK for the Elrond blockchain.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •