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

@selenus/luna-sdk

v5.6.0

Published

The most comprehensive Helius Solana SDK for React Native - All APIs, maximum performance

Downloads

64

Readme

@selenus/luna-sdk

The most comprehensive Solana SDK for React Native - Complete Helius API coverage with Privacy-First features

npm version TypeScript License: MIT

Features

  • Complete Helius API Coverage - All 100+ Helius endpoints
  • Standard Solana RPC - Full JSON-RPC 2.0 support
  • Digital Asset Standard (DAS) - NFT and token metadata APIs
  • Privacy-First APIs - Stealth addresses, privacy pools, transaction graph privacy
  • ZK Compression - Light Protocol integration
  • WebSocket Subscriptions - Real-time blockchain events
  • Smart Transactions - Automatic retry, priority fees, Jito bundles
  • Type-Safe - Full TypeScript support with comprehensive types

Installation

npm install @selenus/luna-sdk
# or
yarn add @selenus/luna-sdk
# or
pnpm add @selenus/luna-sdk

Quick Start

import { LunaHeliusClient } from '@selenus/luna-sdk';

// Initialize the client
const client = new LunaHeliusClient('your-helius-api-key');

// Get account balance
const balance = await client.solana.getBalance('So11111111111111111111111111111111111111112');

// Get NFTs for a wallet
const nfts = await client.das.getAssetsByOwner({
  ownerAddress: 'wallet-address',
  page: 1,
  limit: 100,
});

// Parse a transaction
const parsed = await client.enhancedTransactions.parseTransaction('signature');

API Reference

Core APIs

SolanaApi

Complete Solana JSON-RPC implementation:

client.solana.getAccountInfo(address)
client.solana.getBalance(address)
client.solana.getBlock(slot)
client.solana.getBlockHeight()
client.solana.getBlockTime(slot)
client.solana.getLatestBlockhash()
client.solana.getMinimumBalanceForRentExemption(dataSize)
client.solana.getSignaturesForAddress(address, options)
client.solana.getSlot()
client.solana.getTransaction(signature)
client.solana.sendTransaction(signedTx)
// ... 50+ more methods

DAS (Digital Asset Standard)

client.das.getAsset(assetId)
client.das.getAssetsByOwner(params)
client.das.getAssetsByCreator(params)
client.das.getAssetsByGroup(params)
client.das.searchAssets(params)
client.das.getAssetProof(assetId)
client.das.getAssetsBatch(assetIds)

Enhanced Transactions

client.enhancedTransactions.parseTransaction(signature)
client.enhancedTransactions.parseTransactions(signatures)
client.enhancedTransactions.parseTransactionHistory(address)

Privacy APIs (v5.2.0+)

Stealth Addresses

client.stealthAddress.generateStealthAddress(recipientViewKey)
client.stealthAddress.scanForPayments({ viewKey, startSlot })

Privacy Pools

client.privacyPool.getAvailablePools()
client.privacyPool.calculateOptimalDeposit(amount)

Transaction Graph Privacy

client.transactionGraphPrivacy.analyzeGraphPrivacy(address)
client.transactionGraphPrivacy.findConnectedAddresses(address, depth)

Privacy Score

client.privacyScore.calculatePrivacyScore(address)
client.privacyScore.getPrivacyRecommendations(address)

Additional APIs

ZK Compression

client.zkCompression.getCompressedAccount(address)
client.zkCompression.getCompressedAccountsByOwner(owner)
client.zkCompression.getCompressedTokenBalances(owner)
client.zkCompression.getValidityProof(hashes)

Webhooks

client.webhook.createWebhook(config)
client.webhook.getWebhooks()
client.webhook.editWebhook(webhookId, config)
client.webhook.deleteWebhook(webhookId)

Staking

client.staking.getStakeAccounts(address)
client.staking.createStakeTransaction(params)
client.staking.createUnstakeTransaction(params)

Jupiter

client.jupiter.getQuote(params)
client.jupiter.swap(params)

Jito

client.jito.sendBundle(transactions)
client.jito.getBundleStatuses(bundleIds)

WebSocket Subscriptions

// Connect to WebSocket
await client.webSocket.connect();

// Subscribe to account changes
client.webSocket.accountSubscribe(accountId, (update) => {
  console.log('Account updated:', update);
});

// Subscribe to program logs
client.webSocket.logsSubscribe(programId, (logs) => {
  console.log('Program logs:', logs);
});

// Subscribe to slot updates
client.webSocket.slotSubscribe((slot) => {
  console.log('New slot:', slot);
});

// Disconnect
client.webSocket.disconnect();

Utilities

Base58 Encoding

import { base58 } from '@selenus/luna-sdk';

const encoded = base58.encode(bytes);
const decoded = base58.decode(encoded);

Lamport Conversions

import { lamports } from '@selenus/luna-sdk';

const sol = lamports.lamportsToSol(1_000_000_000); // 1 SOL
const amount = lamports.solToLamports(1.5); // 1,500,000,000
const formatted = lamports.formatSolWithSymbol(1_000_000_000); // "◎ 1.0000"

Retry with Backoff

import { retry, retryRpc } from '@selenus/luna-sdk';

const result = await retryRpc(() => client.solana.getBalance(address), {
  maxRetries: 5,
  initialDelay: 1000,
});

Configuration

Custom Endpoints

const client = new LunaHeliusClient('api-key', {
  rpcUrl: 'https://custom-rpc.example.com',
  cluster: 'mainnet-beta',
});

Network Selection

// Mainnet (default)
const mainnet = new LunaHeliusClient('api-key');

// Devnet
const devnet = new LunaHeliusClient('api-key', { cluster: 'devnet' });

Error Handling

try {
  const result = await client.das.getAsset(assetId);
  if (result.error) {
    console.error('RPC Error:', result.error.message);
  } else {
    console.log('Asset:', result.result);
  }
} catch (error) {
  console.error('Network error:', error);
}

React Native Considerations

This SDK is designed for React Native and includes:

  • No Node.js-specific dependencies
  • Compatible with React Native's JavaScript engine
  • Works with Hermes and JSC
  • Supports Expo and bare React Native projects

Peer Dependencies

  • @solana/web3.js >= 1.95.0

TypeScript Support

Full TypeScript support with comprehensive type definitions:

import type { 
  Asset, 
  Transaction, 
  RpcResponse, 
  WebhookConfig,
  PrivacyScore 
} from '@selenus/luna-sdk';

License

MIT © Selenus Labs

Links