@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.
- package/README.md +84 -10
- package/dist/executors/aptos.d.mts +1 -1
- package/dist/executors/aptos.d.ts +1 -1
- package/dist/executors/bitcoin.d.mts +1 -1
- package/dist/executors/bitcoin.d.ts +1 -1
- package/dist/executors/evm.d.mts +1 -1
- package/dist/executors/evm.d.ts +1 -1
- package/dist/executors/near.d.mts +1 -1
- package/dist/executors/near.d.ts +1 -1
- package/dist/executors/solana.d.mts +1 -1
- package/dist/executors/solana.d.ts +1 -1
- package/dist/executors/sui.d.mts +1 -1
- package/dist/executors/sui.d.ts +1 -1
- package/dist/executors/tron.d.mts +1 -1
- package/dist/executors/tron.d.ts +1 -1
- package/dist/executors/zcash.d.mts +1 -1
- package/dist/executors/zcash.d.ts +1 -1
- package/dist/index.d.mts +45 -5
- package/dist/index.d.ts +45 -5
- package/dist/index.js +198 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +197 -58
- package/dist/index.mjs.map +1 -1
- package/dist/{shared-BEZXY_BM.d.mts → shared-DmMJXknE.d.mts} +62 -3
- package/dist/{shared-BEZXY_BM.d.ts → shared-DmMJXknE.d.ts} +62 -3
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
-
/**
|
|
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 {
|
|
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
|
-
|
|
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
|
-
/**
|
|
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 {
|
|
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
|
+
"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",
|