@rhea-finance/cross-chain-aggregation-dex 2.0.4 → 2.0.6
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 +207 -77
- package/dist/executors/aptos.d.mts +1 -1
- package/dist/executors/aptos.d.ts +1 -1
- package/dist/executors/aptos.js.map +1 -1
- package/dist/executors/aptos.mjs.map +1 -1
- package/dist/executors/bitcoin.d.mts +1 -1
- package/dist/executors/bitcoin.d.ts +1 -1
- package/dist/executors/bitcoin.js.map +1 -1
- package/dist/executors/bitcoin.mjs.map +1 -1
- package/dist/executors/evm.d.mts +1 -1
- package/dist/executors/evm.d.ts +1 -1
- package/dist/executors/evm.js.map +1 -1
- package/dist/executors/evm.mjs.map +1 -1
- package/dist/executors/near.d.mts +1 -1
- package/dist/executors/near.d.ts +1 -1
- package/dist/executors/near.js.map +1 -1
- package/dist/executors/near.mjs.map +1 -1
- package/dist/executors/solana.d.mts +1 -1
- package/dist/executors/solana.d.ts +1 -1
- package/dist/executors/solana.js.map +1 -1
- package/dist/executors/solana.mjs.map +1 -1
- package/dist/executors/sui.d.mts +1 -1
- package/dist/executors/sui.d.ts +1 -1
- package/dist/executors/sui.js.map +1 -1
- package/dist/executors/sui.mjs.map +1 -1
- package/dist/executors/tron.d.mts +1 -1
- package/dist/executors/tron.d.ts +1 -1
- package/dist/executors/tron.js.map +1 -1
- package/dist/executors/tron.mjs.map +1 -1
- package/dist/executors/zcash.d.mts +1 -1
- package/dist/executors/zcash.d.ts +1 -1
- package/dist/executors/zcash.js.map +1 -1
- package/dist/executors/zcash.mjs.map +1 -1
- package/dist/index.d.mts +82 -6
- package/dist/index.d.ts +82 -6
- package/dist/index.js +454 -71
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +451 -72
- package/dist/index.mjs.map +1 -1
- package/dist/{shared-D0_DbMT2.d.mts → shared-COkGiqaz.d.mts} +84 -2
- package/dist/{shared-D0_DbMT2.d.ts → shared-COkGiqaz.d.ts} +84 -2
- package/package.json +1 -1
|
@@ -8,6 +8,27 @@ interface SwapApiTokenMetaRaw {
|
|
|
8
8
|
symbol: string;
|
|
9
9
|
decimals: number;
|
|
10
10
|
}
|
|
11
|
+
interface SwapTokenListRowRaw extends Record<string, unknown> {
|
|
12
|
+
address?: string | null;
|
|
13
|
+
assetId?: string | null;
|
|
14
|
+
blockchain?: string;
|
|
15
|
+
chainId?: number;
|
|
16
|
+
coinType?: string | null;
|
|
17
|
+
contractAddress?: string | null;
|
|
18
|
+
decimals?: number | string;
|
|
19
|
+
isNative?: boolean;
|
|
20
|
+
logoURI?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
platform?: string;
|
|
23
|
+
price?: string | number;
|
|
24
|
+
sources?: string[];
|
|
25
|
+
symbol?: string;
|
|
26
|
+
updated_at?: number;
|
|
27
|
+
}
|
|
28
|
+
type SwapFromTokensDataRaw = Record<string, SwapTokenListRowRaw>;
|
|
29
|
+
interface SwapCrossChainToTokensDataRaw {
|
|
30
|
+
tokens: SwapTokenListRowRaw[];
|
|
31
|
+
}
|
|
11
32
|
interface SwapMcaSignerPayloadRaw {
|
|
12
33
|
chain: string;
|
|
13
34
|
identityKey: string;
|
|
@@ -46,6 +67,10 @@ interface SwapQuoteRequestRaw {
|
|
|
46
67
|
amountIn: string;
|
|
47
68
|
slippage?: number;
|
|
48
69
|
quoteWaitingTimeMs?: number;
|
|
70
|
+
sameChainTimeoutMs?: number;
|
|
71
|
+
crossChainTimeoutMs?: number;
|
|
72
|
+
/** Enables the confidential 1Click route. */
|
|
73
|
+
confidentiality?: "basic";
|
|
49
74
|
sender: string;
|
|
50
75
|
recipient?: string;
|
|
51
76
|
useAsCollateral?: boolean;
|
|
@@ -157,6 +182,8 @@ interface SwapReportRequestRaw {
|
|
|
157
182
|
from_token: string;
|
|
158
183
|
to_token: string;
|
|
159
184
|
deposit_address: string;
|
|
185
|
+
/** Marks reports created by the confidential 1Click route. */
|
|
186
|
+
confidentiality?: "basic";
|
|
160
187
|
from_chain?: string;
|
|
161
188
|
to_chain?: string;
|
|
162
189
|
is_cross_chain?: boolean;
|
|
@@ -177,6 +204,54 @@ interface SwapHistoryParamsRaw {
|
|
|
177
204
|
sender: string;
|
|
178
205
|
pageNumber?: number;
|
|
179
206
|
pageSize?: number;
|
|
207
|
+
mode?: "confidential";
|
|
208
|
+
/** Wallet-scoped token sent through the Authentication header. */
|
|
209
|
+
walletToken?: string;
|
|
210
|
+
}
|
|
211
|
+
type SwapHistoryWalletChainFamilyRaw = "evm" | "solana" | "near" | "aptos" | "sui" | "tron" | "btc" | "zcash";
|
|
212
|
+
interface SwapHistoryAuthChallengeRequestRaw {
|
|
213
|
+
mcaAccountId?: string;
|
|
214
|
+
chainFamily: SwapHistoryWalletChainFamilyRaw;
|
|
215
|
+
chainId: string;
|
|
216
|
+
walletAddress: string;
|
|
217
|
+
identityKey?: string;
|
|
218
|
+
bindingIdentityKey?: string;
|
|
219
|
+
/** Legacy compatibility field. New callers should use walletAddress. */
|
|
220
|
+
address?: string;
|
|
221
|
+
}
|
|
222
|
+
interface SwapHistoryAuthChallengeRaw {
|
|
223
|
+
challengeId: string;
|
|
224
|
+
expiresAt: string;
|
|
225
|
+
chainFamily: SwapHistoryWalletChainFamilyRaw;
|
|
226
|
+
chainId: string;
|
|
227
|
+
address: string;
|
|
228
|
+
walletAddress: string;
|
|
229
|
+
identityKey: string;
|
|
230
|
+
principalType: "mca" | "wallet";
|
|
231
|
+
queryAddress: string;
|
|
232
|
+
mcaAccountId: string | null;
|
|
233
|
+
signingMethod: "personal_sign" | "signMessage" | "NEP-413" | "signPersonalMessage" | "signMessageV2" | "bip322-simple" | "signmessage";
|
|
234
|
+
signingInput: {
|
|
235
|
+
message: string;
|
|
236
|
+
recipient?: string;
|
|
237
|
+
nonce?: string;
|
|
238
|
+
callbackUrl?: string | null;
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
type SwapHistoryAuthProofRaw = Record<string, string>;
|
|
242
|
+
interface SwapHistoryAuthVerifyRequestRaw {
|
|
243
|
+
challengeId: string;
|
|
244
|
+
proof: SwapHistoryAuthProofRaw;
|
|
245
|
+
}
|
|
246
|
+
interface SwapHistoryAuthTokenRaw {
|
|
247
|
+
token: string;
|
|
248
|
+
tokenType: "Bearer";
|
|
249
|
+
expiresIn: number;
|
|
250
|
+
expiresAt: string;
|
|
251
|
+
principalType: "mca" | "wallet";
|
|
252
|
+
queryAddress: string;
|
|
253
|
+
mcaAccountId: string | null;
|
|
254
|
+
scope: "swap:history:confidential:read";
|
|
180
255
|
}
|
|
181
256
|
interface SwapHistoryRecordRaw {
|
|
182
257
|
id: number;
|
|
@@ -253,6 +328,7 @@ interface NearTransaction {
|
|
|
253
328
|
actions: unknown[];
|
|
254
329
|
}
|
|
255
330
|
interface OrderReference {
|
|
331
|
+
/** Status-query key. Usually an order ID; confidential Near Intents may use the deposit address. */
|
|
256
332
|
orderId: string;
|
|
257
333
|
router: string;
|
|
258
334
|
chainId?: string;
|
|
@@ -358,8 +434,14 @@ interface QuoteRequest {
|
|
|
358
434
|
* Frontend-configurable Near Intents route-quote wait in milliseconds.
|
|
359
435
|
* Must be a non-negative integer. Defaults to 3000 when omitted.
|
|
360
436
|
* This is not an HTTP, wallet, settlement, or order-polling timeout.
|
|
361
|
-
|
|
437
|
+
*/
|
|
362
438
|
quoteWaitingTimeMs?: number;
|
|
439
|
+
/** Same-chain route quote timeout in milliseconds. Defaults to 500. */
|
|
440
|
+
sameChainTimeoutMs?: number;
|
|
441
|
+
/** Cross-chain route quote timeout in milliseconds. Defaults to 3000. */
|
|
442
|
+
crossChainTimeoutMs?: number;
|
|
443
|
+
/** Enables the confidential 1Click route. */
|
|
444
|
+
confidentiality?: "basic";
|
|
363
445
|
sender: string;
|
|
364
446
|
recipient?: string;
|
|
365
447
|
extensions?: Record<string, unknown>;
|
|
@@ -561,4 +643,4 @@ interface ExecutorErrorAdapter {
|
|
|
561
643
|
signMessage?(message: string, options?: MessageSignOptions): Promise<string>;
|
|
562
644
|
}
|
|
563
645
|
|
|
564
|
-
export { type
|
|
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 };
|
|
@@ -8,6 +8,27 @@ interface SwapApiTokenMetaRaw {
|
|
|
8
8
|
symbol: string;
|
|
9
9
|
decimals: number;
|
|
10
10
|
}
|
|
11
|
+
interface SwapTokenListRowRaw extends Record<string, unknown> {
|
|
12
|
+
address?: string | null;
|
|
13
|
+
assetId?: string | null;
|
|
14
|
+
blockchain?: string;
|
|
15
|
+
chainId?: number;
|
|
16
|
+
coinType?: string | null;
|
|
17
|
+
contractAddress?: string | null;
|
|
18
|
+
decimals?: number | string;
|
|
19
|
+
isNative?: boolean;
|
|
20
|
+
logoURI?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
platform?: string;
|
|
23
|
+
price?: string | number;
|
|
24
|
+
sources?: string[];
|
|
25
|
+
symbol?: string;
|
|
26
|
+
updated_at?: number;
|
|
27
|
+
}
|
|
28
|
+
type SwapFromTokensDataRaw = Record<string, SwapTokenListRowRaw>;
|
|
29
|
+
interface SwapCrossChainToTokensDataRaw {
|
|
30
|
+
tokens: SwapTokenListRowRaw[];
|
|
31
|
+
}
|
|
11
32
|
interface SwapMcaSignerPayloadRaw {
|
|
12
33
|
chain: string;
|
|
13
34
|
identityKey: string;
|
|
@@ -46,6 +67,10 @@ interface SwapQuoteRequestRaw {
|
|
|
46
67
|
amountIn: string;
|
|
47
68
|
slippage?: number;
|
|
48
69
|
quoteWaitingTimeMs?: number;
|
|
70
|
+
sameChainTimeoutMs?: number;
|
|
71
|
+
crossChainTimeoutMs?: number;
|
|
72
|
+
/** Enables the confidential 1Click route. */
|
|
73
|
+
confidentiality?: "basic";
|
|
49
74
|
sender: string;
|
|
50
75
|
recipient?: string;
|
|
51
76
|
useAsCollateral?: boolean;
|
|
@@ -157,6 +182,8 @@ interface SwapReportRequestRaw {
|
|
|
157
182
|
from_token: string;
|
|
158
183
|
to_token: string;
|
|
159
184
|
deposit_address: string;
|
|
185
|
+
/** Marks reports created by the confidential 1Click route. */
|
|
186
|
+
confidentiality?: "basic";
|
|
160
187
|
from_chain?: string;
|
|
161
188
|
to_chain?: string;
|
|
162
189
|
is_cross_chain?: boolean;
|
|
@@ -177,6 +204,54 @@ interface SwapHistoryParamsRaw {
|
|
|
177
204
|
sender: string;
|
|
178
205
|
pageNumber?: number;
|
|
179
206
|
pageSize?: number;
|
|
207
|
+
mode?: "confidential";
|
|
208
|
+
/** Wallet-scoped token sent through the Authentication header. */
|
|
209
|
+
walletToken?: string;
|
|
210
|
+
}
|
|
211
|
+
type SwapHistoryWalletChainFamilyRaw = "evm" | "solana" | "near" | "aptos" | "sui" | "tron" | "btc" | "zcash";
|
|
212
|
+
interface SwapHistoryAuthChallengeRequestRaw {
|
|
213
|
+
mcaAccountId?: string;
|
|
214
|
+
chainFamily: SwapHistoryWalletChainFamilyRaw;
|
|
215
|
+
chainId: string;
|
|
216
|
+
walletAddress: string;
|
|
217
|
+
identityKey?: string;
|
|
218
|
+
bindingIdentityKey?: string;
|
|
219
|
+
/** Legacy compatibility field. New callers should use walletAddress. */
|
|
220
|
+
address?: string;
|
|
221
|
+
}
|
|
222
|
+
interface SwapHistoryAuthChallengeRaw {
|
|
223
|
+
challengeId: string;
|
|
224
|
+
expiresAt: string;
|
|
225
|
+
chainFamily: SwapHistoryWalletChainFamilyRaw;
|
|
226
|
+
chainId: string;
|
|
227
|
+
address: string;
|
|
228
|
+
walletAddress: string;
|
|
229
|
+
identityKey: string;
|
|
230
|
+
principalType: "mca" | "wallet";
|
|
231
|
+
queryAddress: string;
|
|
232
|
+
mcaAccountId: string | null;
|
|
233
|
+
signingMethod: "personal_sign" | "signMessage" | "NEP-413" | "signPersonalMessage" | "signMessageV2" | "bip322-simple" | "signmessage";
|
|
234
|
+
signingInput: {
|
|
235
|
+
message: string;
|
|
236
|
+
recipient?: string;
|
|
237
|
+
nonce?: string;
|
|
238
|
+
callbackUrl?: string | null;
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
type SwapHistoryAuthProofRaw = Record<string, string>;
|
|
242
|
+
interface SwapHistoryAuthVerifyRequestRaw {
|
|
243
|
+
challengeId: string;
|
|
244
|
+
proof: SwapHistoryAuthProofRaw;
|
|
245
|
+
}
|
|
246
|
+
interface SwapHistoryAuthTokenRaw {
|
|
247
|
+
token: string;
|
|
248
|
+
tokenType: "Bearer";
|
|
249
|
+
expiresIn: number;
|
|
250
|
+
expiresAt: string;
|
|
251
|
+
principalType: "mca" | "wallet";
|
|
252
|
+
queryAddress: string;
|
|
253
|
+
mcaAccountId: string | null;
|
|
254
|
+
scope: "swap:history:confidential:read";
|
|
180
255
|
}
|
|
181
256
|
interface SwapHistoryRecordRaw {
|
|
182
257
|
id: number;
|
|
@@ -253,6 +328,7 @@ interface NearTransaction {
|
|
|
253
328
|
actions: unknown[];
|
|
254
329
|
}
|
|
255
330
|
interface OrderReference {
|
|
331
|
+
/** Status-query key. Usually an order ID; confidential Near Intents may use the deposit address. */
|
|
256
332
|
orderId: string;
|
|
257
333
|
router: string;
|
|
258
334
|
chainId?: string;
|
|
@@ -358,8 +434,14 @@ interface QuoteRequest {
|
|
|
358
434
|
* Frontend-configurable Near Intents route-quote wait in milliseconds.
|
|
359
435
|
* Must be a non-negative integer. Defaults to 3000 when omitted.
|
|
360
436
|
* This is not an HTTP, wallet, settlement, or order-polling timeout.
|
|
361
|
-
|
|
437
|
+
*/
|
|
362
438
|
quoteWaitingTimeMs?: number;
|
|
439
|
+
/** Same-chain route quote timeout in milliseconds. Defaults to 500. */
|
|
440
|
+
sameChainTimeoutMs?: number;
|
|
441
|
+
/** Cross-chain route quote timeout in milliseconds. Defaults to 3000. */
|
|
442
|
+
crossChainTimeoutMs?: number;
|
|
443
|
+
/** Enables the confidential 1Click route. */
|
|
444
|
+
confidentiality?: "basic";
|
|
363
445
|
sender: string;
|
|
364
446
|
recipient?: string;
|
|
365
447
|
extensions?: Record<string, unknown>;
|
|
@@ -561,4 +643,4 @@ interface ExecutorErrorAdapter {
|
|
|
561
643
|
signMessage?(message: string, options?: MessageSignOptions): Promise<string>;
|
|
562
644
|
}
|
|
563
645
|
|
|
564
|
-
export { type
|
|
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 };
|
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.6",
|
|
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",
|