Noodles, Poodles and More!

    @kosu/contract-helpers
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.0 • Public • Published

    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.

    Keywords

    none

    Install

    npm i @kosu/contract-helpers

    DownloadsWeekly Downloads

    3

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    178 kB

    Total Files

    42

    Last publish

    Collaborators

    • paradigm-labs
    • freydal
    • henryharder