https://github.com/hyperledger-iroha/iroha-javascript
JavaScript library for Iroha, a Distributed Ledger Technology (blockchain) platform.
https://github.com/hyperledger-iroha/iroha-javascript
blockchain distributed-ledger dlt hyperledger iroha javascript-library
Last synced: 2 months ago
JSON representation
JavaScript library for Iroha, a Distributed Ledger Technology (blockchain) platform.
- Host: GitHub
- URL: https://github.com/hyperledger-iroha/iroha-javascript
- Owner: hyperledger-iroha
- License: apache-2.0
- Created: 2016-09-19T11:51:46.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-03-28T09:40:43.000Z (2 months ago)
- Last Synced: 2025-03-28T17:11:10.785Z (2 months ago)
- Topics: blockchain, distributed-ledger, dlt, hyperledger, iroha, javascript-library
- Language: TypeScript
- Homepage: https://wiki.hyperledger.org/display/iroha
- Size: 5.25 MB
- Stars: 95
- Watchers: 40
- Forks: 64
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Iroha JavaScript
The JavaScript (TypeScript) SDK of [Iroha 2](https://github.com/hyperledger-iroha/iroha) for Node.js, Deno, Bun, and
Browsers.Packages and documentation are available on JSR: https://jsr.io/@iroha
## Usage
### Installation
```shell
# 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
```ts
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](https://jsr.io/@iroha/core#iroha-compatibility).## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md)