Skip to main content

Getting Started with Wasm

Getting Started with Wasm​

Minimum Requirements​

Install the Library​

If your project does not contain it already, install the peer dependency @iota/iota-sdk as well.

npm install @iota/iota-sdk

You can install the latest beta version of the library by running the following command:

npm install @iota/hierarchies@alpha

Build the Library​

Alternatively, you can build the bindings to work with currently unreleased features. You can find instructions for this in the hierarchies repository.

Usage in Node.js and Web​

The Wasm packages are bundled for both Node.js and web. To use them, you must import them from the correct entry point:

  • Node.js
import { ... } from '@iota/hierarchies/node';
  • Web
import { ... } from '@iota/hierarchies/web';

Usage Examples​

bindings/wasm/hierarchies_wasm/examples/src/01_create_federation.ts
loading...

See utils for details about the implementations about the helper functions used here.

API Reference​

For complete API documentation, see the WASM API Reference.

Examples​

You can find more usage examples and tutorials in the hierarchies examples repository.