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

@aryze/reforge

v1.0.4

Published

TypeScript SDK for Aryze Reforge cross-chain bridge protocol

Readme

@aryze/reforge

TypeScript SDK for Aryze Reforge cross-chain bridge protocol.

Installation

npm install @aryze/reforge

Quick Start

1. Configuration

import reforge from '@aryze/reforge';

// AWS-compatible configuration (recommended)
const config = reforge.createAWSConfig({
  apiKey: 'your-api-key',
  apiUrl: 'https://api.aryze.io/history/v1',
});

reforge.configure(config);

2. Initiate Reforge

import reforge, { IReforgeInitiate } from '@aryze/reforge';

const data: IReforgeInitiate = {
  chainIdHex0: '0x1', // Source chain (Ethereum)
  chainIdHex1: '0x89', // Destination chain (Polygon)
  token0: '0x...', // Source token address
  token1: '0x...', // Destination token address
  amount0: '1000000000000000000', // Amount in wei
  priceToken0InUSD: 1.0, // USD price
  tx0: '0x...', // Source transaction hash
  account0: '0x...', // Source account
  tx0Timestamp: Math.floor(Date.now() / 1000),
  tokenType: 'erc20',
};

const result = await reforge.initiateReforge(data);
console.log(result); // { data: { success: true } } or { error: "..." }

3. Finish Reforge

import reforge, { IReforgeFinish, HistoryId } from '@aryze/reforge';

const data: IReforgeFinish = {
  historyId: '0x1_0x...' as HistoryId, // From initiate response
  amount1: '990000000', // Amount received
  priceToken1InUSD: 1.0, // USD price
  tx1: '0x...', // Destination transaction hash
  tx1Timestamp: Math.floor(Date.now() / 1000),
};

const result = await reforge.finishReforge(data);
console.log(result); // { data: { success: true } } or { error: "..." }

Environment Variables

Create a .env file for your API credentials:

API_KEY=your-api-key
API_URL=https://api.aryze.io/history/v1

Then in your code:

const config = reforge.createAWSConfig({
  apiKey: process.env.API_KEY,
  apiUrl: process.env.API_URL,
});

AWS API Gateway Compatibility

The SDK includes AWS-compatible configuration that resolves common CORS and header issues:

// AWS-compatible configuration (automatically enables minimal mode)
const awsConfig = reforge.createAWSConfig({
  apiKey: 'your-api-key',
  apiUrl: 'https://your-api-gateway.amazonaws.com/prod',
});

// Manual configuration with minimal mode
reforge.configure({
  apiKey: 'your-api-key',
  apiUrl: 'https://your-api-gateway.amazonaws.com/prod',
  includeUserAgent: false, // Disable User-Agent header
  minimalMode: true, // Use minimal fetch options
  debug: false, // Disable debug logging
});

TypeScript Support

The SDK is written in TypeScript and provides full type definitions:

import reforge, {
  IReforgeInitiate,
  IReforgeFinish,
  ActionResponse,
  HistoryId,
  TokenType,
} from '@aryze/reforge';

Error Handling

All methods return a consistent response format:

const result = await reforge.initiateReforge(data);

if (result.error) {
  console.error('Operation failed:', result.error);
} else {
  console.log('Operation succeeded:', result.data);
}

Token Types

Supported token types:

  • 'erc20' - ERC20 tokens
  • 'erc721' - ERC721 NFTs
  • 'erc1155' - ERC1155 multi-tokens

Chain IDs

Use hex format for chain IDs:

  • Ethereum: '0x1'
  • Polygon: '0x89'
  • Arbitrum: '0xa4b1'
  • Optimism: '0xa'

License

MIT