Giter Site home page Giter Site logo

iota.js's Introduction

iota.js

This library is functionally complete, but it is recommended to use iota.rs. The rust library will be more heavily maintained and is more performant.

Mono-repo containing client and supporting packages for the IOTA chrysalis network, implemented in TypeScript to strongly type the objects sent and received from the API.

Runs in both NodeJS and Browser environments.

Prerequisites

npm install @iota/iota.js

Example

const { SingleNodeClient } = require("@iota/iota.js");

async function run() {
    const client = new SingleNodeClient("https://chrysalis-nodes.iota.org");

    const info = await client.info();
    console.log("Node Info");
    console.log("\tName:", info.name);
    console.log("\tVersion:", info.version);
    console.log("\tIs Healthy:", info.isHealthy);
    console.log("\tNetwork Id:", info.networkId);
    console.log("\tLatest Milestone Index:", info.latestMilestoneIndex);
    console.log("\tConfirmed Milestone Index:", info.confirmedMilestoneIndex);
    console.log("\tPruning Index:", info.pruningIndex);
    console.log("\tFeatures:", info.features);
    console.log("\tMin PoW Score:", info.minPoWScore);
}

run()
    .then(() => console.log("Done"))
    .catch((err) => console.error(err));

Packages

For more details on the main package see @iota/iota.js.

Other packages within the framework are.

Examples

Please find other examples in the ./packages/iota/examples folder.

  • Simple - Performs basic API operations.
  • Address - Demonstrates address generation from a Bip39 mnemonic seed using raw and Bip32 path methods.
  • Transaction - Demonstrates how to send a transaction and call some of the other higher level functions.
  • Data - Storing and retrieving data on the tangle.
  • Browser - Demonstrates direct inclusion and use of the library in an html page.
  • Peers - Demonstrates peer management.
  • Pow - Demonstrates using one of the other PoW packages.

Supporting the project

If the iota.js has been useful to you and you feel like contributing, consider submitting a bug report, feature request or a pull request.

See our contributing guidelines for more information.

Joining the discussion

If you want to get involved in the community, need help with getting set up, have any issues or just want to discuss IOTA, feel free to join our Discord.

License

The separate packages all contain their own licenses.

iota.js's People

Contributors

obany avatar chrisdukakis avatar greenkeeper[bot] avatar laumair avatar th0br0 avatar jakescahill avatar paulhandy avatar rajivshah3 avatar dependabot[bot] avatar alon-e avatar anyong avatar snyk-bot avatar deadl1f7 avatar thoralf-m avatar cym00n avatar robertkowalski avatar mark-bradshaw avatar atypicalprogrammer avatar nicoschtein avatar sachushaji avatar tanevanwifferen avatar jim42251 avatar gpanosxp avatar kevinley avatar 7h7 avatar stromflix avatar felhe avatar techworkerzandura avatar thisredone avatar jmcanterafonseca-iota avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.