Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

hyperledger-iroha/iroha-javascript

Open more actions menu

Repository files navigation

Iroha JavaScript

The JavaScript (TypeScript) SDK of Iroha 2 for Node.js, Deno, Bun, and Browsers.

Packages and documentation are available on JSR: https://jsr.io/@iroha

Usage

Installation

# deno
deno add jsr:@iroha/core

# npm (one of the below, depending on your package manager)
npx jsr add @iroha/core
yarn dlx jsr add @iroha/core
pnpm dlx jsr add @iroha/core
bunx jsr add @iroha/core

Quick Example

import { Client } from '@iroha/client'
import * as types from '@iroha/core/data-model'

const kp = types.KeyPair.random()

const client = new Client({
  toriiBaseURL: new URL('http://localhost:8080'),
  chain: '000-000',
  authority: new types.AccountId(kp.publicKey(), new types.DomainId('wonderland')),
  authorityPrivateKey: kp.privateKey(),
})

async function test() {
  await client.transaction(types.Executable.Instructions([
    types.InstructionBox.Register.Domain({
      id: new types.Name('wonderland'),
      logo: null,
      metadata: [],
    }),
  ]))
    .submit({ verify: true })
}

Iroha Compatibility

See the "Compatibility" section in @iroha/core package documentation.

Contributing

See CONTRIBUTING.md

About

JavaScript library for Iroha, a Distributed Ledger Technology (blockchain) platform.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.