Package Exports
- eosjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eosjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Status: Alpha (this is for eosjs library developers)
Eos Js
General purpose library for the EOS blockchain.
Usage
Eos = require('eosjs') // Or Eos = require('.')
callback = (err, res) => {err ? console.error(err) : console.log(res)}
// API, note: testnet uses eosd at localhost (until there is a testnet)
Testnet = require('eosjs-api/testnet')
testnet = Testnet()
testnet.getBlock(1, callback) // More at https://github.com/eosjs/api
eos = Eos({network: testnet})
// Transaction
expireInSeconds = 60
eos.transaction({
messages: [
{
from: '',
to: '',
cc: [],
type: '',
data: ''
}
],
sign: ['5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss'],
permissions: [],
}, callback)
// Exported libraries (see Related Libraries)
let {ecc} = eos.modules
let {json} = eos.modules
let {fcbuffer} = eos.modulesRelated Libraries
This library breaks down into more specific purpose libraries:
- api - application programming interface to EOS blockchain nodes
- json - blockchain definitions (api method names, blockchain operations, etc)
- fcbuffer - binary serialization used by the blockchain
Environment
Node 6+ and browser (browserify, webpack, etc)