# semux-js

> Semux Javascript SDK Library

Latest version **1.9.0** (published 2021-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install semux-js
pnpm add semux-js
yarn add semux-js
bun add semux-js
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.9.0 |
| Published | 2021-04-24 |
| First published | 2018-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=9 |
| Dependencies | 19 |
| Unpacked size | 4.4 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | cryptokat |
| Maintainers | semuxgo |
| Keywords | semux |

## Links

- npm: https://www.npmjs.com/package/semux-js
- Repository: https://github.com/semuxproject/semux-js
- Homepage: https://github.com/semuxproject/semux-js#readme
- Issues: https://github.com/semuxproject/semux-js/issues
- npm.io page: https://npm.io/package/semux-js

## Dependencies (19)

- [url](https://npm.io/package/url.md) ^0.11.0
- [atob](https://npm.io/package/atob.md) ^2.1.2
- [btoa](https://npm.io/package/btoa.md) ^1.2.1
- [hoek](https://npm.io/package/hoek.md) ^5.0.4
- [long](https://npm.io/package/long.md) ^4.0.0
- [buffer](https://npm.io/package/buffer.md) ^5.7.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [blakejs](https://npm.io/package/blakejs.md) ^1.1.0
- [core-js](https://npm.io/package/core-js.md) ^2.6.12
- [unfetch](https://npm.io/package/unfetch.md) ^3.1.2
- [ripemd160](https://npm.io/package/ripemd160.md) ^2.0.2
- [tweetnacl](https://npm.io/package/tweetnacl.md) ^1.0.3
- [@types/long](https://npm.io/package/@types/long.md) ^4.0.1
- [@types/node](https://npm.io/package/@types/node.md) ^9.6.61
- [detect-node](https://npm.io/package/detect-node.md) ^2.0.5
- [mocha-steps](https://npm.io/package/mocha-steps.md) ^1.3.0
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.14.168
- [xmlhttprequest](https://npm.io/package/xmlhttprequest.md) ^1.8.0
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^2.2.4

## Recent versions

- 1.9.0 (latest) — 2021-04-24
- 1.8.0 — 2021-04-17
- 1.7.1 — 2019-09-10
- 1.7.0 — 2019-09-05
- 1.6.1 — 2019-08-20
- 1.6.0 — 2019-08-20
- 1.4.0 — 2019-04-30
- 1.2.0 — 2018-07-28
- 1.0.0 — 2018-07-28

## README

# Semux Javascript SDK

[![NPM Status](https://img.shields.io/npm/v/semux-js.svg)](https://www.npmjs.com/package/semux-js)
[![Travis Build Status](https://travis-ci.com/semuxproject/semux-js.svg?branch=master)](https://travis-ci.com/semuxproject/semux-js)
[![Coverage Status](https://coveralls.io/repos/github/semuxproject/semux-js/badge.svg?branch=master)](https://coveralls.io/github/semuxproject/semux-js?branch=master)

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

Visit [issues](https://github.com/semuxproject/semux-js/issues) page to see planned features or propose a feature request.

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Example Applications](#example-applications)
- [Development](#development)
- [Maintainers](#maintainers)
- [License](#license)

## Install

```
npm install --save semux-js
```

## Getting Started

**Node.js**

```javascript
// 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.5.0"
}));

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

## Usage

- [Hash](https://github.com/semuxproject/semux-js/blob/master/src/lib/Hash.spec.ts)
- [Key & Signature](https://github.com/semuxproject/semux-js/blob/master/src/lib/Key.spec.ts)
- [Transaction Signing, Encoding or Decoding](https://github.com/semuxproject/semux-js/blob/master/src/lib/Transaction.spec.ts)
- [Byte Encoder](https://github.com/semuxproject/semux-js/blob/master/src/lib/SimpleDecoder.spec.ts) / [Byte Decoder](https://github.com/semuxproject/semux-js/blob/master/src/lib/SimpleDecoder.spec.ts)
- [API Client](https://github.com/semuxproject/semux-js/blob/master/src/lib/api/api.spec.ts)

## Example Applications

- Web Wallets
  - https://github.com/witoldsz/semux-light

## Development

### Install Modules

```
npm install
```

### Run Unit Tests

```
npm test
```

### Format Source Code

```
npm run format
```

### Check Source Code Formatting

```
npm run format:check
```

## Maintainers

[@cryptokat](https://github.com/cryptokat/).

## License

[MIT](LICENSE) © [The Semux Developers](https://github.com/semuxproject)

---
_Source: https://npm.io/package/semux-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
