@kosu/contract-helpers
JavaScript module for connecting with Kosu.
Last updated a year ago by paradigm-labs .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kosu/contract-helpers 
SYNC missed versions from official npm registry.

Kosu.js

A TypeScript/JavaScript library for interacting with the Kosu contract system and order relay network.

View the documentation here.

Installation

Kosu.js can be installed into your project through yarn or npm, and can be passed through webpack or browserify for usage in the browser.

Install

Yarn:

yarn add @kosu/kosu.js

NPM:

npm install --save @kosu/kosu.js

Import

Kosu and its exported classes can be imported directly into TypeScript or JavaScript projects.

TypeScript (and ES6+):

// top-level Kosu class
import { Kosu } from "@kosu/kosu.js";

// directly access exported classes/utilities
import {
    // contract wrapper classes
    KosuToken,
    OrderGateway,
    PosterRegistry,
    Treasury,
    ValidatorRegistry,
    Voting,

    // utils/classes and constants
    OrderSerializer,
    OrderHelper,
    Signature,
    toBytes32
    NULL_ADDRESS,
} from "@kosu/kosu.js";

JavaScript (CommonJS):

const { Kosu } = require("@kosu/kosu.js");

const {
    KosuToken,
    OrderGateway,
    PosterRegistry,
    Treasury,
    ValidatorRegistry,
    Voting,

    OrderSerializer,
    OrderHelper,
    Signature,
    toBytes32
    NULL_ADDRESS,
} = require("@kosu/kosu.js");

Development

@todo: add contribution guidelines summary and link

Linting

The TypeScript source can be linted with:

yarn lint

Building

Build the TypeScript source to distributable JavaScript (CommonJS) as well as source mappings and typing files with:

yarn build

License

Open-source software, MIT licensed.

Copyright (c) 2019 Paradigm Labs, corp.

Current Tags

  • 0.3.0                                ...           latest (a year ago)

1 Versions

  • 0.3.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (21)
Dev Dependencies (9)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |