Skip to content

Pandora Pyrrha functions and utilities library for JavaScript-based applications

License

Notifications You must be signed in to change notification settings

pandoraboxchain/pyrrha-js

Repository files navigation

pyrrha-js

Codacy Badge Codacy Badge Build Status

Pandora Pyrrha functions and utilities library for JavaScript-based applications

Initialization and usage

import Kernel from '../contracts/Kernel.json';
import Dataset from '../contracts/Dataset.json';
import Pjs from 'pyrrha-js';

const pjs = new Pjs({
    eth: {
        protocol: 'http',
        host: 'localhost',
        port: 8545,
        // or specify a "provider" property (like MetaMask or WebsocketProvider provider)
    },
    ipfs: {
        protocol: 'http',
        host: 'localhost',
        port: 5001
    },
    contracts: {
        Kernel,
        Dataset 
    },
    addresses: {
        Pandora: '0x58e66b79928cfb362b53c185a6a1fded882bb07d',
        PandoraMarket: '0x6142029abb21ef2e0bffde8d43f15c64f3750fe6'
    }
});

pjs.kernels.fetchAll()
    .then(console.log)
    .catch(console.error);

Running tests

Tests and coverage results will be deployed to codacy and available on Codacy Dashboard

For testing without coverage report use:

npm test

For generating and updating a code coverage report use:

npm run test-with-coverage

About

Pandora Pyrrha functions and utilities library for JavaScript-based applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages