@continuumdao/ctm-mpc-defi 0.2.20 → 0.2.24

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.
Files changed (96) hide show
  1. package/dist/agent/catalog.cjs +256 -46
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +606 -154
  4. package/dist/agent/catalog.js +250 -47
  5. package/dist/agent/catalog.js.map +1 -1
  6. package/dist/agent/skills/gmx/SKILL.md +30 -0
  7. package/dist/agent/skills/hyperliquid/SKILL.md +32 -0
  8. package/dist/agent/skills/uniswap-v4/SKILL.md +83 -0
  9. package/dist/chains/evm/index.cjs +5 -1
  10. package/dist/chains/evm/index.cjs.map +1 -1
  11. package/dist/chains/evm/index.d.ts +4 -4
  12. package/dist/chains/evm/index.js +5 -1
  13. package/dist/chains/evm/index.js.map +1 -1
  14. package/dist/chains/near/index.d.ts +1 -1
  15. package/dist/chains/solana/index.d.ts +1 -1
  16. package/dist/core/index.cjs +25 -0
  17. package/dist/core/index.cjs.map +1 -1
  18. package/dist/core/index.d.ts +11 -36
  19. package/dist/core/index.js +23 -1
  20. package/dist/core/index.js.map +1 -1
  21. package/dist/eip712Multisign-xhXpUYp3.d.ts +36 -0
  22. package/dist/{envelope-CpBUh9eP.d.ts → envelope-C_bfuKab.d.ts} +3 -1
  23. package/dist/index.cjs +371 -13
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.ts +6 -5
  26. package/dist/index.js +369 -14
  27. package/dist/index.js.map +1 -1
  28. package/dist/protocols/evm/aave-v4/index.cjs +5 -1
  29. package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
  30. package/dist/protocols/evm/aave-v4/index.d.ts +1 -1
  31. package/dist/protocols/evm/aave-v4/index.js +5 -1
  32. package/dist/protocols/evm/aave-v4/index.js.map +1 -1
  33. package/dist/protocols/evm/circle-cctp/index.cjs +5 -1
  34. package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -1
  35. package/dist/protocols/evm/circle-cctp/index.d.ts +2 -2
  36. package/dist/protocols/evm/circle-cctp/index.js +5 -1
  37. package/dist/protocols/evm/circle-cctp/index.js.map +1 -1
  38. package/dist/protocols/evm/curve-dao/index.cjs +5 -1
  39. package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
  40. package/dist/protocols/evm/curve-dao/index.d.ts +2 -2
  41. package/dist/protocols/evm/curve-dao/index.js +5 -1
  42. package/dist/protocols/evm/curve-dao/index.js.map +1 -1
  43. package/dist/protocols/evm/ethena/index.cjs +5 -1
  44. package/dist/protocols/evm/ethena/index.cjs.map +1 -1
  45. package/dist/protocols/evm/ethena/index.d.ts +1 -1
  46. package/dist/protocols/evm/ethena/index.js +5 -1
  47. package/dist/protocols/evm/ethena/index.js.map +1 -1
  48. package/dist/protocols/evm/euler-v2/index.cjs +5 -1
  49. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
  50. package/dist/protocols/evm/euler-v2/index.d.ts +1 -1
  51. package/dist/protocols/evm/euler-v2/index.js +5 -1
  52. package/dist/protocols/evm/euler-v2/index.js.map +1 -1
  53. package/dist/protocols/evm/gmx/index.cjs +44 -1
  54. package/dist/protocols/evm/gmx/index.cjs.map +1 -1
  55. package/dist/protocols/evm/gmx/index.d.ts +23 -3
  56. package/dist/protocols/evm/gmx/index.js +43 -2
  57. package/dist/protocols/evm/gmx/index.js.map +1 -1
  58. package/dist/protocols/evm/hyperliquid/index.cjs +483 -208
  59. package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
  60. package/dist/protocols/evm/hyperliquid/index.d.ts +168 -53
  61. package/dist/protocols/evm/hyperliquid/index.js +472 -210
  62. package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
  63. package/dist/protocols/evm/lido/index.cjs +5 -1
  64. package/dist/protocols/evm/lido/index.cjs.map +1 -1
  65. package/dist/protocols/evm/lido/index.d.ts +1 -1
  66. package/dist/protocols/evm/lido/index.js +5 -1
  67. package/dist/protocols/evm/lido/index.js.map +1 -1
  68. package/dist/protocols/evm/maple/index.cjs +5 -1
  69. package/dist/protocols/evm/maple/index.cjs.map +1 -1
  70. package/dist/protocols/evm/maple/index.d.ts +1 -1
  71. package/dist/protocols/evm/maple/index.js +5 -1
  72. package/dist/protocols/evm/maple/index.js.map +1 -1
  73. package/dist/protocols/evm/morpho/index.cjs +5 -1
  74. package/dist/protocols/evm/morpho/index.cjs.map +1 -1
  75. package/dist/protocols/evm/morpho/index.d.ts +1 -1
  76. package/dist/protocols/evm/morpho/index.js +5 -1
  77. package/dist/protocols/evm/morpho/index.js.map +1 -1
  78. package/dist/protocols/evm/permit2/index.cjs +4 -0
  79. package/dist/protocols/evm/permit2/index.cjs.map +1 -1
  80. package/dist/protocols/evm/permit2/index.d.ts +1 -1
  81. package/dist/protocols/evm/permit2/index.js +4 -0
  82. package/dist/protocols/evm/permit2/index.js.map +1 -1
  83. package/dist/protocols/evm/sky/index.cjs +5 -1
  84. package/dist/protocols/evm/sky/index.cjs.map +1 -1
  85. package/dist/protocols/evm/sky/index.d.ts +1 -1
  86. package/dist/protocols/evm/sky/index.js +5 -1
  87. package/dist/protocols/evm/sky/index.js.map +1 -1
  88. package/dist/protocols/evm/uniswap-v4/index.cjs +1415 -13
  89. package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
  90. package/dist/protocols/evm/uniswap-v4/index.d.ts +353 -4
  91. package/dist/protocols/evm/uniswap-v4/index.js +1357 -15
  92. package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
  93. package/dist/{registry-Bv5o37_w.d.ts → registry-DxDSPQ-p.d.ts} +1 -1
  94. package/dist/{types-BfjWdw1j.d.ts → types-PZrvtjv8.d.ts} +2 -0
  95. package/dist/{types-DUeNJLr9.d.ts → types-RZWOTm8c.d.ts} +1 -1
  96. package/package.json +2 -2
@@ -1,10 +1,12 @@
1
- import { b as KeyGenSubsetForPermit, e as ProtocolModule } from '../../../types-BfjWdw1j.js';
1
+ import { b as KeyGenSubsetForPermit, M as MultisignBuildResult, e as ProtocolModule } from '../../../types-PZrvtjv8.js';
2
2
  import { Address, createPublicClient, TransactionReceipt } from 'viem';
3
3
  import { NodeReadAuth } from '@continuumdao/continuum-node-sdk';
4
- import { E as EvmChainDetail } from '../../../types-DUeNJLr9.js';
4
+ import { E as EvmChainDetail } from '../../../types-RZWOTm8c.js';
5
+ import { c as Eip712TypedDataPayload } from '../../../eip712Multisign-xhXpUYp3.js';
5
6
 
6
7
  /** Canonical Uniswap token-allowance contract on most EVM chains. */
7
8
  declare const PERMIT2_ADDRESS: Address;
9
+ declare function getUniswapUniversalRouterVersion(chainId: number): string;
8
10
  declare function isUniswapV4ChainSupported(chainId: string | number | bigint | null | undefined): boolean;
9
11
  declare function getUniswapUniversalRouterSpenderOrThrow(chainId: number): Address;
10
12
  declare const MAX_UINT160: bigint;
@@ -19,6 +21,9 @@ declare const UNISWAP_SWAP_DEFAULT_DEADLINE_SEC_OFFSET: number;
19
21
  declare const UNISWAP_LP_DEFAULT_EXPIRY_MINUTES = 30;
20
22
  declare const UNISWAP_LP_DEFAULT_DEADLINE_SEC_OFFSET: number;
21
23
  declare const UNISWAP_LP_DEFAULT_SLIPPAGE_PERCENT = 0.5;
24
+ /** Robinhood Chain wrapped native (WETH). */
25
+ declare const ROBINHOOD_CHAIN_ID = 4663;
26
+ declare const ROBINHOOD_WETH_ADDRESS: "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73";
22
27
  declare function getUniswapV4PositionManagerOrThrow(chainId: number): Address;
23
28
  declare function tryGetUniswapV4PositionManager(chainId: number): Address | null;
24
29
  /** Default `eth_getLogs` span — many free RPCs cap at 250 blocks (e.g. Nodies). */
@@ -36,10 +41,14 @@ declare const UNISWAP_V4_LP_WETH_DEPOSIT_FALLBACK = 120000n;
36
41
  type UniswapQuoteTradeType = 'EXACT_INPUT' | 'EXACT_OUTPUT';
37
42
  /** Parse chain id like Python: decimal or 0x hex. */
38
43
  declare function parseUniswapChainId(value: string | number): number;
39
- /** `tokenIn` is the EVM address `0x0` used by the Trade API for the chain’s native (gas) token. */
44
+ /** EVM address `0x0` used by the Trade API for the chain’s native (gas) token. */
45
+ declare function isUniswapNativeTokenAddress(token: string | undefined | null): boolean;
46
+ /** @deprecated Prefer {@link isUniswapNativeTokenAddress}. */
40
47
  declare function isUniswapTokenInAddressNative(tokenIn: string | undefined | null): boolean;
41
48
  /** `fullQuote` / stored quote response: top-level or nested has `quote.input` with a native or ERC-20 address. */
42
49
  declare function isUniswapFullQuoteResponseNativeIn(stored: Record<string, unknown> | null | undefined): boolean;
50
+ /** `fullQuote` / stored quote response: top-level or nested has `quote.output` with native or ERC-20 address. */
51
+ declare function isUniswapFullQuoteResponseNativeOut(stored: Record<string, unknown> | null | undefined): boolean;
43
52
  /**
44
53
  * GET /getKeyGenResultById and return `ethereumaddress` (swapper), same as
45
54
  * `uniswap_mpc_helpers.resolve_owner_from_keygen` in mpc-config.
@@ -99,9 +108,20 @@ interface UniswapTradeQuoteParams {
99
108
  /** Override for tests. */
100
109
  fetchImpl?: typeof fetch;
101
110
  }
111
+ /**
112
+ * Build the same JSON body as `uniswap_trade_quote.py` (minus `swapper`, which you must set).
113
+ */
114
+ /**
115
+ * `tokenInChainId` in the HTTP body (Python `--chain-id`).
116
+ * Order: `chainId`, then `tokenInChainId`, else if only `tokenOutChainId` is set use it
117
+ * (same in/out, e.g. same-chain with a single id).
118
+ */
119
+ declare function resolveInputChainId(p: Pick<UniswapTradeQuoteParams, 'chainId' | 'tokenInChainId' | 'tokenOutChainId'>): string | number;
102
120
  declare function buildUniswapQuoteRequestBody(args: Pick<UniswapTradeQuoteParams, 'type' | 'amount' | 'tokenIn' | 'tokenOut' | 'slippage' | 'chainId' | 'tokenInChainId' | 'tokenOutChainId'> & {
103
121
  swapper: string;
104
122
  }): Record<string, unknown>;
123
+ /** Chain id from a stored Trade API quote (for router version / spender resolution). */
124
+ declare function resolveChainIdFromStoredUniswapQuote(stored: Record<string, unknown> | null | undefined): number;
105
125
  /**
106
126
  * Pull a user-facing string from Uniswap / generic JSON error bodies.
107
127
  */
@@ -660,6 +680,331 @@ declare function swapExactInput(args: SwapExactInputArgs & {
660
680
  messageToSign: string;
661
681
  }>;
662
682
 
683
+ /** Node env var for The Graph decentralized gateway (optional but recommended for OHLCV). */
684
+ declare const THE_GRAPH_API_KEY_ENV = "THE_GRAPH_API_KEY";
685
+ declare const THE_GRAPH_API_KEY_SIGNUP_URL = "https://thegraph.com/studio/apikeys/";
686
+ declare const THE_GRAPH_API_KEY_DOCS_URL = "https://thegraph.com/docs/en/subgraphs/querying/managing-api-keys/";
687
+ declare function isTheGraphRateLimitOrAuthError(message: string): boolean;
688
+ /** Brief hint for UI / MCP tool errors (no secret values). */
689
+ declare function theGraphApiKeyVariablesHint(): string;
690
+ declare function theGraphRateLimitErrorMessage(baseError: string): string;
691
+
692
+ /** @deprecated Import from `./theGraphApiKey.js` */
693
+
694
+ /**
695
+ * Public Uniswap V4 subgraph deployment IDs on The Graph.
696
+ * Quality/freshness varies by deployment; Uniswap production UI uses private indexers.
697
+ * @see https://github.com/Uniswap/v4-subgraph/issues/41
698
+ */
699
+ declare const UNISWAP_V4_SUBGRAPH_ID_BY_CHAIN_ID: Readonly<Record<number, string>>;
700
+ type UniswapV4SubgraphPoolHourRow = {
701
+ periodStartUnix: number;
702
+ open: string;
703
+ high: string;
704
+ low: string;
705
+ close: string;
706
+ volumeUSD: string;
707
+ };
708
+ type UniswapV4SubgraphPoolDayRow = {
709
+ date: number;
710
+ open: string;
711
+ high: string;
712
+ low: string;
713
+ close: string;
714
+ volumeUSD: string;
715
+ };
716
+ type UniswapV4SubgraphSwapRow = {
717
+ timestamp: string;
718
+ amountUSD: string;
719
+ token0Price?: string;
720
+ sqrtPriceX96?: string;
721
+ };
722
+ type UniswapV4SubgraphPoolMeta = {
723
+ id: string;
724
+ token0?: {
725
+ symbol?: string;
726
+ };
727
+ token1?: {
728
+ symbol?: string;
729
+ };
730
+ };
731
+ declare function uniswapV4SubgraphIdForChain(chainId: number): string | undefined;
732
+ declare function uniswapV4SubgraphSupportedChainIds(): number[];
733
+ /** Subgraph chains plus Bitquery-backed Robinhood Chain (4663). */
734
+ declare function uniswapV4OhlcvSupportedChainIds(): number[];
735
+ declare function uniswapV4SubgraphUrlForChain(chainId: number, apiKey?: string): string;
736
+ declare function resolveTheGraphApiKey(override?: string): string | undefined;
737
+ declare function fetchUniswapV4PoolHourDatas(args: {
738
+ chainId: number;
739
+ poolReference: string;
740
+ fromSec: number;
741
+ toSec: number;
742
+ maxPages?: number;
743
+ }): Promise<{
744
+ rows: UniswapV4SubgraphPoolHourRow[];
745
+ truncated: boolean;
746
+ }>;
747
+ declare function fetchUniswapV4PoolDayDatas(args: {
748
+ chainId: number;
749
+ poolReference: string;
750
+ fromSec: number;
751
+ toSec: number;
752
+ maxPages?: number;
753
+ }): Promise<{
754
+ rows: UniswapV4SubgraphPoolDayRow[];
755
+ truncated: boolean;
756
+ }>;
757
+ declare function fetchUniswapV4Swaps(args: {
758
+ chainId: number;
759
+ poolReference: string;
760
+ fromSec: number;
761
+ toSec: number;
762
+ maxPages?: number;
763
+ }): Promise<{
764
+ rows: UniswapV4SubgraphSwapRow[];
765
+ truncated: boolean;
766
+ }>;
767
+ declare function fetchUniswapV4PoolMeta(args: {
768
+ chainId: number;
769
+ poolReference: string;
770
+ }): Promise<UniswapV4SubgraphPoolMeta | null>;
771
+
772
+ /** Node env var for Bitquery GraphQL (required for Robinhood Chain OHLCV). */
773
+ declare const BITQUERY_API_KEY_ENV = "BITQUERY_API_KEY";
774
+ declare const BITQUERY_API_KEY_SIGNUP_URL = "https://account.bitquery.io/";
775
+ declare const BITQUERY_API_KEY_DOCS_URL = "https://bitquery.io/blockchains/robinhood-chain-api";
776
+ declare const BITQUERY_GRAPHQL_URL = "https://graphql.bitquery.io";
777
+ declare function resolveBitqueryApiKey(override?: string): string | undefined;
778
+ declare function isBitqueryAuthOrRateLimitError(message: string): boolean;
779
+ /** Brief hint for UI / MCP tool errors (no secret values). */
780
+ declare function bitqueryApiKeyVariablesHint(): string;
781
+ declare function bitqueryAuthErrorMessage(baseError: string): string;
782
+ declare function requireBitqueryApiKey(override?: string): string;
783
+
784
+ type UniswapV4OhlcvCandleRow = {
785
+ timestampMs: number;
786
+ open: string;
787
+ high: string;
788
+ low: string;
789
+ close: string;
790
+ volume?: string;
791
+ };
792
+
793
+ type BitqueryOhlcvCurrencyFilter = {
794
+ kind: 'address';
795
+ address: string;
796
+ } | {
797
+ kind: 'symbol';
798
+ symbol: string;
799
+ };
800
+ type BitqueryOhlcvGqlRow = {
801
+ Block?: {
802
+ Time?: string;
803
+ };
804
+ Trade?: {
805
+ open?: number | string;
806
+ high?: number | string;
807
+ low?: number | string;
808
+ close?: number | string;
809
+ };
810
+ volume?: number | string;
811
+ volumeUsd?: number | string;
812
+ };
813
+ /** Map Bitquery DEXTradeByTokens OHLC rows into normalized Uniswap V4 candle rows. */
814
+ declare function mapBitqueryOhlcvRowsToCandles(rows: BitqueryOhlcvGqlRow[]): UniswapV4OhlcvCandleRow[];
815
+ declare function isRobinhoodOhlcvChain(chainId: number): boolean;
816
+ /**
817
+ * Prefer the non-WETH / non-native side of a swap pair for Stock Token charts.
818
+ */
819
+ declare function resolveRobinhoodChartCurrency(args: {
820
+ currencyAddress?: string;
821
+ currencySymbol?: string;
822
+ tokenIn?: string;
823
+ tokenOut?: string;
824
+ }): BitqueryOhlcvCurrencyFilter;
825
+ declare function currencyFilterLabel(filter: BitqueryOhlcvCurrencyFilter): string;
826
+ declare function fetchRobinhoodBitqueryOhlcv(args: {
827
+ filter: BitqueryOhlcvCurrencyFilter;
828
+ interval: string;
829
+ startTimeMs: number;
830
+ endTimeMs: number;
831
+ apiKey?: string;
832
+ limit?: number;
833
+ }): Promise<{
834
+ candles: UniswapV4OhlcvCandleRow[];
835
+ warnings: string[];
836
+ }>;
837
+
838
+ declare const UNISWAP_V4_OHLCV_INTERVALS: readonly ["1m", "5m", "15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h", "1d", "2d", "3d", "1w", "1M"];
839
+ type UniswapV4OhlcvInterval = (typeof UNISWAP_V4_OHLCV_INTERVALS)[number];
840
+ type UniswapV4OhlcvDataTier = {
841
+ kind: 'subgraph_native';
842
+ entity: 'hourly' | 'daily';
843
+ bucketSec: number;
844
+ interval: UniswapV4OhlcvInterval;
845
+ } | {
846
+ kind: 'subgraph_aggregate';
847
+ baseEntity: 'hourly' | 'daily';
848
+ bucketSec: number;
849
+ interval: UniswapV4OhlcvInterval;
850
+ } | {
851
+ kind: 'swaps';
852
+ bucketSec: number;
853
+ interval: UniswapV4OhlcvInterval;
854
+ };
855
+ declare function assertUniswapV4OhlcvInterval(interval: string): UniswapV4OhlcvInterval;
856
+ declare function uniswapV4OhlcvIntervalToBucketSec(interval: UniswapV4OhlcvInterval): number;
857
+ declare function resolveUniswapV4OhlcvDataTier(intervalRaw: string): UniswapV4OhlcvDataTier;
858
+
859
+ type UniswapV4OhlcvQuoteToken = 'token0' | 'token1';
860
+ type UniswapV4OhlcvFetchResult = {
861
+ symbol: string;
862
+ timeframe: UniswapV4OhlcvInterval;
863
+ chainId: number;
864
+ poolReference: string;
865
+ dataSource: 'subgraph_native' | 'subgraph_aggregate' | 'swaps' | 'bitquery';
866
+ baseSubgraphEntity?: 'hourly' | 'daily';
867
+ priceQuote: 'token0PerToken1' | 'token1PerToken0';
868
+ startTimeMs?: number;
869
+ endTimeMs?: number;
870
+ candleCount: number;
871
+ candles: UniswapV4OhlcvCandleRow[];
872
+ fetchedAtMs: number;
873
+ warnings?: string[];
874
+ };
875
+ type ResolvedPool = {
876
+ poolReference: string;
877
+ pairLabel: string;
878
+ token0Symbol?: string;
879
+ token1Symbol?: string;
880
+ };
881
+ declare function aggregateOhlcvCandles(bars: UniswapV4OhlcvCandleRow[], bucketSec: number): UniswapV4OhlcvCandleRow[];
882
+ declare function resolveUniswapV4OhlcvPool(args: {
883
+ chainId: number | string;
884
+ poolPreset?: string;
885
+ poolReference?: string;
886
+ existingPool?: {
887
+ token0Address: string;
888
+ token1Address: string;
889
+ poolReference?: string;
890
+ fee?: number;
891
+ tickSpacing?: number;
892
+ hooks?: string;
893
+ };
894
+ }): Promise<ResolvedPool>;
895
+ declare function uniswapV4FetchOhlcv(args: {
896
+ chainId: number | string;
897
+ interval?: string;
898
+ poolPreset?: string;
899
+ poolReference?: string;
900
+ existingPool?: {
901
+ token0Address: string;
902
+ token1Address: string;
903
+ poolReference?: string;
904
+ fee?: number;
905
+ tickSpacing?: number;
906
+ hooks?: string;
907
+ };
908
+ /** Bitquery (Robinhood): chart this token contract. */
909
+ currencyAddress?: string;
910
+ /** Bitquery (Robinhood): chart by symbol (e.g. NVDA, AAPL). */
911
+ currencySymbol?: string;
912
+ quoteToken?: UniswapV4OhlcvQuoteToken;
913
+ lookbackDays?: number;
914
+ lookbackHours?: number;
915
+ startTimeMs?: number;
916
+ endTimeMs?: number;
917
+ }): Promise<UniswapV4OhlcvFetchResult>;
918
+
919
+ declare const UNISWAP_LIMIT_ORDER_CHAIN_ID = 1;
920
+ declare const DEFAULT_UNISWAPX_ORDER_BASE = "https://api.uniswap.org/v2";
921
+ declare const DEFAULT_LIMIT_ORDER_QUOTE_PATH = "/limit_order_quote";
922
+ declare const DEFAULT_ORDER_SUBMIT_PATH = "/order";
923
+ declare function isUniswapLimitOrderChainSupported(chainId: number): boolean;
924
+ declare function assertUniswapLimitOrderChain(chainId: number): void;
925
+ interface UniswapLimitOrderQuoteParams {
926
+ amount: string;
927
+ tokenIn: string;
928
+ tokenOut: string;
929
+ limitPrice: string;
930
+ uniswapApiKey: string;
931
+ type: UniswapQuoteTradeType;
932
+ orderDeadline: number;
933
+ keyGen?: string;
934
+ swapper?: string;
935
+ managementNodeUrl?: string;
936
+ nodeReadAuth?: NodeReadAuth;
937
+ chainId?: string | number;
938
+ tokenInChainId?: string | number;
939
+ tokenOutChainId?: string | number;
940
+ baseUrl?: string;
941
+ signal?: AbortSignal;
942
+ fetchImpl?: typeof fetch;
943
+ }
944
+ /** Map Trade API `permitData` into MPC EIP-712 multisign payload. */
945
+ declare function permitDataToEip712Payload(permitData: Record<string, unknown>): Eip712TypedDataPayload;
946
+ declare function extractPermitDataFromLimitQuote(quoteResponse: Record<string, unknown>): Record<string, unknown> | null;
947
+ declare function buildLimitOrderQuoteRequestBody(args: Pick<UniswapLimitOrderQuoteParams, 'type' | 'amount' | 'tokenIn' | 'tokenOut' | 'limitPrice' | 'orderDeadline' | 'chainId' | 'tokenInChainId' | 'tokenOutChainId'> & {
948
+ swapper: string;
949
+ }): Record<string, unknown>;
950
+ /**
951
+ * POST /v1/limit_order_quote — UniswapX limit order quote (mainnet only).
952
+ */
953
+ declare function uniswapLimitOrderQuote(args: UniswapLimitOrderQuoteParams): Promise<Record<string, unknown>>;
954
+ declare function buildUniswapXLimitOrderSubmitBody(args: {
955
+ quoteResponse: Record<string, unknown>;
956
+ signatureHex: string;
957
+ }): Record<string, unknown>;
958
+ declare function submitUniswapXLimitOrder(args: {
959
+ submitBody: Record<string, unknown>;
960
+ uniswapApiKey: string;
961
+ baseUrl?: string;
962
+ fetchImpl?: typeof fetch;
963
+ }): Promise<Record<string, unknown>>;
964
+ declare function fetchUniswapXLimitOrders(args: {
965
+ swapper: string;
966
+ chainId?: number;
967
+ uniswapApiKey?: string;
968
+ baseUrl?: string;
969
+ limit?: number;
970
+ fetchImpl?: typeof fetch;
971
+ }): Promise<Record<string, unknown>>;
972
+ declare function uniswapFetchLimitOrdersMcp(args: {
973
+ chainId?: number;
974
+ swapper?: string;
975
+ keyGen?: string;
976
+ managementNodeUrl?: string;
977
+ uniswapApiKey?: string;
978
+ limit?: number;
979
+ baseUrl?: string;
980
+ nodeReadAuth?: NodeReadAuth;
981
+ fetchImpl?: typeof fetch;
982
+ }): Promise<Record<string, unknown>>;
983
+
984
+ type UniswapLimitOrderMultisignArgs = {
985
+ keyGen: KeyGenSubsetForPermit;
986
+ chainId: number;
987
+ purposeText: string;
988
+ fullLimitQuote: Record<string, unknown>;
989
+ swapper: Address;
990
+ uniswapApiKey: string;
991
+ tradeApiBaseUrl?: string;
992
+ expiryDate?: number;
993
+ };
994
+ declare function buildEvmMultisignBodyUniswapV4LimitOrderBatch(args: UniswapLimitOrderMultisignArgs): Promise<MultisignBuildResult>;
995
+ type UniswapLimitOrderMultisignMcpArgs = {
996
+ keyGen: KeyGenSubsetForPermit;
997
+ chainId: number;
998
+ purposeText: string;
999
+ fullLimitQuote: Record<string, unknown>;
1000
+ executorAddress: Address;
1001
+ uniswapApiKey: string;
1002
+ tradeApiBaseUrl?: string;
1003
+ expiryDate?: number;
1004
+ };
1005
+ /** MCP handler: enrichMultisignContext supplies executorAddress + keyGen. */
1006
+ declare function buildEvmMultisignBodyUniswapV4LimitOrderBatchFromMcp(args: UniswapLimitOrderMultisignMcpArgs): Promise<MultisignBuildResult>;
1007
+
663
1008
  declare const UNISWAP_V4_PROTOCOL_ID = "uniswap-v4";
664
1009
  declare const uniswapV4ProtocolModule: ProtocolModule;
665
1010
 
@@ -669,6 +1014,10 @@ declare const uniswapV4: {
669
1014
  swapExactInput: typeof swapExactInput;
670
1015
  swapFromQuote: typeof swapFromQuote;
671
1016
  buildSwapMultisignBody: typeof buildEvmMultisignBodyUniswapV4SkipPermit2Batch;
1017
+ limitOrderQuote: typeof uniswapLimitOrderQuote;
1018
+ buildLimitOrderMultisignBody: typeof buildEvmMultisignBodyUniswapV4LimitOrderBatchFromMcp;
1019
+ fetchLimitOrders: typeof fetchUniswapXLimitOrders;
1020
+ fetchLimitOrdersMcp: typeof uniswapFetchLimitOrdersMcp;
672
1021
  quote: typeof uniswapTradeQuote;
673
1022
  createLiquidityPosition: typeof uniswapLpCreatePosition;
674
1023
  increaseLiquidityPosition: typeof uniswapLpIncreasePosition;
@@ -682,4 +1031,4 @@ declare const uniswapV4: {
682
1031
  isChainSupported: typeof isUniswapV4ChainSupported;
683
1032
  };
684
1033
 
685
- export { MAX_UINT160, MAX_UINT48, PERMIT2_ADDRESS, type SwapExactInputArgs, UNISWAP_LP_API_BASE_DEFAULT, UNISWAP_LP_DEFAULT_DEADLINE_SEC_OFFSET, UNISWAP_LP_DEFAULT_EXPIRY_MINUTES, UNISWAP_LP_DEFAULT_SLIPPAGE_PERCENT, UNISWAP_SWAP_DEFAULT_DEADLINE_SEC_OFFSET, UNISWAP_SWAP_DEFAULT_EXPIRY_MINUTES, UNISWAP_TRADE_BASE_DEFAULT, UNISWAP_UNIVERSAL_ROUTER_DEFAULT_GAS_UNITS, UNISWAP_UNIVERSAL_ROUTER_VERSION_DEFAULT, UNISWAP_V4_LP_COLLECT_DEFAULT_GAS_UNITS, UNISWAP_V4_LP_DECREASE_DEFAULT_GAS_UNITS, UNISWAP_V4_LP_ERC20_APPROVE_FALLBACK, UNISWAP_V4_LP_INCREASE_DEFAULT_GAS_UNITS, UNISWAP_V4_LP_LOG_CHUNK_SIZE_DEFAULT, UNISWAP_V4_LP_LOG_CHUNK_SIZE_MIN, UNISWAP_V4_LP_MINT_DEFAULT_GAS_UNITS, UNISWAP_V4_LP_POOL_LOOKUP_HINT, UNISWAP_V4_LP_POSITION_REGISTRY_HINT, UNISWAP_V4_LP_WETH_DEPOSIT_FALLBACK, UNISWAP_V4_PROTOCOL_ID, type UniswapLpAction, type UniswapLpExistingPool, type UniswapLpIndependentToken, type UniswapLpNewPool, type UniswapLpPriceBounds, type UniswapLpProtocol, type UniswapLpTickBounds, type UniswapLpTokenAmount, type UniswapLpTransactionRequest, type UniswapQuoteTradeType, type UniswapTradeQuoteParams, type UniswapV4PoolKeyInput, type UniswapV4PositionRow, type UniswapV4PositionScanProgress, type UniswapV4RegistryErc721Row, type UniswapV4SessionPayload, type UniswapV4StandardLpPoolRow, applySlippagePercentToApproveWei, buildEvmMultisignBodyUniswapV4CollectFeesBatch, buildEvmMultisignBodyUniswapV4DecreaseLiquidityBatch, buildEvmMultisignBodyUniswapV4IncreaseLiquidityBatch, buildEvmMultisignBodyUniswapV4MintLiquidityBatch, buildEvmMultisignBodyUniswapV4SkipPermit2Batch, buildUniswapQuoteRequestBody, buildUniswapV4PurposePrefill, computeUniswapV4PoolReference, computeUniswapV4Session, createSwap, errorMessageFromUniswapJsonBody, extractUniswapLpTokenAmounts, extractUniswapLpTransaction, fetchEthereumAddressForKeyGen, formatUniswapAmountFieldFromWei, formatUniswapLpAmountHuman, formatUniswapPercentForUi, formatUniswapQuoteForDisplay, formatUniswapV4PositionNotFoundError, getClassicQuoteFromStoredUniswapResponse, getUniswapUniversalRouterSpenderOrThrow, getUniswapV4PositionManagerDeployBlock, getUniswapV4PositionManagerOrThrow, isEthGetLogsBlockRangeTooLargeError, isNativeUniswapLpTokenAddress, isUniswapFullQuoteResponseNativeIn, isUniswapTokenInAddressNative, isUniswapV4ChainSupported, isUniswapV4LiquidityEvmSignRequest, isUniswapV4SwapEvmSignRequest, listUniswapV4PositionsForWallet, listUniswapV4StandardLpPools, messageFromUniswapHttpResponseBody, parseUniswapChainId, parseUniswapLpApiSnapshot, parseUniswapQuoteClassicInOut, parseUniswapQuoteSlippageInfo, parseUniswapV4ScanFromDateYmd, quoteSwap, readUniswapV4PositionInfoRaw, resolveBlockAtOrAfterUnixTime, resolveRouterSwapGasUnitsFromSignRequest, resolveUniswapV4LpExistingPoolFromKey, resolveUniswapV4LpPoolPreset, resolveUniswapV4PositionScanFromDate, sortUniswapV4PoolCurrencies, swapExactInput, swapFromQuote, swapTransactionDeadlineUnixFromExpiryMinutes, tryGetUniswapV4PositionManager, uniswapCreateSwap, uniswapLpClaimFees, uniswapLpCreatePosition, uniswapLpDecreasePosition, uniswapLpIncreasePosition, uniswapLpTxFieldForAction, uniswapQuoteToJsonQuoteOneLine, uniswapTradeQuote, uniswapV4, uniswapV4ListPositionsForMcp, uniswapV4ListPositionsFromRegistryForMcp, uniswapV4ListPositionsRegistryMcpPlaceholder, uniswapV4ListStandardLpPools, uniswapV4PositionMintedTokenIdsFromReceipt, uniswapV4ProtocolModule, uniswapV4RegisterPositionFromMintTxPlaceholder, uniswapV4RegisterPositionNftPlaceholder };
1034
+ export { BITQUERY_API_KEY_DOCS_URL, BITQUERY_API_KEY_ENV, BITQUERY_API_KEY_SIGNUP_URL, BITQUERY_GRAPHQL_URL, type BitqueryOhlcvCurrencyFilter, DEFAULT_LIMIT_ORDER_QUOTE_PATH, DEFAULT_ORDER_SUBMIT_PATH, DEFAULT_UNISWAPX_ORDER_BASE, MAX_UINT160, MAX_UINT48, PERMIT2_ADDRESS, ROBINHOOD_CHAIN_ID, ROBINHOOD_WETH_ADDRESS, type SwapExactInputArgs, THE_GRAPH_API_KEY_DOCS_URL, THE_GRAPH_API_KEY_ENV, THE_GRAPH_API_KEY_SIGNUP_URL, UNISWAP_LIMIT_ORDER_CHAIN_ID, UNISWAP_LP_API_BASE_DEFAULT, UNISWAP_LP_DEFAULT_DEADLINE_SEC_OFFSET, UNISWAP_LP_DEFAULT_EXPIRY_MINUTES, UNISWAP_LP_DEFAULT_SLIPPAGE_PERCENT, UNISWAP_SWAP_DEFAULT_DEADLINE_SEC_OFFSET, UNISWAP_SWAP_DEFAULT_EXPIRY_MINUTES, UNISWAP_TRADE_BASE_DEFAULT, UNISWAP_UNIVERSAL_ROUTER_DEFAULT_GAS_UNITS, UNISWAP_UNIVERSAL_ROUTER_VERSION_DEFAULT, UNISWAP_V4_LP_COLLECT_DEFAULT_GAS_UNITS, UNISWAP_V4_LP_DECREASE_DEFAULT_GAS_UNITS, UNISWAP_V4_LP_ERC20_APPROVE_FALLBACK, UNISWAP_V4_LP_INCREASE_DEFAULT_GAS_UNITS, UNISWAP_V4_LP_LOG_CHUNK_SIZE_DEFAULT, UNISWAP_V4_LP_LOG_CHUNK_SIZE_MIN, UNISWAP_V4_LP_MINT_DEFAULT_GAS_UNITS, UNISWAP_V4_LP_POOL_LOOKUP_HINT, UNISWAP_V4_LP_POSITION_REGISTRY_HINT, UNISWAP_V4_LP_WETH_DEPOSIT_FALLBACK, UNISWAP_V4_OHLCV_INTERVALS, UNISWAP_V4_PROTOCOL_ID, UNISWAP_V4_SUBGRAPH_ID_BY_CHAIN_ID, type UniswapLimitOrderMultisignArgs, type UniswapLimitOrderMultisignMcpArgs, type UniswapLimitOrderQuoteParams, type UniswapLpAction, type UniswapLpExistingPool, type UniswapLpIndependentToken, type UniswapLpNewPool, type UniswapLpPriceBounds, type UniswapLpProtocol, type UniswapLpTickBounds, type UniswapLpTokenAmount, type UniswapLpTransactionRequest, type UniswapQuoteTradeType, type UniswapTradeQuoteParams, type UniswapV4OhlcvDataTier, type UniswapV4OhlcvFetchResult, type UniswapV4OhlcvInterval, type UniswapV4OhlcvQuoteToken, type UniswapV4PoolKeyInput, type UniswapV4PositionRow, type UniswapV4PositionScanProgress, type UniswapV4RegistryErc721Row, type UniswapV4SessionPayload, type UniswapV4StandardLpPoolRow, type UniswapV4SubgraphPoolDayRow, type UniswapV4SubgraphPoolHourRow, type UniswapV4SubgraphPoolMeta, type UniswapV4SubgraphSwapRow, aggregateOhlcvCandles, applySlippagePercentToApproveWei, assertUniswapLimitOrderChain, assertUniswapV4OhlcvInterval, bitqueryApiKeyVariablesHint, bitqueryAuthErrorMessage, buildEvmMultisignBodyUniswapV4CollectFeesBatch, buildEvmMultisignBodyUniswapV4DecreaseLiquidityBatch, buildEvmMultisignBodyUniswapV4IncreaseLiquidityBatch, buildEvmMultisignBodyUniswapV4LimitOrderBatch, buildEvmMultisignBodyUniswapV4LimitOrderBatchFromMcp, buildEvmMultisignBodyUniswapV4MintLiquidityBatch, buildEvmMultisignBodyUniswapV4SkipPermit2Batch, buildLimitOrderQuoteRequestBody, buildUniswapQuoteRequestBody, buildUniswapV4PurposePrefill, buildUniswapXLimitOrderSubmitBody, computeUniswapV4PoolReference, computeUniswapV4Session, createSwap, currencyFilterLabel, errorMessageFromUniswapJsonBody, extractPermitDataFromLimitQuote, extractUniswapLpTokenAmounts, extractUniswapLpTransaction, fetchEthereumAddressForKeyGen, fetchRobinhoodBitqueryOhlcv, fetchUniswapV4PoolDayDatas, fetchUniswapV4PoolHourDatas, fetchUniswapV4PoolMeta, fetchUniswapV4Swaps, fetchUniswapXLimitOrders, formatUniswapAmountFieldFromWei, formatUniswapLpAmountHuman, formatUniswapPercentForUi, formatUniswapQuoteForDisplay, formatUniswapV4PositionNotFoundError, getClassicQuoteFromStoredUniswapResponse, getUniswapUniversalRouterSpenderOrThrow, getUniswapUniversalRouterVersion, getUniswapV4PositionManagerDeployBlock, getUniswapV4PositionManagerOrThrow, isBitqueryAuthOrRateLimitError, isEthGetLogsBlockRangeTooLargeError, isNativeUniswapLpTokenAddress, isRobinhoodOhlcvChain, isTheGraphRateLimitOrAuthError, isUniswapFullQuoteResponseNativeIn, isUniswapFullQuoteResponseNativeOut, isUniswapLimitOrderChainSupported, isUniswapNativeTokenAddress, isUniswapTokenInAddressNative, isUniswapV4ChainSupported, isUniswapV4LiquidityEvmSignRequest, isUniswapV4SwapEvmSignRequest, listUniswapV4PositionsForWallet, listUniswapV4StandardLpPools, mapBitqueryOhlcvRowsToCandles, messageFromUniswapHttpResponseBody, parseUniswapChainId, parseUniswapLpApiSnapshot, parseUniswapQuoteClassicInOut, parseUniswapQuoteSlippageInfo, parseUniswapV4ScanFromDateYmd, permitDataToEip712Payload, quoteSwap, readUniswapV4PositionInfoRaw, requireBitqueryApiKey, resolveBitqueryApiKey, resolveBlockAtOrAfterUnixTime, resolveChainIdFromStoredUniswapQuote, resolveInputChainId, resolveRobinhoodChartCurrency, resolveRouterSwapGasUnitsFromSignRequest, resolveTheGraphApiKey, resolveUniswapV4LpExistingPoolFromKey, resolveUniswapV4LpPoolPreset, resolveUniswapV4OhlcvDataTier, resolveUniswapV4OhlcvPool, resolveUniswapV4PositionScanFromDate, sortUniswapV4PoolCurrencies, submitUniswapXLimitOrder, swapExactInput, swapFromQuote, swapTransactionDeadlineUnixFromExpiryMinutes, theGraphApiKeyVariablesHint, theGraphRateLimitErrorMessage, tryGetUniswapV4PositionManager, uniswapCreateSwap, uniswapFetchLimitOrdersMcp, uniswapLimitOrderQuote, uniswapLpClaimFees, uniswapLpCreatePosition, uniswapLpDecreasePosition, uniswapLpIncreasePosition, uniswapLpTxFieldForAction, uniswapQuoteToJsonQuoteOneLine, uniswapTradeQuote, uniswapV4, uniswapV4FetchOhlcv, uniswapV4ListPositionsForMcp, uniswapV4ListPositionsFromRegistryForMcp, uniswapV4ListPositionsRegistryMcpPlaceholder, uniswapV4ListStandardLpPools, uniswapV4OhlcvIntervalToBucketSec, uniswapV4OhlcvSupportedChainIds, uniswapV4PositionMintedTokenIdsFromReceipt, uniswapV4ProtocolModule, uniswapV4RegisterPositionFromMintTxPlaceholder, uniswapV4RegisterPositionNftPlaceholder, uniswapV4SubgraphIdForChain, uniswapV4SubgraphSupportedChainIds, uniswapV4SubgraphUrlForChain };