Vana SDK - v2.2.2
    Preparing search index...

    Type Alias UnifiedRelayerResponse

    UnifiedRelayerResponse:
        | { type: "pending"; operationId: string }
        | { type: "submitted"; hash: Hash; context?: TransactionContext }
        | { type: "confirmed"; hash: Hash; receipt?: TransactionReceipt }
        | { type: "signed"; hash: Hash; context?: TransactionContext }
        | { type: "direct"; result: unknown }
        | { type: "error"; error: string }

    Provides type-safe responses for all relayer operations.

    Type Declaration

    • { type: "pending"; operationId: string }
    • { type: "submitted"; hash: Hash; context?: TransactionContext }
      • type: "submitted"
      • hash: Hash
      • Optionalcontext?: TransactionContext

        Optional context for client-side event parsing and enhanced responses

    • { type: "confirmed"; hash: Hash; receipt?: TransactionReceipt }
    • { type: "signed"; hash: Hash; context?: TransactionContext }
      • type: "signed"
      • hash: Hash
      • Optionalcontext?: TransactionContext

        Optional context for client-side event parsing and enhanced responses

    • { type: "direct"; result: unknown }
      • type: "direct"

        Non-transactional operations that complete immediately (e.g., IPFS uploads, file info)

      • result: unknown

        The result data from the operation, structure depends on the specific operation

    • { type: "error"; error: string }

    The discriminated union ensures proper error handling and result typing. Check the type field to determine success or failure before accessing results. The new async pattern returns pending operations with operationIds for polling.

    Transaction responses include optional context to enable client-side event parsing through the enhanced response pattern.