Skip to content
A javascript Echo library for node.js and browsers πŸ”Š
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.test [ECHOJS-108] Remove old fields (#41) Aug 21, 2019
docs [ECHOJS-105] Delete methods (#40) Aug 21, 2019
src Merge branch 'master' into feature/ECHOJS-99 Aug 22, 2019
test Fix operation name in tests Aug 21, 2019
types
.babelrc Resolve EEX-318 (add babel 7, move babel/cli from dev-deps into deps) Feb 13, 2019
.eslintignore
.eslintrc.js Fix merge conflicts Jan 9, 2019
.gitignore [ECHOJS-102] edit objects list (#25) Aug 16, 2019
.gitlab-ci.yml [ECHOJS-83] Remove testing from GitlabCI (#10) Aug 6, 2019
.npmignore EEX-317. package.json: Add prepare script, rm doc script, rm scripts … Feb 13, 2019
.travis.yml Fix travis-CI (#45) Aug 22, 2019
CONTRIBUTING.md [ECHOJS-83] CI/CD Implementation (#2) Aug 2, 2019
LICENSE Add LICENSE Feb 8, 2019
README.md
SECURITY.md [ECHOJS-83] CI/CD Implementation (#2) Aug 2, 2019
package.json Up version to "1.6.0" Aug 22, 2019
tsconfig.json Resolve ECHOJS-97 conflicts Aug 19, 2019

README.md

Echojs-lib (echojs-lib)

Build Status David npm npm

Pure JavaScript ECHO library for node.js and browsers. Can be used to construct, sign and broadcast transactions in JavaScript, and to easily obtain data from the blockchain via public apis.

Setup

This library can be obtained through npm:

npm install echojs-lib

Preparation

Launched echo node (https://github.com/echoprotocol/echo-core) with open port

Usage

const { default: echo } = require('echojs-lib');

await echo.connect('ws://127.0.0.1:9000');
const account = await echo.api.getObject('1.2.0');

You also can use it with import

import echo from 'echojs-lib';

await echo.connect('ws://127.0.0.1:9000');
const account = await echo.api.getObject('1.2.0');

To more examples and options look at section below

Connection - More connections options

API - List with all api methodes

Subscriber - Subscriber module

Cache - Information about cache

Redux - Information about integrating lib cache to redux with auto update

Transactions - Transactions exampels

Crypto - Create private/public keys example

Constants - List of constants you can use

Run Tests

Tests use a locally running Echo node. Therefore, before starting the tests, you need to start Echo with predefined configuration parameters.

The easiest way is to use docker-compose:

cd .test
docker-compose up

After the node is started, you can run the tests:

npm run test
You can’t perform that action at this time.