Implements comprehensive SDK support for three core services across four programming languages (JavaScript/TypeScript, Python, Go, Rust). ## New SDKs ### Wallet SDK - Key management (create, import, export) - Transaction signing - Message signing and verification - Balance and UTXO queries - Stealth address support ### RPC SDK - Block and transaction queries - Chain state information - Fee estimation - Mempool information - WebSocket subscriptions for real-time updates ### Storage SDK - Content upload and download - Pinning operations - CAR file support - Directory management - Gateway URL generation ## Shared Infrastructure - JSON Schema definitions for all 11 services - Common type definitions (Address, Amount, UTXO, etc.) - Unified error handling patterns - Builder patterns for configuration ## Package Updates - JavaScript: Updated to @synor/sdk with module exports - Python: Updated to synor-sdk with websockets dependency - Go: Added gorilla/websocket dependency - Rust: Added base64, urlencoding, multipart support ## Fixes - Fixed Tensor Default trait implementation - Fixed ProcessorType enum casing
57 lines
1 KiB
Python
57 lines
1 KiB
Python
"""
|
|
Synor RPC SDK
|
|
|
|
A Python SDK for querying blocks, transactions, and chain state
|
|
on the Synor blockchain with WebSocket subscription support.
|
|
|
|
Example:
|
|
>>> from synor_rpc import SynorRpc
|
|
>>> async with SynorRpc(api_key="sk_...") as rpc:
|
|
... block = await rpc.get_latest_block()
|
|
... print(f"Height: {block.height}")
|
|
"""
|
|
|
|
from .client import SynorRpc, RpcError
|
|
from .types import (
|
|
RpcConfig,
|
|
Network,
|
|
Priority,
|
|
TransactionStatus,
|
|
SubscriptionType,
|
|
BlockHeader,
|
|
Block,
|
|
TxInput,
|
|
TxOutput,
|
|
Transaction,
|
|
FeeEstimate,
|
|
ChainInfo,
|
|
MempoolInfo,
|
|
UTXO,
|
|
Subscription,
|
|
)
|
|
|
|
__all__ = [
|
|
# Client
|
|
"SynorRpc",
|
|
"RpcError",
|
|
# Config
|
|
"RpcConfig",
|
|
# Enums
|
|
"Network",
|
|
"Priority",
|
|
"TransactionStatus",
|
|
"SubscriptionType",
|
|
# Types
|
|
"BlockHeader",
|
|
"Block",
|
|
"TxInput",
|
|
"TxOutput",
|
|
"Transaction",
|
|
"FeeEstimate",
|
|
"ChainInfo",
|
|
"MempoolInfo",
|
|
"UTXO",
|
|
"Subscription",
|
|
]
|
|
|
|
__version__ = "0.1.0"
|