npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qubic-labs/core

v1.0.0

Published

Core, low-level TypeScript building blocks for Qubic: identity conversion, seed/key derivation, transaction build/signing, binary codecs, and transports.

Readme

jskit-core

Core, low-level TypeScript building blocks for Qubic: identity conversion, seed/key derivation, transaction build/signing, binary codecs, and transports.

Documentation

  • Feature docs: docs/README.md
  • Examples: examples/README.md

Feature pages

  • Identity: docs/identity.md
  • Seed & keys: docs/seed-and-keys.md
  • Transactions: docs/transactions.md
  • Protocol & codecs: docs/protocol.md
  • Transports: docs/transports.md

Install

bun add @qubic-labs/core

API Overview

Identity

  • identityFromPublicKey(publicKey32, { lowerCase? })
  • publicKeyFromIdentity(identity60)
  • verifyIdentity(identity60)

Seed & keys

  • SEED_LENGTH
  • privateKeyFromSeed(seed, index?)
  • publicKeyFromSeed(seed, index?)
  • identityFromSeed(seed, index?)

Transactions

  • buildUnsignedTransaction(...)
  • unsignedTransactionDigest(unsignedTxBytes)
  • signTransaction(unsignedTxBytes, secretKey32)
  • buildSignedTransaction(...)
  • transactionDigest(txBytes)
  • transactionId(txBytes)
  • Constants: TRANSACTION_HEADER_SIZE, SIGNATURE_LENGTH, MAX_TRANSACTION_SIZE, MAX_INPUT_SIZE

Protocol & codecs

  • Framing: createPacketFramer, encodeRequestResponseHeader, decodeRequestResponseHeader
  • Requests: encodeRequestPacket, NetworkMessageType
  • Tick info: encodeRequestCurrentTickInfo, decodeRespondCurrentTickInfo
  • Entity: encodeRequestEntity, decodeRespondEntity
  • System info: encodeRequestSystemInfo, decodeRespondSystemInfo
  • Contract function: encodeRequestContractFunction, decodeRespondContractFunction
  • Broadcast tx: encodeBroadcastTransactionPacket
  • Tick data: encodeRequestTickData, decodeBroadcastFutureTickData, countNonZeroTransactionDigests
  • Assets: encodeRequestAssetsByFilter, encodeRequestAssetsByUniverseIndex, decodeRespondAssets, decodeRespondAssetsWithSiblings, decodeAssetRecord
  • Stream helper: readUntilEndResponse

Transports

  • createTcpTransport({ host, port, signal? }) (Node)
  • createBridgeTransport({ url, signal?, WebSocketImpl? }) (browser/WebSocket bridge)

Usage

Derive identity from seed

import { identityFromSeed } from "@qubic-labs/core";

const seed = "jvhbyzjinlyutyuhsweuxiwootqoevjqwqmdhjeohrytxjxidpbcfyg";
console.log(await identityFromSeed(seed));

Build + sign + broadcast a transaction (Node TCP)

import {
  buildSignedTransaction,
  createTcpTransport,
  encodeBroadcastTransactionPacket,
  identityFromSeed,
  privateKeyFromSeed,
  publicKeyFromIdentity,
} from "@qubic-labs/core";

const host = "127.0.0.1";
const port = 21841;

const seed = "jvhbyzjinlyutyuhsweuxiwootqoevjqwqmdhjeohrytxjxidpbcfyg";
const sourceIdentity = await identityFromSeed(seed);
const secretKey32 = await privateKeyFromSeed(seed);
const sourcePublicKey32 = publicKeyFromIdentity(sourceIdentity);
const destinationPublicKey32 = publicKeyFromIdentity(
  "AFZPUAIYVPNUYGJRQVLUKOPPVLHAZQTGLYAAUUNBXFTVTAMSBKQBLEIEPCVJ",
);

const tick = 12345;
const txBytes = await buildSignedTransaction(
  { sourcePublicKey32, destinationPublicKey32, amount: 1n, tick },
  secretKey32,
);

const packet = encodeBroadcastTransactionPacket(txBytes);
const transport = await createTcpTransport({ host, port });
await transport.write(packet);
await transport.close();

Request current tick info

import {
  createPacketFramer,
  createTcpTransport,
  decodeRespondCurrentTickInfo,
  encodeRequestCurrentTickInfo,
  NetworkMessageType,
} from "@qubic-labs/core";

const transport = await createTcpTransport({ host: "127.0.0.1", port: 21841 });
const framer = createPacketFramer();

await transport.write(encodeRequestCurrentTickInfo());

for await (const chunk of transport.read()) {
  framer.push(chunk);
  for (const pkt of framer.read()) {
    if (pkt.header.type === NetworkMessageType.RESPOND_CURRENT_TICK_INFO) {
      console.log(decodeRespondCurrentTickInfo(pkt.payload));
      await transport.close();
      break;
    }
  }
}

Browser / bridge transport

If you have a WebSocket bridge that forwards binary frames to a Qubic node TCP connection, you can use:

import { createBridgeTransport } from "@qubic-labs/core";

const transport = await createBridgeTransport({ url: "wss://bridge.example/ws" });