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

sobra-sdk

v1.0.0

Published

Official TypeScript SDK for the Sobra Protocol - Solana memory storage and verification

Readme

Sobra SDK

TypeScript Solana Node.js

Version License: MIT Maintenance

Installation

npm install sobra-sdk
# or
yarn add sobra-sdk

Quick Start

import { SobraClient } from 'sobra-sdk';
import { Keypair } from '@solana/web3.js';

// Initialize the client with your wallet
const wallet = Keypair.generate(); // Replace with your actual wallet
const client = new SobraClient(wallet);

// Create a new memory
const memory = await client.createMemory(
  'User wants to analyze token XYZ',
  'intent',
  'agent-123'
);
console.log(`Memory created: ${memory.data.id}`);

🔧 Core Features

  • Wallet-Keyed Memories: Secure, wallet-based memory storage
  • Structured Memory Types: Intent, Alert, and Belief memory types
  • Agent Integration: Seamless integration with AI agents
  • Signature Verification: Cryptographic verification of memory contents
  • Query Capabilities: Flexible memory retrieval and filtering

📊 Memory Management Example

import { SobraClient } from 'sobra-sdk';
import { Keypair } from '@solana/web3.js';

async function manageMemories() {
  const wallet = Keypair.generate(); // Replace with your actual wallet
  const client = new SobraClient(wallet);
  
  // Create a new memory
  const memory = await client.createMemory(
    'Analyze market trends for SOL',
    'intent',
    'market-agent'
  );
  
  // Retrieve memories
  const memories = await client.getMemories('intent', 'market-agent', 10);
  
  console.log(`
Memory Management Results:
-------------------------
Total Memories: ${memories.data.length}
Latest Memory: ${memories.data[0]?.content}
  `);
}

API Endpoints

Memory Management

POST /memory

Creates a new memory entry with:

  • Content
  • Memory type (intent, alert, belief)
  • Agent identifier
  • Wallet signature
  • Timestamp

Response type:

interface MemoryEntry {
  id: string;
  wallet: string;
  content: string;
  type: 'intent' | 'alert' | 'belief';
  agent: string;
  timestamp: number;
  signature: string;
}

Memory Retrieval

GET /memory

Retrieves memories with optional filtering:

  • Memory type
  • Agent identifier
  • Result limit

Memory Verification

GET /verify

Verifies the signature of a memory entry:

  • Content verification
  • Timestamp validation
  • Signature validation

Response type:

interface VerificationResponse {
  isValid: boolean;
}

Error Handling

All endpoints return standardized error responses:

interface ErrorResponse {
  error: string;       // Error type
  message: string;     // Detailed message
  statusCode: number;  // HTTP status code
  timestamp: string;   // Error timestamp
}

🔍 Advanced Usage

Memory Management Class

import { SobraClient } from 'sobra-sdk';
import { Keypair } from '@solana/web3.js';

class MemoryManager {
  private client: SobraClient;
  private agentId: string;

  constructor(wallet: Keypair, agentId: string) {
    this.client = new SobraClient(wallet);
    this.agentId = agentId;
  }

  async storeIntent(content: string) {
    return this.client.createMemory(content, 'intent', this.agentId);
  }

  async getRecentMemories(limit: number = 10) {
    return this.client.getMemories(undefined, this.agentId, limit);
  }

  async verifyMemory(content: string) {
    return this.client.verifySignature(content);
  }
}

Error Handling Patterns

import { SobraClient } from 'sobra-sdk';
import { Keypair } from '@solana/web3.js';

async function robustMemoryCreation(content: string, agentId: string) {
  const wallet = Keypair.generate(); // Replace with your actual wallet
  const client = new SobraClient(wallet);
  
  try {
    const memory = await client.createMemory(content, 'intent', agentId);
    return memory;
  } catch (error: any) {
    console.error('Memory Creation Error:', error.message);
    throw error;
  }
}

Roadmap

  • [ ] WebSocket support for real-time memory updates
  • [ ] Advanced memory querying capabilities
  • [ ] Memory encryption support
  • [ ] Cross-chain memory compatibility
  • [ ] Memory compression and optimization
  • [ ] Multiple storage backends:
    • [ ] IPFS integration for decentralized storage
    • [ ] Local server storage option
    • [ ] Arweave integration for permanent storage
    • [ ] Custom blockchain storage adapters

License

MIT © Sobra Team