Quick Start

Installation

npm install @kyne/sdk

Basic Setup

from kyne import KyneClient
from kyne.wallet import KyneWallet

# Initialize with wallet
client = KyneClient(
    wallet=KyneWallet.from_private_key("0x..."),
    network="mainnet",
    config={
        "storage": "walrus",
        "compute": "distributed"
    }
)

Integration Patterns

Token Integration

Data Exchange Layer

  • Trading - Buy and sell AI training data
  • API Endpoints - Managed model inference
  • Token Gating - Access control
  • Blob Storage - Efficient data storage

Network Layer

  • Storage - Decentralized storage
  • Proof Systems - Verification & security
  • Compute - Distributed compute
  • Protocol Params - Governance settings

Integration Examples

# Create token-gated API endpoint
api = await client.create_api_endpoint(
    name="sentiment-analysis",
    config={
        "access_control": {
            "token_required": True,
            "whitelist": ["0x..."]
        },
        "distribution": {
            "storage": "walrus",
            "availability": "high"
        }
    }
)


# Monitor usage
stats = await api.get_stats()
print(f"Active users: {stats.users}")
print(f"Storage health: {stats.availability}")

Core SDKs

Data Management

from kyne.data import DataManager

# Upload dataset with revenue sharing
dataset = await DataManager.upload(
    path="./training_data",
    config={
        "price": 1000,         # KYNE tokens
        "revenue_share": 0.1,  # Share with contributors
        "min_purchase": 100    # Minimum purchase size
    }
)

# Create marketplace listing
listing = await dataset.create_listing(
    pricing={
        "fixed_price": True,
        "allow_subscriptions": True
    }
)

Model Deployment

from kyne.models import ModelDeployment

# Deploy model with token incentives
deployment = await ModelDeployment.create(
    model_path="./my_model",
    config={
        "inference_price": 1,    # KYNE per call
        "batch_discount": 0.2,   # 20% bulk discount
        "revenue_share": 0.1     # Share to data providers
    }
)

# Monitor usage and revenue
metrics = await deployment.get_metrics()
print(f"Total calls: {metrics.total_calls}")
print(f"Revenue: {metrics.revenue} KYNE")

Integration Guidelines

Best Practices

Storage Optimization

  • • Use recommended chunk sizes
  • • Enable proper redundancy
  • • Monitor node health
  • • Implement caching

Performance

  • • Optimize batch operations
  • • Monitor usage metrics
  • • Implement rate limiting
  • • Use proper indexing

Security Considerations

Access Control

  • Implement proper authentication
  • Use secure key management
  • Monitor access patterns
  • Verify storage proofs

Data Protection

  • Enable encryption where needed
  • Implement proper backups
  • Use secure endpoints
  • Validate data integrity

Network Security

  • Enable Byzantine fault tolerance
  • Implement proper redundancy
  • Monitor network health
  • Verify node signatures

Next Up

Kyne’s architecture combines decentralized storage and compute to enable efficient model training and deployment at scale.