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

Repository files navigation

DEPRECATED - erdbox is now deprecated and no longer maintained. Please use the official starter dapp instead.

NPM moduleJoin the communityFollow on Twitter

Drop-in widget for connecting your Elrond dapp to user's wallets.

  • Supports all wallet types: Mnemonic/seedphrase, JSON keyfile, PEM file, Ledger hardware.
  • Full transaction signing (including smart contract interactions).
  • Easy and simple API.
  • Works with any frontend framework and/or vanilla JS.
  • Self-hosting and/or IPFS supported.
  • Typescript definitions.
  • Full documentation.

Usage

Include the following script tag anywhere within your HTML:

<scripttype="text/javascript">constg=window.document.createElement('script');g.id='erdboxScript';g.type='text/javascript';g.async=true;g.defer=true;g.src='https://cdn.jsdelivr.net/npm/erdbox@1.12.0/dist/erdbox.js';window.document.body.appendChild(g);</script>

Note: replace 1.12.0 in the above code with the latest version of erdbox. This can always be found by visiting the erdbox package page at https://www.npmjs.com/package/erdbox

Then in your Javascript code:

window.addEventListener('erdbox:ready',async()=>{/* `window.erdbox` is now available for use! */// Example: ask user to connect a walletconstaddress=awaitwindow.erdbox.getWalletAddress({mustLoadWallet: true});alert(`User wallet address: ${address}`);},{once: true});

Contributors guide

Note: These instructions are for developers who wish to work on erdbox itself.

Start the dev server

yarn dev

The script will now be available at http://localhost:9000/erdbox.js, so replace the embed code URL with this one:

g.src='http://localhost:9000/erdbox.js'

License

AGPLv3

About

DEPRECATED - Drop-in widget for connecting Elrond dapps to user wallets

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages