Installation

Quickly get up and running with DSA platform

To get started, install the DSA SDK package from NPM:

npm install dsa-sdk

For browsers, via jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/dsa.min.js"></script>

For production, we recommend linking to a specific version number (jsdeliver)

Usage

To enable web3 calls via SDK, instantiate web3 library.

// in browser
if (window.ethereum) {
  window.web3 = new Web3(window.ethereum)
} else if (window.web3) {
  window.web3 = new Web3(window.web3.currentProvider)
} else {
  window.web3 = new Web3(customProvider)
}

// in nodejs
const Web3 = require('web3')
const DSA = require('dsa-sdk');
const web3 = new Web3(new Web3.providers.HttpProvider(ETH_NODE_URL))

Now instantiate DSA with web3 instance.

// in browser
const dsa = new DSA(web3);

// in nodejs
const dsa = new DSA({
  web3: web3,
  mode: "node",
  privateKey: PRIVATE_KEY
});

That's it. You're all set to start using the SDK methods.


If you still can't find something you're looking for or have any questions, ask them at our developers community on Telegram, Discord or simply send an Email.

Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.

Best way to stay connected with our progress.