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

daon-sdk

v1.0.0

Published

DAON Creator Protection SDK for Node.js applications

Downloads

16

Readme

DAON SDK for Node.js

Official Node.js SDK for the Decentralized Archive of Original Narratives (DAON) - a blockchain-based creator protection platform.

Installation

npm install daon-sdk

Quick Start

const { DAONClient } = require('daon-sdk');

// Initialize the client
const client = new DAONClient({
  baseURL: 'https://api.daon.network',
  apiKey: 'your-api-key' // Optional
});

// Protect a creative work
async function protectWork() {
  const protection = await client.protectContent({
    title: 'My Creative Work',
    content: 'Your creative content here...',
    contentType: 'text/plain',
    metadata: {
      author: 'Your Name',
      createdAt: new Date().toISOString()
    }
  });
  
  console.log('Protected! Content ID:', protection.contentId);
  console.log('Blockchain TX:', protection.txHash);
}

// Verify protection status
async function checkProtection(contentId) {
  const status = await client.getProtectionStatus(contentId);
  console.log('Protection status:', status);
}

Features

  • Blockchain Protection: Register creative works on the DAON blockchain
  • Verification: Verify protection status and authenticity
  • AI Scraping Prevention: Mark content as protected from AI training
  • TypeScript Support: Full type definitions included
  • ESM & CommonJS: Works with both module systems

API Reference

DAONClient

Constructor

new DAONClient(config: DAONConfig)

Config Options:

  • baseURL (string): API endpoint URL (default: 'https://api.daon.network')
  • apiKey (string, optional): Your API key for authenticated requests
  • timeout (number, optional): Request timeout in milliseconds (default: 30000)
  • retries (number, optional): Number of retry attempts (default: 3)

Methods

protectContent(data: ProtectionRequest): Promise<ProtectionResponse>

Register creative content on the blockchain.

Parameters:

{
  title: string;           // Title of the work
  content: string;         // Content to protect
  contentType: string;     // MIME type (e.g., 'text/plain', 'text/html')
  metadata?: {             // Optional metadata
    author?: string;
    createdAt?: string;
    tags?: string[];
    [key: string]: any;
  }
}

Returns:

{
  contentId: string;       // Unique content identifier
  txHash: string;          // Blockchain transaction hash
  timestamp: string;       // Protection timestamp
  status: 'pending' | 'confirmed';
}
getProtectionStatus(contentId: string): Promise<ProtectionStatus>

Check the protection status of a registered work.

Returns:

{
  contentId: string;
  status: 'pending' | 'confirmed' | 'not_found';
  txHash?: string;
  timestamp?: string;
  blockHeight?: number;
}
verifyContent(content: string, contentId: string): Promise<VerificationResult>

Verify if content matches a protected work.

Returns:

{
  verified: boolean;
  contentId: string;
  match: number;           // Match percentage (0-100)
  timestamp?: string;
}

Error Handling

The SDK throws specific error types for better error handling:

try {
  await client.protectContent({ /* ... */ });
} catch (error) {
  if (error.response) {
    // API error response
    console.error('API Error:', error.response.status, error.response.data);
  } else if (error.request) {
    // Network error
    console.error('Network Error:', error.message);
  } else {
    // Other error
    console.error('Error:', error.message);
  }
}

Advanced Usage

Custom Configuration

const client = new DAONClient({
  baseURL: 'https://custom-api.example.com',
  apiKey: process.env.DAON_API_KEY,
  timeout: 60000,  // 60 second timeout
  retries: 5       // Retry failed requests 5 times
});

TypeScript

import { DAONClient, ProtectionRequest, ProtectionResponse } from 'daon-sdk';

const client = new DAONClient({ baseURL: 'https://api.daon.network' });

const request: ProtectionRequest = {
  title: 'My Story',
  content: 'Once upon a time...',
  contentType: 'text/plain',
  metadata: {
    author: 'Jane Doe',
    tags: ['fiction', 'fantasy']
  }
};

const response: ProtectionResponse = await client.protectContent(request);

License

This project is licensed under the Liberation License v1.0.

Key terms:

  • ✅ Free for creators and platforms protecting creative works
  • ✅ Free for educational and research purposes
  • ❌ Cannot be used by AI companies to identify unprotected content for training
  • ❌ Cannot be used to circumvent creator protection

See LICENSE.md for full terms.

Support

  • Documentation: https://daon.network/docs
  • Issues: https://github.com/daon-network/daon/issues
  • Community: https://github.com/daon-network/daon/discussions

Contributing

Contributions are welcome! Please read our Contributing Guide before submitting pull requests.

About DAON

DAON (Decentralized Archive of Original Narratives) is a blockchain-based platform that helps creators protect their work from unauthorized AI training and scraping. By registering creative works on-chain, creators establish provable ownership and can opt-out of AI training datasets.

Learn more at daon.network