New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hashgraph/sdk

Package Overview
Dependencies
Maintainers
15
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashgraph/sdk

Hedera™ Hashgraph SDK

  • 2.56.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
increased by16.29%
Maintainers
15
Weekly downloads
 
Created
Source

Hedera™ Hashgraph JavaScript SDK

Docs NPM Package

The JavaScript SDK for interacting with Hedera Hashgraph: the official distributed consensus platform built using the hashgraph consensus algorithm for fast, fair and secure transactions. Hedera enables and empowers developers to build an entirely new class of decentralized applications.

Install

NOTE: v1 of the SDK is deprecated and support will be discontinued after October 2021. Please install the latest version 2.x or migrate from v1 to the latest 2.x version. You can reference the migration documentation.

# with NPM
$ npm install --save @hashgraph/sdk

# with Yarn
$ yarn add @hashgraph/sdk

# with PNPM
$ pnpm add @hashgraph/sdk

Build

Prerequisites

  1. Taskfile tool installation
  2. Node.js: It is recommended to use Node.js v20 or higher for best performance and compatibility. The package may also work with Node.js v16, but this version has not been officially tested.
# with npm
$ npm install -g @go-task/cli

# with homebrew
$ brew install go-task
  1. pNpm package manager installation
# with npm
$ npm install -g pnpm

# with homebrew
$ brew install pnpm

After downloading the repo run:

  1. task install

  2. task build to build the SDK

React Native Support

The Hedera JavaScript SDK supports the following:

  • React Native with Expo - keep in mind that the SDK uses some functionalities provided from ethers/ethersproject and there is an issue using parts of ethers.js in this environment. A shims package has to be installed and imported before importing the SDK in your project as it is showed here
  • Useful information: here and here

The Hedera JavaScript SDK does not currently support the following:

  • React Native Bare

Usage

See examples.

Every example can be executed using the following command from the root directory: node examples/[name-of-example].js

Start tests

  • To start the integration tests follow the next steps:
  • To start unit tests follow the next steps:
    • Run task test:unit (Note: the local node should not be running)

Contributing to this Project

We welcome participation from all developers! For instructions on how to contribute to this repo, please review the Contributing Guide.

License Information

Licensed under Apache License, Version 2.0 – see LICENSE in this repo or apache.org/licenses/LICENSE-2.0.

Keywords

FAQs

Package last updated on 18 Dec 2024

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