Skip to main content

@iroha/core@0.3.1
Built and signed on GitHub Actions

Core components of Iroha JavaScript SDK.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 weeks ago (0.3.1)
class EnumCodec
extends GenCodec<scale.Enumerate<E>>

Type Parameters

E extends scale.EnumRecord

Methods

discriminated<T extends [Tag in keyof E]: E[Tag] extends [] ? VariantUnit<Tag> : E[Tag] extends [infer Value] ? Variant<Tag, Value> : never[keyof E]>(): GenCodec<T>
literalUnion(): GenCodec<[Tag in keyof E]: E[Tag] extends [] ? Tag : never[keyof E]>

Add Package

deno add jsr:@iroha/core

Import symbol

import { EnumCodec } from "@iroha/core/codec";

---- OR ----

Import directly with a jsr specifier

import { EnumCodec } from "jsr:@iroha/core/codec";

Add Package

npx jsr add @iroha/core

Import symbol

import { EnumCodec } from "@iroha/core/codec";

Add Package

yarn dlx jsr add @iroha/core

Import symbol

import { EnumCodec } from "@iroha/core/codec";

Add Package

pnpm dlx jsr add @iroha/core

Import symbol

import { EnumCodec } from "@iroha/core/codec";

Add Package

bunx jsr add @iroha/core

Import symbol

import { EnumCodec } from "@iroha/core/codec";