tempo.ts 0.1.5 → 0.2.0

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 (276) hide show
  1. package/README.md +33 -2
  2. package/dist/chains.d.ts +509 -115
  3. package/dist/chains.d.ts.map +1 -1
  4. package/dist/chains.js +18 -9
  5. package/dist/chains.js.map +1 -1
  6. package/dist/ox/Order.d.ts +92 -0
  7. package/dist/ox/Order.d.ts.map +1 -0
  8. package/dist/ox/Order.js +88 -0
  9. package/dist/ox/Order.js.map +1 -0
  10. package/dist/ox/OrdersFilters.d.ts +72 -0
  11. package/dist/ox/OrdersFilters.d.ts.map +1 -0
  12. package/dist/ox/OrdersFilters.js +100 -0
  13. package/dist/ox/OrdersFilters.js.map +1 -0
  14. package/dist/ox/Pagination.d.ts +128 -0
  15. package/dist/ox/Pagination.d.ts.map +1 -0
  16. package/dist/ox/Pagination.js +78 -0
  17. package/dist/ox/Pagination.js.map +1 -0
  18. package/dist/ox/PoolId.d.ts +18 -0
  19. package/dist/ox/PoolId.d.ts.map +1 -0
  20. package/dist/ox/PoolId.js +13 -0
  21. package/dist/ox/PoolId.js.map +1 -0
  22. package/dist/ox/RpcSchema.d.ts +32 -0
  23. package/dist/ox/RpcSchema.d.ts.map +1 -0
  24. package/dist/ox/RpcSchema.js +2 -0
  25. package/dist/ox/RpcSchema.js.map +1 -0
  26. package/dist/ox/SignatureEnvelope.d.ts +1 -1
  27. package/dist/ox/SignatureEnvelope.d.ts.map +1 -1
  28. package/dist/ox/SignatureEnvelope.js.map +1 -1
  29. package/dist/{viem → ox}/Tick.d.ts +4 -0
  30. package/dist/ox/Tick.d.ts.map +1 -0
  31. package/dist/ox/Tick.js.map +1 -0
  32. package/dist/ox/Transaction.d.ts.map +1 -1
  33. package/dist/ox/Transaction.js +2 -1
  34. package/dist/ox/Transaction.js.map +1 -1
  35. package/dist/ox/TransactionEnvelopeAA.d.ts +6 -6
  36. package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -1
  37. package/dist/ox/TransactionEnvelopeAA.js +4 -2
  38. package/dist/ox/TransactionEnvelopeAA.js.map +1 -1
  39. package/dist/ox/TransactionRequest.d.ts +4 -0
  40. package/dist/ox/TransactionRequest.d.ts.map +1 -1
  41. package/dist/ox/TransactionRequest.js.map +1 -1
  42. package/dist/ox/index.d.ts +6 -0
  43. package/dist/ox/index.d.ts.map +1 -1
  44. package/dist/ox/index.js +6 -0
  45. package/dist/ox/index.js.map +1 -1
  46. package/dist/prool/Instance.d.ts.map +1 -1
  47. package/dist/prool/Instance.js +20 -4
  48. package/dist/prool/Instance.js.map +1 -1
  49. package/dist/viem/Abis.d.ts +1469 -1082
  50. package/dist/viem/Abis.d.ts.map +1 -1
  51. package/dist/viem/Abis.js +932 -671
  52. package/dist/viem/Abis.js.map +1 -1
  53. package/dist/viem/Account.d.ts +150 -0
  54. package/dist/viem/Account.d.ts.map +1 -0
  55. package/dist/viem/Account.js +221 -0
  56. package/dist/viem/Account.js.map +1 -0
  57. package/dist/viem/Actions/amm.d.ts +80 -118
  58. package/dist/viem/Actions/amm.d.ts.map +1 -1
  59. package/dist/viem/Actions/amm.js +47 -116
  60. package/dist/viem/Actions/amm.js.map +1 -1
  61. package/dist/viem/Actions/dex.d.ts +889 -633
  62. package/dist/viem/Actions/dex.d.ts.map +1 -1
  63. package/dist/viem/Actions/dex.js +99 -0
  64. package/dist/viem/Actions/dex.js.map +1 -1
  65. package/dist/viem/Actions/fee.d.ts +3 -17
  66. package/dist/viem/Actions/fee.d.ts.map +1 -1
  67. package/dist/viem/Actions/fee.js.map +1 -1
  68. package/dist/viem/Actions/index.d.ts +1 -0
  69. package/dist/viem/Actions/index.d.ts.map +1 -1
  70. package/dist/viem/Actions/index.js +1 -0
  71. package/dist/viem/Actions/index.js.map +1 -1
  72. package/dist/viem/Actions/reward.d.ts +3236 -0
  73. package/dist/viem/Actions/reward.d.ts.map +1 -0
  74. package/dist/viem/Actions/reward.js +725 -0
  75. package/dist/viem/Actions/reward.js.map +1 -0
  76. package/dist/viem/Actions/token.d.ts +4295 -2646
  77. package/dist/viem/Actions/token.d.ts.map +1 -1
  78. package/dist/viem/Actions/token.js +214 -335
  79. package/dist/viem/Actions/token.js.map +1 -1
  80. package/dist/viem/Addresses.d.ts +1 -2
  81. package/dist/viem/Addresses.d.ts.map +1 -1
  82. package/dist/viem/Addresses.js +1 -2
  83. package/dist/viem/Addresses.js.map +1 -1
  84. package/dist/viem/Chain.d.ts +38 -12
  85. package/dist/viem/Chain.d.ts.map +1 -1
  86. package/dist/viem/Chain.js +27 -18
  87. package/dist/viem/Chain.js.map +1 -1
  88. package/dist/viem/Decorator.d.ts +959 -405
  89. package/dist/viem/Decorator.d.ts.map +1 -1
  90. package/dist/viem/Decorator.js +13 -5
  91. package/dist/viem/Decorator.js.map +1 -1
  92. package/dist/viem/Formatters.d.ts +8 -1
  93. package/dist/viem/Formatters.d.ts.map +1 -1
  94. package/dist/viem/Formatters.js +17 -0
  95. package/dist/viem/Formatters.js.map +1 -1
  96. package/dist/viem/P256.d.ts +2 -0
  97. package/dist/viem/P256.d.ts.map +1 -0
  98. package/dist/viem/P256.js +2 -0
  99. package/dist/viem/P256.js.map +1 -0
  100. package/dist/viem/Secp256k1.d.ts +2 -0
  101. package/dist/viem/Secp256k1.d.ts.map +1 -0
  102. package/dist/viem/Secp256k1.js +2 -0
  103. package/dist/viem/Secp256k1.js.map +1 -0
  104. package/dist/viem/TokenIds.d.ts +1 -2
  105. package/dist/viem/TokenIds.d.ts.map +1 -1
  106. package/dist/viem/TokenIds.js +1 -2
  107. package/dist/viem/TokenIds.js.map +1 -1
  108. package/dist/viem/Transaction.d.ts +1 -1
  109. package/dist/viem/Transaction.d.ts.map +1 -1
  110. package/dist/viem/Transaction.js +46 -5
  111. package/dist/viem/Transaction.js.map +1 -1
  112. package/dist/viem/WebAuthnP256.d.ts +79 -0
  113. package/dist/viem/WebAuthnP256.d.ts.map +1 -0
  114. package/dist/viem/WebAuthnP256.js +95 -0
  115. package/dist/viem/WebAuthnP256.js.map +1 -0
  116. package/dist/viem/WebCryptoP256.d.ts +2 -0
  117. package/dist/viem/WebCryptoP256.d.ts.map +1 -0
  118. package/dist/viem/WebCryptoP256.js +2 -0
  119. package/dist/viem/WebCryptoP256.js.map +1 -0
  120. package/dist/viem/index.d.ts +6 -3
  121. package/dist/viem/index.d.ts.map +1 -1
  122. package/dist/viem/index.js +6 -3
  123. package/dist/viem/index.js.map +1 -1
  124. package/dist/viem/internal/account.d.ts +24 -0
  125. package/dist/viem/internal/account.d.ts.map +1 -0
  126. package/dist/viem/internal/account.js +68 -0
  127. package/dist/viem/internal/account.js.map +1 -0
  128. package/dist/viem/internal/types.d.ts +10 -0
  129. package/dist/viem/internal/types.d.ts.map +1 -1
  130. package/dist/wagmi/Actions/amm.d.ts +428 -0
  131. package/dist/wagmi/Actions/amm.d.ts.map +1 -0
  132. package/dist/wagmi/Actions/amm.js +472 -0
  133. package/dist/wagmi/Actions/amm.js.map +1 -0
  134. package/dist/wagmi/Actions/dex.d.ts +908 -0
  135. package/dist/wagmi/Actions/dex.d.ts.map +1 -0
  136. package/dist/wagmi/Actions/dex.js +1023 -0
  137. package/dist/wagmi/Actions/dex.js.map +1 -0
  138. package/dist/wagmi/Actions/fee.d.ts +111 -0
  139. package/dist/wagmi/Actions/fee.d.ts.map +1 -0
  140. package/dist/wagmi/Actions/fee.js +126 -0
  141. package/dist/wagmi/Actions/fee.js.map +1 -0
  142. package/dist/wagmi/Actions/index.d.ts +6 -0
  143. package/dist/wagmi/Actions/index.d.ts.map +1 -0
  144. package/dist/wagmi/Actions/index.js +6 -0
  145. package/dist/wagmi/Actions/index.js.map +1 -0
  146. package/dist/wagmi/Actions/reward.d.ts +348 -0
  147. package/dist/wagmi/Actions/reward.d.ts.map +1 -0
  148. package/dist/wagmi/Actions/reward.js +388 -0
  149. package/dist/wagmi/Actions/reward.js.map +1 -0
  150. package/dist/wagmi/Actions/token.d.ts +1546 -0
  151. package/dist/wagmi/Actions/token.d.ts.map +1 -0
  152. package/dist/wagmi/Actions/token.js +1712 -0
  153. package/dist/wagmi/Actions/token.js.map +1 -0
  154. package/dist/wagmi/Connector.d.ts +73 -0
  155. package/dist/wagmi/Connector.d.ts.map +1 -0
  156. package/dist/wagmi/Connector.js +249 -0
  157. package/dist/wagmi/Connector.js.map +1 -0
  158. package/dist/wagmi/Hooks/amm.d.ts +421 -0
  159. package/dist/wagmi/Hooks/amm.d.ts.map +1 -0
  160. package/dist/wagmi/Hooks/amm.js +504 -0
  161. package/dist/wagmi/Hooks/amm.js.map +1 -0
  162. package/dist/wagmi/Hooks/dex.d.ts +816 -0
  163. package/dist/wagmi/Hooks/dex.d.ts.map +1 -0
  164. package/dist/wagmi/Hooks/dex.js +973 -0
  165. package/dist/wagmi/Hooks/dex.js.map +1 -0
  166. package/dist/wagmi/Hooks/fee.d.ts +97 -0
  167. package/dist/wagmi/Hooks/fee.d.ts.map +1 -0
  168. package/dist/wagmi/Hooks/fee.js +109 -0
  169. package/dist/wagmi/Hooks/fee.js.map +1 -0
  170. package/dist/wagmi/Hooks/index.d.ts +6 -0
  171. package/dist/wagmi/Hooks/index.d.ts.map +1 -0
  172. package/dist/wagmi/Hooks/index.js +6 -0
  173. package/dist/wagmi/Hooks/index.js.map +1 -0
  174. package/dist/wagmi/Hooks/reward.d.ts +307 -0
  175. package/dist/wagmi/Hooks/reward.d.ts.map +1 -0
  176. package/dist/wagmi/Hooks/reward.js +349 -0
  177. package/dist/wagmi/Hooks/reward.js.map +1 -0
  178. package/dist/wagmi/Hooks/token.d.ts +1388 -0
  179. package/dist/wagmi/Hooks/token.d.ts.map +1 -0
  180. package/dist/wagmi/Hooks/token.js +1657 -0
  181. package/dist/wagmi/Hooks/token.js.map +1 -0
  182. package/dist/wagmi/index.d.ts +4 -0
  183. package/dist/wagmi/index.d.ts.map +1 -0
  184. package/dist/wagmi/index.js +4 -0
  185. package/dist/wagmi/index.js.map +1 -0
  186. package/package.json +54 -10
  187. package/src/chains.ts +19 -9
  188. package/src/ox/Order.test.ts +78 -0
  189. package/src/ox/Order.ts +125 -0
  190. package/src/ox/OrdersFilters.test.ts +182 -0
  191. package/src/ox/OrdersFilters.ts +125 -0
  192. package/src/ox/Pagination.test.ts +162 -0
  193. package/src/ox/Pagination.ts +164 -0
  194. package/src/ox/PoolId.test.ts +33 -0
  195. package/src/ox/PoolId.ts +27 -0
  196. package/src/ox/RpcSchema.ts +35 -0
  197. package/src/ox/SignatureEnvelope.ts +3 -1
  198. package/src/{viem → ox}/Tick.test.ts +1 -1
  199. package/src/{viem → ox}/Tick.ts +5 -0
  200. package/src/ox/Transaction.test.ts +1 -1
  201. package/src/ox/Transaction.ts +2 -1
  202. package/src/ox/TransactionEnvelopeAA.test.ts +239 -96
  203. package/src/ox/TransactionEnvelopeAA.ts +9 -7
  204. package/src/ox/TransactionRequest.ts +4 -0
  205. package/src/ox/index.ts +6 -0
  206. package/src/prool/Instance.ts +51 -37
  207. package/src/prool/internal/chain.json +104 -52
  208. package/src/tsconfig.json +9 -0
  209. package/src/viem/Abis.ts +972 -710
  210. package/src/viem/Account.ts +279 -0
  211. package/src/viem/Actions/__snapshots__/dex.test.ts.snap +850 -0
  212. package/src/viem/Actions/amm.test.ts +98 -169
  213. package/src/viem/Actions/amm.ts +68 -155
  214. package/src/viem/Actions/dex.test.ts +563 -484
  215. package/src/viem/Actions/dex.ts +173 -0
  216. package/src/viem/Actions/fee.test.ts +23 -34
  217. package/src/viem/Actions/fee.ts +7 -0
  218. package/src/viem/Actions/index.ts +1 -0
  219. package/src/viem/Actions/policy.test.ts +19 -33
  220. package/src/viem/Actions/reward.test.ts +457 -0
  221. package/src/viem/Actions/reward.ts +999 -0
  222. package/src/viem/Actions/token.test.ts +453 -287
  223. package/src/viem/Actions/token.ts +452 -540
  224. package/src/viem/Addresses.ts +1 -2
  225. package/src/viem/Chain.ts +70 -20
  226. package/src/viem/Decorator.test.ts +2 -1
  227. package/src/viem/Decorator.ts +996 -421
  228. package/src/viem/Formatters.ts +31 -5
  229. package/src/viem/P256.ts +1 -0
  230. package/src/viem/Secp256k1.ts +1 -0
  231. package/src/viem/TokenIds.ts +1 -2
  232. package/src/viem/Transaction.ts +53 -7
  233. package/src/viem/WebAuthnP256.ts +140 -0
  234. package/src/viem/WebCryptoP256.ts +1 -0
  235. package/src/viem/e2e.test.ts +1126 -297
  236. package/src/viem/index.ts +6 -3
  237. package/src/viem/internal/account.ts +107 -0
  238. package/src/viem/internal/types.ts +9 -0
  239. package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +310 -0
  240. package/src/wagmi/Actions/amm.test.ts +198 -0
  241. package/src/wagmi/Actions/amm.ts +691 -0
  242. package/src/wagmi/Actions/dex.test.ts +1507 -0
  243. package/src/wagmi/Actions/dex.ts +1640 -0
  244. package/src/wagmi/Actions/fee.test.ts +63 -0
  245. package/src/wagmi/Actions/fee.ts +208 -0
  246. package/src/wagmi/Actions/index.ts +5 -0
  247. package/src/wagmi/Actions/reward.test.ts +210 -0
  248. package/src/wagmi/Actions/reward.ts +632 -0
  249. package/src/wagmi/Actions/token.test.ts +1308 -0
  250. package/src/wagmi/Actions/token.ts +2613 -0
  251. package/src/wagmi/Connector.test.ts +53 -0
  252. package/src/wagmi/Connector.ts +367 -0
  253. package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +457 -0
  254. package/src/wagmi/Hooks/amm.test.ts +424 -0
  255. package/src/wagmi/Hooks/amm.ts +806 -0
  256. package/src/wagmi/Hooks/dex.test.ts +1017 -0
  257. package/src/wagmi/Hooks/dex.ts +1685 -0
  258. package/src/wagmi/Hooks/fee.test.ts +166 -0
  259. package/src/wagmi/Hooks/fee.ts +206 -0
  260. package/src/wagmi/Hooks/index.ts +5 -0
  261. package/src/wagmi/Hooks/reward.test.ts +219 -0
  262. package/src/wagmi/Hooks/reward.ts +672 -0
  263. package/src/wagmi/Hooks/token.test.ts +1670 -0
  264. package/src/wagmi/Hooks/token.ts +2906 -0
  265. package/src/wagmi/index.ts +3 -0
  266. package/src/wagmi/internal/types.ts +16 -0
  267. package/dist/viem/Client.d.ts +0 -27
  268. package/dist/viem/Client.d.ts.map +0 -1
  269. package/dist/viem/Client.js +0 -28
  270. package/dist/viem/Client.js.map +0 -1
  271. package/dist/viem/Tick.d.ts.map +0 -1
  272. package/dist/viem/Tick.js.map +0 -1
  273. package/src/viem/Client.bench-d.ts +0 -8
  274. package/src/viem/Client.test.ts +0 -178
  275. package/src/viem/Client.ts +0 -91
  276. /package/dist/{viem → ox}/Tick.js +0 -0
@@ -0,0 +1,816 @@
1
+ import type { DefaultError, InfiniteData } from '@tanstack/query-core';
2
+ import type { UseMutationResult } from '@tanstack/react-query';
3
+ import type { Config, ResolvedRegister } from '@wagmi/core';
4
+ import type { ConfigParameter, QueryParameter } from 'wagmi/internal';
5
+ import { type UseInfiniteQueryReturnType, type UseMutationParameters, type UseQueryReturnType } from 'wagmi/query';
6
+ import type { ExactPartial, UnionCompute } from '../../internal/types.js';
7
+ import { buy, buySync, cancel, cancelSync, createPair, createPairSync, getBalance, getBuyQuote, getOrder, getOrderbook, getOrders, getPriceLevel, getSellQuote, place, placeFlip, placeFlipSync, placeSync, sell, sellSync, watchFlipOrderPlaced, watchOrderCancelled, watchOrderFilled, watchOrderPlaced, withdraw, withdrawSync } from '../Actions/dex.js';
8
+ /**
9
+ * Hook for buying a specific amount of tokens.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { Hooks } from 'tempo.ts/wagmi'
14
+ *
15
+ * function App() {
16
+ * const { mutate, isPending } = Hooks.dex.useBuy()
17
+ *
18
+ * return (
19
+ * <button
20
+ * onClick={() => mutate({
21
+ * tokenIn: '0x20c...11',
22
+ * tokenOut: '0x20c...20',
23
+ * amountOut: parseUnits('100', 6),
24
+ * maxAmountIn: parseUnits('105', 6),
25
+ * })}
26
+ * disabled={isPending}
27
+ * >
28
+ * Buy Tokens
29
+ * </button>
30
+ * )
31
+ * }
32
+ * ```
33
+ *
34
+ * @param parameters - Parameters.
35
+ * @returns Mutation result.
36
+ */
37
+ export declare function useBuy<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useBuy.Parameters<config, context>): useBuy.ReturnType<config, context>;
38
+ export declare namespace useBuy {
39
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
40
+ mutation?: UseMutationParameters<buy.ReturnValue, buy.ErrorType, buy.Parameters<config>, context> | undefined;
41
+ };
42
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<buy.ReturnValue, buy.ErrorType, buy.Parameters<config>, context>;
43
+ }
44
+ /**
45
+ * Hook for buying a specific amount of tokens.
46
+ *
47
+ * Note: This is a synchronous hook that waits for the transaction
48
+ * to be included on a block before returning a response.
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * import { Hooks } from 'tempo.ts/wagmi'
53
+ *
54
+ * function App() {
55
+ * const { mutate, isPending } = Hooks.dex.useBuySync()
56
+ *
57
+ * return (
58
+ * <button
59
+ * onClick={() => mutate({
60
+ * tokenIn: '0x20c...11',
61
+ * tokenOut: '0x20c...20',
62
+ * amountOut: parseUnits('100', 6),
63
+ * maxAmountIn: parseUnits('105', 6),
64
+ * })}
65
+ * disabled={isPending}
66
+ * >
67
+ * Buy Tokens
68
+ * </button>
69
+ * )
70
+ * }
71
+ * ```
72
+ *
73
+ * @param parameters - Parameters.
74
+ * @returns Mutation result.
75
+ */
76
+ export declare function useBuySync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useBuySync.Parameters<config, context>): useBuySync.ReturnType<config, context>;
77
+ export declare namespace useBuySync {
78
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
79
+ mutation?: UseMutationParameters<buySync.ReturnValue, buySync.ErrorType, buySync.Parameters<config>, context> | undefined;
80
+ };
81
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<buySync.ReturnValue, buySync.ErrorType, buySync.Parameters<config>, context>;
82
+ }
83
+ /**
84
+ * Hook for canceling an order from the orderbook.
85
+ *
86
+ * @example
87
+ * ```tsx
88
+ * import { Hooks } from 'tempo.ts/wagmi'
89
+ *
90
+ * function App() {
91
+ * const { mutate, isPending } = Hooks.dex.useCancel()
92
+ *
93
+ * return (
94
+ * <button
95
+ * onClick={() => mutate({ orderId: 123n })}
96
+ * disabled={isPending}
97
+ * >
98
+ * Cancel Order
99
+ * </button>
100
+ * )
101
+ * }
102
+ * ```
103
+ *
104
+ * @param parameters - Parameters.
105
+ * @returns Mutation result.
106
+ */
107
+ export declare function useCancel<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useCancel.Parameters<config, context>): useCancel.ReturnType<config, context>;
108
+ export declare namespace useCancel {
109
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
110
+ mutation?: UseMutationParameters<cancel.ReturnValue, cancel.ErrorType, cancel.Parameters<config>, context> | undefined;
111
+ };
112
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<cancel.ReturnValue, cancel.ErrorType, cancel.Parameters<config>, context>;
113
+ }
114
+ /**
115
+ * Hook for canceling an order from the orderbook.
116
+ *
117
+ * Note: This is a synchronous hook that waits for the transaction
118
+ * to be included on a block before returning a response.
119
+ *
120
+ * @example
121
+ * ```tsx
122
+ * import { Hooks } from 'tempo.ts/wagmi'
123
+ *
124
+ * function App() {
125
+ * const { mutate, isPending } = Hooks.dex.useCancelSync()
126
+ *
127
+ * return (
128
+ * <button
129
+ * onClick={() => mutate({ orderId: 123n })}
130
+ * disabled={isPending}
131
+ * >
132
+ * Cancel Order
133
+ * </button>
134
+ * )
135
+ * }
136
+ * ```
137
+ *
138
+ * @param parameters - Parameters.
139
+ * @returns Mutation result.
140
+ */
141
+ export declare function useCancelSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useCancelSync.Parameters<config, context>): useCancelSync.ReturnType<config, context>;
142
+ export declare namespace useCancelSync {
143
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
144
+ mutation?: UseMutationParameters<cancelSync.ReturnValue, cancelSync.ErrorType, cancelSync.Parameters<config>, context> | undefined;
145
+ };
146
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<cancelSync.ReturnValue, cancelSync.ErrorType, cancelSync.Parameters<config>, context>;
147
+ }
148
+ /**
149
+ * Hook for creating a new trading pair on the DEX.
150
+ *
151
+ * @example
152
+ * ```tsx
153
+ * import { Hooks } from 'tempo.ts/wagmi'
154
+ *
155
+ * function App() {
156
+ * const { mutate, isPending } = Hooks.dex.useCreatePair()
157
+ *
158
+ * return (
159
+ * <button
160
+ * onClick={() => mutate({ base: '0x20c...11' })}
161
+ * disabled={isPending}
162
+ * >
163
+ * Create Pair
164
+ * </button>
165
+ * )
166
+ * }
167
+ * ```
168
+ *
169
+ * @param parameters - Parameters.
170
+ * @returns Mutation result.
171
+ */
172
+ export declare function useCreatePair<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useCreatePair.Parameters<config, context>): useCreatePair.ReturnType<config, context>;
173
+ export declare namespace useCreatePair {
174
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
175
+ mutation?: UseMutationParameters<createPair.ReturnValue, createPair.ErrorType, createPair.Parameters<config>, context> | undefined;
176
+ };
177
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<createPair.ReturnValue, createPair.ErrorType, createPair.Parameters<config>, context>;
178
+ }
179
+ /**
180
+ * Hook for creating a new trading pair on the DEX.
181
+ *
182
+ * Note: This is a synchronous hook that waits for the transaction
183
+ * to be included on a block before returning a response.
184
+ *
185
+ * @example
186
+ * ```tsx
187
+ * import { Hooks } from 'tempo.ts/wagmi'
188
+ *
189
+ * function App() {
190
+ * const { mutate, isPending } = Hooks.dex.useCreatePairSync()
191
+ *
192
+ * return (
193
+ * <button
194
+ * onClick={() => mutate({ base: '0x20c...11' })}
195
+ * disabled={isPending}
196
+ * >
197
+ * Create Pair
198
+ * </button>
199
+ * )
200
+ * }
201
+ * ```
202
+ *
203
+ * @param parameters - Parameters.
204
+ * @returns Mutation result.
205
+ */
206
+ export declare function useCreatePairSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useCreatePairSync.Parameters<config, context>): useCreatePairSync.ReturnType<config, context>;
207
+ export declare namespace useCreatePairSync {
208
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
209
+ mutation?: UseMutationParameters<createPairSync.ReturnValue, createPairSync.ErrorType, createPairSync.Parameters<config>, context> | undefined;
210
+ };
211
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<createPairSync.ReturnValue, createPairSync.ErrorType, createPairSync.Parameters<config>, context>;
212
+ }
213
+ /**
214
+ * Hook for getting a user's token balance on the DEX.
215
+ *
216
+ * @example
217
+ * ```tsx
218
+ * import { Hooks } from 'tempo.ts/wagmi'
219
+ *
220
+ * function App() {
221
+ * const { data, isLoading } = Hooks.dex.useBalance({
222
+ * account: '0x...',
223
+ * token: '0x20c...11',
224
+ * })
225
+ *
226
+ * if (isLoading) return <div>Loading...</div>
227
+ * return <div>Balance: {data}</div>
228
+ * }
229
+ * ```
230
+ *
231
+ * @param parameters - Parameters.
232
+ * @returns Query result with the user's token balance on the DEX.
233
+ */
234
+ export declare function useBalance<config extends Config = ResolvedRegister['config'], selectData = getBalance.ReturnValue>(parameters: useBalance.Parameters<config, selectData>): UseQueryReturnType<selectData, Error>;
235
+ export declare namespace useBalance {
236
+ type Parameters<config extends Config = ResolvedRegister['config'], selectData = getBalance.ReturnValue> = ConfigParameter<config> & QueryParameter<getBalance.ReturnValue, DefaultError, selectData, getBalance.QueryKey<config>> & Omit<getBalance.queryOptions.Parameters<config, selectData>, 'query'>;
237
+ type ReturnValue<selectData = getBalance.ReturnValue> = UseQueryReturnType<selectData, Error>;
238
+ }
239
+ /**
240
+ * Hook for getting the quote for buying a specific amount of tokens.
241
+ *
242
+ * @example
243
+ * ```tsx
244
+ * import { Hooks } from 'tempo.ts/wagmi'
245
+ *
246
+ * function App() {
247
+ * const { data, isLoading } = Hooks.dex.useBuyQuote({
248
+ * amountOut: parseUnits('100', 6),
249
+ * tokenIn: '0x20c...11',
250
+ * tokenOut: '0x20c...20',
251
+ * })
252
+ *
253
+ * if (isLoading) return <div>Loading...</div>
254
+ * return <div>Required Input: {data}</div>
255
+ * }
256
+ * ```
257
+ *
258
+ * @param parameters - Parameters.
259
+ * @returns Query result with the amount of tokenIn needed.
260
+ */
261
+ export declare function useBuyQuote<config extends Config = ResolvedRegister['config'], selectData = getBuyQuote.ReturnValue>(parameters: useBuyQuote.Parameters<config, selectData>): UseQueryReturnType<selectData, Error>;
262
+ export declare namespace useBuyQuote {
263
+ type Parameters<config extends Config = ResolvedRegister['config'], selectData = getBuyQuote.ReturnValue> = ConfigParameter<config> & QueryParameter<getBuyQuote.ReturnValue, DefaultError, selectData, getBuyQuote.QueryKey<config>> & Omit<getBuyQuote.queryOptions.Parameters<config, selectData>, 'query'>;
264
+ type ReturnValue<selectData = getBuyQuote.ReturnValue> = UseQueryReturnType<selectData, Error>;
265
+ }
266
+ /**
267
+ * Hook for getting an order's details from the orderbook.
268
+ *
269
+ * @example
270
+ * ```tsx
271
+ * import { Hooks } from 'tempo.ts/wagmi'
272
+ *
273
+ * function App() {
274
+ * const { data, isLoading } = Hooks.dex.useOrder({
275
+ * orderId: 123n,
276
+ * })
277
+ *
278
+ * if (isLoading) return <div>Loading...</div>
279
+ * return <div>Order: {JSON.stringify(data)}</div>
280
+ * }
281
+ * ```
282
+ *
283
+ * @param parameters - Parameters.
284
+ * @returns Query result with the order details.
285
+ */
286
+ export declare function useOrder<config extends Config = ResolvedRegister['config'], selectData = getOrder.ReturnValue>(parameters: useOrder.Parameters<config, selectData>): UseQueryReturnType<selectData, Error>;
287
+ export declare namespace useOrder {
288
+ type Parameters<config extends Config = ResolvedRegister['config'], selectData = getOrder.ReturnValue> = ConfigParameter<config> & QueryParameter<getOrder.ReturnValue, DefaultError, selectData, getOrder.QueryKey<config>> & Omit<getOrder.queryOptions.Parameters<config, selectData>, 'query'>;
289
+ type ReturnValue<selectData = getOrder.ReturnValue> = UseQueryReturnType<selectData, Error>;
290
+ }
291
+ /**
292
+ * Hook for getting paginated orders from the orderbook.
293
+ *
294
+ * @example
295
+ * ```tsx
296
+ * import { Hooks } from 'tempo.ts/wagmi'
297
+ *
298
+ * function App() {
299
+ * const { data, fetchNextPage, hasNextPage, isFetchingNextPage } = Hooks.dex.useGetOrders({
300
+ * limit: 10,
301
+ * filters: {
302
+ * baseToken: '0x20c0...',
303
+ * isBid: true,
304
+ * }
305
+ * })
306
+ *
307
+ * return (
308
+ * <div>
309
+ * {data?.pages.map((page, i) => (
310
+ * <div key={i}>
311
+ * {page.orders.map((order) => (
312
+ * <div key={order.orderId.toString()}>{order.amount.toString()}</div>
313
+ * ))}
314
+ * </div>
315
+ * ))}
316
+ * {hasNextPage && (
317
+ * <button onClick={() => fetchNextPage()} disabled={isFetchingNextPage}>
318
+ * Load More
319
+ * </button>
320
+ * )}
321
+ * </div>
322
+ * )
323
+ * }
324
+ * ```
325
+ *
326
+ * @param parameters - Parameters.
327
+ * @returns Infinite query result with paginated orders.
328
+ */
329
+ export declare function useGetOrders<config extends Config = ResolvedRegister['config'], selectData = getOrders.ReturnValue>(parameters?: useGetOrders.Parameters<config, selectData>): useGetOrders.ReturnValue<selectData>;
330
+ export declare namespace useGetOrders {
331
+ type Parameters<config extends Config = ResolvedRegister['config'], selectData = getOrders.ReturnValue> = ConfigParameter<config> & Omit<QueryParameter<getOrders.ReturnValue, DefaultError, selectData, getOrders.QueryKey<config>>, 'queryFn' | 'queryKey'> & ExactPartial<Omit<getOrders.infiniteQueryOptions.Parameters<config, selectData>, 'query'>>;
332
+ type ReturnValue<selectData = getOrders.ReturnValue> = UseInfiniteQueryReturnType<InfiniteData<selectData>, Error>;
333
+ }
334
+ /**
335
+ * Hook for getting orderbook information for a trading pair.
336
+ *
337
+ * @example
338
+ * ```tsx
339
+ * import { Hooks } from 'tempo.ts/wagmi'
340
+ *
341
+ * function App() {
342
+ * const { data, isLoading } = Hooks.dex.useOrderbook({
343
+ * base: '0x20c...11',
344
+ * quote: '0x20c...20',
345
+ * })
346
+ *
347
+ * if (isLoading) return <div>Loading...</div>
348
+ * return <div>Orderbook: {JSON.stringify(data)}</div>
349
+ * }
350
+ * ```
351
+ *
352
+ * @param parameters - Parameters.
353
+ * @returns Query result with the orderbook information.
354
+ */
355
+ export declare function useOrderbook<config extends Config = ResolvedRegister['config'], selectData = getOrderbook.ReturnValue>(parameters: useOrderbook.Parameters<config, selectData>): UseQueryReturnType<selectData, Error>;
356
+ export declare namespace useOrderbook {
357
+ type Parameters<config extends Config = ResolvedRegister['config'], selectData = getOrderbook.ReturnValue> = ConfigParameter<config> & QueryParameter<getOrderbook.ReturnValue, DefaultError, selectData, getOrderbook.QueryKey<config>> & Omit<getOrderbook.queryOptions.Parameters<config, selectData>, 'query'>;
358
+ type ReturnValue<selectData = getOrderbook.ReturnValue> = UseQueryReturnType<selectData, Error>;
359
+ }
360
+ /**
361
+ * Hook for getting the price level information at a specific tick.
362
+ *
363
+ * @example
364
+ * ```tsx
365
+ * import { Hooks } from 'tempo.ts/wagmi'
366
+ *
367
+ * function App() {
368
+ * const { data, isLoading } = Hooks.dex.usePriceLevel({
369
+ * base: '0x20c...11',
370
+ * tick: Tick.fromPrice('1.001'),
371
+ * isBid: true,
372
+ * })
373
+ *
374
+ * if (isLoading) return <div>Loading...</div>
375
+ * return <div>Price Level: {JSON.stringify(data)}</div>
376
+ * }
377
+ * ```
378
+ *
379
+ * @param parameters - Parameters.
380
+ * @returns Query result with the price level information.
381
+ */
382
+ export declare function usePriceLevel<config extends Config = ResolvedRegister['config'], selectData = getPriceLevel.ReturnValue>(parameters: usePriceLevel.Parameters<config, selectData>): UseQueryReturnType<selectData, Error>;
383
+ export declare namespace usePriceLevel {
384
+ type Parameters<config extends Config = ResolvedRegister['config'], selectData = getPriceLevel.ReturnValue> = ConfigParameter<config> & QueryParameter<getPriceLevel.ReturnValue, DefaultError, selectData, getPriceLevel.QueryKey<config>> & Omit<getPriceLevel.queryOptions.Parameters<config, selectData>, 'query'>;
385
+ type ReturnValue<selectData = getPriceLevel.ReturnValue> = UseQueryReturnType<selectData, Error>;
386
+ }
387
+ /**
388
+ * Hook for getting the quote for selling a specific amount of tokens.
389
+ *
390
+ * @example
391
+ * ```tsx
392
+ * import { Hooks } from 'tempo.ts/wagmi'
393
+ *
394
+ * function App() {
395
+ * const { data, isLoading } = Hooks.dex.useSellQuote({
396
+ * amountIn: parseUnits('100', 6),
397
+ * tokenIn: '0x20c...11',
398
+ * tokenOut: '0x20c...20',
399
+ * })
400
+ *
401
+ * if (isLoading) return <div>Loading...</div>
402
+ * return <div>Expected Output: {data}</div>
403
+ * }
404
+ * ```
405
+ *
406
+ * @param parameters - Parameters.
407
+ * @returns Query result with the amount of tokenOut received.
408
+ */
409
+ export declare function useSellQuote<config extends Config = ResolvedRegister['config'], selectData = getSellQuote.ReturnValue>(parameters: useSellQuote.Parameters<config, selectData>): UseQueryReturnType<selectData, Error>;
410
+ export declare namespace useSellQuote {
411
+ type Parameters<config extends Config = ResolvedRegister['config'], selectData = getSellQuote.ReturnValue> = ConfigParameter<config> & QueryParameter<getSellQuote.ReturnValue, DefaultError, selectData, getSellQuote.QueryKey<config>> & Omit<getSellQuote.queryOptions.Parameters<config, selectData>, 'query'>;
412
+ type ReturnValue<selectData = getSellQuote.ReturnValue> = UseQueryReturnType<selectData, Error>;
413
+ }
414
+ /**
415
+ * Hook for placing a limit order on the orderbook.
416
+ *
417
+ * @example
418
+ * ```tsx
419
+ * import { Hooks } from 'tempo.ts/wagmi'
420
+ *
421
+ * function App() {
422
+ * const { mutate, isPending } = Hooks.dex.usePlace()
423
+ *
424
+ * return (
425
+ * <button
426
+ * onClick={() => mutate({
427
+ * amount: parseUnits('100', 6),
428
+ * tick: Tick.fromPrice('0.99'),
429
+ * token: '0x20c...11',
430
+ * type: 'buy',
431
+ * })}
432
+ * disabled={isPending}
433
+ * >
434
+ * Place Order
435
+ * </button>
436
+ * )
437
+ * }
438
+ * ```
439
+ *
440
+ * @param parameters - Parameters.
441
+ * @returns Mutation result.
442
+ */
443
+ export declare function usePlace<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: usePlace.Parameters<config, context>): usePlace.ReturnType<config, context>;
444
+ export declare namespace usePlace {
445
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
446
+ mutation?: UseMutationParameters<place.ReturnValue, place.ErrorType, place.Parameters<config>, context> | undefined;
447
+ };
448
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<place.ReturnValue, place.ErrorType, place.Parameters<config>, context>;
449
+ }
450
+ /**
451
+ * Hook for placing a flip order that automatically flips when filled.
452
+ *
453
+ * @example
454
+ * ```tsx
455
+ * import { Hooks } from 'tempo.ts/wagmi'
456
+ *
457
+ * function App() {
458
+ * const { mutate, isPending } = Hooks.dex.usePlaceFlip()
459
+ *
460
+ * return (
461
+ * <button
462
+ * onClick={() => mutate({
463
+ * amount: parseUnits('100', 6),
464
+ * flipTick: Tick.fromPrice('1.01'),
465
+ * tick: Tick.fromPrice('0.99'),
466
+ * token: '0x20c...11',
467
+ * type: 'buy',
468
+ * })}
469
+ * disabled={isPending}
470
+ * >
471
+ * Place Flip Order
472
+ * </button>
473
+ * )
474
+ * }
475
+ * ```
476
+ *
477
+ * @param parameters - Parameters.
478
+ * @returns Mutation result.
479
+ */
480
+ export declare function usePlaceFlip<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: usePlaceFlip.Parameters<config, context>): usePlaceFlip.ReturnType<config, context>;
481
+ export declare namespace usePlaceFlip {
482
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
483
+ mutation?: UseMutationParameters<placeFlip.ReturnValue, placeFlip.ErrorType, placeFlip.Parameters<config>, context> | undefined;
484
+ };
485
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<placeFlip.ReturnValue, placeFlip.ErrorType, placeFlip.Parameters<config>, context>;
486
+ }
487
+ /**
488
+ * Hook for placing a flip order that automatically flips when filled.
489
+ *
490
+ * Note: This is a synchronous hook that waits for the transaction
491
+ * to be included on a block before returning a response.
492
+ *
493
+ * @example
494
+ * ```tsx
495
+ * import { Hooks } from 'tempo.ts/wagmi'
496
+ *
497
+ * function App() {
498
+ * const { mutate, isPending } = Hooks.dex.usePlaceFlipSync()
499
+ *
500
+ * return (
501
+ * <button
502
+ * onClick={() => mutate({
503
+ * amount: parseUnits('100', 6),
504
+ * flipTick: Tick.fromPrice('1.01'),
505
+ * tick: Tick.fromPrice('0.99'),
506
+ * token: '0x20c...11',
507
+ * type: 'buy',
508
+ * })}
509
+ * disabled={isPending}
510
+ * >
511
+ * Place Flip Order
512
+ * </button>
513
+ * )
514
+ * }
515
+ * ```
516
+ *
517
+ * @param parameters - Parameters.
518
+ * @returns Mutation result.
519
+ */
520
+ export declare function usePlaceFlipSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: usePlaceFlipSync.Parameters<config, context>): usePlaceFlipSync.ReturnType<config, context>;
521
+ export declare namespace usePlaceFlipSync {
522
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
523
+ mutation?: UseMutationParameters<placeFlipSync.ReturnValue, placeFlipSync.ErrorType, placeFlipSync.Parameters<config>, context> | undefined;
524
+ };
525
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<placeFlipSync.ReturnValue, placeFlipSync.ErrorType, placeFlipSync.Parameters<config>, context>;
526
+ }
527
+ /**
528
+ * Hook for placing a limit order on the orderbook.
529
+ *
530
+ * Note: This is a synchronous hook that waits for the transaction
531
+ * to be included on a block before returning a response.
532
+ *
533
+ * @example
534
+ * ```tsx
535
+ * import { Hooks } from 'tempo.ts/wagmi'
536
+ *
537
+ * function App() {
538
+ * const { mutate, isPending } = Hooks.dex.usePlaceSync()
539
+ *
540
+ * return (
541
+ * <button
542
+ * onClick={() => mutate({
543
+ * amount: parseUnits('100', 6),
544
+ * tick: Tick.fromPrice('0.99'),
545
+ * token: '0x20c...11',
546
+ * type: 'buy',
547
+ * })}
548
+ * disabled={isPending}
549
+ * >
550
+ * Place Order
551
+ * </button>
552
+ * )
553
+ * }
554
+ * ```
555
+ *
556
+ * @param parameters - Parameters.
557
+ * @returns Mutation result.
558
+ */
559
+ export declare function usePlaceSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: usePlaceSync.Parameters<config, context>): usePlaceSync.ReturnType<config, context>;
560
+ export declare namespace usePlaceSync {
561
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
562
+ mutation?: UseMutationParameters<placeSync.ReturnValue, placeSync.ErrorType, placeSync.Parameters<config>, context> | undefined;
563
+ };
564
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<placeSync.ReturnValue, placeSync.ErrorType, placeSync.Parameters<config>, context>;
565
+ }
566
+ /**
567
+ * Hook for selling a specific amount of tokens.
568
+ *
569
+ * @example
570
+ * ```tsx
571
+ * import { Hooks } from 'tempo.ts/wagmi'
572
+ *
573
+ * function App() {
574
+ * const { mutate, isPending } = Hooks.dex.useSell()
575
+ *
576
+ * return (
577
+ * <button
578
+ * onClick={() => mutate({
579
+ * amountIn: parseUnits('100', 6),
580
+ * minAmountOut: parseUnits('95', 6),
581
+ * tokenIn: '0x20c...11',
582
+ * tokenOut: '0x20c...20',
583
+ * })}
584
+ * disabled={isPending}
585
+ * >
586
+ * Sell Tokens
587
+ * </button>
588
+ * )
589
+ * }
590
+ * ```
591
+ *
592
+ * @param parameters - Parameters.
593
+ * @returns Mutation result.
594
+ */
595
+ export declare function useSell<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useSell.Parameters<config, context>): useSell.ReturnType<config, context>;
596
+ export declare namespace useSell {
597
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
598
+ mutation?: UseMutationParameters<sell.ReturnValue, sell.ErrorType, sell.Parameters<config>, context> | undefined;
599
+ };
600
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<sell.ReturnValue, sell.ErrorType, sell.Parameters<config>, context>;
601
+ }
602
+ /**
603
+ * Hook for selling a specific amount of tokens.
604
+ *
605
+ * Note: This is a synchronous hook that waits for the transaction
606
+ * to be included on a block before returning a response.
607
+ *
608
+ * @example
609
+ * ```tsx
610
+ * import { Hooks } from 'tempo.ts/wagmi'
611
+ *
612
+ * function App() {
613
+ * const { mutate, isPending } = Hooks.dex.useSellSync()
614
+ *
615
+ * return (
616
+ * <button
617
+ * onClick={() => mutate({
618
+ * amountIn: parseUnits('100', 6),
619
+ * minAmountOut: parseUnits('95', 6),
620
+ * tokenIn: '0x20c...11',
621
+ * tokenOut: '0x20c...20',
622
+ * })}
623
+ * disabled={isPending}
624
+ * >
625
+ * Sell Tokens
626
+ * </button>
627
+ * )
628
+ * }
629
+ * ```
630
+ *
631
+ * @param parameters - Parameters.
632
+ * @returns Mutation result.
633
+ */
634
+ export declare function useSellSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useSellSync.Parameters<config, context>): useSellSync.ReturnType<config, context>;
635
+ export declare namespace useSellSync {
636
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
637
+ mutation?: UseMutationParameters<sellSync.ReturnValue, sellSync.ErrorType, sellSync.Parameters<config>, context> | undefined;
638
+ };
639
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<sellSync.ReturnValue, sellSync.ErrorType, sellSync.Parameters<config>, context>;
640
+ }
641
+ /**
642
+ * Hook for withdrawing tokens from the DEX to the caller's wallet.
643
+ *
644
+ * @example
645
+ * ```tsx
646
+ * import { Hooks } from 'tempo.ts/wagmi'
647
+ *
648
+ * function App() {
649
+ * const { mutate, isPending } = Hooks.dex.useWithdraw()
650
+ *
651
+ * return (
652
+ * <button
653
+ * onClick={() => mutate({
654
+ * amount: 100n,
655
+ * token: '0x20c...11',
656
+ * })}
657
+ * disabled={isPending}
658
+ * >
659
+ * Withdraw
660
+ * </button>
661
+ * )
662
+ * }
663
+ * ```
664
+ *
665
+ * @param parameters - Parameters.
666
+ * @returns Mutation result.
667
+ */
668
+ export declare function useWithdraw<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useWithdraw.Parameters<config, context>): useWithdraw.ReturnType<config, context>;
669
+ export declare namespace useWithdraw {
670
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
671
+ mutation?: UseMutationParameters<withdraw.ReturnValue, withdraw.ErrorType, withdraw.Parameters<config>, context> | undefined;
672
+ };
673
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<withdraw.ReturnValue, withdraw.ErrorType, withdraw.Parameters<config>, context>;
674
+ }
675
+ /**
676
+ * Hook for withdrawing tokens from the DEX to the caller's wallet.
677
+ *
678
+ * Note: This is a synchronous hook that waits for the transaction
679
+ * to be included on a block before returning a response.
680
+ *
681
+ * @example
682
+ * ```tsx
683
+ * import { Hooks } from 'tempo.ts/wagmi'
684
+ *
685
+ * function App() {
686
+ * const { mutate, isPending } = Hooks.dex.useWithdrawSync()
687
+ *
688
+ * return (
689
+ * <button
690
+ * onClick={() => mutate({
691
+ * amount: 100n,
692
+ * token: '0x20c...11',
693
+ * })}
694
+ * disabled={isPending}
695
+ * >
696
+ * Withdraw
697
+ * </button>
698
+ * )
699
+ * }
700
+ * ```
701
+ *
702
+ * @param parameters - Parameters.
703
+ * @returns Mutation result.
704
+ */
705
+ export declare function useWithdrawSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useWithdrawSync.Parameters<config, context>): useWithdrawSync.ReturnType<config, context>;
706
+ export declare namespace useWithdrawSync {
707
+ type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
708
+ mutation?: UseMutationParameters<withdrawSync.ReturnValue, withdrawSync.ErrorType, withdrawSync.Parameters<config>, context> | undefined;
709
+ };
710
+ type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<withdrawSync.ReturnValue, withdrawSync.ErrorType, withdrawSync.Parameters<config>, context>;
711
+ }
712
+ /**
713
+ * Hook for watching flip order placement events on the DEX.
714
+ *
715
+ * @example
716
+ * ```tsx
717
+ * import { Hooks } from 'tempo.ts/wagmi'
718
+ *
719
+ * function App() {
720
+ * Hooks.dex.useWatchFlipOrderPlaced({
721
+ * onFlipOrderPlaced(args) {
722
+ * console.log('Flip order placed:', args)
723
+ * },
724
+ * })
725
+ *
726
+ * return <div>Watching for flip order placements...</div>
727
+ * }
728
+ * ```
729
+ *
730
+ * @param parameters - Parameters.
731
+ */
732
+ export declare function useWatchFlipOrderPlaced<config extends Config = ResolvedRegister['config']>(parameters?: useWatchFlipOrderPlaced.Parameters<config>): void;
733
+ export declare namespace useWatchFlipOrderPlaced {
734
+ type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<watchFlipOrderPlaced.Parameters<config>> & ConfigParameter<config> & {
735
+ enabled?: boolean | undefined;
736
+ }>;
737
+ }
738
+ /**
739
+ * Hook for watching order cancellation events on the DEX.
740
+ *
741
+ * @example
742
+ * ```tsx
743
+ * import { Hooks } from 'tempo.ts/wagmi'
744
+ *
745
+ * function App() {
746
+ * Hooks.dex.useWatchOrderCancelled({
747
+ * onOrderCancelled(args) {
748
+ * console.log('Order cancelled:', args)
749
+ * },
750
+ * })
751
+ *
752
+ * return <div>Watching for order cancellations...</div>
753
+ * }
754
+ * ```
755
+ *
756
+ * @param parameters - Parameters.
757
+ */
758
+ export declare function useWatchOrderCancelled<config extends Config = ResolvedRegister['config']>(parameters?: useWatchOrderCancelled.Parameters<config>): void;
759
+ export declare namespace useWatchOrderCancelled {
760
+ type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<watchOrderCancelled.Parameters<config>> & ConfigParameter<config> & {
761
+ enabled?: boolean | undefined;
762
+ }>;
763
+ }
764
+ /**
765
+ * Hook for watching order filled events on the DEX.
766
+ *
767
+ * @example
768
+ * ```tsx
769
+ * import { Hooks } from 'tempo.ts/wagmi'
770
+ *
771
+ * function App() {
772
+ * Hooks.dex.useWatchOrderFilled({
773
+ * onOrderFilled(args) {
774
+ * console.log('Order filled:', args)
775
+ * },
776
+ * })
777
+ *
778
+ * return <div>Watching for order fills...</div>
779
+ * }
780
+ * ```
781
+ *
782
+ * @param parameters - Parameters.
783
+ */
784
+ export declare function useWatchOrderFilled<config extends Config = ResolvedRegister['config']>(parameters?: useWatchOrderFilled.Parameters<config>): void;
785
+ export declare namespace useWatchOrderFilled {
786
+ type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<watchOrderFilled.Parameters<config>> & ConfigParameter<config> & {
787
+ enabled?: boolean | undefined;
788
+ }>;
789
+ }
790
+ /**
791
+ * Hook for watching order placement events on the DEX.
792
+ *
793
+ * @example
794
+ * ```tsx
795
+ * import { Hooks } from 'tempo.ts/wagmi'
796
+ *
797
+ * function App() {
798
+ * Hooks.dex.useWatchOrderPlaced({
799
+ * onOrderPlaced(args) {
800
+ * console.log('Order placed:', args)
801
+ * },
802
+ * })
803
+ *
804
+ * return <div>Watching for order placements...</div>
805
+ * }
806
+ * ```
807
+ *
808
+ * @param parameters - Parameters.
809
+ */
810
+ export declare function useWatchOrderPlaced<config extends Config = ResolvedRegister['config']>(parameters?: useWatchOrderPlaced.Parameters<config>): void;
811
+ export declare namespace useWatchOrderPlaced {
812
+ type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<watchOrderPlaced.Parameters<config>> & ConfigParameter<config> & {
813
+ enabled?: boolean | undefined;
814
+ }>;
815
+ }
816
+ //# sourceMappingURL=dex.d.ts.map