synor/sdk/shared/schemas/hosting.json
Gulshan Yadav 59a7123535 feat(sdk): implement Phase 1 SDKs for Wallet, RPC, and Storage
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
2026-01-27 00:46:24 +05:30

190 lines
5.3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://synor.io/schemas/hosting.json",
"title": "Synor Hosting SDK",
"description": "Domain management, DNS, deployments, and SSL certificates",
"$defs": {
"HostingConfig": {
"type": "object",
"allOf": [{ "$ref": "common.json#/$defs/SynorConfig" }]
},
"Domain": {
"type": "object",
"properties": {
"name": { "type": "string" },
"owner": { "$ref": "common.json#/$defs/Address" },
"resolver": { "$ref": "common.json#/$defs/ContentId" },
"registeredAt": { "$ref": "common.json#/$defs/Timestamp" },
"expiresAt": { "$ref": "common.json#/$defs/Timestamp" },
"verified": { "type": "boolean" }
},
"required": ["name", "owner"]
},
"DomainRecord": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"cid": { "$ref": "common.json#/$defs/ContentId" },
"dnslink": { "type": "string" },
"ipv4": {
"type": "array",
"items": { "type": "string", "format": "ipv4" }
},
"ipv6": {
"type": "array",
"items": { "type": "string", "format": "ipv6" }
},
"updatedAt": { "$ref": "common.json#/$defs/Timestamp" }
},
"required": ["domain"]
},
"RegisterDomainRequest": {
"type": "object",
"properties": {
"name": { "type": "string", "pattern": "^[a-z0-9-]+\\.synor$" },
"duration": { "$ref": "common.json#/$defs/Duration" }
},
"required": ["name"]
},
"ResolveDomainRequest": {
"type": "object",
"properties": {
"name": { "type": "string" }
},
"required": ["name"]
},
"UpdateDomainRequest": {
"type": "object",
"properties": {
"name": { "type": "string" },
"record": { "$ref": "#/$defs/DomainRecord" }
},
"required": ["name", "record"]
},
"DnsRecordType": {
"type": "string",
"enum": ["A", "AAAA", "CNAME", "TXT", "MX", "NS", "CAA", "DNSLINK"]
},
"DnsRecord": {
"type": "object",
"properties": {
"type": { "$ref": "#/$defs/DnsRecordType" },
"name": { "type": "string" },
"value": { "type": "string" },
"ttl": { "type": "integer", "minimum": 60, "default": 3600 },
"priority": { "type": "integer", "minimum": 0 }
},
"required": ["type", "name", "value"]
},
"SetDnsRecordsRequest": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"records": {
"type": "array",
"items": { "$ref": "#/$defs/DnsRecord" }
}
},
"required": ["domain", "records"]
},
"GetDnsRecordsRequest": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"type": { "$ref": "#/$defs/DnsRecordType" }
},
"required": ["domain"]
},
"DeploymentStatus": {
"type": "string",
"enum": ["queued", "building", "deploying", "ready", "failed", "cancelled"]
},
"Deployment": {
"type": "object",
"properties": {
"id": { "type": "string" },
"domain": { "type": "string" },
"cid": { "$ref": "common.json#/$defs/ContentId" },
"status": { "$ref": "#/$defs/DeploymentStatus" },
"url": { "type": "string", "format": "uri" },
"createdAt": { "$ref": "common.json#/$defs/Timestamp" },
"readyAt": { "$ref": "common.json#/$defs/Timestamp" },
"error": { "type": "string" }
},
"required": ["id", "domain", "cid", "status"]
},
"DeployRequest": {
"type": "object",
"properties": {
"cid": { "$ref": "common.json#/$defs/ContentId" },
"domain": { "type": "string" },
"buildCommand": { "type": "string" },
"outputDirectory": { "type": "string" },
"environment": {
"type": "object",
"additionalProperties": { "type": "string" }
}
},
"required": ["cid", "domain"]
},
"ListDeploymentsRequest": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"status": { "$ref": "#/$defs/DeploymentStatus" }
},
"allOf": [{ "$ref": "common.json#/$defs/PaginationParams" }]
},
"Certificate": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"issuer": { "type": "string" },
"validFrom": { "$ref": "common.json#/$defs/Timestamp" },
"validTo": { "$ref": "common.json#/$defs/Timestamp" },
"fingerprint": { "type": "string" },
"autoRenew": { "type": "boolean" }
},
"required": ["domain", "validFrom", "validTo"]
},
"ProvisionSslRequest": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"wildcard": { "type": "boolean", "default": false }
},
"required": ["domain"]
},
"DomainVerification": {
"type": "object",
"properties": {
"domain": { "type": "string" },
"method": {
"type": "string",
"enum": ["dns", "http", "email"]
},
"token": { "type": "string" },
"verified": { "type": "boolean" },
"expiresAt": { "$ref": "common.json#/$defs/Timestamp" }
},
"required": ["domain", "method", "token"]
}
}
}