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

pledra-sdk

v0.1.0

Published

Borrow SOL against your Pump.fun tokens from JavaScript/Node. Official SDK for Pledra Protocol on Solana.

Readme

pledra-sdk

Borrow SOL against your Pump.fun tokens from JavaScript/Node. Official SDK for Pledra Protocol on Solana.

Lock a Pump.fun token, instantly receive a SOL credit, repay later to unlock. No wallet-connect: the credit is paid to the wallet that sends the tokens.

npm install pledra-sdk

Requires Node 18+ (uses the global fetch).

Borrow in one call

borrow() does everything: opens the loan, sends your tokens to the lock address on-chain, and confirms. The SOL credit lands in your wallet.

import { PledraClient } from 'pledra-sdk';
import { Connection, Keypair } from '@solana/web3.js';

const pledra = new PledraClient();
const connection = new Connection('https://your-rpc.com', 'confirmed');
const wallet = Keypair.fromSecretKey(/* your secret key */);

const { loan, depositTxSig, confirm } = await pledra.borrow({
  mint: 'So1aNa...PumpFunMint',
  amount: 1_000_000,   // token amount to lock
  wallet,
  connection,
});

console.log('Credit received:', confirm.creditSol, 'SOL');
console.log('Loan id:', loan.loanId);

Repay in one call

const { repaySolSent, result } = await pledra.repay({
  loanId: loan.loanId,
  wallet,
  connection,
});
console.log('Repaid', repaySolSent, 'SOL, status:', result.status);

Preview before you borrow

const quote = await pledra.quote({ mint, lockTokenAmount: 1_000_000 } as any);
// → { ltv, creditSol, repaySol, liquidationPriceSol, capOk, treasuryOk, ... }

(See quote({ address, lockTokenAmount }) for the exact shape.)

Low-level API

Every REST endpoint is also exposed directly, in case you want to manage the on-chain transfers yourself:

await pledra.lookupToken(mint);                              // live price + Smart Cap
await pledra.quote({ address: mint, lockTokenAmount });      // preview
await pledra.createLoan({ address: mint, lockTokenAmount }); // → { lockAddress, ... }
await pledra.confirmLoan(loanId);                            // after you send tokens
await pledra.repayLoan(loanId);                              // after you send repaySol
await pledra.getLoans(walletAddress);                        // your positions
await pledra.getStats();                                     // protocol stats

The manual flow is: createLoan → send depositTokenAmount of the token to lockAddress from your own wallet → confirmLoan.

How it works

  • Lock to value: you receive a share of the locked token value as a SOL credit (25%, or 35% with 10M $PLEDRA staked).
  • Repay: pay back the credit plus 5% interest to unlock your tokens.
  • Liquidation: if the token drops 50% from entry, the position is liquidated and the proceeds are kept by the protocol. You owe nothing more.
  • Smart Cap: at most 10% of a token's pool liquidity can be locked protocol-wide, so loans stay solvent.

Only bonded Pump.fun tokens (with a tradable SOL pool) are supported.

Notes

  • Use your own RPC (new Connection(...) or new PledraClient({ rpcUrl })). The public default is rate-limited.
  • Always send from your own wallet, not an exchange.
  • High risk. Not financial advice.

Links

  • Website: https://pledraprotocol.xyz
  • API docs: https://pledraprotocol.xyz/api-docs

MIT License.