@rhea-finance/cross-chain-aggregation-dex 2.0.7 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -167,8 +167,11 @@ interface SwapOrderSubmitDataRaw {
167
167
  raw?: Record<string, unknown>;
168
168
  }
169
169
  interface SwapOrderStatusParamsRaw {
170
- orderId: string;
171
- router: string;
170
+ /** Preferred status identifier returned by POST /api/swap/report. */
171
+ recordId?: string | number;
172
+ orderId?: string;
173
+ txHash?: string;
174
+ router?: string;
172
175
  chainId?: string | number;
173
176
  }
174
177
  type SwapOrderStatusDataRaw = Record<string, unknown> & {
@@ -328,9 +331,13 @@ interface NearTransaction {
328
331
  actions: unknown[];
329
332
  }
330
333
  interface OrderReference {
334
+ /** Preferred status identifier returned by POST /api/swap/report. */
335
+ recordId?: string;
331
336
  /** Status-query key. Usually an order ID; confidential Near Intents may use the deposit address. */
332
- orderId: string;
333
- router: string;
337
+ orderId?: string;
338
+ /** Source-chain transaction hash when no order id is available. */
339
+ txHash?: string;
340
+ router?: string;
334
341
  chainId?: string;
335
342
  }
336
343
  interface DepositInfo {
@@ -542,6 +549,8 @@ interface SwapExecutionResult {
542
549
  depositAddress?: string;
543
550
  report?: {
544
551
  status: "reported" | "failed" | "skipped";
552
+ /** Report row id from POST /api/swap/report; preferred for order-status polling. */
553
+ recordId?: string;
545
554
  warning?: SwapWarning;
546
555
  };
547
556
  raw: unknown;
@@ -565,8 +574,10 @@ interface SwapInput extends Omit<ExecuteSwapInput, "build"> {
565
574
  idempotencyKey?: string;
566
575
  }
567
576
  interface OrderStatusResult {
568
- orderId: string;
569
- router: string;
577
+ recordId?: string;
578
+ orderId?: string;
579
+ txHash?: string;
580
+ router?: string;
570
581
  status: OrderStatus;
571
582
  raw: SwapOrderStatusDataRaw;
572
583
  }
@@ -643,4 +654,4 @@ interface ExecutorErrorAdapter {
643
654
  signMessage?(message: string, options?: MessageSignOptions): Promise<string>;
644
655
  }
645
656
 
646
- export { type MessageSignOptions as $, type AssetRef as A, type BaseUnitAmount as B, type ChainRef as C, type OrderStatusResult as D, ExecutorRegistry as E, type WaitForOrderInput as F, type SwapHistoryAuthProofRaw as G, type SwapMcaRelayerRequestRaw as H, type SwapApiResponse as I, type SwapApiTokenMetaRaw as J, type SwapTokenListRowRaw as K, type SwapMcaSignerPayloadRaw as L, type SwapSigningRequestRaw as M, type NearTransaction as N, type OrderPollingOptions as O, type SwapBuildApproveRaw as P, type QuoteRequest as Q, type SwapHistoryWalletChainFamilyRaw as R, type SwapQuoteRequestRaw as S, type TransactionConfirmation as T, type SwapWarning as U, type SignRequestPreview as V, type WaitMode as W, type OrderStatus as X, normalizeOrderStatus as Y, type ChainExecutionResult as Z, type ExecutionContext as _, type SwapQuoteDataRaw as a, type ExecutorIdentityProvider as a0, type ExecutorMessageSigner as a1, assertBaseUnitAmount as a2, type EvmTx as a3, type EvmApproval as a4, type EvmSigningRequest as a5, type SolanaMetadata as a6, type OrderReference as a7, type DepositInfo as a8, type SwapReportContext as a9, type SwapExecution as aa, type RouteSummary as ab, type BuildContext as ac, type ExecutorErrorAdapter as ad, type TransactionSubmission as ae, type SwapBuildRequestRaw as b, type SwapBuildDataRaw as c, type SwapOrderSubmitRequestRaw as d, type SwapOrderSubmitDataRaw as e, type SwapOrderStatusParamsRaw as f, type SwapOrderStatusDataRaw as g, type SwapReportRequestRaw as h, type SwapReportDataRaw as i, type SwapHistoryParamsRaw as j, type SwapHistoryDataRaw as k, type SwapHistoryAuthChallengeRequestRaw as l, type SwapHistoryAuthChallengeRaw as m, type SwapHistoryAuthVerifyRequestRaw as n, type SwapHistoryAuthTokenRaw as o, type SwapFromTokensDataRaw as p, type SwapCrossChainToTokensDataRaw as q, type Quote as r, type SwapMcaPayloadRaw as s, type SwapLifecycleEvent as t, type SwapExecutionResult as u, type SwapHistoryRecordRaw as v, type ChainExecutor as w, type SwapBuild as x, type ExecuteSwapInput as y, type SwapInput as z };
657
+ export { type ExecutionContext as $, type AssetRef as A, type BaseUnitAmount as B, type ChainRef as C, type OrderReference as D, ExecutorRegistry as E, type OrderStatusResult as F, type WaitForOrderInput as G, type SwapHistoryAuthProofRaw as H, type SwapMcaRelayerRequestRaw as I, type SwapApiResponse as J, type SwapApiTokenMetaRaw as K, type SwapTokenListRowRaw as L, type SwapMcaSignerPayloadRaw as M, type NearTransaction as N, type OrderPollingOptions as O, type SwapSigningRequestRaw as P, type QuoteRequest as Q, type SwapBuildApproveRaw as R, type SwapQuoteRequestRaw as S, type TransactionConfirmation as T, type SwapHistoryWalletChainFamilyRaw as U, type SwapWarning as V, type WaitMode as W, type SignRequestPreview as X, type OrderStatus as Y, normalizeOrderStatus as Z, type ChainExecutionResult as _, type SwapQuoteDataRaw as a, type MessageSignOptions as a0, type ExecutorIdentityProvider as a1, type ExecutorMessageSigner as a2, assertBaseUnitAmount as a3, type EvmTx as a4, type EvmApproval as a5, type EvmSigningRequest as a6, type SolanaMetadata as a7, type DepositInfo as a8, type SwapReportContext as a9, type SwapExecution as aa, type RouteSummary as ab, type BuildContext as ac, type ExecutorErrorAdapter as ad, type TransactionSubmission as ae, type SwapBuildRequestRaw as b, type SwapBuildDataRaw as c, type SwapOrderSubmitRequestRaw as d, type SwapOrderSubmitDataRaw as e, type SwapOrderStatusParamsRaw as f, type SwapOrderStatusDataRaw as g, type SwapReportRequestRaw as h, type SwapReportDataRaw as i, type SwapHistoryParamsRaw as j, type SwapHistoryDataRaw as k, type SwapHistoryAuthChallengeRequestRaw as l, type SwapHistoryAuthChallengeRaw as m, type SwapHistoryAuthVerifyRequestRaw as n, type SwapHistoryAuthTokenRaw as o, type SwapFromTokensDataRaw as p, type SwapCrossChainToTokensDataRaw as q, type Quote as r, type SwapMcaPayloadRaw as s, type SwapLifecycleEvent as t, type SwapExecutionResult as u, type SwapHistoryRecordRaw as v, type ChainExecutor as w, type SwapBuild as x, type ExecuteSwapInput as y, type SwapInput as z };
@@ -167,8 +167,11 @@ interface SwapOrderSubmitDataRaw {
167
167
  raw?: Record<string, unknown>;
168
168
  }
169
169
  interface SwapOrderStatusParamsRaw {
170
- orderId: string;
171
- router: string;
170
+ /** Preferred status identifier returned by POST /api/swap/report. */
171
+ recordId?: string | number;
172
+ orderId?: string;
173
+ txHash?: string;
174
+ router?: string;
172
175
  chainId?: string | number;
173
176
  }
174
177
  type SwapOrderStatusDataRaw = Record<string, unknown> & {
@@ -328,9 +331,13 @@ interface NearTransaction {
328
331
  actions: unknown[];
329
332
  }
330
333
  interface OrderReference {
334
+ /** Preferred status identifier returned by POST /api/swap/report. */
335
+ recordId?: string;
331
336
  /** Status-query key. Usually an order ID; confidential Near Intents may use the deposit address. */
332
- orderId: string;
333
- router: string;
337
+ orderId?: string;
338
+ /** Source-chain transaction hash when no order id is available. */
339
+ txHash?: string;
340
+ router?: string;
334
341
  chainId?: string;
335
342
  }
336
343
  interface DepositInfo {
@@ -542,6 +549,8 @@ interface SwapExecutionResult {
542
549
  depositAddress?: string;
543
550
  report?: {
544
551
  status: "reported" | "failed" | "skipped";
552
+ /** Report row id from POST /api/swap/report; preferred for order-status polling. */
553
+ recordId?: string;
545
554
  warning?: SwapWarning;
546
555
  };
547
556
  raw: unknown;
@@ -565,8 +574,10 @@ interface SwapInput extends Omit<ExecuteSwapInput, "build"> {
565
574
  idempotencyKey?: string;
566
575
  }
567
576
  interface OrderStatusResult {
568
- orderId: string;
569
- router: string;
577
+ recordId?: string;
578
+ orderId?: string;
579
+ txHash?: string;
580
+ router?: string;
570
581
  status: OrderStatus;
571
582
  raw: SwapOrderStatusDataRaw;
572
583
  }
@@ -643,4 +654,4 @@ interface ExecutorErrorAdapter {
643
654
  signMessage?(message: string, options?: MessageSignOptions): Promise<string>;
644
655
  }
645
656
 
646
- export { type MessageSignOptions as $, type AssetRef as A, type BaseUnitAmount as B, type ChainRef as C, type OrderStatusResult as D, ExecutorRegistry as E, type WaitForOrderInput as F, type SwapHistoryAuthProofRaw as G, type SwapMcaRelayerRequestRaw as H, type SwapApiResponse as I, type SwapApiTokenMetaRaw as J, type SwapTokenListRowRaw as K, type SwapMcaSignerPayloadRaw as L, type SwapSigningRequestRaw as M, type NearTransaction as N, type OrderPollingOptions as O, type SwapBuildApproveRaw as P, type QuoteRequest as Q, type SwapHistoryWalletChainFamilyRaw as R, type SwapQuoteRequestRaw as S, type TransactionConfirmation as T, type SwapWarning as U, type SignRequestPreview as V, type WaitMode as W, type OrderStatus as X, normalizeOrderStatus as Y, type ChainExecutionResult as Z, type ExecutionContext as _, type SwapQuoteDataRaw as a, type ExecutorIdentityProvider as a0, type ExecutorMessageSigner as a1, assertBaseUnitAmount as a2, type EvmTx as a3, type EvmApproval as a4, type EvmSigningRequest as a5, type SolanaMetadata as a6, type OrderReference as a7, type DepositInfo as a8, type SwapReportContext as a9, type SwapExecution as aa, type RouteSummary as ab, type BuildContext as ac, type ExecutorErrorAdapter as ad, type TransactionSubmission as ae, type SwapBuildRequestRaw as b, type SwapBuildDataRaw as c, type SwapOrderSubmitRequestRaw as d, type SwapOrderSubmitDataRaw as e, type SwapOrderStatusParamsRaw as f, type SwapOrderStatusDataRaw as g, type SwapReportRequestRaw as h, type SwapReportDataRaw as i, type SwapHistoryParamsRaw as j, type SwapHistoryDataRaw as k, type SwapHistoryAuthChallengeRequestRaw as l, type SwapHistoryAuthChallengeRaw as m, type SwapHistoryAuthVerifyRequestRaw as n, type SwapHistoryAuthTokenRaw as o, type SwapFromTokensDataRaw as p, type SwapCrossChainToTokensDataRaw as q, type Quote as r, type SwapMcaPayloadRaw as s, type SwapLifecycleEvent as t, type SwapExecutionResult as u, type SwapHistoryRecordRaw as v, type ChainExecutor as w, type SwapBuild as x, type ExecuteSwapInput as y, type SwapInput as z };
657
+ export { type ExecutionContext as $, type AssetRef as A, type BaseUnitAmount as B, type ChainRef as C, type OrderReference as D, ExecutorRegistry as E, type OrderStatusResult as F, type WaitForOrderInput as G, type SwapHistoryAuthProofRaw as H, type SwapMcaRelayerRequestRaw as I, type SwapApiResponse as J, type SwapApiTokenMetaRaw as K, type SwapTokenListRowRaw as L, type SwapMcaSignerPayloadRaw as M, type NearTransaction as N, type OrderPollingOptions as O, type SwapSigningRequestRaw as P, type QuoteRequest as Q, type SwapBuildApproveRaw as R, type SwapQuoteRequestRaw as S, type TransactionConfirmation as T, type SwapHistoryWalletChainFamilyRaw as U, type SwapWarning as V, type WaitMode as W, type SignRequestPreview as X, type OrderStatus as Y, normalizeOrderStatus as Z, type ChainExecutionResult as _, type SwapQuoteDataRaw as a, type MessageSignOptions as a0, type ExecutorIdentityProvider as a1, type ExecutorMessageSigner as a2, assertBaseUnitAmount as a3, type EvmTx as a4, type EvmApproval as a5, type EvmSigningRequest as a6, type SolanaMetadata as a7, type DepositInfo as a8, type SwapReportContext as a9, type SwapExecution as aa, type RouteSummary as ab, type BuildContext as ac, type ExecutorErrorAdapter as ad, type TransactionSubmission as ae, type SwapBuildRequestRaw as b, type SwapBuildDataRaw as c, type SwapOrderSubmitRequestRaw as d, type SwapOrderSubmitDataRaw as e, type SwapOrderStatusParamsRaw as f, type SwapOrderStatusDataRaw as g, type SwapReportRequestRaw as h, type SwapReportDataRaw as i, type SwapHistoryParamsRaw as j, type SwapHistoryDataRaw as k, type SwapHistoryAuthChallengeRequestRaw as l, type SwapHistoryAuthChallengeRaw as m, type SwapHistoryAuthVerifyRequestRaw as n, type SwapHistoryAuthTokenRaw as o, type SwapFromTokensDataRaw as p, type SwapCrossChainToTokensDataRaw as q, type Quote as r, type SwapMcaPayloadRaw as s, type SwapLifecycleEvent as t, type SwapExecutionResult as u, type SwapHistoryRecordRaw as v, type ChainExecutor as w, type SwapBuild as x, type ExecuteSwapInput as y, type SwapInput as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhea-finance/cross-chain-aggregation-dex",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "TypeScript SDK for a unified multi-chain Swap API with quote, transaction building, execution adapters, status, reporting, and history.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",