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

@inaya-network/bridge-sdk

v0.1.0

Published

Cross-chain $INAYA transfer + cross-chain staking SDK for the Inaya Network (SOW-1). Separate from @inaya-network/custody-sdk (file custody) so upload-only consumers don't pay for this surface.

Readme

@inaya-network/bridge-sdk

Cross-chain $INAYA transfer + cross-chain staking SDK (SOW-1). Separate from @inaya-network/custody-sdk (file custody/upload) so that package's payload stays unchanged for existing consumers.

1. Installation

npm install @inaya-network/bridge-sdk ethers

2. What This SDK Does

Wraps the on-chain bridge/staking-gateway contracts + the Inaya Network backend API (/api/bridge/*) so you don't hand-build ABIs or poll Mongo-backed status yourself. It does not run a relayer or hold validator keys — signing/quorum/destination-chain delivery is handled by Inaya's own backend cron jobs.

3. Quick Start — Transfer

import { ethers } from "ethers";
import { InayaBridgeClient, CHAIN_IDS } from "@inaya-network/bridge-sdk";

const provider = new ethers.BrowserProvider(window.ethereum);
const signer = await provider.getSigner();
const client = new InayaBridgeClient({ signer });

const chains = await client.getSupportedChains();
const home = chains.find((c) => c.chainId === CHAIN_IDS.BSC_TESTNET);

const { messageHash } = await client.bridgeTransfer({
  sourceChain: home,
  destChainId: CHAIN_IDS.SEPOLIA,
  amountWei: ethers.parseUnits("100", 18),
  recipient: await signer.getAddress(),
  userAddress: await signer.getAddress(),
});

// Poll until status is 'completed' or 'failed'.
const status = await client.getTransferStatus(messageHash);

4. Quick Start — Cross-Chain Stake

const sepolia = chains.find((c) => c.chainId === CHAIN_IDS.SEPOLIA);
await client.stake({ chain: sepolia, amountWei: ethers.parseUnits("50", 18), lockPeriodDays: 30 });

5. Transfer Status Polling

getTransferStatus(messageHash) reflects the backend's Mongo record, which is the actual source of truth for pending/completed/failed — not on-chain state alone (see CROSS_CHAIN_BRIDGE_GUIDE.md's design note on why). Poll every few seconds; there is no webhook/push mechanism yet.

6. Error Handling

Every method throws a plain Error with the backend's error message, or ethers' own error for on-chain failures (insufficient allowance, reverts, etc.) — check err.message.

7. Supported Chains Reference

Call getSupportedChains() rather than hardcoding addresses — contracts can be redeployed (e.g. a v2 staking migration) and this is the single source of truth the dApp itself reads from.

8. TypeScript

src/index.d.ts ships basic types; contract/chain shapes are currently typed as any — refine once the chain-config shape stabilizes.

9. Known Limitations

  • No mobile wallet integration bundled — bring your own signer.
  • No Solana support (see the separate solana/ Anchor program; this SDK is EVM-only for now).
  • unstake/claimRewards require the home chain's staking contract; cross-chain-initiated unstake/claim always settle from home, per the single-canonical-ledger design.