@windingtree/org.id-test-ganache-server
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@windingtree/org.id-test-ganache-server

@windingtree/org.id-test-ganache-server

Ease setup of the Ganache server for ORGiD protocol testing

Setup

npm install @windingtree/org.id-test-ganache-server

Usage

import { ganache } from '@windingtree/org.id-test-ganache-server';

const server = await ganache();

server.getAccounts()
  .then(accounts => {
    console.log(accounts);
    /*
      [
        '0xe0367e4F58B1742B16DEE96E436554C4Ac679D23',
        '0x4cEAC03Ec8C9643b8be83830A45b69be430125d9',
        '0x19e17F4051f82471921C29319EE77c27992404b2',
        '0xdD004E3258CEfA1e01eC06dD6D88347Daf11eEA0',
        ...
      ]
    */
  })
  .catch(console.error);

/*
server.web3 // web3 instance
server.port
server.providerUri // web3 provider URI
server.provider // web3 provider
server.close() // async closing the server
*/

Documentation

Generated docs

Package Sidebar

Install

npm i @windingtree/org.id-test-ganache-server

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

6.59 kB

Total Files

5

Last publish

Collaborators

  • kostysh
  • kvakes
  • tomashq