XcmInputs: {
    destinations: "*" | string[];
    events?: "*" | XcmNotificationType[];
    history?: {
        last?: number;
        timeframe?:
            | string
            | Partial<{ end: string | number; start: string | number }>;
    };
    origins: "*"
    | string[];
    senders?: "*" | string[];
}

XCM Agent subscription inputs.

Type declaration

  • destinations: "*" | string[]

    An array of destination chain ids or '*' for all.

  • Optionalevents?: "*" | XcmNotificationType[]

    An optional array with the events to deliver. Use '*' for all.

  • Optionalhistory?: {
        last?: number;
        timeframe?:
            | string
            | Partial<{ end: string | number; start: string | number }>;
    }

    Historical Query.

    Enables backfilling historical data up to the server's retention limit in your subscription.

    Modes:

    • "last": Retrieves the last N data points and continues the real-time stream.
    • "timeframe": Supports open or closed time frames using relative time expressions or explicity start and end dates.

    Relative timeframe format: {rel}_{n}_{units}

    • {rel}: "this" (includes events up to now) or "previous" (includes only complete time chunks).
    • {n}: A positive integer.
    • {units}: "minutes", "hours", "days", "weeks", "months", or "years".

    "this" keeps the stream open for real-time updates, while "previous" closes it at the end.

  • origins: "*" | string[]

    An array of origin chain ids or '*' for all.

  • Optionalsenders?: "*" | string[]

    An array of sender addresses or '*' for all.