Commit graph

9 commits

Author SHA1 Message Date
Gulshan Yadav
e65ea40af2 feat: implement Privacy and Contract SDKs for all 12 languages (Phase 5)
Privacy SDK features:
- Confidential transactions with Pedersen commitments
- Bulletproof range proofs for value validation
- Ring signatures for anonymous signing with key images
- Stealth addresses for unlinkable payments
- Blinding factor generation and value operations

Contract SDK features:
- Smart contract deployment (standard and CREATE2)
- Call (view/pure) and Send (state-changing) operations
- Event log filtering, subscription, and decoding
- ABI encoding/decoding utilities
- Gas estimation and contract verification
- Multicall for batched operations
- Storage slot reading

Languages implemented:
- JavaScript/TypeScript
- Python (async with httpx)
- Go
- Rust (async with reqwest/tokio)
- Java (async with OkHttp)
- Kotlin (coroutines with Ktor)
- Swift (async/await with URLSession)
- Flutter/Dart
- C (header-only interface)
- C++ (header-only with std::future)
- C#/.NET (async with HttpClient)
- Ruby (Faraday HTTP client)

All SDKs follow consistent patterns:
- Configuration with API key, endpoint, timeout, retries
- Custom exception types with error codes
- Retry logic with exponential backoff
- Health check endpoints
- Closed state management
2026-01-28 09:03:34 +05:30
Gulshan Yadav
6607223c9e feat(sdk): complete Phase 4 SDKs for all remaining languages
Add Economics, Governance, and Mining SDKs for:
- Java: Full SDK with CompletableFuture async operations
- Kotlin: Coroutine-based SDK with suspend functions
- Swift: Modern Swift SDK with async/await
- Flutter/Dart: Complete Dart SDK with Future-based API
- C: Header files and implementations with opaque handles
- C++: Modern C++17 with std::future and PIMPL pattern
- C#: Records, async/await Tasks, and IDisposable
- Ruby: Struct-based types with Faraday HTTP client

Also includes minor Dart lint fixes (const exceptions).
2026-01-28 08:33:20 +05:30
Gulshan Yadav
dd01a06116 feat(sdk): add Database, Hosting, and Bridge SDKs for Flutter
Phase 3 SDK expansion - Flutter/Dart implementations:

- Database SDK: Multi-model database with Key-Value, Document,
  Vector, and Time Series stores
- Hosting SDK: Decentralized web hosting with domain management,
  DNS, deployments, and SSL provisioning
- Bridge SDK: Cross-chain asset transfers with lock-mint and
  burn-unlock patterns

All SDKs follow consistent patterns with:
- Async/await API using Futures
- Proper error handling with typed exceptions
- Configurable retry logic and timeouts
- Full type safety with Dart's type system
2026-01-27 02:00:41 +05:30
Gulshan Yadav
74b82d2bb2 Add Synor Storage and Wallet SDKs for Swift
- Implement SynorStorage class for decentralized storage operations including upload, download, pinning, and CAR file management.
- Create supporting types and models for storage operations such as UploadOptions, Pin, and StorageConfig.
- Implement SynorWallet class for wallet operations including wallet creation, address generation, transaction signing, and balance queries.
- Create supporting types and models for wallet operations such as Wallet, Address, and Transaction.
- Introduce error handling for both storage and wallet operations.
2026-01-27 01:56:45 +05:30
Gulshan Yadav
7e3bbe569c fix: implement incomplete features and apply linter fixes
- Fixed TransferDirection import error in ethereum.rs tests
- Implemented math.tanh function for Flutter tensor operations
- Added DocumentStore CRUD methods (find_by_id, update_by_id, delete_by_id)
- Implemented database gateway handlers (get/update/delete document)
- Applied cargo fix across all crates to resolve unused imports/variables
- Reduced warnings from 320+ to 68 (remaining are architectural)

Affected crates: synor-database, synor-bridge, synor-compute,
synor-privacy, synor-verifier, synor-hosting, synor-economics
2026-01-26 21:43:51 +05:30
Gulshan Yadav
3e68f72743 fix: resolve 35 clippy warnings across Rust and Dart codebases
## Rust Fixes (35 warnings resolved)
- Remove unused imports (synor-vm, synor-bridge, tests)
- Remove unused variables and prefix intentional ones with underscore
- Use derive for Default implementations (6 structs)
- Replace manual is_multiple_of with standard method (3 occurrences)
- Fix needless borrows by using direct expressions (12 occurrences)
- Suppress false-positive variant assignment warnings with allow attributes
- Fix Default field initialization pattern in synor-crypto
- Rename MerklePath::to_string() to path() to avoid conflict with Display trait

## Flutter/Dart Fixes
- Add const constructors for immutable objects (8 instances)
- Remove unused imports (dart:convert, collection package, tensor.dart)

## Impact
- Reduced clippy warnings from 49 to 10 (79% reduction)
- Remaining 10 warnings are "too many arguments" requiring architectural refactoring
- All library code compiles successfully
- Code quality and maintainability improved
2026-01-26 17:08:57 +05:30
Gulshan Yadav
cb071a7a3b feat(sdk/flutter): add dataset upload APIs and comprehensive examples
Add comprehensive dataset management to the Flutter SDK including:
- Dataset formats: JSONL, CSV, Parquet, Arrow, HuggingFace, TFRecord, WebDataset, Text, ImageFolder, Custom
- Dataset types: text completion, instruction tuning, chat, Q&A, classification, NER, vision, audio
- Upload methods: uploadDataset, uploadDatasetFromFile, createDatasetFromRecords
- Management APIs: listDatasets, getDataset, deleteDataset
- Dataset preprocessing: splitting, shuffling, deduplication, tokenization
- Complete examples showing all formats and use cases
2026-01-11 16:47:47 +05:30
Gulshan Yadav
89fc542da4 feat(compute): add model registry and training APIs
Adds comprehensive model management and training capabilities:

synor-compute (Rust):
- ModelRegistry with pre-registered popular models
  - LLMs: Llama 3/3.1, Mistral, Mixtral, Qwen, DeepSeek, Phi, CodeLlama
  - Embedding: BGE, E5
  - Image: Stable Diffusion XL, FLUX.1
  - Speech: Whisper
  - Multi-modal: LLaVA
- ModelInfo with parameters, format, precision, context length
- Custom model upload and registration
- Model search by name/category

Flutter SDK:
- Model registry APIs: listModels, getModel, searchModels
- Custom model upload with multipart upload
- Training APIs: train(), fineTune(), trainStream()
- TrainingOptions: framework, epochs, batch_size, learning_rate
- TrainingProgress for real-time updates
- ModelUploadOptions and ModelUploadResult

Example code for:
- Listing available models by category
- Fine-tuning pre-trained models
- Uploading custom Python/ONNX models
- Streaming training progress

This enables users to:
1. Use pre-registered models like 'llama-3-70b'
2. Upload their own custom models
3. Fine-tune models on custom datasets
4. Track training progress in real-time
2026-01-11 15:22:26 +05:30
Gulshan Yadav
62ec3c92da feat(sdk): add Flutter/Dart SDK for Synor Compute
Complete SDK implementation for Flutter and Dart applications:

lib/src/types.dart:
- Precision, ProcessorType, Priority, JobStatus enums
- SynorConfig for client configuration
- MatMulOptions, Conv2dOptions, AttentionOptions, InferenceOptions
- PricingInfo and UsageStats data classes
- SynorException for error handling

lib/src/tensor.dart:
- Full Tensor class with shape, dtype, and data
- Factory constructors: zeros, ones, rand, randn, eye, linspace, arange
- Operations: reshape, transpose, flatten
- Statistics: sum, mean, std, min, max, argmin, argmax
- Element-wise: add, sub, mul, div, scalar ops
- Activations: relu, sigmoid, tanh, softmax
- JSON serialization with base64-encoded binary data

lib/src/job.dart:
- JobResult with status, result, timing, and cost
- Job class with WebSocket streaming and HTTP polling
- JobStatusUpdate for real-time progress tracking
- JobBatch for parallel job management

lib/src/client.dart:
- SynorCompute main client
- Operations: matmul, conv2d, attention, elementwise, reduce
- LLM inference with streaming support
- Tensor upload/download/delete
- Job management: submit, cancel, list
- Pricing and usage statistics

Platform support: Android, iOS, Linux, macOS, Web, Windows
2026-01-11 14:27:55 +05:30