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

@incentiv/ui-sdk

v0.7.3

Published

A TypeScript SDK that enables **Account Abstraction (ERC-4337)** capabilities in Incentiv Platform applications, providing a streamlined interface for creating smart contract wallets with enhanced security and user experience.

Readme

UI-SDK

A TypeScript SDK that enables Account Abstraction (ERC-4337) capabilities in Incentiv Platform applications, providing a streamlined interface for creating smart contract wallets with enhanced security and user experience.

What does UI-SDK do?

UI-SDK transforms how users interact with blockchain applications by enabling smart contract wallets instead of traditional Externally Owned Accounts (EOAs). This unlocks powerful features like:

  • Passwordless Authentication with biometric passkeys
  • Batch Transactions for improved efficiency
  • Gas Abstraction and sponsored transactions
  • Account Recovery mechanisms
  • Custom Security Policies and spending limits
  • Multi-signature requirements
  • Transaction Automation and whitelisting

Key Features

🔐 Dual Authentication Methods

  • EOA Provider: Integrate with existing wallets (MetaMask, WalletConnect, etc.)
  • Passkey Provider: Passwordless authentication using WebAuthn biometrics

Seamless Integration

  • Drop-in replacement for standard ethers.js providers
  • Compatible with existing dApps and smart contracts
  • Full TypeScript support with comprehensive type definitions

🛡️ Enhanced Security

  • Hardware-backed passkey storage
  • Multi-layered signature validation
  • Customizable security policies

Quick Start

Installation

npm install @incentiv/ui-sdk [email protected]

EOA Provider (MetaMask, WalletConnect, etc.)

Transform your existing wallet into a smart contract wallet:

import { ethers } from 'ethers';
import { getEoaProvider } from '@incentiv/ui-sdk';

// Works with any existing provider
const baseProvider = new ethers.providers.Web3Provider(window.ethereum);
await window.ethereum.request({ method: 'eth_requestAccounts' });

const config = {
  chainId: 1,
  entryPointAddress: '0x...',
  bundlerUrl: 'https://...',
  factoryAddress: '0x...'
};

const aaProvider = await getEoaProvider(baseProvider, config);

// Use like any ethers provider
const signer = aaProvider.getSigner();
const address = await signer.getAddress();

Passkey Provider (Biometric Authentication)

Create a passwordless wallet experience:

import { ethers } from 'ethers';
import { getPasskeyProvider, registerPasskey, WebAuthnPublicKey } from '@incentiv/ui-sdk';

// 1. Register a new passkey
const registrationResult = await registerPasskey(
  'My Wallet',
  challengeFromServer,
  userId
);

// 2. Extract public key
const publicKey = await WebAuthnPublicKey.fromAttetationObject(
  registrationResult.credential.response.attestationObject
);

// 3. Create provider
const baseProvider = new ethers.providers.StaticJsonRpcProvider(rpcUrl);
const credential = {
  credentialId: registrationResult.credential.id,
  publicKey: publicKey
};

const aaProvider = await getPasskeyProvider(baseProvider, credential, config);

// Use with biometric authentication
const signer = aaProvider.getSigner();
const tx = await signer.sendTransaction({
  to: '0x...',
  value: ethers.utils.parseEther('1.0')
});

Advanced Features

Batch Transactions

Execute multiple operations in a single transaction:

const transactions = [
  { to: '0x123...', value: ethers.utils.parseEther('1.0') },
  { to: '0x456...', value: ethers.utils.parseEther('0.5') }
];

const txResponse = await signer.sendBatchTransaction({
  targets: transactions.map(tx => tx.to),
  values: transactions.map(tx => tx.value),
  datas: transactions.map(tx => tx.data || '0x')
});

Contract Deployment

Deploy contracts with deterministic addresses:

import { deployContract, predictContractAddress } from '@incentiv/ui-sdk';

// Predict address before deployment
const predictedAddress = await predictContractAddress(aaProvider, {
  bytecode: contractBytecode,
  constructorArgs: [arg1, arg2]
});

// Deploy the contract
const txHash = await deployContract(aaProvider, {
  bytecode: contractBytecode,
  constructorArgs: [arg1, arg2]
});

Gas Management

Optimized gas estimation and pricing:

// Get detailed gas estimation
const gasEstimate = await estimateGas(provider, to, value, data);

// Get optimized gas prices
const feeData = await provider.getFeeData();

Browser Compatibility

EOA Provider: All modern browsers with wallet extensions

Passkey Provider:

  • Chrome/Edge: Version 67+
  • Safari: Version 14+
  • Firefox: Version 60+
  • Mobile: iOS 15+ (Safari), Android 7+ (Chrome)

Documentation

📚 Complete Implementation Guide

For detailed implementation instructions, configuration options, and advanced usage patterns, see our comprehensive guide:

Examples

Check out our example implementations:

  • MetaMask Integration: Standard EOA provider setup
  • WalletConnect Integration: Multi-wallet support
  • Passkey Authentication: Complete biometric authentication flow
  • Batch Operations: Multiple transaction execution
  • Contract Deployment: Deterministic contract addresses

Support

For questions, issues, or contributions, please refer to our documentation or open an issue in this repository.


UI-SDK - Enabling the future of user-friendly blockchain interactions through Account Abstraction.