
Security News
Cloudflare Introduces a Faster TypeScript Compiler Written in Rust
Cloudflare introduces tsrs, a Rust port of TypeScript’s compiler promising faster checks and lower memory use, with the TypeScript team’s help.
@layerhop/solana
Advanced tools
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
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.
npm install @layerhop/solana @layerhop/sdk @solana/web3.js
# peer: @solana/web3.js ^1.98.4
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
| 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) |
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.
MIT
FAQs
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
The npm package @layerhop/solana receives a total of 0 weekly downloads. As such, @layerhop/solana popularity was classified as not popular.
We found that @layerhop/solana demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare introduces tsrs, a Rust port of TypeScript’s compiler promising faster checks and lower memory use, with the TypeScript team’s help.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.