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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tuwaio/pulsar-evm

v0.2.2

Published

An adapter for the Pulsar Engine that adds support for tracking transactions on EVM-compatible chains. Integrates with Viem and Wagmi.

Readme

Pulsar EVM Adapter & Toolkit

NPM Version License Build Status

An advanced toolkit for the Pulsar Engine that adds comprehensive support for tracking transactions on EVM-compatible chains. It integrates seamlessly with Viem & Wagmi and provides multiple tracking strategies, utility actions, and helpers.


🏛️ What is @tuwaio/pulsar-evm?

This package is a powerful, official adapter for @tuwaio/pulsar-core. It contains all the necessary logic to interact with EVM-compatible blockchains, acting as the primary logic provider for most dApps.

While its main export is the evmAdapter, it also includes a suite of standalone trackers, actions, and utilities that can be used for advanced or custom implementations.


✨ Core Features

  • 🔌 Simple Integration: A single evmAdapter factory function to easily plug full EVM support into @tuwaio/pulsar-core.
  • 🎯 Multi-Tracker Support: Provides distinct, optimized trackers for:
    • Standard EVM Transactions (via transaction hash polling viem).
    • Safe (formerly Gnosis Safe) Multisig Transactions (via the Safe Transaction Service API).
    • Gelato Relay Meta-Transactions (via the Gelato API).
  • 🤖 Automatic Routing: The adapter automatically detects the correct tracker to use (Safe, Gelato, or standard EVM) based on the transaction context and wallet type.
  • ⚡ Built-in Actions: Includes ready-to-use functions for common user needs like speedUpTxAction and cancelTxAction.

💾 Installation

This package is designed to be used as part of the Pulsar stack and requires @wagmi/core and viem. Install all necessary packages together:

# Using pnpm
pnpm add @tuwaio/pulsar-evm @tuwaio/pulsar-core @tuwaio/orbit-core @tuwaio/orbit-evm @wagmi/core viem zustand immer dayjs

# Using npm
npm install @tuwaio/pulsar-evm @tuwaio/pulsar-core @tuwaio/orbit-core @tuwaio/orbit-evm @wagmi/core viem zustand immer dayjs

# Using yarn
yarn add @tuwaio/pulsar-evm @tuwaio/pulsar-core @tuwaio/orbit-core @tuwaio/orbit-evm @wagmi/core viem zustand immer dayjs

🚀 Usage

1. Primary Usage: The evmAdapter

For most applications, you'll only need to import the evmAdapter and pass it to your createPulsarStore configuration.

// src/hooks/txTrackingHooks.ts
import { createBoundedUseStore, createPulsarStore, Transaction } from '@tuwaio/pulsar-core';
import { evmAdapter } from '@tuwaio/pulsar-evm';

import { appChains, config } from '@/configs/wagmiConfig';

const storageName = 'transactions-tracking-storage';

export enum TxType {
  example = 'example',
}

type ExampleTx = Transaction & {
  type: TxType.example;
  payload: {
    value: number;
  };
};

export type TransactionUnion = ExampleTx;

export const usePulsarStore = createBoundedUseStore(
  createPulsarStore<TransactionUnion>({
    name: storageName,
    adapter: evmAdapter(config, appChains),
  }),
);

2. Using Standalone Actions

This package also exports utility actions that you can wire up to your UI for features like speeding up or canceling transactions.

Example: A button to speed up a stuck transaction

// src/components/SpeedUpButton.tsx
import { speedUpTxAction } from '@tuwaio/pulsar-evm';
import { usePulsarStore } from '../hooks/txTrackingHooks'; // Or your custom hook
import { wagmiConfig } from '../configs/wagmi'; // Your wagmi config

function SpeedUpButton({ txKey }) {
  const transactionsPool = usePulsarStore((state) => state.transactionsPool);
  const stuckTransaction = transactionsPool[txKey];

  // Only show the button if the transaction is pending and is a standard EVM tx
  if (!stuckTransaction?.pending || stuckTransaction.tracker !== 'ethereum') {
    return null;
  }

  const handleSpeedUp = async () => {
    try {
      const newTxHash = await speedUpTxAction({
        config: wagmiConfig,
        tx: stuckTransaction,
      });
      console.log('Transaction sped up with new hash:', newTxHash);
      // Pulsar's `executeTxAction` will automatically add and track this new transaction
      // if you integrate it with the action that calls this.
    } catch (error) {
      console.error('Failed to speed up transaction:', error);
    }
  };

  return <button onClick={handleSpeedUp}>Speed Up</button>;
}

3. Using Standalone Utilities

You can use exported utilities, like selectors, to get derived data for your UI.

Example: Getting a block explorer link for a transaction

// src/components/ExplorerLink.tsx
import { selectEvmTxExplorerLink } from '@tuwaio/pulsar-evm';
import { chains } from '../configs/wagmi'; // Your wagmi config

function ExplorerLink({ tx }) {
  // The selector needs your app's chains, and the transaction.
  const explorerLink = selectEvmTxExplorerLink({ chains, tx });

  if (!explorerLink) return null;

  return (
    <a href={explorerLink} target="_blank" rel="noopener noreferrer">
      View on Explorer
    </a>
  );
}

🤝 Contributing & Support

Contributions are welcome! Please read our main Contribution Guidelines.

If you find this library useful, please consider supporting its development. Every contribution helps!

➡️ View Support Options

📄 License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.