1.0.7 • Published 5 years ago

te_lib_2 v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Echojs-lib (echojs-lib)

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

import echo from '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 require

const { default: echo } = require('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