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

@0xsequence/anypay-sdk

v0.0.5

Published

SDK for Anypay functionality

Readme

@0xsequence/anypay-sdk

Anypay SDK for sending any token from any chain.

⚠️ This is a work in progress!

Installation

npm install @0xsequence/anypay-sdk

Usage

React Widget Component

The easiest way to integrate Anypay is using our pre-built React widget:

import { AnyPayWidget } from '@0xsequence/anypay-sdk/widget'

export const App = () => {
  const sequenceApiKey = import.meta.env.VITE_SEQUENCE_API_KEY

  return (
    <AnyPayWidget
      sequenceApiKey={sequenceApiKey}
    />
  )
}

Low-level API Usage

If you need more control, you can use the low-level APIs directly:

Basic Example

import { prepareSend } from '@0xsequence/anypay-sdk'
import { createWalletClient, custom } from 'viem'

// Initialize a wallet client
const client = createWalletClient({
  account,
  chain: getChainConfig(chainId),
  transport: custom(window.ethereum),
})

// Prepare and send a transaction
const options = {
  account,
  originTokenAddress: '0x0000000000000000000000000000000000000000', // ETH
  originChainId: 42161, // Arbitrum
  originTokenAmount: '1000000000000000',
  destinationChainId: 8453, // Base
  recipient: '0xYourRecipientAddress',
  destinationTokenAddress: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913', // USDC on Base
  destinationTokenAmount: '300003', // Amount in USDC decimals (6)
  sequenceApiKey: 'your-api-key',
  fee: '5600000000000',
  client,
}

const { intentAddress, send } = await prepareSend(options)
console.log('Intent address:', intentAddress.toString())

// Send the transaction
await send()

Advanced Example

import {
  getAPIClient,
  getRelayer,
  getIntentCallsPayloads,
  calculateIntentAddress,
  commitIntentConfig,
  sendOriginTransaction,
  getERC20TransferData,
} from '@0xsequence/anypay-sdk'
import { createWalletClient, http } from 'viem'
import { arbitrum } from 'viem/chains'

async function sendCrossChainToken() {
  // Initialize clients
  const apiClient = getAPIClient('http://localhost:4422', process.env.SEQUENCE_API_KEY)
  const originRelayer = getRelayer({ env: 'local' }, originChainId)
  const destinationRelayer = getRelayer({ env: 'local' }, destinationChainId)

  // Create intent
  const args = {
    userAddress: account.address,
    originChainId: 42161,
    originTokenAddress: '0x0000000000000000000000000000000000000000',
    originTokenAmount: '1000000000000000',
    destinationChainId: 8453,
    destinationToAddress: destinationTokenAddress,
    destinationTokenAddress: destinationTokenAddress,
    destinationTokenAmount: destinationTokenAmount,
    destinationCallData: getERC20TransferData(recipient, BigInt(destinationTokenAmount)),
    destinationCallValue: '0',
  }

  const intent = await getIntentCallsPayloads(apiClient, args)

  // Calculate and commit intent
  const intentAddress = calculateIntentAddress(account.address, intent.calls, intent.lifiInfos)
  await commitIntentConfig(apiClient, account.address, intent.calls, intent.preconditions, intent.lifiInfos)

  // Monitor transaction status
  const status = await getMetaTxStatus(relayer, metaTxId, chainId)
  console.log('Transaction status:', status)
}

Development

# Install dependencies
pnpm install

# Build the package
pnpm run build

# Run tests
pnpm test

License

MIT License