smartxjs

SmartX Javascript SDK Library

Usage no npm install needed!

<script type="module">
  import smartxjs from 'https://cdn.skypack.dev/smartxjs';
</script>

README

SmartX Javascript SDK

NPM Status Travis Build Status Coverage Status BrowserStack Status

This library aims to providing javascript utilities for SmartX client-side applications, such as web wallet.

Visit issues page to see planned features or propose a feature request.

Table of Contents

Install

npm install --save semux-js

Getting Started

Node.js

// import semux module
const {AccountApi, BlockchainApi, Configuration, DelegateApi, NodeApi, ToolApi, WalletApi} = require("semux-js");

// create an API client
const api = new NodeApi(new Configuration({
    username: "user",
    password: "pass",
    basePath: "http://localhost:5171/v2.4.0"
}));

// call GET /info API
api
  .getInfo({ mode: 'cors', credentials: 'include' })
  .then(response => console.log(response))
  .catch(err => console.error(err));

Usage

Example Applications

Browser Compatibility

  • Chrome >= 65
  • Firefox >= 59
  • IE >= 11
  • Edge >= 16
  • Safari >= 6

Development

Install Modules

npm install

Run Unit Tests

npm test

Run Browser Tests

Browser testing requires Chrome and Firefox installed.

npm run-script test:browser

Format Source Code

npm run format

Check Source Code Formatting

npm run format:check

Maintainers

@cryptokat.

License

MIT © The SmartX Developers