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

@tuwaio/orbit-core

v0.2.15

Published

Layer 1 (L1) of the TUWA Ecosystem. Framework-agnostic library for abstracting core multi-chain types, errors, and localStorage helper utilities.

Readme

@tuwaio/orbit-core

NPM Version License

@tuwaio/orbit-core is the Layer 1 (L1) core logic and foundational state wrapper layer of the TUWA Orbit multi-chain framework. It is completely headless and framework-agnostic, engineered to decouple raw blockchain connection interfaces from visual frontend layers. By establishing a unified type-safe interface, it enables consistent cross-chain connection management and persistent user account tracking.


🏛️ Core Capabilities

  • Unified Multi-Chain Primitives: Establishes the structural BaseAdapter interface and the OrbitAdapter enum (EVM, Solana, Starknet) to serve as the abstract layer for multi-chain communication.
  • Connection State Persistence: Implements SSR-safe storage helpers (lastConnectedConnectorHelpers, recentConnectedConnectorHelpers) to track and resume wallet connection history via localStorage.
  • Autonomy-Focused Utilities: Technical utility helpers for formatting chain IDs, parsing connector names, and executing asynchronous operations (waitFor, delay).
  • Account Impersonation Engine: Built-in impersonatedHelpers for sandboxed testing and account auditing.

💾 Installation

pnpm add @tuwaio/orbit-core

🚀 Architectural Integration

Runtime Adapter Resolution

Register and resolve chain-specific primitive adapters dynamically:

import { OrbitAdapter, selectAdapterByKey, BaseAdapter } from '@tuwaio/orbit-core';

// Configure primitive adapter mapping
const adapters: BaseAdapter[] = [
  {
    key: OrbitAdapter.EVM,
    getExplorerUrl: (url) => `https://etherscan.io/${url}`,
  },
  {
    key: OrbitAdapter.SOLANA,
    getExplorerUrl: (url, cluster) => `https://solscan.io/${url}?cluster=${cluster}`,
  },
];

// Dynamically select target execution adapter
const activeAdapter = selectAdapterByKey({
  adapterKey: OrbitAdapter.SOLANA,
  adapter: adapters,
});

if (activeAdapter) {
  console.log(activeAdapter.getExplorerUrl('tx/0x...', 'mainnet-beta'));
}

Connection State Storage

Read and write connected connector metadata securely with localStorage fallback checks:

import { lastConnectedConnectorHelpers } from '@tuwaio/orbit-core';

// Persist metadata
lastConnectedConnectorHelpers.setLastConnectedConnector({
  connectorType: 'evm:metamask',
  chainId: 1,
  address: '0x123...',
});

// Retrieve connection metadata safely during client-side hydration
const lastConnected = lastConnectedConnectorHelpers.getLastConnectedConnector();
console.log(lastConnected?.address); // "0x123..."

🔧 API & Module Architecture

@tuwaio/orbit-core exposes the following modules:

  • Core Primitives: OrbitAdapter, BaseAdapter, ConnectorType, RecentlyConnectedConnectorData.
  • Registry Resolvers: selectAdapterByKey, getAdapterFromConnectorType, getConnectorTypeFromName.
  • Formatters: formatConnectorName, formatConnectorChainId.
  • Storage Helpers: lastConnectedConnectorHelpers, recentConnectedConnectorHelpers, impersonatedHelpers.
  • Core Primitives: isSafeApp, delay, waitFor, filterUniqueByKey.

📄 License

Licensed under the Apache-2.0 License. See the LICENSE file for details.