import type { HexString } from '../types/index.js'; import type { CentrifugeId, PoolId } from '../utils/types.js'; /** * Status of a cross-chain message envelope (indexer-side `CrosschainPayload`). * * - `Underpaid` — gas paid was less than required; awaiting top-up. * - `InTransit` — sent from the origin, not yet delivered on the destination. * - `Delivered` — handled on the destination; may still be awaiting follow-up. * - `PartiallyFailed` — at least one inner message failed. * - `Completed` — fully processed end-to-end. */ export type CrosschainMessageStatus = 'Underpaid' | 'InTransit' | 'Delivered' | 'PartiallyFailed' | 'Completed'; /** * Status of an inner cross-chain message (one of the messages bundled inside * a `CrosschainMessage` envelope). */ export type CrosschainInnerMessageStatus = 'Unsent' | 'AwaitingBatchDelivery' | 'Failed' | 'Executed'; export type AdapterParticipationType = 'PAYLOAD' | 'PROOF'; export type AdapterParticipationSide = 'SEND' | 'HANDLE'; export type CrosschainBlockchainRef = { id: string; centrifugeId: CentrifugeId; network: string; }; export type CrosschainPoolRef = { id: string; name: string | undefined; }; export type CrosschainTokenRef = { name: string | undefined; symbol: string | undefined; }; export type CrosschainAdapterRef = { address: HexString; name: string; centrifugeId: CentrifugeId; }; export type CrosschainInnerMessage = { id: HexString; index: number; poolId: string | null; tokenId: string | null; payloadId: HexString; payloadIndex: number; fromCentrifugeId: CentrifugeId; toCentrifugeId: CentrifugeId; messageType: string; status: CrosschainInnerMessageStatus; rawData: HexString | undefined; data: unknown; failReason: string | undefined; createdAt: Date; executedAt: Date | undefined; executedAtTxHash: HexString | undefined; }; export type AdapterParticipation = { centrifugeId: CentrifugeId; fromCentrifugeId: CentrifugeId; toCentrifugeId: CentrifugeId; type: AdapterParticipationType; side: AdapterParticipationSide; gasPaid: bigint | undefined; timestamp: Date; transactionHash: HexString; adapter?: CrosschainAdapterRef; }; /** * Optional joined data on a cross-chain message. Each field is `undefined` * unless the corresponding flag is set on the request's `include` option. * * Single-message reads (`centrifuge.crosschainMessage(id, index)`) request * every join by default since the page renders one row. */ export type CrosschainMessageIncludes = { pool?: boolean; token?: boolean; blockchains?: boolean; innerMessages?: boolean; adapterParticipations?: boolean; }; export type CrosschainMessage = { id: HexString; index: number; poolId: string | null; tokenId: string | null; fromCentrifugeId: CentrifugeId; toCentrifugeId: CentrifugeId; status: CrosschainMessageStatus; rawData: HexString | undefined; gasLimit: bigint | undefined; gasPrice: bigint | undefined; createdAt: Date; deliveredAt: Date | undefined; completedAt: Date | undefined; preparedAtTxHash: HexString | undefined; deliveredAtTxHash: HexString | undefined; pool: CrosschainPoolRef | undefined; token: CrosschainTokenRef | undefined; fromBlockchain: CrosschainBlockchainRef | undefined; toBlockchain: CrosschainBlockchainRef | undefined; innerMessages: CrosschainInnerMessage[] | undefined; adapterParticipations: AdapterParticipation[] | undefined; }; export type CrosschainMessagesPageInfo = { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string | null; endCursor: string | null; }; export type CrosschainMessagesPage = { items: CrosschainMessage[]; totalCount: number; pageInfo: CrosschainMessagesPageInfo; }; export type CrosschainMessagesFilter = { poolId?: PoolId | bigint; fromCentrifugeId?: CentrifugeId; toCentrifugeId?: CentrifugeId; status?: CrosschainMessageStatus | CrosschainMessageStatus[]; /** Match all payloads emitted by the same source transaction (batch). */ preparedAtTxHash?: HexString; limit?: number; before?: string; after?: string; include?: CrosschainMessageIncludes; }; //# sourceMappingURL=crosschainMessages.d.ts.map