Welcome to ƒ(xyz) Network API

The ƒ(xyz) Network API provides a unified GraphQL interface for accessing all blockchain, governance, and financial data within the ƒ(xyz) ecosystem. Our API includes real-time subscriptions, Neo4j graph database integration, and comprehensive support for confidential transactions and DeFi operations.

GraphQL Playground

Explore our API schema and test queries interactively

🚀 GraphQL Endpoint

All API operations are performed through a single GraphQL endpoint:

POST https://api.fxyz.network/graphql

Local Development:

POST http://localhost:3002/graphql

Key Features

  • Unified Interface: All data operations through one endpoint
  • Real-time Subscriptions: Live updates for network changes
  • Type Safety: Strong typing with GraphQL schema
  • Efficient Queries: Request exactly the data you need
  • Neo4j Integration: Direct graph database queries
  • Confidential Transactions: Privacy-preserving financial operations

Authentication

API operations requiring authentication use Bearer tokens:

Authorization: Bearer <your-token>

Admin-level operations require elevated permissions and are restricted to authenticated administrators.

Core Operations

🔍 Query Operations

OperationDescription
neo4jStatusDatabase connection and health status
networkGraphNetwork visualization data with nodes and relationships
networkDataComprehensive network information
holacracyDataOrganizational structure and governance data
locationsGeographic locations and member distribution
getUserPortfolioUnified user portfolio with balances and assets
userBalanceEncrypted user balance information
userVouchersUser’s voucher data
voucherByCodeGet voucher by redemption code
allVouchersAll vouchers (admin only)
vouchersAll vouchers with filtering
allInvitesAll invites (admin only)
invitesAll invites with filtering
tokensAvailable token information
isAdminCheck admin status
executeCypherExecute raw Cypher queries (admin only)
cypherQueryExecute parameterized Cypher queries
investmentDataCurrent investment round and token metrics

✏️ Mutation Operations

OperationDescription
createVoucherCreate new vouchers
updateVoucherUpdate existing voucher
claimVoucherClaim vouchers by code
redeemVoucherRedeem vouchers for tokens
issueVoucherIssue voucher with amount and recipient
createInviteCreate new invites
updateInviteUpdate existing invite
mintConfidentialFLRMint confidential Florin tokens
fixVoucherRelationshipsFix missing voucher relationships

🔄 Subscription Operations

Real-time updates for live network monitoring:

SubscriptionDescription
networkUpdatedReal-time network graph changes
nodeCreatedNew nodes added to the network
nodeUpdatedExisting nodes modified
relationshipCreatedNew relationships formed
voucherCreatedNew vouchers issued
voucherRedeemedVouchers redeemed
dataUpdatedGeneral data change notifications

Example Queries

Get Network Graph Data

query NetworkGraph {
  networkGraph(limit: 100) {
    nodes {
      id
      labels
      type
      properties
    }
    links {
      id
      source
      target
      type
      properties
    }
    metadata {
      nodeCount
      linkCount
      lastUpdated
    }
  }
}

Get User Portfolio

query GetUserPortfolio($userId: String) {
  getUserPortfolio(userId: $userId) {
    success
    data {
      totalBalance
      tokens {
        symbol
        amount
        value
      }
      vouchers {
        id
        amount
        status
      }
      invites {
        id
        status
        expiresAt
      }
    }
    error
  }
}

Create and Issue Voucher

mutation IssueVoucher($amount: Float!, $recipientEmail: String, $expiresAt: String) {
  issueVoucher(amount: $amount, recipientEmail: $recipientEmail, expiresAt: $expiresAt) {
    id
    code
    amount
    status
    createdAt
    expiresAt
  }
}

Real-time Network Updates

subscription NetworkUpdates {
  networkUpdated {
    nodes {
      id
      labels
      type
    }
    links {
      id
      source
      target
      type
    }
    metadata {
      nodeCount
      linkCount
      lastUpdated
    }
  }
}

System Endpoints

These endpoints remain as REST for system functionality:

EndpointPurpose
/healthHealth check and system status
/webhooks/privyPrivy authentication webhook
/webhooks/heliusHelius blockchain webhook
/cron/keep-aliveKeep-alive service
/invites/*Invite management pages

Error Handling

GraphQL errors follow the standard GraphQL error format:

{
  "errors": [
    {
      "message": "Error description",
      "locations": [{"line": 2, "column": 3}],
      "path": ["fieldName"]
    }
  ],
  "data": null
}

Rate Limiting

API requests are subject to rate limiting based on authentication status:

  • Unauthenticated: 100 requests per hour
  • Authenticated: 1000 requests per hour
  • Admin: 5000 requests per hour

Real-time Features

The API supports GraphQL subscriptions for real-time updates:

  • WebSocket Connection: Automatic upgrade from HTTP
  • Event-driven Updates: Publish/Subscribe pattern
  • Efficient Updates: Only changed data is transmitted
  • Connection Management: Automatic reconnection and error handling

Confidential Transactions

The API supports privacy-preserving financial operations:

  • ElGamal Encryption: Zero-knowledge balance proofs
  • Confidential Transfers: Private transaction amounts
  • Compliance Integration: Selective disclosure capabilities
  • Multi-sig Support: Complex approval workflows

Support

For API support and questions:

Welcome to ƒ(xyz) Network API

The ƒ(xyz) Network API provides a unified GraphQL interface for accessing all blockchain, governance, and financial data within the ƒ(xyz) ecosystem. Our API includes real-time subscriptions, Neo4j graph database integration, and comprehensive support for confidential transactions and DeFi operations.

GraphQL Playground

Explore our API schema and test queries interactively

🚀 GraphQL Endpoint

All API operations are performed through a single GraphQL endpoint:

POST https://api.fxyz.network/graphql

Local Development:

POST http://localhost:3002/graphql

Key Features

  • Unified Interface: All data operations through one endpoint
  • Real-time Subscriptions: Live updates for network changes
  • Type Safety: Strong typing with GraphQL schema
  • Efficient Queries: Request exactly the data you need
  • Neo4j Integration: Direct graph database queries
  • Confidential Transactions: Privacy-preserving financial operations

Authentication

API operations requiring authentication use Bearer tokens:

Authorization: Bearer <your-token>

Admin-level operations require elevated permissions and are restricted to authenticated administrators.

Core Operations

🔍 Query Operations

OperationDescription
neo4jStatusDatabase connection and health status
networkGraphNetwork visualization data with nodes and relationships
networkDataComprehensive network information
holacracyDataOrganizational structure and governance data
locationsGeographic locations and member distribution
getUserPortfolioUnified user portfolio with balances and assets
userBalanceEncrypted user balance information
userVouchersUser’s voucher data
voucherByCodeGet voucher by redemption code
allVouchersAll vouchers (admin only)
vouchersAll vouchers with filtering
allInvitesAll invites (admin only)
invitesAll invites with filtering
tokensAvailable token information
isAdminCheck admin status
executeCypherExecute raw Cypher queries (admin only)
cypherQueryExecute parameterized Cypher queries
investmentDataCurrent investment round and token metrics

✏️ Mutation Operations

OperationDescription
createVoucherCreate new vouchers
updateVoucherUpdate existing voucher
claimVoucherClaim vouchers by code
redeemVoucherRedeem vouchers for tokens
issueVoucherIssue voucher with amount and recipient
createInviteCreate new invites
updateInviteUpdate existing invite
mintConfidentialFLRMint confidential Florin tokens
fixVoucherRelationshipsFix missing voucher relationships

🔄 Subscription Operations

Real-time updates for live network monitoring:

SubscriptionDescription
networkUpdatedReal-time network graph changes
nodeCreatedNew nodes added to the network
nodeUpdatedExisting nodes modified
relationshipCreatedNew relationships formed
voucherCreatedNew vouchers issued
voucherRedeemedVouchers redeemed
dataUpdatedGeneral data change notifications

Example Queries

Get Network Graph Data

query NetworkGraph {
  networkGraph(limit: 100) {
    nodes {
      id
      labels
      type
      properties
    }
    links {
      id
      source
      target
      type
      properties
    }
    metadata {
      nodeCount
      linkCount
      lastUpdated
    }
  }
}

Get User Portfolio

query GetUserPortfolio($userId: String) {
  getUserPortfolio(userId: $userId) {
    success
    data {
      totalBalance
      tokens {
        symbol
        amount
        value
      }
      vouchers {
        id
        amount
        status
      }
      invites {
        id
        status
        expiresAt
      }
    }
    error
  }
}

Create and Issue Voucher

mutation IssueVoucher($amount: Float!, $recipientEmail: String, $expiresAt: String) {
  issueVoucher(amount: $amount, recipientEmail: $recipientEmail, expiresAt: $expiresAt) {
    id
    code
    amount
    status
    createdAt
    expiresAt
  }
}

Real-time Network Updates

subscription NetworkUpdates {
  networkUpdated {
    nodes {
      id
      labels
      type
    }
    links {
      id
      source
      target
      type
    }
    metadata {
      nodeCount
      linkCount
      lastUpdated
    }
  }
}

System Endpoints

These endpoints remain as REST for system functionality:

EndpointPurpose
/healthHealth check and system status
/webhooks/privyPrivy authentication webhook
/webhooks/heliusHelius blockchain webhook
/cron/keep-aliveKeep-alive service
/invites/*Invite management pages

Error Handling

GraphQL errors follow the standard GraphQL error format:

{
  "errors": [
    {
      "message": "Error description",
      "locations": [{"line": 2, "column": 3}],
      "path": ["fieldName"]
    }
  ],
  "data": null
}

Rate Limiting

API requests are subject to rate limiting based on authentication status:

  • Unauthenticated: 100 requests per hour
  • Authenticated: 1000 requests per hour
  • Admin: 5000 requests per hour

Real-time Features

The API supports GraphQL subscriptions for real-time updates:

  • WebSocket Connection: Automatic upgrade from HTTP
  • Event-driven Updates: Publish/Subscribe pattern
  • Efficient Updates: Only changed data is transmitted
  • Connection Management: Automatic reconnection and error handling

Confidential Transactions

The API supports privacy-preserving financial operations:

  • ElGamal Encryption: Zero-knowledge balance proofs
  • Confidential Transfers: Private transaction amounts
  • Compliance Integration: Selective disclosure capabilities
  • Multi-sig Support: Complex approval workflows

Support

For API support and questions:

ƒ(xyz) Network API - ƒxyz Network