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

@lo-ink/adapter-lo

v0.24.1

Published

Compatibility exports for native LO transport in Mini App SDK

Readme

@lo-ink/adapter-lo

Compatibility exports for the native transport owned by @lo-ink/miniapp-sdk. Version 0.24 requires SDK 0.22. New applications use one package:

import { createLoClient } from "@lo-ink/miniapp-sdk";
const client = createLoClient();
if (!client) throw new Error("A supported LO host is required");

Existing createAdapter, detectAdapter and createNativeAdapter imports are aliases of the SDK implementation. Native types remain exported. This package contains no decoder or independent connection/request state.

Discovery returns null for an absent or invalid port. Capabilities are the intersection of operations implemented by the SDK and the features explicitly advertised by the host. Unknown host features are ignored. A failed native request is never replayed through another transport.

The adapter validates envelope size, protocol version, document generation, request identity, response shapes, theme values and event payloads. Requests have bounded lifetimes and concurrency. Cancellation emits a single cancel message; stale document results cannot settle a current request.

The supported protocol includes chrome, appearance, fullscreen, orientation, haptics, popups, links, inline queries, clipboard, location, biometry, sensors, file downloads, QR, permissions, contact/prepared-message sharing, story presentation, vertical dismissal controls and storage. Story/swipe operations require the corresponding LO host rollout; earlier ports omit them. The current decoder does not advertise invoices. Actual availability still depends on the running LO client, device and permission.

Migration from 0.21

This is a breaking adapter release: createAdapter no longer composes or reads LO.WebApp. Native snapshots and events are authoritative. If your released host still needs the older surface, keep 0.21 pinned or explicitly use @lo-ink/adapter-lo-legacy. Do not upgrade an existing application until its required native capabilities and events are available.

Launch assertions stay opaque and untrusted. Send their exact bytes to your backend for verification. The adapter does not authenticate them.

Launch identity and missing bot

adapter.launchUnsafe() (also client.launchUnsafe()) parses display-only launch data; IDs stay strings and avatar URLs are restricted to HTTPS subdomains of lo.ink. Verify adapter.launchData on your server before trusting it. Native NO_BOT errors become NoBot from miniapp-sdk. Older host false stays false and cannot distinguish a missing link from denial. Host rollout is separate from this adapter release; no host version is claimed until its release is verified.

themeChanged, viewportChanged, inset and fullscreen events update snapshot() before listeners run. Older ports return their launch snapshot, so subscribed event fields take precedence for those hosts. The optional LO native transport flag liveSnapshot: true declares that the host maintains its snapshot before event delivery, including when no listeners are registered. On those hosts the validated current port snapshot is authoritative, including after an unsubscribe gap. Invalid event payloads cannot erase validated insets.

Native LO requests have a 60-second transport/host deadline. The effective deadline is the shorter of the caller's timeoutMs and 60 seconds. A longer SDK default (such as the shared shareMessage helper's five minutes) does not extend the LO host deadline. Timeout sends a best-effort cancellation and releases listeners; it cannot undo a native action that has already completed.

Hosts that suspend UI operations while the Mini App is hidden report ABORTED for interrupted UI requests and NOT_AVAILABLE for new UI requests. The adapter maps these to the existing SDK codes aborted and failed, respectively; they are valid host failures, not malformed responses. Older host error codes remain supported.