@rhea-finance/cross-chain-aggregation-dex 2.0.3 → 2.0.5

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.
@@ -46,6 +46,8 @@ interface SwapQuoteRequestRaw {
46
46
  amountIn: string;
47
47
  slippage?: number;
48
48
  quoteWaitingTimeMs?: number;
49
+ /** Enables the confidential 1Click route. */
50
+ confidentiality?: "basic";
49
51
  sender: string;
50
52
  recipient?: string;
51
53
  useAsCollateral?: boolean;
@@ -55,7 +57,8 @@ interface SwapQuoteDataRaw {
55
57
  isCrossChain: boolean;
56
58
  chainType: string;
57
59
  bestQuote: Record<string, unknown>;
58
- allQuotes: Record<string, unknown>[];
60
+ /** Optional route alternatives. Some quote responses only return bestQuote. */
61
+ allQuotes?: Record<string, unknown>[];
59
62
  errors?: unknown;
60
63
  nearDepositTx?: unknown;
61
64
  nearDepositTxError?: string;
@@ -156,6 +159,8 @@ interface SwapReportRequestRaw {
156
159
  from_token: string;
157
160
  to_token: string;
158
161
  deposit_address: string;
162
+ /** Marks reports created by the confidential 1Click route. */
163
+ confidentiality?: "basic";
159
164
  from_chain?: string;
160
165
  to_chain?: string;
161
166
  is_cross_chain?: boolean;
@@ -176,6 +181,54 @@ interface SwapHistoryParamsRaw {
176
181
  sender: string;
177
182
  pageNumber?: number;
178
183
  pageSize?: number;
184
+ mode?: "confidential";
185
+ /** Wallet-scoped token sent through the Authentication header. */
186
+ walletToken?: string;
187
+ }
188
+ type SwapHistoryWalletChainFamilyRaw = "evm" | "solana" | "near" | "aptos" | "sui" | "tron" | "btc" | "zcash";
189
+ interface SwapHistoryAuthChallengeRequestRaw {
190
+ mcaAccountId?: string;
191
+ chainFamily: SwapHistoryWalletChainFamilyRaw;
192
+ chainId: string;
193
+ walletAddress: string;
194
+ identityKey?: string;
195
+ bindingIdentityKey?: string;
196
+ /** Legacy compatibility field. New callers should use walletAddress. */
197
+ address?: string;
198
+ }
199
+ interface SwapHistoryAuthChallengeRaw {
200
+ challengeId: string;
201
+ expiresAt: string;
202
+ chainFamily: SwapHistoryWalletChainFamilyRaw;
203
+ chainId: string;
204
+ address: string;
205
+ walletAddress: string;
206
+ identityKey: string;
207
+ principalType: "mca" | "wallet";
208
+ queryAddress: string;
209
+ mcaAccountId: string | null;
210
+ signingMethod: "personal_sign" | "signMessage" | "NEP-413" | "signPersonalMessage" | "signMessageV2" | "bip322-simple" | "signmessage";
211
+ signingInput: {
212
+ message: string;
213
+ recipient?: string;
214
+ nonce?: string;
215
+ callbackUrl?: string | null;
216
+ };
217
+ }
218
+ type SwapHistoryAuthProofRaw = Record<string, string>;
219
+ interface SwapHistoryAuthVerifyRequestRaw {
220
+ challengeId: string;
221
+ proof: SwapHistoryAuthProofRaw;
222
+ }
223
+ interface SwapHistoryAuthTokenRaw {
224
+ token: string;
225
+ tokenType: "Bearer";
226
+ expiresIn: number;
227
+ expiresAt: string;
228
+ principalType: "mca" | "wallet";
229
+ queryAddress: string;
230
+ mcaAccountId: string | null;
231
+ scope: "swap:history:confidential:read";
179
232
  }
180
233
  interface SwapHistoryRecordRaw {
181
234
  id: number;
@@ -353,8 +406,14 @@ interface QuoteRequest {
353
406
  tokenOut: AssetRef;
354
407
  amountIn: BaseUnitAmount;
355
408
  slippageBps: number;
356
- /** Near Intents quote waiting time in milliseconds. Defaults to 3000. */
409
+ /**
410
+ * Frontend-configurable Near Intents route-quote wait in milliseconds.
411
+ * Must be a non-negative integer. Defaults to 3000 when omitted.
412
+ * This is not an HTTP, wallet, settlement, or order-polling timeout.
413
+ */
357
414
  quoteWaitingTimeMs?: number;
415
+ /** Enables the confidential 1Click route. */
416
+ confidentiality?: "basic";
358
417
  sender: string;
359
418
  recipient?: string;
360
419
  extensions?: Record<string, unknown>;
@@ -556,4 +615,4 @@ interface ExecutorErrorAdapter {
556
615
  signMessage?(message: string, options?: MessageSignOptions): Promise<string>;
557
616
  }
558
617
 
559
- export { type DepositInfo as $, type AssetRef as A, type BaseUnitAmount as B, type ChainRef as C, type SwapSigningRequestRaw as D, ExecutorRegistry as E, type SwapBuildApproveRaw as F, type SwapWarning as G, type SignRequestPreview as H, type OrderStatus as I, normalizeOrderStatus as J, type ChainExecutionResult as K, type ExecutionContext as L, type MessageSignOptions as M, type NearTransaction as N, type OrderPollingOptions as O, type ExecutorIdentityProvider as P, type QuoteRequest as Q, type ExecutorMessageSigner as R, type SwapQuoteRequestRaw as S, type TransactionConfirmation as T, assertBaseUnitAmount as U, type EvmTx as V, type WaitMode as W, type EvmApproval as X, type EvmSigningRequest as Y, type SolanaMetadata as Z, type OrderReference as _, type SwapQuoteDataRaw as a, type SwapReportContext as a0, type SwapExecution as a1, type RouteSummary as a2, type BuildContext as a3, type ExecutorErrorAdapter as a4, type TransactionSubmission as a5, 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 Quote as l, type SwapMcaPayloadRaw as m, type SwapLifecycleEvent as n, type SwapExecutionResult as o, type SwapHistoryRecordRaw as p, type ChainExecutor as q, type SwapBuild as r, type ExecuteSwapInput as s, type SwapInput as t, type OrderStatusResult as u, type WaitForOrderInput as v, type SwapMcaRelayerRequestRaw as w, type SwapApiResponse as x, type SwapApiTokenMetaRaw as y, type SwapMcaSignerPayloadRaw as z };
618
+ export { assertBaseUnitAmount as $, type AssetRef as A, type BaseUnitAmount as B, type ChainRef as C, type SwapHistoryAuthProofRaw as D, ExecutorRegistry as E, type SwapMcaRelayerRequestRaw as F, type SwapApiResponse as G, type SwapApiTokenMetaRaw as H, type SwapMcaSignerPayloadRaw as I, type SwapSigningRequestRaw as J, type SwapBuildApproveRaw as K, type SwapHistoryWalletChainFamilyRaw as L, type SwapWarning as M, type NearTransaction as N, type OrderPollingOptions as O, type SignRequestPreview as P, type QuoteRequest as Q, type OrderStatus as R, type SwapQuoteRequestRaw as S, type TransactionConfirmation as T, normalizeOrderStatus as U, type ChainExecutionResult as V, type WaitMode as W, type ExecutionContext as X, type MessageSignOptions as Y, type ExecutorIdentityProvider as Z, type ExecutorMessageSigner as _, type SwapQuoteDataRaw as a, type EvmTx as a0, type EvmApproval as a1, type EvmSigningRequest as a2, type SolanaMetadata as a3, type OrderReference as a4, type DepositInfo as a5, type SwapReportContext as a6, type SwapExecution as a7, type RouteSummary as a8, type BuildContext as a9, type ExecutorErrorAdapter as aa, type TransactionSubmission as ab, 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 Quote as p, type SwapMcaPayloadRaw as q, type SwapLifecycleEvent as r, type SwapExecutionResult as s, type SwapHistoryRecordRaw as t, type ChainExecutor as u, type SwapBuild as v, type ExecuteSwapInput as w, type SwapInput as x, type OrderStatusResult as y, type WaitForOrderInput as z };
@@ -46,6 +46,8 @@ interface SwapQuoteRequestRaw {
46
46
  amountIn: string;
47
47
  slippage?: number;
48
48
  quoteWaitingTimeMs?: number;
49
+ /** Enables the confidential 1Click route. */
50
+ confidentiality?: "basic";
49
51
  sender: string;
50
52
  recipient?: string;
51
53
  useAsCollateral?: boolean;
@@ -55,7 +57,8 @@ interface SwapQuoteDataRaw {
55
57
  isCrossChain: boolean;
56
58
  chainType: string;
57
59
  bestQuote: Record<string, unknown>;
58
- allQuotes: Record<string, unknown>[];
60
+ /** Optional route alternatives. Some quote responses only return bestQuote. */
61
+ allQuotes?: Record<string, unknown>[];
59
62
  errors?: unknown;
60
63
  nearDepositTx?: unknown;
61
64
  nearDepositTxError?: string;
@@ -156,6 +159,8 @@ interface SwapReportRequestRaw {
156
159
  from_token: string;
157
160
  to_token: string;
158
161
  deposit_address: string;
162
+ /** Marks reports created by the confidential 1Click route. */
163
+ confidentiality?: "basic";
159
164
  from_chain?: string;
160
165
  to_chain?: string;
161
166
  is_cross_chain?: boolean;
@@ -176,6 +181,54 @@ interface SwapHistoryParamsRaw {
176
181
  sender: string;
177
182
  pageNumber?: number;
178
183
  pageSize?: number;
184
+ mode?: "confidential";
185
+ /** Wallet-scoped token sent through the Authentication header. */
186
+ walletToken?: string;
187
+ }
188
+ type SwapHistoryWalletChainFamilyRaw = "evm" | "solana" | "near" | "aptos" | "sui" | "tron" | "btc" | "zcash";
189
+ interface SwapHistoryAuthChallengeRequestRaw {
190
+ mcaAccountId?: string;
191
+ chainFamily: SwapHistoryWalletChainFamilyRaw;
192
+ chainId: string;
193
+ walletAddress: string;
194
+ identityKey?: string;
195
+ bindingIdentityKey?: string;
196
+ /** Legacy compatibility field. New callers should use walletAddress. */
197
+ address?: string;
198
+ }
199
+ interface SwapHistoryAuthChallengeRaw {
200
+ challengeId: string;
201
+ expiresAt: string;
202
+ chainFamily: SwapHistoryWalletChainFamilyRaw;
203
+ chainId: string;
204
+ address: string;
205
+ walletAddress: string;
206
+ identityKey: string;
207
+ principalType: "mca" | "wallet";
208
+ queryAddress: string;
209
+ mcaAccountId: string | null;
210
+ signingMethod: "personal_sign" | "signMessage" | "NEP-413" | "signPersonalMessage" | "signMessageV2" | "bip322-simple" | "signmessage";
211
+ signingInput: {
212
+ message: string;
213
+ recipient?: string;
214
+ nonce?: string;
215
+ callbackUrl?: string | null;
216
+ };
217
+ }
218
+ type SwapHistoryAuthProofRaw = Record<string, string>;
219
+ interface SwapHistoryAuthVerifyRequestRaw {
220
+ challengeId: string;
221
+ proof: SwapHistoryAuthProofRaw;
222
+ }
223
+ interface SwapHistoryAuthTokenRaw {
224
+ token: string;
225
+ tokenType: "Bearer";
226
+ expiresIn: number;
227
+ expiresAt: string;
228
+ principalType: "mca" | "wallet";
229
+ queryAddress: string;
230
+ mcaAccountId: string | null;
231
+ scope: "swap:history:confidential:read";
179
232
  }
180
233
  interface SwapHistoryRecordRaw {
181
234
  id: number;
@@ -353,8 +406,14 @@ interface QuoteRequest {
353
406
  tokenOut: AssetRef;
354
407
  amountIn: BaseUnitAmount;
355
408
  slippageBps: number;
356
- /** Near Intents quote waiting time in milliseconds. Defaults to 3000. */
409
+ /**
410
+ * Frontend-configurable Near Intents route-quote wait in milliseconds.
411
+ * Must be a non-negative integer. Defaults to 3000 when omitted.
412
+ * This is not an HTTP, wallet, settlement, or order-polling timeout.
413
+ */
357
414
  quoteWaitingTimeMs?: number;
415
+ /** Enables the confidential 1Click route. */
416
+ confidentiality?: "basic";
358
417
  sender: string;
359
418
  recipient?: string;
360
419
  extensions?: Record<string, unknown>;
@@ -556,4 +615,4 @@ interface ExecutorErrorAdapter {
556
615
  signMessage?(message: string, options?: MessageSignOptions): Promise<string>;
557
616
  }
558
617
 
559
- export { type DepositInfo as $, type AssetRef as A, type BaseUnitAmount as B, type ChainRef as C, type SwapSigningRequestRaw as D, ExecutorRegistry as E, type SwapBuildApproveRaw as F, type SwapWarning as G, type SignRequestPreview as H, type OrderStatus as I, normalizeOrderStatus as J, type ChainExecutionResult as K, type ExecutionContext as L, type MessageSignOptions as M, type NearTransaction as N, type OrderPollingOptions as O, type ExecutorIdentityProvider as P, type QuoteRequest as Q, type ExecutorMessageSigner as R, type SwapQuoteRequestRaw as S, type TransactionConfirmation as T, assertBaseUnitAmount as U, type EvmTx as V, type WaitMode as W, type EvmApproval as X, type EvmSigningRequest as Y, type SolanaMetadata as Z, type OrderReference as _, type SwapQuoteDataRaw as a, type SwapReportContext as a0, type SwapExecution as a1, type RouteSummary as a2, type BuildContext as a3, type ExecutorErrorAdapter as a4, type TransactionSubmission as a5, 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 Quote as l, type SwapMcaPayloadRaw as m, type SwapLifecycleEvent as n, type SwapExecutionResult as o, type SwapHistoryRecordRaw as p, type ChainExecutor as q, type SwapBuild as r, type ExecuteSwapInput as s, type SwapInput as t, type OrderStatusResult as u, type WaitForOrderInput as v, type SwapMcaRelayerRequestRaw as w, type SwapApiResponse as x, type SwapApiTokenMetaRaw as y, type SwapMcaSignerPayloadRaw as z };
618
+ export { assertBaseUnitAmount as $, type AssetRef as A, type BaseUnitAmount as B, type ChainRef as C, type SwapHistoryAuthProofRaw as D, ExecutorRegistry as E, type SwapMcaRelayerRequestRaw as F, type SwapApiResponse as G, type SwapApiTokenMetaRaw as H, type SwapMcaSignerPayloadRaw as I, type SwapSigningRequestRaw as J, type SwapBuildApproveRaw as K, type SwapHistoryWalletChainFamilyRaw as L, type SwapWarning as M, type NearTransaction as N, type OrderPollingOptions as O, type SignRequestPreview as P, type QuoteRequest as Q, type OrderStatus as R, type SwapQuoteRequestRaw as S, type TransactionConfirmation as T, normalizeOrderStatus as U, type ChainExecutionResult as V, type WaitMode as W, type ExecutionContext as X, type MessageSignOptions as Y, type ExecutorIdentityProvider as Z, type ExecutorMessageSigner as _, type SwapQuoteDataRaw as a, type EvmTx as a0, type EvmApproval as a1, type EvmSigningRequest as a2, type SolanaMetadata as a3, type OrderReference as a4, type DepositInfo as a5, type SwapReportContext as a6, type SwapExecution as a7, type RouteSummary as a8, type BuildContext as a9, type ExecutorErrorAdapter as aa, type TransactionSubmission as ab, 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 Quote as p, type SwapMcaPayloadRaw as q, type SwapLifecycleEvent as r, type SwapExecutionResult as s, type SwapHistoryRecordRaw as t, type ChainExecutor as u, type SwapBuild as v, type ExecuteSwapInput as w, type SwapInput as x, type OrderStatusResult as y, type WaitForOrderInput 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.3",
3
+ "version": "2.0.5",
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",