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

test2-xandeum-web3

v10.3.0

Published

> Solana transaction builder for interacting with a file system on the Xandeum network.

Readme

@xandeum/web3

Solana transaction builder for interacting with a file system on the Xandeum network.

This package provides a JavaScript/TypeScript interface to construct Solana transactions for creating, modifying, and managing file systems on-chain using the Xandeum program.

✨ Features

  • Create and delete file systems (bigbang, armageddon)
  • Manage files and directories (create, rename, remove, copy)
  • Read and write file contents with byte-level control (peek, poke)
  • Secure path validation and serialization
  • Compatible with @solana/web3.js

📦 Installation

npm install test2-xandeum-web3

or

yarn add test2-xandeum-web3

🚀 Usage

import {
  bigbang,
  armageddon,
  createFile,
  poke,
  peek,
  copyPath
} from 'test2-xandeum-web3'

import {
  Connection,
  sendAndConfirmTransaction,
  Keypair
} from '@solana/web3.js'

const connection = new Connection('https://apis.devnet.xandeum.com)
const signer = Keypair.generate()
const wallet = signer.publicKey

async function main() {
  // Create a new file system
  const tx1 = await bigbang(wallet)
  await sendAndConfirmTransaction(connection, tx1, [signer])

  // Create a file
  const tx2 = await createFile('1', '/1','hello.txt', wallet)
  await sendAndConfirmTransaction(connection, tx2, [signer])

  // Write data
  const tx3 = await poke('1', '/1/hello.txt', 0, Buffer.from('Hello Xandeum!'), wallet)
  await sendAndConfirmTransaction(connection, tx3, [signer])

  // Read data
  const tx4 = await peek('1', '/1/hello.txt', 0, 14, wallet)
  await sendAndConfirmTransaction(connection, tx4, [signer])
}

🧩 API Overview

bigbang(wallet: PublicKey): Promise Creates a new file system account.

armageddon(fsid: string, wallet: PublicKey): Promise Deletes a file system by ID.

createFile(fsid: string, path: string, wallet: PublicKey): Promise Creates a new file at the given path.

poke(fsid: string, path: string, offset: number, data: Buffer, wallet: PublicKey): Promise Writes bytes to a file starting at a specific offset.

peek(fsid: string, path: string, offset: number, length: number, wallet: PublicKey): Promise Reads bytes from a file.

copyPath(fsid: string, srcPath: string, destPath: string, wallet: PublicKey): Promise Copies a file or directory from one path to another.

Other available functions renamePath removeFile removeDirectory createDirectory exists listDirectoryEntry getMetadata

All functions that accept a file or directory path will validate inputs using sanitizePath to prevent invalid characters.

🌐 WebSocket Subscription

subscribeResult(connection: Connection,tx: string, onResult: (result: ResultValue) => void, onError?: (err: any) => void, onClose?: () => void): void Subscribes to results from a transaction via WebSocket. Used for listening events triggered by the transaction.

Parameters:

connection - The solana web3 connection with Xandeum-compatible JSON-RPC endpoint (e.g., 'https://api.devnet.solana.com'). tx — Transaction signature to subscribe to onResult(result) — Called when a valid result is received onError(err) — Optional callback for connection errors onClose() — Optional callback for connection closure Example:

subscribeResult(
  connection,
  'transactionSignatureHere',
  result => {
    console.log('Result:', result)
  }
)

Example

import {
  bigbang,
  createFile,
  poke,
  peek,
  subscribeResult
} from '@xandeum/fs-transaction'

import {
  Connection,
  sendAndConfirmTransaction,
  Keypair
} from '@solana/web3.js'

const connection = new Connection('https://api.mainnet-beta.solana.com')
const signer = Keypair.generate()
const wallet = signer.publicKey

async function main() {
  const tx = await createFile('1', '/1/hello.txt', wallet)
  const txSignature = await sendAndConfirmTransaction(connection, tx, [signer])

  subscribeResult(
    connection,
    txSignature,
    result => {
      console.log('Received result:', result)
    },
    err => console.error('WebSocket error:', err),
    () => console.log('WebSocket closed')
  )
}

MIT © Xandeum

👤 Author

Built by Xandeum to provide decentralized, programmable file systems on Solana via the Xandeum protocol.