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

@bronlabs/bron-sdk

v0.1.27

Published

TypeScript SDK for the Bron API

Downloads

547

Readme

Bron SDK

TypeScript SDK for the Bron API.

Features

  • Complete API Coverage: All Bron API endpoints are supported
  • JWT Authentication: Automatic JWT generation for API requests
  • Key Generation: Built-in JWK key pair generation
  • Type Safety: Full TypeScript support with type definitions
  • Code Generation: Automatic code generation from OpenAPI spec
  • Testing: Comprehensive test suite

Install

npm install @bronlabs/bron-sdk

Generate API Keys

npm run generate-keys

This will output:

  • Public JWK (send to Bron)
  • Private JWK (keep safe)

Usage Example

export BRON_API_KEY='{"kty":"EC","x":"VqW0Rzw4At***ADF2iFCzxc","y":"9AylQ7HHI0vRT0C***PqWuf2yT8","crv":"P-256","d":"DCQ0jrmYw8***9i64igNKuP0","kid":"cmdos3lj50000sayo6pl45zly"}'
export BRON_WORKSPACE_ID='htotobpkg7xqjfxenjid3n1o'
import BronClient from '@bronlabs/bron-sdk';
import { randomUUID } from 'node:crypto';

const client = new BronClient({
  apiKey: process.env.BRON_API_KEY, // Your private JWK
  workspaceId: process.env.BRON_WORKSPACE_ID
});

// Get workspace
const workspace = await client.workspaces.getWorkspaceById();
console.log('Workspace:', workspace.name);

// Get accounts
const { accounts } = await client.accounts.getAccounts();

// Get balances for first account
if (accounts.length > 0) {
  const account = accounts[0];
  const { balances } = await client.balances.getBalances({
    accountIds: [account.accountId]
  });

  balances.forEach(balance => {
    console.log(`Balance ${balance.assetId} (${balance.symbol}):`, balance.totalBalance)
  });

  // Create transaction
  const tx = await client.transactions.createTransaction({
    accountId: account.accountId,
    externalId: randomUUID(),
    transactionType: 'withdrawal',
    params: {
      amount: '0.001',
      assetId: '2',
      symbol: 'ETH',
      networkId: 'ETH',
      toAddress: '0x428CdE5631142916F295d7bb2DA9d1b5f49F0eF9'
    }
  });

  console.log(`Created transaction '${tx.transactionId}': send ${tx.params.amount}`);
}

Configuration

The SDK supports the following configuration options:

  • apiKey: Your private JWK (required)
  • workspaceId: Your workspace ID (required)
  • baseUrl: API base URL (defaults to https://api.bron.org)

Authentication

The SDK automatically handles JWT generation for API requests. You only need to provide your private JWK as the API key.

Error Handling

All API methods return promises that should be handled:

try {
  const accounts = await client.accounts.getAccounts();
  console.log('Accounts:', accounts);
} catch (error) {
  console.error('API error:', error);
}

License

MIT License - see LICENSE file for details.