Protocols
Communication and interoperability protocols - Solana Token-2022, GraphQL, Wormhole bridges, and FIX on fXYZ Network
Network Protocols
fXYZ Network utilizes multiple protocols to enable blockchain operations, data exchange, and system interoperability.
Blockchain Protocols
Solana Token-2022
The network uses Solana's Token-2022 standard for advanced token features:
| Feature | Description |
|---|---|
| Confidential Transfers | ElGamal encryption for private balances |
| Transfer Hooks | Custom logic on token transfers |
| Metadata Extensions | On-chain token metadata |
| Permanent Delegate | Treasury management capabilities |
Florin Token uses Token-2022 with confidential transfer extensions for privacy-preserving balance operations.
Metaplex NFTs
Membership NFTs use Metaplex standard:
// NFT structure
{
mint: "membership-nft-address",
name: "fXYZ Network Membership",
symbol: "FXYZ-MEM",
uri: "https://arweave.net/...",
sellerFeeBasisPoints: 0,
creators: [{
address: "network-treasury",
share: 100,
}],
}Cross-Chain Bridges
| Bridge | Chains | Use Case |
|---|---|---|
| Wormhole | Solana to EVM | Token transfers |
| Circle CCTP | Multi-chain | USDC bridging |
API Protocols
GraphQL
Primary API protocol for complex queries:
# Schema location: packages/graphql/src/schema/
type Query {
# Member operations
me: Member
member(id: ID!): Member
# Network graph
parties(limit: Int): [Party]
circles: [Circle]
# Market data
prices: [Asset]
orderBook(pairId: String!): OrderBook
}
type Mutation {
# Member operations
updateProfile(input: ProfileInput!): Member
bootstrapUser(privyUserId: String!): Member
# Trading
submitOrder(input: OrderInput!): OrderResult
cancelOrder(orderId: String!): Order
}Endpoint: https://api.fxyz.network/api/graphql
REST
RESTful endpoints for specific services:
| Pattern | Example | Use Case |
|---|---|---|
| Resource | GET /api/prices | List all prices |
| Resource/:id | GET /api/fixie/:id | Get specific agent |
| Resource/action | POST /api/fixie/:id/stream | Stream chat |
| Nested | GET /api/bridge/customers/:id/kyc-link | Related resource |
Base URL: https://api.fxyz.network/api
Server-Sent Events (SSE)
Streaming responses for AI chat:
POST /api/fixie/:agentId/stream
Content-Type: application/json
{"message": "What is the current BTC price?"}Response (SSE stream):
data: {"type":"reasoning","content":"Checking prices..."}
data: {"type":"text","content":"Bitcoin is currently..."}
data: {"type":"done"}Authentication Protocol
Privy JWT
All authenticated endpoints use Privy JWT tokens:
Authorization: Bearer <privy-jwt-token>Token validation:
- Extract JWT from header
- Verify signature with Privy public key
- Check expiration
- Extract
sub(Privy user ID) - Map to Member via Neo4j
Persona Header
For multi-persona users:
x-persona-id: <persona-id>Allows operations in context of specific persona (service, technical, etc.)
Data Protocols
Neo4j Bolt
Graph database communication:
Endpoint: bolt://neo4j.fxyz.network:7687
Protocol: Bolt v4+
Encryption: TLS
Auth: Basic (username/password)Cypher Query Language
Graph queries use Cypher:
// Find member and their circles
MATCH (m:Member {privyUserId: $userId})
OPTIONAL MATCH (m)-[:HAS_PERSONA]->(p:Persona)
OPTIONAL MATCH (p)-[:MEMBER_OF]->(c:Circle)
RETURN m, collect(DISTINCT p) as personas, collect(DISTINCT c) as circlesFinancial Protocols
FIX Protocol (Future)
Financial Information eXchange for institutional connectivity:
| Component | Status | Description |
|---|---|---|
| FIX 4.4 | Planned | Standard trading messages |
| Order Routing | Planned | Route to external venues |
| Market Data | Planned | Real-time price feeds |
Note: FIX integration is in the Lagrange archive for reference. Modern implementation uses WebSocket + GraphQL.
FIBO Ontology
Financial Industry Business Ontology compliance:
// FIBO-compliant party hierarchy
(:Agent)-[:ISA]->(:Party)
(:Party)-[:HAS_ROLE]->(:PartyRole)
(:PartyRole)-[:IN_CONTEXT]->(:RoleContext)
// Example: Member as FIBO Agent
(:Member)-[:ISA]->(:Person)-[:ISA]->(:Party)-[:ISA]->(:Agent)See Knowledge Graph for details.
Webhook Protocols
Helius Webhooks
Solana transaction notifications:
POST /api/webhooks/helius
Authorization: <helius-webhook-secret>
Content-Type: application/json
{
"type": "TRANSFER",
"signature": "...",
"accountData": [...],
"timestamp": 1705689600
}Bridge Webhooks
Payment status updates:
POST /api/webhooks/bridge
X-Webhook-Signature: sha256=...
Content-Type: application/json
{
"event": "transfer.completed",
"data": {
"transferId": "...",
"status": "completed"
}
}Signature validation:
const expectedSig = crypto
.createHmac('sha256', webhookSecret)
.update(rawBody)
.digest('hex');
if (receivedSig !== `sha256=${expectedSig}`) {
throw new Error('Invalid signature');
}Real-Time Protocols
WebSocket
Order book and trade updates:
// Connection
ws://api.fxyz.network/ws
// Subscribe
{ "action": "subscribe", "channel": "orderbook", "pairId": "FLORIN-USDC" }
{ "action": "subscribe", "channel": "trades", "pairId": "FLORIN-USDC" }
{ "action": "subscribe", "channel": "ticker" }
// Messages
{ "type": "ORDER_BOOK_UPDATE", "data": {...}, "sequence": 12345 }
{ "type": "TRADE", "data": {...} }Letta Streaming
AI agent responses via Vercel AI SDK:
import { useChat } from '@ai-sdk/react';
const { messages, append } = useChat({
api: `/api/fixie/${agentId}/stream`,
headers: {
Authorization: `Bearer ${token}`,
},
});Security Protocols
TLS/HTTPS
All external communication encrypted:
- TLS 1.3 for API endpoints
- Certificate management via Let's Encrypt
- HSTS enabled
CORS
Allowed origins:
https://app.fxyz.network
https://fxyz.network
https://docs.fxyz.network
http://localhost:* (development)Rate Limiting
| Endpoint Type | Limit |
|---|---|
| Authenticated | 1000/hour |
| Unauthenticated | 100/hour |
| Streaming | 100/hour |
| Webhooks | Unlimited |
Protocol Standards
Date/Time
All timestamps in ISO 8601 UTC:
2026-01-19T12:00:00.000ZCurrency Codes
ISO 4217 for fiat, symbol for digital assets:
USD, EUR, MXN, BRL // Fiat
BTC, ETH, SOL, FLR // Digital Assets
USDC, USDT, PYUSD // StablecoinsError Responses
Consistent error format:
{
"error": "Error message",
"code": "ERROR_CODE",
"details": {}
}HTTP status codes:
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 404: Not Found
- 429: Rate Limited
- 500: Server Error
References
- FIX Trading Community — FIX Protocol Specifications — Official FIX 4.4 and FIX 5.0 protocol standards
- Wormhole Bridge Documentation — Cross-chain message passing protocol
- Circle CCTP (Cross-Chain Transfer Protocol) — Native USDC cross-chain transfers
- Neo4j Bolt Protocol — Binary protocol for Neo4j database communication
- FIBO — Financial Industry Business Ontology — EDM Council financial ontology standard