tsoposki-ptokens-peos
v0.2.1-alpha.0
Published
repo holding the code for interacting with pEOS
Downloads
2
Readme
ptokens-peos
Module for interacting only with pEOS.
Installation:
npm install ptokens-peos
Usage:
const pEOS = require('ptokens-peos')
const peos = new pEOS({
ethPrivateKey: 'Eth private key',
ethProvider: 'Eth provider',
eosPrivateKey: 'EOS private key',
eosRpc: 'EOS RPC Address'
eosSignatureProvider: 'An EOS Signature Provider' //if the private key is not passed
})
It is possible to pass a standard Ethereum Provider as the ethProvider
value, such as the one injected
into the content script of each web page by Metamask(window.web3.currentProvider
).
const pEOS = require('ptokens-peos')
if (window.web3) {
const peos = new pEOS({
ethProvider: window.web3.currentProvider,
})
} else {
console.log('No web3 detected')
}