Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iota/client

Package Overview
Dependencies
Maintainers
12
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iota/client

Node.js binding to the client library

  • 3.0.0-rc.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
88
increased by528.57%
Maintainers
12
Weekly downloads
 
Created
Source

IOTA Client Library - Node.js binding

Node.js binding to the iota.rs client library.

Installation

  • Using NPM:
$ npm i @iota/client
  • Using yarn:
$ yarn add @iota/client

Requirements

One of the following Node.js version: '14.x', '16.x', '18.x'

If there is no prebuilt binary available for your system you need Rust and Cargo, to build it yourself. Install them here. Also for Linux libudev is needed and can be installed with apt install libudev-dev.

Getting Started

After you linked the library, you can create a Client instance and interface with it.

const { Client, initLogger } = require('@iota/client');

async function run() {
    initLogger();

    const client = new Client({
        nodes: ['https://api.testnet.shimmer.network'],
        localPow: true,
    });

    try {
        const nodeInfo = await client.getInfo();
        console.log('Node info: ', nodeInfo);
    } catch (error) {
        console.error('Error: ', error);
    }
}

run().then(() => process.exit());

FAQs

Package last updated on 14 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc