DAON SDKs & API Documentation

Complete API reference and SDK documentation for integrating DAON creator protection into any platform.


Quick Start

1. Choose Your Language

# JavaScript/Node.js
npm install @daon/sdk

# Python
pip install daon

# Ruby
gem install daon

# PHP
composer require daon/client

# Go
go get github.com/daon-network/go-sdk

2. Basic Protection

// Node.js/JavaScript
import { protect } from '@daon/sdk';

const result = await protect(
    content,
    { title: "My Work", author: "Creator Name" },
    'liberation_v1'
);
console.log('Protected:', result.verificationUrl);

3. Verification

const verification = await verify(result.contentHash);
console.log('Verified:', verification.isValid);

SDK Documentation

JavaScript/TypeScript

For web apps, Node.js, React, Vue, Angular

Key Features: TypeScript support, CommonJS & ESM modules, Browser compatibility, Async/await ready

Python

For Django, Flask, FastAPI, academic platforms

Key Features: Django model mixins, Flask decorators, Async support, Type hints included

Ruby

For Rails, AO3-style platforms, fanfiction sites

Key Features: ActiveRecord integration, Rails generators, AO3-compatible, Gem-based distribution

PHP

For WordPress, Laravel, Symfony, legacy systems

Key Features: WordPress hooks, Laravel facades, PSR-4 autoloading, PHP 7.4+ support

Go

For high-performance systems, microservices

Key Features: High performance, Concurrent operations, gRPC support, Minimal dependencies

REST API

For any language or custom integrations

Key Features: Language-agnostic, HTTP/JSON interface, Webhook support, OpenAPI specification


Core API Methods

Protect Content

Register content with cryptographic protection

POST /api/v1/protect
Content-Type: application/json

{
  "content": "Your creative work here...",
  "metadata": {
    "title": "Work Title",
    "author": "Creator Name",
    "type": "article"
  },
  "license": "liberation_v1"
}

Response:

{
  "success": true,
  "contentHash": "7f8b9c2d4a1e3f5a...",
  "verificationUrl": "https://verify.daon.network/7f8b9c2d...",
  "timestamp": "2024-03-15T14:32:17Z",
  "license": "liberation_v1"
}

Verify Content

Check if content is protected and get details

GET /api/v1/verify/{contentHash}

Response:

{
  "isValid": true,
  "contentHash": "7f8b9c2d4a1e3f5a...",
  "timestamp": "2024-03-15T14:32:17Z",
  "license": "liberation_v1",
  "metadata": {
    "title": "Work Title",
    "author": "Creator Name"
  }
}

Bulk Protect

Protect multiple works in a single request

POST /api/v1/protect/bulk
Content-Type: application/json

{
  "works": [
    {
      "content": "First work...",
      "metadata": {"title": "Work 1"}
    },
    {
      "content": "Second work...", 
      "metadata": {"title": "Work 2"}
    }
  ],
  "license": "liberation_v1"
}

Authentication

API Key Authentication

POST /api/v1/protect
Authorization: Bearer your-api-key-here
Content-Type: application/json

OAuth 2.0 (For platforms)

POST /oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&
client_id=your-client-id&
client_secret=your-client-secret

SDK Authentication

// Configure API key
daon.configure({
  apiKey: process.env.DAON_API_KEY,
  environment: 'production' // or 'sandbox'
});

Performance & Limits

Rate Limits

  • Free Tier: 1,000 protections/month
  • Creator Tier: 10,000 protections/month
  • Platform Tier: 100,000 protections/month
  • Enterprise: Custom limits

Request Limits

  • Individual: 100 requests/minute
  • Bulk: 10 requests/minute (up to 100 works each)
  • Verification: 1,000 requests/minute

Content Limits

  • Max Content Size: 10MB per work
  • Supported Formats: Text, HTML, Markdown, JSON
  • Encoding: UTF-8 required

Security

Data Protection

  • Content Hashing: SHA-256 cryptographic fingerprints
  • Transport Security: TLS 1.3 encryption
  • API Security: Rate limiting, DDoS protection
  • Privacy: No content storage, GDPR compliant

Verification Integrity

  • Blockchain Storage: Immutable record keeping
  • Timestamp Accuracy: NTP-synchronized servers
  • Hash Verification: Cryptographic proof validation
  • Legal Standing: Court-admissible evidence

Error Handling

Common Error Codes

{
  "error": {
    "code": "CONTENT_TOO_LARGE",
    "message": "Content exceeds 10MB limit",
    "details": {
      "maxSize": "10MB",
      "actualSize": "15MB"
    }
  }
}

Error Types

  • INVALID_API_KEY - Authentication failure
  • RATE_LIMIT_EXCEEDED - Too many requests
  • CONTENT_TOO_LARGE - Content size limit exceeded
  • INVALID_LICENSE - Unknown license type
  • NETWORK_ERROR - Temporary service unavailability

SDK Error Handling

try {
  const result = await daon.protect(content);
} catch (error) {
  if (error.code === 'RATE_LIMIT_EXCEEDED') {
    // Wait and retry
    await new Promise(resolve => setTimeout(resolve, 60000));
    return await daon.protect(content);
  }
  throw error;
}

Testing & Development

Sandbox Environment

daon.configure({
  environment: 'sandbox',
  apiKey: 'test_key_...'
});

Test API Key

For development and testing:

  • Sandbox URL: https://sandbox-api.daon.network
  • Test Key: Contact support@daon.network
  • Free Tier: Unlimited sandbox usage

Mock Responses

SDK includes built-in mock responses for testing:

import { mockDAON } from '@daon/sdk/testing';

// Enable mocks for unit tests
mockDAON.enable();

Support & Resources

Documentation

Community

Professional Support

  • API Issues: api-support@daon.network
  • SDK Problems: sdk-support@daon.network
  • Integration Help: integrations@daon.network
  • Enterprise: enterprise@daon.network

Get Started Now

API Reference

Complete technical docs

API Reference →

Code Examples

Copy-paste snippets

Code Examples →

Get Help

Chat with developers

Get Help →

Technical Support

Direct developer help

Technical Support →

## 🛡️ Build the Protection **Every line of code is an act of resistance.** *Integrate DAON and protect your creators.* *Build the tools that fight exploitation.* *Code the future of creator rights.*