portis-project / web-sdk

Portis Web SDK

Home Page:https://portis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Portis

Twitter license

Quick Start

It should take no more than 5 minutes to get started with Portis πŸš€

  1. Register a DApp in the Portis Dashboard, and copy your DApp ID.

  2. Install Portis and Web3

    npm install @portis/web3 web3
  3. Import and initialize a web3 instance

    import Portis from '@portis/web3';
    import Web3 from 'web3';
    
    const portis = new Portis('YOUR_DAPP_ID', 'mainnet');
    const web3 = new Web3(portis.provider);
  4. Verify everything works by calling a web3 method such as getAccounts:

    web3.eth.getAccounts((error, accounts) => {
      console.log(accounts);
    });
  5. You are good to go! πŸ‘

For more information see our docs πŸ“•

License

MIT

About

Portis Web SDK

https://portis.io

License:MIT License


Languages

Language:TypeScript 94.8%Language:JavaScript 5.2%