0.3.10 • Published 4 years ago

@meey-sdk-js/client v0.3.10

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@meey-sdk-js/client

This package includes the API client and common classes and utils.

This package supports both Node.js and Web platforms. Please refer to the documentation how to select the platform.

Quick start

npm install @meey-sdk-js/client

You can import the module both as CommonJS (require) and ES module (import).

import MeeyClient from '@meey-sdk-js/client';
let meey = new MeeyClient();
meey.blockchain().then(result => {
    console.log('Current state', result);
});

Note that this by default imports the Node.js version which is not compatible with browsers. If you target web browsers, either import MeeyClient from '@meey-sdk-js/client/dist/meey-sdk-js.js'; or create an alias in your bundler configuration. Many bundlers like Webpack automatically pick the browser version, so you don't need to configure anything.

You can also directly import the pre-built bundle in HTML using <script src="meey-sdk-js/dist/meey-sdk-js.min.js"></script> and use the global meey-sdk-js variable.

Contribute

Setup

Clone this repository and run

npm install

Scripts

Run tests (requires a local meeysvr node running in --testmode, listening on port 7845).

npm run test

Regenerate GRPC type definitions

npm run grpc

Development build with auto-update

npm run dev

Build all targets for distribution

npm run build