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

@bronlabs/intents-sdk

v1.0.101

Published

SDK for Intents DeFi smart contracts

Readme

@bronlabs/intents-sdk

TypeScript SDK for building Intents DeFi applications with order indexing, processing, and smart contract interactions.

Installation

pnpm install @bronlabs/intents-sdk

Core Components

OrderIndexer

Monitors blockchain events and indexes order status changes.

import { OrderIndexer, IntentsConfig } from '@bronlabs/intents-sdk';

const config: IntentsConfig = {
  rpcUrl: 'https://your-rpc-url',
  orderEngineAddress: '0x...',
  startBlockOffset: 100,
  pollingInterval: 5000,
  maxRetries: 3,
  retryDelay: 1000,
  networks: {}
};

const indexer = new OrderIndexer(config);

indexer.addProcessor(async (event) => {
  console.log(`Order ${event.data.orderId} status: ${event.data.status}`);
});

await indexer.start();

OrderProcessor (Abstract)

Base class for implementing custom order processing logic.

import { OrderProcessor } from '@bronlabs/intents-sdk';

class CustomOrderProcessor extends OrderProcessor {
  async process(orderId: string, status: string): Promise<void> {
    // Implement your processing logic
    console.log(`Processing order ${orderId} with status ${status}`);
  }
}

const processor = new CustomOrderProcessor();
await processor.stop();

Network Configuration

import { NetworkConfig, IntentsConfig } from '@bronlabs/intents-sdk';

const config: IntentsConfig = {
  rpcUrl: 'https://mainnet.infura.io/v3/your-key',
  orderEngineAddress: '0x123...',
  startBlockOffset: 0,
  pollingInterval: 10000,
  maxRetries: 5,
  retryDelay: 2000,
  networks: {
    ethereum: {
      rpcUrl: 'https://mainnet.infura.io/v3/your-key',
      walletAddress: '0x456...',
      walletPrivateKey: 'your-private-key'
    },
    polygon: {
      rpcUrl: 'https://polygon-rpc.com',
      walletAddress: '0x789...'
    }
  }
};

Configuration Schema

interface IntentsConfig {
  rpcUrl: string;
  orderEngineAddress: string;
  oracleAggregatorAddress?: string;
  oraclePrivateKey?: string;
  solverPrivateKey?: string;
  startBlockOffset: number;
  pollingInterval: number;
  maxRetries: number;
  retryDelay: number;
  networks: {
    [key: string]: NetworkConfig;
  };
}

interface NetworkConfig {
  rpcUrl: string;
  walletAddress?: string;
  walletPrivateKey?: string;
}

Error Handling

The SDK includes built-in retry mechanisms and error handling:

  • Events are retried up to maxRetries times
  • Failed events are logged and can be monitored
  • Graceful shutdown ensures all queued events are processed