JavaScript SDK for Iroha 2.
The Iroha 2 JavaScript library includes the following packages:
@iroha2/clientsubmits requests to the Iroha peer@iroha2/crypto-*:@iroha2/crypto-coreprovides unified crypto interface for Iroha 2@iroha2/crypto-target-nodeprovides compiled crypto WASM for the Node.js environment@iroha2/crypto-target-webprovides compiled crypto WASM for native Web (ESM)@iroha2/crypto-target-bundlerprovides compiled crypto WASM to use with bundlers such as Webpack
@iroha2/data-modelprovides SCALE codecs for Iroha 2 data model
Other packages you can find in this repository:
@iroha2/client-isomorphic-fetchfallbacks tonode-fetchor nativefetch()in Node.js@iroha2/client-isomorphic-wscontains isomorphic WebSocket transport for@iroha2/client@iroha2/docs-recipescontains code samples used in documentation@iroha2/data-model-schemacontains Iroha 2 Schema@iroha2/i64-fixnumhandles operations with fixed-point numbers
The packages are published under the @iroha2 scope into Iroha Nexus Registry. To install them using npm/pnpm, follow these steps:
-
Configure your package manager to fetch scoped packages from Nexus Registry:
# FILE: .npmrc @iroha2:registry=https://nexus.iroha.tech/repository/npm-group/
-
Install these packages as any other NPM package:
npm i @iroha2/client yarn add @iroha2/data-model pnpm add @iroha2/crypto-target-web
Check out Hyperledger Iroha 2 Tutorial that introduces you to Iroha 2 concepts and features and provides you with a step-by-step guide for JavaScript/TypeScript.
pnpm jake -t