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

brahma-trade-widget

v0.1.16

Published

A React component for trade automation within the Brahma ecosystem.

Readme

Brahma Account Deployment Flow

This document outlines the process for managing assets and deploying a Brahma Account using a pre-computed address. The flow involves several steps, from fetching assets to deploying the account and checking the deployment status.

flowchart TD;
    A[Start] --> B[Fetch EOA Assets]
    B --> C[User Selection]
    C --> D[Fetch Pre-Computed Address]
    D --> E{Is Deposit Sufficient?}
    E -- Yes --> F[Deploy Brahma Account]
    E -- No --> G[Request Additional Deposit]
    G --> C
    F --> H[Poll for Deployment Status]
    H --> I[End]

Flow Overview

  1. Fetch EOA Assets: Retrieve the balances of assets for a given Externally Owned Account (EOA). See the implementation in fetchEoaAssets.
  2. User Selection: Users select the amount they want to transfer to the pre-computed address.
  3. Fetch Pre-Computed Address: Obtain the pre-computed address and related data such as fee estimates. See the implementation in fetchPreComputedConsoleAddress.
  4. Check Deposit Against Gas Cost: Ensure the deposited amount covers the gas cost for deploying the Brahma Account.
  5. Request Additional Deposit: If necessary, prompt the user to deposit more funds.
  6. Deploy Brahma Account: Generate and deploy the Brahma Account once the deposit is sufficient. See the implementation in generateAndDeploySubAccount.
  7. Poll for Deployment Status: Continuously check the deployment status until completion. See the implementation in fetchDeploymentStatus.

Detailed Steps

1. Fetch EOA Assets

  • Use the fetchEoaAssets function to call fetchAssetsBalanceMultiCall and retrieve asset balances. See the API call in fetchAssetsBalanceMultiCall.

2. User Selection

  • Users interact with the UI to select the amount to transfer.

3. Fetch Pre-Computed Address

  • Call fetchPreComputedConsoleAddress to get the pre-computed address, fee estimate, and signature.

4. Check Deposit Against Gas Cost

  • Compare the deposited amount with the feeEstimate to ensure sufficient funds.

5. Request Additional Deposit

  • If the deposit is insufficient, prompt the user to add more funds.

6. Deploy Brahma Account

  • Use generateAndDeploySubAccount to generate and deploy the account using the public deployer from brahma-templates-sdk calling the functions generateAutomationSubAccount and deployConsoleAndSubAccount.

7. Poll for Deployment Status

  • Use fetchDeploymentStatus to poll the deployment status using the fetchTaskStatus from the brahma-templates-sdk's public deployer.

Error Handling

  • Ensure proper error handling at each step, especially when interacting with APIs.
  • Use dispatchToast to notify users of errors or status updates. See the implementation in dispatchToast.

Conclusion

This flow ensures a seamless process for deploying Brahma Accounts, leveraging pre-computed addresses and efficient asset management.

Running the app

This is a RainbowKit + wagmi + Next.js project bootstrapped with create-rainbowkit.

Getting Started

First, run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

Learn More

To learn more about this stack, take a look at the following resources:

You can check out the RainbowKit GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out the Next.js deployment documentation for more details