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

@unconfirmed/onara

v0.1.0

Published

TypeScript client SDK for Onara — a policy-based Sui transaction sponsorship (gas station) server.

Readme

@unconfirmed/onara

TypeScript client SDK for Onara — a policy-based Sui transaction sponsorship (gas station) server.

Install

bun add @unconfirmed/onara @mysten/sui

@mysten/sui is a peer dependency — the SDK uses whichever copy your app installs.

Usage

As a Sui client extension (recommended)

Register Onara on a Sui client with $extend, following the Mysten SDK extension pattern. The registered client is reused to build transactions, so you don't pass it again:

import { SuiGrpcClient } from '@mysten/sui/grpc'
import { onara } from '@unconfirmed/onara'

const client = new SuiGrpcClient({ network: 'testnet', baseUrl: 'https://fullnode.testnet.sui.io:443' })
  .$extend(onara({ url: 'https://my-onara.example.com' }))

// Sponsor a transaction — built, signed, and submitted for you
const result = await client.onara.sponsorTransaction({ transaction: tx, signer: keypair })

// Inspect the sponsor
const { address, balances } = await client.onara.status()

As a standalone client

import { OnaraClient } from '@unconfirmed/onara'

const onara = new OnaraClient('https://my-onara.example.com')

// Check sponsor status & view configured policies
const { address, balances } = await onara.status()
const policies = await onara.policies()

// High-level: build, sign, and sponsor (pass the Sui client used to build)
const result = await onara.sponsorTransaction({
  transaction: tx,
  signer: keypair,
  client: suiClient,
})

// Low-level: sponsor pre-built bytes
const result = await onara.sponsor({
  sender: '0x...',
  txBytes: '...',
  txSignature: '...',
  dryRun: true,
})

API

onara(options)

Returns a Sui client extension for client.$extend(...). Registers an OnaraClient under client.onara (or a custom name).

  • url — base URL of the Onara server
  • name? — property to register under (default 'onara')
  • fetch? — custom fetch implementation

new OnaraClient(url) / new OnaraClient({ url, fetch?, client? })

Create a client directly. fetch injects a custom fetch (useful for testing); client sets a default Sui client for sponsorTransaction (set automatically when registered via onara()).

client.status()

Returns the server's network, chain identifier, sponsor address, and balances.

client.policies()

Returns the array of configured policy configs.

client.sponsor(options)

Submit pre-built transaction bytes for sponsorship.

  • sender — Sui address of the transaction sender
  • txBytes — base64-encoded transaction bytes
  • txSignature — base64-encoded sender signature
  • dryRun? — validate against policies without submitting
  • waitForExecution? — wait for transaction finality (default true)
  • simulate? — run pre-flight simulation before execution (default true)

On a confirmation timeout the thrown OnaraError carries digest and txStatus: 'unconfirmed'; use getTransactionStatus(digest) to resolve the final outcome.

client.sponsorTransaction(options)

High-level convenience that builds, signs, and sponsors a transaction.

  • transaction — a Sui Transaction instance
  • signer — a Sui Signer (e.g. Ed25519Keypair)
  • client? — a Sui client used to build the transaction (defaults to the registered/constructed client)
  • dryRun?, waitForExecution?, simulate? — as in sponsor

client.getTransactionStatus(digest)

Look up the on-chain status of a sponsored transaction by digest — useful for recovering after a confirmation timeout.