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

@layerhop/solana

v0.7.0

Published

Execute LayerHop quotes with a Solana wallet: decode the transaction, sign and send it through @solana/wallet-adapter, Wallet Standard or an injected provider, submit-via-API and co-signed modes, then report it

Readme

@layerhop/solana

npm license docs

Execute LayerHop quotes with a Solana wallet. It decodes the base64 SvmTx, has the wallet sign it (and send it, when the route allows), submits it through POST /v1/orders/submit when the route requires that, and reports the signature to LayerHop.

Never holds keys. Every transaction is confirmed by the user in their wallet.

Install

npm install @layerhop/solana @layerhop/sdk @solana/web3.js
# peer: @solana/web3.js ^1.98.4

Usage

import { useConnection, useWallet } from "@solana/wallet-adapter-react";
import { executeSolanaQuote, fromWalletAdapter, LayerHop } from "@layerhop/solana";

const lh = new LayerHop({ integrator: "myapp" });
const wallet = useWallet();
const { connection } = useConnection();

const { best } = await lh.quote({
  srcChain: "solana", srcToken: "SOL", amount: "100000000", dstChain: "base", dstToken: "USDC",
  sender: wallet.publicKey!.toBase58(), recipient: "0xYourEvmAddress",
});
const sent = await executeSolanaQuote(fromWalletAdapter(wallet), { quote: best, client: lh, connection });
await sent.wait(); // true once confirmed

Signers

| Wallet stack | Signer | |---|---| | @solana/wallet-adapter (useWallet() or an adapter) | fromWalletAdapter(wallet) | | Wallet Standard (getWallets()) | fromWalletStandard(wallet, account, "solana:mainnet") | | Reown AppKit walletProvider, Phantom, Dynamic getSigner(), other injected/embedded providers | fromInjectedProvider(provider) | | Anything else | implement SolanaSigner (signTransaction, optional signAndSendTransaction) |

Send modes

sendSvmTx / executeSolanaQuote pick the mode from the transaction:

  • api (submitViaApi: true, e.g. Jupiter): the wallet only signs, then the signed bytes go to POST /v1/orders/submit.
  • cosigned (the provider already signed, e.g. Mayan): the wallet only signs (signing and sending could rewrite the transaction and void the provider's signature), then your connection broadcasts the exact bytes.
  • wallet: the wallet signs and sends. Sign-only wallets are broadcast through your connection.

Test-mode (sandbox) transactions never reach the wallet. executeSolanaQuote reports a placeholder signature instead.

Other exports: decodeSvmTx, solanaSendMode, confirmSignature, base64ToBytes, bytesToBase64, bytesToBase58.

Guide (Privy, Dynamic, Reown and more): https://docs.layerhop.com/guides/wallets. Example: example/swap.ts.

License

MIT