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

    Interface RelayerOperationOptions

    Options for handleRelayerOperation

    interface RelayerOperationOptions {
        execution?: "sync" | "async";
        syncTimeout?: number;
        gas?: bigint;
        gasPrice?: bigint;
        maxFeePerGas?: bigint;
        maxPriorityFeePerGas?: bigint;
        nonce?: number;
        value?: bigint;
        signal?: AbortSignal;
        onStatusUpdate?: (status: OperationStatus) => void;
        pollingOptions?: {
            timeout?: number;
            initialInterval?: number;
            maxInterval?: number;
        };
    }

    Hierarchy

    • TransactionOptions
      • RelayerOperationOptions
    Index

    Properties

    execution?: "sync" | "async"

    Execution mode for the operation.

    • 'sync' (default): Attempts to process the transaction immediately. If a timeout occurs, automatically falls back to returning a pending operation ID. This is the Vana App's current model.

    • 'async': Immediately queues the operation and returns a pending operation ID. The transaction will be processed by a background worker. Requires an operationStore to be configured.

    'sync'
    
    syncTimeout?: number

    Timeout for synchronous execution in milliseconds. Only applies when execution is 'sync'.

    30000 (30 seconds)
    
    gas?: bigint

    Gas limit for the transaction

    gasPrice?: bigint

    Gas price in wei (for legacy transactions)

    maxFeePerGas?: bigint

    Maximum fee per gas in wei (EIP-1559)

    maxPriorityFeePerGas?: bigint

    Maximum priority fee per gas in wei (EIP-1559)

    nonce?: number

    Transaction nonce override

    value?: bigint

    ETH value to send with transaction

    signal?: AbortSignal

    AbortSignal for cancelling long-running operations.

    Useful for cancelling pending transactions or polling operations. When aborted, the operation will throw an error immediately.

    onStatusUpdate?: (status: OperationStatus) => void

    Callback for receiving status updates during long-running operations.

    Type Declaration

      • (status: OperationStatus): void
      • Parameters

        • status: OperationStatus

          The current operation status

        Returns void

    Called whenever the operation status changes (e.g., from pending to queued). Useful for showing progress in UI during multi-minute operations.

    pollingOptions?: {
        timeout?: number;
        initialInterval?: number;
        maxInterval?: number;
    }

    Custom polling options for long-running operations.

    Type Declaration

    • Optionaltimeout?: number

      Total timeout in milliseconds (default: 300000 = 5 min)

    • OptionalinitialInterval?: number

      Initial polling interval in milliseconds (default: 1000)

    • OptionalmaxInterval?: number

      Maximum polling interval in milliseconds (default: 10000)

    Overrides default polling behavior for operations that use the relayer. Generally not needed unless you have specific timing requirements.