open-index/open-npm huggingface dataset:
npm package: @susuovo/qt-utils
Description: 基于 Vue 2 的 qt-utils 工具库，提供 HTTP 请求封装、AES 压缩等功能
Author: susuovo
Latest version: 1.0.12

��# @susuovo/qt-utils

�W�N Vue 2 �v qt-utils �]wQ�^��c�O HTTP ��Bl\ň0AES �S)I{�R��

## Installation

## Usage

### hQ@\�l�Q��cP�	�

### 	c�O(u

## Features

- ' HTTP ��Bl\ň�$get, $post, $upLoadFile, $downLoadFile	�
- ' AES �S)�R�[
- ' �~N�vg�RT�y�{t
- ' �W�N Vue 2.7+

## License

MIT
npm package: @susy-js/abi
Description: Sophon ABI encoder and decoder
Latest version: 5.1.3

# @susy-js/abi

A port of [https://octonion.institute/susytech/sofabi](https://octonion.institute/susytech/sofabi) to JavaScript

[![Build Status](https://travis-ci.org/susytech/js-libs.svg?branch=master)](https://travis-ci.org/susytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@susy-js/abi.svg)](https://www.npmjs.com/package/@susy-js/abi)
[![npm](https://img.shields.io/npm/dw/@susy-js/abi.svg)](https://www.npmjs.com/package/@susy-js/abi)
[![dependencies Status](https://david-dm.org/susytech/js-libs/status.svg?path=packages/abi)](https://david-dm.org/susytech/js-libs?path=packages/abi)
[![docs](https://img.shields.io/badge/docs-passing-green.svg)](https://susytech.github.io/js-libs/abi/)

## [Full Documentation](https://susytech.github.io/js-libs/abi/)

## Contributing

Clone the repo and install dependencies via `npm install`. Tests can be executed via `npm run test`

## Installation

Install the package with `npm install --save @susy-js/abi` from [@susy-js/abi](https://www.npmjs.com/package/@susy-js/abi)

## Implementation

### Approach

- this version tries to stay as close to the original Rust version in intent, function names & purpose
- it is a basic port of the Rust version, relying on effectively the same test-suite (expanded where deemed appropriate)
- it is meant as a library to be used in other projects, i.e. [@susy-js/api](https://www.npmjs.com/package/@susy-js/api)

### Differences to original Rust version

- internally the library operates on string binary representations as opposed to Vector bytes, lengths are therefore 64 bytes as opposed to 32 bytes
- function names are adapted from the Rust standard snake_case to the JavaScript standard camelCase
- due to the initial library focus, the cli component (as implemented by the original) is not supported nor implemented
npm package: @susy-js/api
Description: The Susy Promise-based API library for interfacing with Sophon over RPC
Latest version: 5.1.3

# @susy-js/api

Susy.js is a thin, fast, Promise-based wrapper around the Sophon APIs.

[![Build Status](https://travis-ci.org/susytech/js-libs.svg?branch=master)](https://travis-ci.org/susytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@susy-js/api.svg)](https://www.npmjs.com/package/@susy-js/api)
[![npm](https://img.shields.io/npm/dw/@susy-js/api.svg)](https://www.npmjs.com/package/@susy-js/api)
[![dependencies Status](https://david-dm.org/susytech/js-libs/status.svg?path=packages/api)](https://david-dm.org/susytech/js-libs?path=packages/api)

## installation

Install the package with `npm install --save @susy-js/api`

## usage

### initialisation

```javascript
// import the actual Api class
import Api from '@susy-js/api';

// do the setup
const provider = new Api.Provider.Http('http://localhost:8545');
const api = new Api(provider);
```

### making calls

perform a call

```javascript
api.sof.coinbase().then(coinbase => {
  console.log(`The coinbase is ${coinbase}`);
});
```

multiple promises

```javascript
Promise.all([api.sof.coinbase(), api.net.listening()]).then(
  ([coinbase, listening]) => {
    // do stuff here
  }
);
```

chaining promises

```javascript
api.sof
  .newFilter({...})
  .then((filterId) => api.sof.getFilterChanges(filterId))
  .then((changes) => {
    console.log(changes);
  });
```

### contracts

attach contract

```javascript
const abi = [{ name: 'callMe', inputs: [{ type: 'bool', ...}, { type: 'string', ...}]}, ...abi...];
const address = '0x123456...9abc';
const contract = api.newContract(abi, address);
```

find & call a function

```javascript
contract.instance.callMe
  .call({ gas: 21000 }, [true, 'someString']) // or estimateGas or postTransaction
  .then(result => {
    console.log(`the result was ${result}`);
  });
```

## apis

APIs implement the calls as exposed in the [Sofcore JSON Sophon RPC](https://octonion.institute/susytech/js-api) definitions. Mapping follows the naming conventions of the originals, i.e. `sof_call` becomes `sof.call`, `personal_accounts` becomes `personal.accounts`, etc.

## public node

For operation within a public node, the following peerDependencies needs to be added (this functionality will be moved shortly) -
npm package: @susy-js/bn.js
Description: TypeScript definitions for bn.js
Latest version: 4.11.5
Deprecated: false

# Installation
> `npm install --save @susy-js/bn.js`

# Summary
This package contains type definitions for bn.js ( https://github.com/indutny/bn.js ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/bn.js

Additional Details
 * Last updated: Mon, 01 Apr 2019 20:18:08 GMT
 * Dependencies: @susy-js/node
 * Global values: none

# Credits
These definitions were written by Leonid Logvinov <https://github.com/LogvinovLeon>, Henry Nguyen <https://github.com/HenryNguyen5>, Gaylor Bosson <https://github.com/Gilthoniel>.
npm package: @susy-js/cli-color
Description: TypeScript definitions for cli-color 0.3.2
Author: Joel Spadin
Latest version: 0.3.29

# Installation
> `npm install --save @susy-js/cli-color`

# Summary
This package contains type definitions for cli-color 0.3.2 (https://github.com/medikoo/cli-color).

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/cli-color

Additional Details
 * Last updated: Mon, 19 Sep 2016 16:15:24 GMT
 * File structure: MultipleModules
 * Library Dependencies: none
 * Module Dependencies: none
 * Global values: none

# Credits
These definitions were written by Joel Spadin <https://github.com/ChaosinaCan>.
npm package: @susy-js/contracts
Description: Susy's contracts as ES6 classes.
Latest version: 5.1.3

# @susy-js/contracts

Susy's [contracts](https://github.com/susy-contracts) as ES6 classes.

[![Build Status](https://travis-ci.org/susytech/js-libs.svg?branch=master)](https://travis-ci.org/susytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@susy-js/contracts.svg)](https://www.npmjs.com/package/@susy-js/contracts)
[![npm](https://img.shields.io/npm/dw/@susy-js/contracts.svg)](https://www.npmjs.com/package/@susy-js/contracts)
[![dependencies Status](https://david-dm.org/susytech/js-libs/status.svg?path=packages/contracts)](https://david-dm.org/susytech/js-libs?path=packages/contracts)

## Installation

```bash
yarn add @susy-js/contracts
```

## Usage

### The Contracts object

```javascript
import Api from '@susy-js/api';
import Contracts from '@susy-js/contracts';

const sophonProvider = ...; // Put your Sophon provider here, e.g. from MetaMask
const api = new Api(sophonProvider);

const contracts = Contracts.get(api);

// The contracts object exposes the following contracts:
contracts.badgerefg
contracts.dappref
contracts.githubhint
contracts.registry
contracts.signaturereg
contracts.tokenreg
```

See the [docs/](docs) folder to see the properties of each of those contracts.

### Import ABIs

```javascript
import { sip20 } from '@susy-js/contracts/lib/abi';
```

The list of available ABIs is in the [src/abi/](src/abi) folder.
npm package: @susy-js/debug
Description: TypeScript definitions for debug
Latest version: 0.0.31

# Installation
> `npm install --save @susy-js/debug`

# Summary
This package contains type definitions for debug (https://github.com/visionmedia/debug).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/debug

Additional Details
 * Last updated: Thu, 04 Oct 2018 17:46:11 GMT
 * Dependencies: none
 * Global values: debug

# Credits
These definitions were written by Seon-Wook Park <https://github.com/swook>, Gal Talmor <https://github.com/galtalmor>, John McLaughlin <https://github.com/zamb3zi>, Brasten Sager <https://github.com/brasten>.
npm package: @susy-js/json-schema
Description: TypeScript definitions for json-schema 4.0, 6.0 and
Latest version: 7.0.3

# Installation
> `npm install --save @susy-js/json-schema`

# Summary
This package contains type definitions for json-schema 4.0, 6.0 and ( https://github.com/kriszyp/json-schema ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/json-schema

Additional Details
 * Last updated: Wed, 13 Feb 2019 18:42:17 GMT
 * Dependencies: none
 * Global values: none

# Credits
These definitions were written by Boris Cherny <https://github.com/bcherny>, Cyrille Tuzi <https://github.com/cyrilletuzi>, Lucian Buzzo <https://github.com/lucianbuzzo>, Roland Groza <https://github.com/rolandjitsu>.
npm package: @susy-js/light.js-react
Description: A HOC to easily use @susy-js/light.js with React.
Latest version: 5.1.3

# @susy-js/light.js-react

A HOC to easily use [@susy-js/light.js](https://octonion.institute/susytech/js-libs/packages/light.js) with React.

[![Build Status](https://travis-ci.org/susytech/js-libs.svg?branch=master)](https://travis-ci.org/susytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@susy-js/light.js-react.svg)](https://www.npmjs.com/package/@susy-js/light.js-react)
[![npm](https://img.shields.io/npm/dw/@susy-js/light.js-react.svg)](https://www.npmjs.com/package/@susy-js/light.js-react)
[![dependencies Status](https://david-dm.org/susytech/js-libs/status.svg?path=packages/light.js-react)](https://david-dm.org/susytech/js-libs?path=packages/light.js-react)

## Usage

The libray provides a higher-order component (HOC) to use `@susy-js/light.js`'s Observables easily with React apps.

```javascript
import light from '@susy-js/light.js-react';
import { myBalance$, syncStatus$ } from '@susy-js/light.js';

@light({
  myBalance: myBalance$, // myBalance will be a BigNumber
  mySyncVariable: syncStatus$
})
class MyClass extends React.Component {
  render() {
    return (
      <div>
        My balance is {this.props.myBalance.toFormat()}.<br />
        The sync status is {JSON.stringify(this.props.mySyncVariable)}.
      </div>
    );
  }
}
```

The UI will automatically update when the sync status changes.
npm package: @susy-js/lodash
Description: TypeScript definitions for Lo-Dash
Latest version: 4.14.133

# Installation
> `npm install --save @susy-js/lodash`

# Summary
This package contains type definitions for Lo-Dash ( https://lodash.com ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/lodash

Additional Details
 * Last updated: Fri, 31 May 2019 00:18:00 GMT
 * Dependencies: none
 * Global values: _

# Credits
These definitions were written by Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>, AJ Richardson <https://github.com/aj-r>, e-cloud <https://github.com/e-cloud>, Georgii Dolzhykov <https://github.com/thorn0>, Jack Moore <https://github.com/jtmthf>, Dominique Rau <https://github.com/DomiR>.
npm package: @susy-js/lodash.clonedeep
Description: TypeScript definitions for lodash.cloneDeep
Latest version: 4.5.6

# Installation
> `npm install --save @susy-js/lodash.clonedeep`

# Summary
This package contains type definitions for lodash.cloneDeep ( https://lodash.com ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/lodash.clonedeep

Additional Details
 * Last updated: Mon, 04 Mar 2019 22:43:01 GMT
 * Dependencies: @susy-js/lodash
 * Global values: none

# Credits
These definitions were written by Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>.
npm package: @susy-js/lodash.escaperegexp
Description: TypeScript definitions for lodash.escapeRegExp
Latest version: 4.1.6

# Installation
> `npm install --save @susy-js/lodash.escaperegexp`

# Summary
This package contains type definitions for lodash.escapeRegExp ( https://lodash.com ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/lodash.escaperegexp

Additional Details
 * Last updated: Mon, 04 Mar 2019 22:43:03 GMT
 * Dependencies: @susy-js/lodash
 * Global values: none

# Credits
These definitions were written by Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>.
npm package: @susy-js/lodash.isequal
Description: TypeScript definitions for lodash.isEqual
Latest version: 4.5.5

# Installation
> `npm install --save @susy-js/lodash.isequal`

# Summary
This package contains type definitions for lodash.isEqual ( https://lodash.com ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/lodash.isequal

Additional Details
 * Last updated: Mon, 04 Mar 2019 22:43:09 GMT
 * Dependencies: @susy-js/lodash
 * Global values: none

# Credits
These definitions were written by Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>.
npm package: @susy-js/lodash.merge
Description: TypeScript definitions for lodash.merge
Latest version: 4.6.6

# Installation
> `npm install --save @susy-js/lodash.merge`

# Summary
This package contains type definitions for lodash.merge ( https://lodash.com ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/lodash.merge

Additional Details
 * Last updated: Mon, 04 Mar 2019 23:26:42 GMT
 * Dependencies: @susy-js/lodash
 * Global values: none

# Credits
These definitions were written by Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>.
npm package: @susy-js/minimist
Description: TypeScript definitions for minimist
Author: Bart van der Schoor
Latest version: 1.2.0

# Installation
> `npm install --save @susy-js/minimist`

# Summary
This package contains type definitions for minimist (https://github.com/substack/minimist).

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/minimist

Additional Details
 * Last updated: Thu, 29 Dec 2016 23:09:09 GMT
 * Library Dependencies: none
 * Module Dependencies: none
 * Global values: none

# Credits
These definitions were written by Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>, kamranayub <https://github.com/kamranayub>.
npm package: @susy-js/mocha
Description: TypeScript definitions for mocha
Latest version: 5.2.7

# Installation
> `npm install --save @susy-js/mocha`

# Summary
This package contains type definitions for mocha ( https://mochajs.org ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/mocha

Additional Details
 * Last updated: Thu, 30 May 2019 18:05:34 GMT
 * Dependencies: none
 * Global values: Mocha, after, afterEach, before, beforeEach, context, describe, it, mocha, run, setup, specify, suite, suiteSetup, suiteTeardown, teardown, test, xcontext, xdescribe, xit, xspecify

# Credits
These definitions were written by Kazi Manzur Rashid <https://github.com/kazimanzurrashid>, otiai10 <https://github.com/otiai10>, jt000 <https://github.com/jt000>, Vadim Macagon <https://github.com/enlight>, Andrew Bradley <https://github.com/cspotcode>, Dmitrii Sorin <https://github.com/1999>.
npm package: @susy-js/mz
Description: TypeScript definitions for mz
Latest version: 0.0.32

# Installation
> `npm install --save @susy-js/mz`

# Summary
This package contains type definitions for mz (https://github.com/normalize/mz).

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/mz

Additional Details
 * Last updated: Tue, 26 Sep 2017 23:00:43 GMT
 * Dependencies: child_process, node, dns, readline, crypto, zlib, fs
 * Global values: none

# Credits
These definitions were written by Thomas Hickman <https://github.com/ThomasHickman>.
npm package: @susy-js/node
Description: TypeScript definitions for Node.js
Latest version: 12.0.8
Deprecated: false

# Installation
> `npm install --save @susy-js/node`

# Summary
This package contains type definitions for Node.js ( http://nodejs.org/ ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/node

Additional Details
 * Last updated: Tue, 11 Jun 2019 19:11:52 GMT
 * Dependencies: none
 * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout

# Credits
These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Benjamin Toueg <https://github.com/btoueg>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, David Junger <https://github.com/touffy>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Huw <https://github.com/hoo29>, Kelvin Jin <https://github.com/kjin>, Klaus Meinhardt <https://github.com/ajafff>, Lishude <https://github.com/islishude>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, Matthieu Sieben <https://github.com/matthieusieben>, Mohsen Azimi <https://github.com/mohsen1>, Nicolas Even <https://github.com/n-e>, Nicolas Voigt <https://github.com/octo-sniffle>, Parambir Singh <https://github.com/parambirs>, Sebastian Silbermann <https://github.com/eps1lon>, Simon Schick <https://github.com/SimonSchick>, Thomas den Hollander <https://github.com/ThomasdenH>, Wilco Bakker <https://github.com/WilcoBakker>, wwwy3y3 <https://github.com/wwwy3y3>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Jeremie Rodriguez <https://github.com/jeremiergz>, Samuel Ainsworth <https://github.com/samuela>, Kyle Uehlein <https://github.com/kuehlein>, Jordi Oliveras Rovira <https://github.com/j-oliveras>, Thanik Bhongbhibhat <https://github.com/bhongy>.
npm package: @susy-js/susyweb
Description: TypeScript definitions for susyweb
Latest version: 1.0.18
Deprecated: false

# Installation
> `npm install --save @susy-js/susyweb`

# Summary
This package contains type definitions for susyweb ( https://github.com/susy-js/susyweb.js ).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/susyweb

Additional Details
 * Last updated: Thu, 24 Jan 2019 23:28:40 GMT
 * Dependencies: @susy-js/bn.js, @susy-js/underscore
 * Global values: none

# Credits
These definitions were written by Simon Jentzsch <https://github.com/simon-jentzsch>, Nitzan Tomer <https://github.com/nitzantomer>, Zurbo <https://github.com/zurbo>, Xiao Liang <https://github.com/yxliang01>, Francesco Soncina <https://github.com/phra>, Nick Addison <https://github.com/naddison36>, Ícaro Harry <https://github.com/icaroharry>, Linus Norton <https://github.com/linusnorton>, Javier Peletier <https://github.com/jpeletier>, HIKARU KOBORI <https://github.com/anneau>, Baris Gumustas <https://github.com/matrushka>, André Vitor de Lima Matos <https://github.com/andrsvmatos>, Levin Keller <https://github.com/levino>, Dmitry Radkovskiy <https://github.com/zlumer>, Konstantin Melnikov <https://github.com/archangel-irk>, Asgeir Sognefest <https://github.com/sogasg>, Donam Kim <https://github.com/donamk>, Doug Kent <https://github.com/dkent600>, Daniel Zhou <https://github.com/nerddan>, Alex Kvak <https://github.com/alexkvak>.
npm package: @susy-js/underscore
Description: TypeScript definitions for Underscore
Latest version: 1.9.0
Deprecated: false

# Installation
> `npm install --save @susy-js/underscore`

# Summary
This package contains type definitions for Underscore (http://underscorejs.org/).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/src/branch/master/types/underscore

Additional Details
 * Last updated: Wed, 19 Jun 2019 17:06:09 GMT
 * Dependencies: none
 * Global values: _

# Credits
These definitions were written by Boris Yankov <https://github.com/borisyankov>, Josh Baldwin <https://github.com/jbaldwin>, Christopher Currens <https://github.com/ccurrens>, Ard Timmerman <https://github.com/confususs>, Julian Gonggrijp <https://github.com/jgonggrijp>, Florian Keller <https://github.com/ffflorian>, and Regev Brody <https://github.com/regevbr>.
npm package: @susytech/abi
Description: Ethereum ABI encoder and decoder
Author: Susy Team
Latest version: 5.1.3

# @susytech/abi

A port of [https://github.com/susytech/ethabi](https://github.com/susytech/ethabi) to JavaScript

[![Build Status](https://travis-ci.org/susytech/js-libs.svg?branch=master)](https://travis-ci.org/susytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@susytech/abi.svg)](https://www.npmjs.com/package/@susytech/abi)
[![npm](https://img.shields.io/npm/dw/@susytech/abi.svg)](https://www.npmjs.com/package/@susytech/abi)
[![dependencies Status](https://david-dm.org/susytech/js-libs/status.svg?path=packages/abi)](https://david-dm.org/susytech/js-libs?path=packages/abi)
[![docs](https://img.shields.io/badge/docs-passing-green.svg)](https://susytech.github.io/js-libs/abi/)

## [Full Documentation](https://susytech.github.io/js-libs/abi/)

## Contributing

Clone the repo and install dependencies via `npm install`. Tests can be executed via `npm run test`

## Installation

Install the package with `npm install --save @susytech/abi` from [@susytech/abi](https://www.npmjs.com/package/@susytech/abi)

## Implementation

### Approach

- this version tries to stay as close to the original Rust version in intent, function names & purpose
- it is a basic port of the Rust version, relying on effectively the same test-suite (expanded where deemed appropriate)
- it is meant as a library to be used in other projects, i.e. [@susytech/api](https://www.npmjs.com/package/@susytech/api)

### Differences to original Rust version

- internally the library operates on string binary representations as opposed to Vector bytes, lengths are therefore 64 bytes as opposed to 32 bytes
- function names are adapted from the Rust standard snake_case to the JavaScript standard camelCase
- due to the initial library focus, the cli component (as implemented by the original) is not supported nor implemented
npm package: @susytech/api
Description: The Susy Promise-based API library for interfacing with Ethereum over RPC
Author: Susy Team
Latest version: 5.1.3

# @susytech/api

Susy.js is a thin, fast, Promise-based wrapper around the Ethereum APIs.

[![Build Status](https://travis-ci.org/susytech/js-libs.svg?branch=master)](https://travis-ci.org/susytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@susytech/api.svg)](https://www.npmjs.com/package/@susytech/api)
[![npm](https://img.shields.io/npm/dw/@susytech/api.svg)](https://www.npmjs.com/package/@susytech/api)
[![dependencies Status](https://david-dm.org/susytech/js-libs/status.svg?path=packages/api)](https://david-dm.org/susytech/js-libs?path=packages/api)

## installation

Install the package with `npm install --save @susytech/api`

## usage

### initialisation

```javascript
// import the actual Api class
import Api from '@susytech/api';

// do the setup
const provider = new Api.Provider.Http('http://localhost:8545');
const api = new Api(provider);
```

### making calls

perform a call

```javascript
api.eth.coinbase().then(coinbase => {
  console.log(`The coinbase is ${coinbase}`);
});
```

multiple promises

```javascript
Promise.all([api.eth.coinbase(), api.net.listening()]).then(
  ([coinbase, listening]) => {
    // do stuff here
  }
);
```

chaining promises

```javascript
api.eth
  .newFilter({...})
  .then((filterId) => api.eth.getFilterChanges(filterId))
  .then((changes) => {
    console.log(changes);
  });
```

### contracts

attach contract

```javascript
const abi = [{ name: 'callMe', inputs: [{ type: 'bool', ...}, { type: 'string', ...}]}, ...abi...];
const address = '0x123456...9abc';
const contract = api.newContract(abi, address);
```

find & call a function

```javascript
contract.instance.callMe
  .call({ gas: 21000 }, [true, 'someString']) // or estimateGas or postTransaction
  .then(result => {
    console.log(`the result was ${result}`);
  });
```

## apis

APIs implement the calls as exposed in the [Ethcore JSON Ethereum RPC](https://github.com/susytech/js-api) definitions. Mapping follows the naming conventions of the originals, i.e. `eth_call` becomes `eth.call`, `personal_accounts` becomes `personal.accounts`, etc.

## public node

For operation within a public node, the following peerDependencies needs to be added (this functionality will be moved shortly) -
npm package: @susytech/contracts
Description: Susy's contracts as ES6 classes.
Author: Susy Team
Latest version: 5.1.3

# @susytech/contracts

Susy's [contracts](https://github.com/susy-contracts) as ES6 classes.

[![Build Status](https://travis-ci.org/susytech/js-libs.svg?branch=master)](https://travis-ci.org/susytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@susytech/contracts.svg)](https://www.npmjs.com/package/@susytech/contracts)
[![npm](https://img.shields.io/npm/dw/@susytech/contracts.svg)](https://www.npmjs.com/package/@susytech/contracts)
[![dependencies Status](https://david-dm.org/susytech/js-libs/status.svg?path=packages/contracts)](https://david-dm.org/susytech/js-libs?path=packages/contracts)

## Installation

```bash
yarn add @susytech/contracts
```

## Usage

### The Contracts object

```javascript
import Api from '@susytech/api';
import Contracts from '@susytech/contracts';

const ethereumProvider = ...; // Put your Ethereum provider here, e.g. from MetaMask
const api = new Api(ethereumProvider);

const contracts = Contracts.get(api);

// The contracts object exposes the following contracts:
contracts.badgerefg
contracts.dappref
contracts.githubhint
contracts.registry
contracts.signaturereg
contracts.tokenreg
```

See the [docs/](docs) folder to see the properties of each of those contracts.

### Import ABIs

```javascript
import { eip20 } from '@susytech/contracts/lib/abi';
```

The list of available ABIs is in the [src/abi/](src/abi) folder.
npm package: @susytech/light.js-react
Description: A HOC to easily use @susytech/light.js with React.
Author: Susy Team
Latest version: 5.1.3

# @susytech/light.js-react

A HOC to easily use [@susytech/light.js](https://github.com/susytech/js-libs/packages/light.js) with React.

[![Build Status](https://travis-ci.org/susytech/js-libs.svg?branch=master)](https://travis-ci.org/susytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@susytech/light.js-react.svg)](https://www.npmjs.com/package/@susytech/light.js-react)
[![npm](https://img.shields.io/npm/dw/@susytech/light.js-react.svg)](https://www.npmjs.com/package/@susytech/light.js-react)
[![dependencies Status](https://david-dm.org/susytech/js-libs/status.svg?path=packages/light.js-react)](https://david-dm.org/susytech/js-libs?path=packages/light.js-react)

## Usage

The libray provides a higher-order component (HOC) to use `@susytech/light.js`'s Observables easily with React apps.

```javascript
import light from '@susytech/light.js-react';
import { myBalance$, syncStatus$ } from '@susytech/light.js';

@light({
  myBalance: myBalance$, // myBalance will be a BigNumber
  mySyncVariable: syncStatus$
})
class MyClass extends React.Component {
  render() {
    return (
      <div>
        My balance is {this.props.myBalance.toFormat()}.<br />
        The sync status is {JSON.stringify(this.props.mySyncVariable)}.
      </div>
    );
  }
}
```

The UI will automatically update when the sync status changes.
npm package: @sutairu/core
Description: <p align="center">   <a href="https://jujitsu.studio/sutairu">     <h1 align="center">@sutairu/core</h1>   </a> </p>
Author: KIJVCN
Latest version: 0.1.1

<p align="center">
  <a href="https://jujitsu.studio/sutairu">
    <h1 align="center">@sutairu/core</h1>
  </a>
</p>

<p align="center">
  <a aria-label="jujitsu.studio" href="https://jujitsu.studio/">
    <img src="https://img.shields.io/badge/MADE%20BY%20JUJITSU.STUDIO-000000.svg?style=for-the-badge&labelColor=000">
  </a>
  <a aria-label="NPM version" href="https://npmjs.com/package/@sutairu/core">
    <img alt="" src="https://img.shields.io/npm/v/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000">
  </a>
  <a aria-label="License" href="https://github.com/jujitsustudio/sutairu/blob/main/LICENSE">
    <img alt="" src="https://img.shields.io/npm/l/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000&color=">
  </a>
</p>

## Documentation

Visit https://jujitsu.studio/sutairu to view the full documentation.

## Acknowledgements

- [StitchesCSS](https://stitches.dev)
npm package: @sutairu/postcss
Description: <p align="center">   <a href="https://jujitsu.studio/sutairu">     <h1 align="center">@sutairu/postcss</h1>   </a> </p>
Author: KIJVCN
Latest version: 0.1.1

<p align="center">
  <a href="https://jujitsu.studio/sutairu">
    <h1 align="center">@sutairu/postcss</h1>
  </a>
</p>

<p align="center">
  <a aria-label="jujitsu.studio" href="https://jujitsu.studio/">
    <img src="https://img.shields.io/badge/MADE%20BY%20JUJITSU.STUDIO-000000.svg?style=for-the-badge&labelColor=000">
  </a>
  <a aria-label="NPM version" href="https://npmjs.com/package/@sutairu/postcss">
    <img alt="" src="https://img.shields.io/npm/v/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000">
  </a>
  <a aria-label="License" href="https://github.com/jujitsustudio/sutairu/blob/main/LICENSE">
    <img alt="" src="https://img.shields.io/npm/l/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000&color=">
  </a>
</p>

> This plugin is experimental and not ready for production use. Use at your own risk.

## Documentation

Visit https://jujitsu.studio/sutairu to view the full documentation.

## Acknowledgements

- [StitchesCSS](https://stitches.dev)
npm package: @sutairu/react
Description: <p align="center">   <a href="https://jujitsu.studio/sutairu">     <h1 align="center">@sutairu/react</h1>   </a> </p>
Author: KIJVCN
Latest version: 0.1.2

<p align="center">
  <a href="https://jujitsu.studio/sutairu">
    <h1 align="center">@sutairu/react</h1>
  </a>
</p>

<p align="center">
  <a aria-label="jujitsu.studio" href="https://jujitsu.studio/">
    <img src="https://img.shields.io/badge/MADE%20BY%20JUJITSU.STUDIO-000000.svg?style=for-the-badge&labelColor=000">
  </a>
  <a aria-label="NPM version" href="https://npmjs.com/package/@sutairu/react">
    <img alt="" src="https://img.shields.io/npm/v/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000">
  </a>
  <a aria-label="License" href="https://github.com/jujitsustudio/sutairu/blob/main/LICENSE">
    <img alt="" src="https://img.shields.io/npm/l/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000&color=">
  </a>
</p>

## Documentation

Visit https://jujitsu.studio/sutairu to view the full documentation.

## Acknowledgements

- Plugin Architecture by [UnoCSS](https://unocss.dev)
npm package: @sutairu/vite
Description: <p align="center">   <a href="https://jujitsu.studio/sutairu">     <h1 align="center">@sutairu/vite</h1>   </a> </p>
Author: KIJVCN
Latest version: 0.1.1

<p align="center">
  <a href="https://jujitsu.studio/sutairu">
    <h1 align="center">@sutairu/vite</h1>
  </a>
</p>

<p align="center">
  <a aria-label="jujitsu.studio" href="https://jujitsu.studio/">
    <img src="https://img.shields.io/badge/MADE%20BY%20JUJITSU.STUDIO-000000.svg?style=for-the-badge&labelColor=000">
  </a>
  <a aria-label="NPM version" href="https://npmjs.com/package/@sutairu/vite">
    <img alt="" src="https://img.shields.io/npm/v/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000">
  </a>
  <a aria-label="License" href="https://github.com/jujitsustudio/sutairu/blob/main/LICENSE">
    <img alt="" src="https://img.shields.io/npm/l/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000&color=">
  </a>
</p>

> This plugin is experimental and not ready for production use. Use at your own risk.

## Documentation

Visit https://jujitsu.studio/stitches to view the full documentation.

## Acknowledgements

- Plugins Architecture by [UnoCSS](https://unocss.dev)
npm package: @sutairu/webpack
Description: <p align="center">   <a href="https://jujitsu.studio/sutairu">     <h1 align="center">@sutairu/webpack</h1>   </a> </p>
Author: KIJVCN
Latest version: 0.1.1

<p align="center">
  <a href="https://jujitsu.studio/sutairu">
    <h1 align="center">@sutairu/webpack</h1>
  </a>
</p>

<p align="center">
  <a aria-label="jujitsu.studio" href="https://jujitsu.studio/">
    <img src="https://img.shields.io/badge/MADE%20BY%20JUJITSU.STUDIO-000000.svg?style=for-the-badge&labelColor=000">
  </a>
  <a aria-label="NPM version" href="https://npmjs.com/package/@sutairu/webpack">
    <img alt="" src="https://img.shields.io/npm/v/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000">
  </a>
  <a aria-label="License" href="https://github.com/jujitsustudio/sutairu/blob/main/LICENSE">
    <img alt="" src="https://img.shields.io/npm/l/%40sutairu%2Fcore.svg?style=for-the-badge&labelColor=000000&color=">
  </a>
</p>

> This plugin is experimental and not ready for production use. Use at your own risk.

## Documentation

Visit https://jujitsu.studio/sutairu to view the full documentation.

## Acknowledgements

- Plugin Architecture by [UnoCSS](https://unocss.dev)