@luxexchange/api 1.0.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 (336) hide show
  1. package/.depcheckrc +17 -0
  2. package/.eslintrc.js +30 -0
  3. package/README.md +5 -0
  4. package/package.json +74 -0
  5. package/project.json +94 -0
  6. package/scripts/fixGraphQLApiTypes.mts +91 -0
  7. package/scripts/modifyTradingApiTypes.mts +232 -0
  8. package/src/client.ts +66 -0
  9. package/src/clients/auctions/createAuctionServiceClient.ts +44 -0
  10. package/src/clients/base/SharedQueryClient.ts +25 -0
  11. package/src/clients/base/auth.ts +43 -0
  12. package/src/clients/base/createFetchClient.ts +133 -0
  13. package/src/clients/base/errors.ts +32 -0
  14. package/src/clients/base/types.ts +26 -0
  15. package/src/clients/base/urls.test.ts +297 -0
  16. package/src/clients/base/urls.ts +85 -0
  17. package/src/clients/base/utils.test.ts +131 -0
  18. package/src/clients/base/utils.ts +54 -0
  19. package/src/clients/blockaid/createBlockaidApiClient.ts +185 -0
  20. package/src/clients/blockaid/types.ts +495 -0
  21. package/src/clients/content/types.ts +22 -0
  22. package/src/clients/conversionTracking/api-ConversionProxyService_connectquery.ts +20 -0
  23. package/src/clients/conversionTracking/api_connect.ts +24 -0
  24. package/src/clients/conversionTracking/api_pb.ts +184 -0
  25. package/src/clients/conversionTracking/index.ts +4 -0
  26. package/src/clients/data/createDataServiceApiClient.ts +101 -0
  27. package/src/clients/dataApi/createDataApiServiceClient.ts +29 -0
  28. package/src/clients/dataApi/getGetPortfolioQueryOptions.test.ts +122 -0
  29. package/src/clients/dataApi/getGetPortfolioQueryOptions.ts +76 -0
  30. package/src/clients/embeddedWallet/createEmbeddedWalletApiClient.ts +325 -0
  31. package/src/clients/for/createForApiClient.ts +187 -0
  32. package/src/clients/for/types.ts +39 -0
  33. package/src/clients/for/utils.ts +13 -0
  34. package/src/clients/graphql/__generated__/operations.ts +605 -0
  35. package/src/clients/graphql/__generated__/react-hooks.ts +4245 -0
  36. package/src/clients/graphql/__generated__/resolvers.ts +1469 -0
  37. package/src/clients/graphql/__generated__/schema-types.ts +2099 -0
  38. package/src/clients/graphql/codegen.config.ts +50 -0
  39. package/src/clients/graphql/fragments.ts +96 -0
  40. package/src/clients/graphql/generated.ts +5 -0
  41. package/src/clients/graphql/queries.graphql +1028 -0
  42. package/src/clients/graphql/queries.ts +19 -0
  43. package/src/clients/graphql/schema.graphql +1585 -0
  44. package/src/clients/graphql/types.ts +9 -0
  45. package/src/clients/graphql/utils.ts +21 -0
  46. package/src/clients/graphql/web/LuxPrices.graphql +18 -0
  47. package/src/clients/graphql/web/RecentTokenTransfers.graphql +93 -0
  48. package/src/clients/graphql/web/SimpleToken.graphql +12 -0
  49. package/src/clients/graphql/web/TokenSpotPrice.graphql +19 -0
  50. package/src/clients/graphql/web/activity.graphql +272 -0
  51. package/src/clients/graphql/web/allV3Ticks.graphql +11 -0
  52. package/src/clients/graphql/web/allV4Ticks.graphql +11 -0
  53. package/src/clients/graphql/web/feeTierDistribution.graphql +7 -0
  54. package/src/clients/graphql/web/landing.graphql +38 -0
  55. package/src/clients/graphql/web/latestSubgraphBlock.graphql +3 -0
  56. package/src/clients/graphql/web/nft/CollectionSearch.graphql +34 -0
  57. package/src/clients/graphql/web/nft/NftBalance.graphql +109 -0
  58. package/src/clients/graphql/web/pool.graphql +199 -0
  59. package/src/clients/graphql/web/poolTransactions.graphql +84 -0
  60. package/src/clients/graphql/web/portfolios.graphql +68 -0
  61. package/src/clients/graphql/web/token.graphql +97 -0
  62. package/src/clients/graphql/web/tokenCharts.graphql +85 -0
  63. package/src/clients/graphql/web/tokenTransactions.graphql +25 -0
  64. package/src/clients/graphql/web/topPools.graphql +78 -0
  65. package/src/clients/graphql/web/transactions.graphql +56 -0
  66. package/src/clients/jupiter/createJupiterApiClient.ts +42 -0
  67. package/src/clients/jupiter/types.ts +92 -0
  68. package/src/clients/jupiter/utils.ts +27 -0
  69. package/src/clients/liquidity/createAuctionMutationClient.ts +41 -0
  70. package/src/clients/liquidity/createLiquidityServiceClient.ts +56 -0
  71. package/src/clients/lux/createLuxApiClient.ts +100 -0
  72. package/src/clients/notifications/createNotificationsApiClient.ts +72 -0
  73. package/src/clients/notifications/types.ts +102 -0
  74. package/src/clients/trading/__generated__/core/ApiError.ts +25 -0
  75. package/src/clients/trading/__generated__/core/ApiRequestOptions.ts +17 -0
  76. package/src/clients/trading/__generated__/core/ApiResult.ts +11 -0
  77. package/src/clients/trading/__generated__/core/CancelablePromise.ts +131 -0
  78. package/src/clients/trading/__generated__/core/OpenAPI.ts +32 -0
  79. package/src/clients/trading/__generated__/core/request.ts +322 -0
  80. package/src/clients/trading/__generated__/index.ts +221 -0
  81. package/src/clients/trading/__generated__/models/Address.ts +5 -0
  82. package/src/clients/trading/__generated__/models/AggregatedOutput.ts +20 -0
  83. package/src/clients/trading/__generated__/models/ApprovalRequest.ts +25 -0
  84. package/src/clients/trading/__generated__/models/ApprovalResponse.ts +18 -0
  85. package/src/clients/trading/__generated__/models/AutoSlippage.ts +14 -0
  86. package/src/clients/trading/__generated__/models/BridgeQuote.ts +55 -0
  87. package/src/clients/trading/__generated__/models/ChainDelegationMap.ts +9 -0
  88. package/src/clients/trading/__generated__/models/ChainId.ts +29 -0
  89. package/src/clients/trading/__generated__/models/ChainedQuote.ts +63 -0
  90. package/src/clients/trading/__generated__/models/CheckApprovalLPRequest.ts +35 -0
  91. package/src/clients/trading/__generated__/models/CheckApprovalLPResponse.ts +29 -0
  92. package/src/clients/trading/__generated__/models/ClaimLPFeesRequest.ts +20 -0
  93. package/src/clients/trading/__generated__/models/ClaimLPFeesResponse.ts +13 -0
  94. package/src/clients/trading/__generated__/models/ClaimLPRewardsRequest.ts +19 -0
  95. package/src/clients/trading/__generated__/models/ClaimLPRewardsResponse.ts +13 -0
  96. package/src/clients/trading/__generated__/models/ClassicGasUseEstimateUSD.ts +8 -0
  97. package/src/clients/trading/__generated__/models/ClassicInput.ts +11 -0
  98. package/src/clients/trading/__generated__/models/ClassicOutput.ts +13 -0
  99. package/src/clients/trading/__generated__/models/ClassicQuote.ts +69 -0
  100. package/src/clients/trading/__generated__/models/ClientContext.ts +18 -0
  101. package/src/clients/trading/__generated__/models/CosignerData.ts +21 -0
  102. package/src/clients/trading/__generated__/models/CreateLPPositionRequest.ts +40 -0
  103. package/src/clients/trading/__generated__/models/CreateLPPositionResponse.ts +21 -0
  104. package/src/clients/trading/__generated__/models/CreatePlanRequest.ts +23 -0
  105. package/src/clients/trading/__generated__/models/CreateSendRequest.ts +22 -0
  106. package/src/clients/trading/__generated__/models/CreateSendResponse.ts +18 -0
  107. package/src/clients/trading/__generated__/models/CreateSwap5792Request.ts +17 -0
  108. package/src/clients/trading/__generated__/models/CreateSwap5792Response.ts +17 -0
  109. package/src/clients/trading/__generated__/models/CreateSwap7702Request.ts +21 -0
  110. package/src/clients/trading/__generated__/models/CreateSwap7702Response.ts +13 -0
  111. package/src/clients/trading/__generated__/models/CreateSwapRequest.ts +42 -0
  112. package/src/clients/trading/__generated__/models/CreateSwapResponse.ts +16 -0
  113. package/src/clients/trading/__generated__/models/Curve.ts +9 -0
  114. package/src/clients/trading/__generated__/models/DEXOrder.ts +35 -0
  115. package/src/clients/trading/__generated__/models/DecreaseLPPositionRequest.ts +33 -0
  116. package/src/clients/trading/__generated__/models/DecreaseLPPositionResponse.ts +19 -0
  117. package/src/clients/trading/__generated__/models/DelegationDetails.ts +19 -0
  118. package/src/clients/trading/__generated__/models/Distributor.ts +10 -0
  119. package/src/clients/trading/__generated__/models/DutchInput.ts +13 -0
  120. package/src/clients/trading/__generated__/models/DutchInputV3.ts +15 -0
  121. package/src/clients/trading/__generated__/models/DutchOrderInfo.ts +41 -0
  122. package/src/clients/trading/__generated__/models/DutchOrderInfoV2.ts +27 -0
  123. package/src/clients/trading/__generated__/models/DutchOrderInfoV3.ts +28 -0
  124. package/src/clients/trading/__generated__/models/DutchOutput.ts +15 -0
  125. package/src/clients/trading/__generated__/models/DutchOutputV3.ts +18 -0
  126. package/src/clients/trading/__generated__/models/DutchQuote.ts +27 -0
  127. package/src/clients/trading/__generated__/models/DutchQuoteV2.ts +28 -0
  128. package/src/clients/trading/__generated__/models/DutchQuoteV3.ts +30 -0
  129. package/src/clients/trading/__generated__/models/Encode7702ResponseBody.ts +11 -0
  130. package/src/clients/trading/__generated__/models/Err400.ts +9 -0
  131. package/src/clients/trading/__generated__/models/Err401.ts +9 -0
  132. package/src/clients/trading/__generated__/models/Err404.ts +17 -0
  133. package/src/clients/trading/__generated__/models/Err422.ts +9 -0
  134. package/src/clients/trading/__generated__/models/Err429.ts +9 -0
  135. package/src/clients/trading/__generated__/models/Err500.ts +9 -0
  136. package/src/clients/trading/__generated__/models/Err504.ts +9 -0
  137. package/src/clients/trading/__generated__/models/GasStrategy.ts +46 -0
  138. package/src/clients/trading/__generated__/models/GetOrdersResponse.ts +12 -0
  139. package/src/clients/trading/__generated__/models/GetSwappableTokensResponse.ts +29 -0
  140. package/src/clients/trading/__generated__/models/GetSwapsResponse.ts +18 -0
  141. package/src/clients/trading/__generated__/models/HooksOptions.ts +12 -0
  142. package/src/clients/trading/__generated__/models/IncreaseLPPositionRequest.ts +39 -0
  143. package/src/clients/trading/__generated__/models/IncreaseLPPositionResponse.ts +21 -0
  144. package/src/clients/trading/__generated__/models/IndependentToken.ts +8 -0
  145. package/src/clients/trading/__generated__/models/IndicativeQuoteRequest.ts +18 -0
  146. package/src/clients/trading/__generated__/models/IndicativeQuoteResponse.ts +14 -0
  147. package/src/clients/trading/__generated__/models/IndicativeQuoteToken.ts +13 -0
  148. package/src/clients/trading/__generated__/models/LimitOrderQuoteRequest.ts +22 -0
  149. package/src/clients/trading/__generated__/models/LimitOrderQuoteResponse.ts +19 -0
  150. package/src/clients/trading/__generated__/models/MigrateLPPositionRequest.ts +41 -0
  151. package/src/clients/trading/__generated__/models/MigrateLPPositionResponse.ts +13 -0
  152. package/src/clients/trading/__generated__/models/NullablePermit.ts +13 -0
  153. package/src/clients/trading/__generated__/models/OrderIds.ts +5 -0
  154. package/src/clients/trading/__generated__/models/OrderInput.ts +13 -0
  155. package/src/clients/trading/__generated__/models/OrderOutput.ts +16 -0
  156. package/src/clients/trading/__generated__/models/OrderRequest.ts +17 -0
  157. package/src/clients/trading/__generated__/models/OrderResponse.ts +13 -0
  158. package/src/clients/trading/__generated__/models/OrderStatus.ts +23 -0
  159. package/src/clients/trading/__generated__/models/OrderType.ts +11 -0
  160. package/src/clients/trading/__generated__/models/OrderTypeQuery.ts +12 -0
  161. package/src/clients/trading/__generated__/models/Permit.ts +13 -0
  162. package/src/clients/trading/__generated__/models/PermitAmount.ts +11 -0
  163. package/src/clients/trading/__generated__/models/PlanResponse.ts +75 -0
  164. package/src/clients/trading/__generated__/models/PlanStatus.ts +14 -0
  165. package/src/clients/trading/__generated__/models/PlanStep.ts +59 -0
  166. package/src/clients/trading/__generated__/models/PlanStepMethod.ts +12 -0
  167. package/src/clients/trading/__generated__/models/PlanStepPayloadType.ts +12 -0
  168. package/src/clients/trading/__generated__/models/PlanStepProof.ts +20 -0
  169. package/src/clients/trading/__generated__/models/PlanStepStatus.ts +14 -0
  170. package/src/clients/trading/__generated__/models/PlanStepType.ts +23 -0
  171. package/src/clients/trading/__generated__/models/Pool.ts +15 -0
  172. package/src/clients/trading/__generated__/models/PoolInfoRequest.ts +20 -0
  173. package/src/clients/trading/__generated__/models/PoolInfoResponse.ts +16 -0
  174. package/src/clients/trading/__generated__/models/PoolInformation.ts +44 -0
  175. package/src/clients/trading/__generated__/models/PoolParameters.ts +19 -0
  176. package/src/clients/trading/__generated__/models/PoolReferenceByProtocol.ts +12 -0
  177. package/src/clients/trading/__generated__/models/Position.ts +11 -0
  178. package/src/clients/trading/__generated__/models/PriorityInput.ts +12 -0
  179. package/src/clients/trading/__generated__/models/PriorityOrderInfo.ts +29 -0
  180. package/src/clients/trading/__generated__/models/PriorityOutput.ts +17 -0
  181. package/src/clients/trading/__generated__/models/PriorityQuote.ts +31 -0
  182. package/src/clients/trading/__generated__/models/ProtocolItems.ts +15 -0
  183. package/src/clients/trading/__generated__/models/Protocols.ts +9 -0
  184. package/src/clients/trading/__generated__/models/Quote.ts +14 -0
  185. package/src/clients/trading/__generated__/models/QuoteRequest.ts +41 -0
  186. package/src/clients/trading/__generated__/models/QuoteResponse.ts +19 -0
  187. package/src/clients/trading/__generated__/models/RequestId.ts +8 -0
  188. package/src/clients/trading/__generated__/models/Routing.ts +20 -0
  189. package/src/clients/trading/__generated__/models/RoutingPreference.ts +16 -0
  190. package/src/clients/trading/__generated__/models/SafetyLevel.ts +10 -0
  191. package/src/clients/trading/__generated__/models/ScopeData.ts +28 -0
  192. package/src/clients/trading/__generated__/models/SettledAmount.ts +14 -0
  193. package/src/clients/trading/__generated__/models/SortKey.ts +7 -0
  194. package/src/clients/trading/__generated__/models/SpreadOptimization.ts +11 -0
  195. package/src/clients/trading/__generated__/models/StepUpdate.ts +25 -0
  196. package/src/clients/trading/__generated__/models/SwapSafetyMode.ts +10 -0
  197. package/src/clients/trading/__generated__/models/SwapStatus.ts +11 -0
  198. package/src/clients/trading/__generated__/models/TokenInRoute.ts +20 -0
  199. package/src/clients/trading/__generated__/models/TokenProject.ts +13 -0
  200. package/src/clients/trading/__generated__/models/TokenProjectLogo.ts +8 -0
  201. package/src/clients/trading/__generated__/models/TradeType.ts +11 -0
  202. package/src/clients/trading/__generated__/models/TransactionFailureReason.ts +11 -0
  203. package/src/clients/trading/__generated__/models/TransactionHash.ts +8 -0
  204. package/src/clients/trading/__generated__/models/TransactionRequest.ts +29 -0
  205. package/src/clients/trading/__generated__/models/TransactionRequest5792.ts +25 -0
  206. package/src/clients/trading/__generated__/models/TruncatedPlanStep.ts +21 -0
  207. package/src/clients/trading/__generated__/models/UniversalRouterVersion.ts +8 -0
  208. package/src/clients/trading/__generated__/models/UpdatePlanRequest.ts +12 -0
  209. package/src/clients/trading/__generated__/models/Urgency.ts +12 -0
  210. package/src/clients/trading/__generated__/models/V2PoolInRoute.ts +19 -0
  211. package/src/clients/trading/__generated__/models/V2Reserve.ts +16 -0
  212. package/src/clients/trading/__generated__/models/V3PoolInRoute.ts +24 -0
  213. package/src/clients/trading/__generated__/models/V4PoolInRoute.ts +30 -0
  214. package/src/clients/trading/__generated__/models/WalletCheckDelegationRequestBody.ts +17 -0
  215. package/src/clients/trading/__generated__/models/WalletCheckDelegationResponseBody.ts +14 -0
  216. package/src/clients/trading/__generated__/models/WalletEncode7702RequestBody.ts +21 -0
  217. package/src/clients/trading/__generated__/models/WalletExecutionContext.ts +17 -0
  218. package/src/clients/trading/__generated__/models/WalletInfo.ts +22 -0
  219. package/src/clients/trading/__generated__/models/WalletProperties.ts +12 -0
  220. package/src/clients/trading/__generated__/models/WrapUnwrapQuote.ts +31 -0
  221. package/src/clients/trading/__generated__/models/additionalValidationContract.ts +9 -0
  222. package/src/clients/trading/__generated__/models/additionalValidationData.ts +9 -0
  223. package/src/clients/trading/__generated__/models/bps.ts +8 -0
  224. package/src/clients/trading/__generated__/models/bpsFee.ts +8 -0
  225. package/src/clients/trading/__generated__/models/bridgeTokenInChainIdParam.ts +6 -0
  226. package/src/clients/trading/__generated__/models/chainIdParam.ts +6 -0
  227. package/src/clients/trading/__generated__/models/claimerWalletAddress.ts +8 -0
  228. package/src/clients/trading/__generated__/models/contractAddress.ts +8 -0
  229. package/src/clients/trading/__generated__/models/cosignerAddress.ts +8 -0
  230. package/src/clients/trading/__generated__/models/cursorParam.ts +5 -0
  231. package/src/clients/trading/__generated__/models/deadline.ts +8 -0
  232. package/src/clients/trading/__generated__/models/encodedOrder.ts +8 -0
  233. package/src/clients/trading/__generated__/models/endAmount.ts +8 -0
  234. package/src/clients/trading/__generated__/models/erc20EthEnabledHeader.ts +8 -0
  235. package/src/clients/trading/__generated__/models/fillerParam.ts +9 -0
  236. package/src/clients/trading/__generated__/models/gasFee.ts +8 -0
  237. package/src/clients/trading/__generated__/models/gasFeeInCurrency.ts +8 -0
  238. package/src/clients/trading/__generated__/models/gasFeeUSD.ts +8 -0
  239. package/src/clients/trading/__generated__/models/gasLimit.ts +8 -0
  240. package/src/clients/trading/__generated__/models/gasPrice.ts +8 -0
  241. package/src/clients/trading/__generated__/models/generatePermitAsTransaction.ts +8 -0
  242. package/src/clients/trading/__generated__/models/includeGasInfo.ts +8 -0
  243. package/src/clients/trading/__generated__/models/inputToken.ts +8 -0
  244. package/src/clients/trading/__generated__/models/isSpam.ts +8 -0
  245. package/src/clients/trading/__generated__/models/limitParam.ts +5 -0
  246. package/src/clients/trading/__generated__/models/liquidity.ts +8 -0
  247. package/src/clients/trading/__generated__/models/lpPoolFee.ts +8 -0
  248. package/src/clients/trading/__generated__/models/lpTickCurrent.ts +8 -0
  249. package/src/clients/trading/__generated__/models/maxFeePerGas.ts +8 -0
  250. package/src/clients/trading/__generated__/models/maxPriorityFeePerGas.ts +8 -0
  251. package/src/clients/trading/__generated__/models/minAmount.ts +8 -0
  252. package/src/clients/trading/__generated__/models/nonce.ts +8 -0
  253. package/src/clients/trading/__generated__/models/orderId.ts +8 -0
  254. package/src/clients/trading/__generated__/models/orderIdParam.ts +6 -0
  255. package/src/clients/trading/__generated__/models/orderIdsParam.ts +9 -0
  256. package/src/clients/trading/__generated__/models/orderStatusParam.ts +9 -0
  257. package/src/clients/trading/__generated__/models/orderTypeParam.ts +9 -0
  258. package/src/clients/trading/__generated__/models/outputToken.ts +8 -0
  259. package/src/clients/trading/__generated__/models/poolFee.ts +8 -0
  260. package/src/clients/trading/__generated__/models/portionAmount.ts +8 -0
  261. package/src/clients/trading/__generated__/models/portionAmountReceiverAddress.ts +8 -0
  262. package/src/clients/trading/__generated__/models/portionBips.ts +8 -0
  263. package/src/clients/trading/__generated__/models/quoteId.ts +8 -0
  264. package/src/clients/trading/__generated__/models/receiverWalletAddress.ts +8 -0
  265. package/src/clients/trading/__generated__/models/senderWalletAddress.ts +8 -0
  266. package/src/clients/trading/__generated__/models/slippageTolerance.ts +14 -0
  267. package/src/clients/trading/__generated__/models/sortKeyParam.ts +9 -0
  268. package/src/clients/trading/__generated__/models/sortParam.ts +8 -0
  269. package/src/clients/trading/__generated__/models/sqrtRatioX96.ts +8 -0
  270. package/src/clients/trading/__generated__/models/startAmount.ts +8 -0
  271. package/src/clients/trading/__generated__/models/swapperParam.ts +9 -0
  272. package/src/clients/trading/__generated__/models/tickCurrent.ts +8 -0
  273. package/src/clients/trading/__generated__/models/tickSpacing.ts +8 -0
  274. package/src/clients/trading/__generated__/models/tokenAmount.ts +8 -0
  275. package/src/clients/trading/__generated__/models/tokenInParam.ts +6 -0
  276. package/src/clients/trading/__generated__/models/tokenSymbol.ts +8 -0
  277. package/src/clients/trading/__generated__/models/transactionHashesParam.ts +9 -0
  278. package/src/clients/trading/__generated__/models/universalRouterVersionHeader.ts +9 -0
  279. package/src/clients/trading/__generated__/services/ApprovalService.ts +39 -0
  280. package/src/clients/trading/__generated__/services/DefaultService.ts +46 -0
  281. package/src/clients/trading/__generated__/services/IndicativeQuoteService.ts +39 -0
  282. package/src/clients/trading/__generated__/services/LimitOrderQuoteService.ts +37 -0
  283. package/src/clients/trading/__generated__/services/LiquidityService.ts +239 -0
  284. package/src/clients/trading/__generated__/services/OrderService.ts +131 -0
  285. package/src/clients/trading/__generated__/services/PlanService.ts +76 -0
  286. package/src/clients/trading/__generated__/services/QuoteService.ts +58 -0
  287. package/src/clients/trading/__generated__/services/SendService.ts +37 -0
  288. package/src/clients/trading/__generated__/services/SwapService.ts +161 -0
  289. package/src/clients/trading/__generated__/services/SwappableTokensService.ts +42 -0
  290. package/src/clients/trading/__generated__/services/WalletCheckDelegationService.ts +37 -0
  291. package/src/clients/trading/__generated__/services/WalletEncode7702Service.ts +37 -0
  292. package/src/clients/trading/api.json +1 -0
  293. package/src/clients/trading/createTradingApiClient.ts +328 -0
  294. package/src/clients/trading/tradeTypes.ts +51 -0
  295. package/src/clients/trading/types.ts +72 -0
  296. package/src/clients/unitags/createUnitagsApiClient.test.ts +438 -0
  297. package/src/clients/unitags/createUnitagsApiClient.ts +214 -0
  298. package/src/clients/unitags/types.ts +122 -0
  299. package/src/components/ApiInit.test.tsx +364 -0
  300. package/src/components/ApiInit.tsx +71 -0
  301. package/src/connectRpc/base.ts +33 -0
  302. package/src/connectRpc/utils.ts +136 -0
  303. package/src/getEntryGatewayUrl.ts +46 -0
  304. package/src/getWebSocketUrl.ts +28 -0
  305. package/src/global.d.ts +2 -0
  306. package/src/hooks/index.ts +6 -0
  307. package/src/hooks/shared/types.ts +10 -0
  308. package/src/hooks/shared/useQueryWithImmediateGarbageCollection.ts +90 -0
  309. package/src/hooks/use-token-list.ts +52 -0
  310. package/src/hooks/use-token-price.ts +82 -0
  311. package/src/hooks/useIsSessionInitialized.ts +17 -0
  312. package/src/index.ts +318 -0
  313. package/src/provideDeviceIdService.ts +25 -0
  314. package/src/provideLuxIdentifierService.ts +25 -0
  315. package/src/provideSessionService.native.ts +46 -0
  316. package/src/provideSessionService.ts +13 -0
  317. package/src/provideSessionService.web.ts +87 -0
  318. package/src/provideSessionStorage.ts +21 -0
  319. package/src/session/createSessionTransport.test.ts +79 -0
  320. package/src/session/createSessionTransport.ts +107 -0
  321. package/src/session/createWithSessionRetry.ts +33 -0
  322. package/src/session/index.ts +12 -0
  323. package/src/storage/createExtensionStorageDriver.ts +29 -0
  324. package/src/storage/createNativeStorageDriver.ts +19 -0
  325. package/src/storage/createWebStorageDriver.ts +17 -0
  326. package/src/storage/getStorageDriver.native.ts +6 -0
  327. package/src/storage/getStorageDriver.ts +8 -0
  328. package/src/storage/getStorageDriver.web.ts +11 -0
  329. package/src/storage/types.ts +9 -0
  330. package/src/transport.ts +85 -0
  331. package/stubs/privy-service-connect.d.ts +3 -0
  332. package/stubs/privy-service-pb.d.ts +60 -0
  333. package/tsconfig.json +37 -0
  334. package/tsconfig.lint.json +8 -0
  335. package/tsconfig.spec.json +8 -0
  336. package/vitest.config.ts +14 -0
@@ -0,0 +1,1585 @@
1
+ """This directive allows results to be deferred during execution"""
2
+ directive @defer on FIELD
3
+
4
+ """
5
+ Tells the service which subscriptions will be published to when this mutation is
6
+ called. This directive is deprecated use @aws_susbscribe directive instead.
7
+ """
8
+ directive @aws_publish(
9
+ """
10
+ List of subscriptions which will be published to when this mutation is called.
11
+ """
12
+ subscriptions: [String]
13
+ ) on FIELD_DEFINITION
14
+
15
+ """
16
+ Tells the service this field/object has access authorized by an API key.
17
+ """
18
+ directive @aws_api_key on OBJECT | FIELD_DEFINITION
19
+
20
+ """
21
+ Tells the service this field/object has access authorized by an OIDC token.
22
+ """
23
+ directive @aws_oidc on OBJECT | FIELD_DEFINITION
24
+
25
+ """Directs the schema to enforce authorization on a field"""
26
+ directive @aws_auth(
27
+ """List of cognito user pool groups which have access on this field"""
28
+ cognito_groups: [String]
29
+ ) on FIELD_DEFINITION
30
+
31
+ """Tells the service which mutation triggers this subscription."""
32
+ directive @aws_subscribe(
33
+ """
34
+ List of mutations which will trigger this subscription when they are called.
35
+ """
36
+ mutations: [String]
37
+ ) on FIELD_DEFINITION
38
+
39
+ """
40
+ Tells the service this field/object has access authorized by a Lambda Authorizer.
41
+ """
42
+ directive @aws_lambda on OBJECT | FIELD_DEFINITION
43
+
44
+ """
45
+ Tells the service this field/object has access authorized by a Cognito User Pools token.
46
+ """
47
+ directive @aws_cognito_user_pools(
48
+ """List of cognito user pool groups which have access on this field"""
49
+ cognito_groups: [String]
50
+ ) on OBJECT | FIELD_DEFINITION
51
+
52
+ """
53
+ Tells the service this field/object has access authorized by sigv4 signing.
54
+ """
55
+ directive @aws_iam on OBJECT | FIELD_DEFINITION
56
+
57
+ """
58
+ Types, unions, and inputs (alphabetized):
59
+ These are colocated to highlight the relationship between some types and their inputs.
60
+ """
61
+ union ActivityDetails = TransactionDetails | SwapOrderDetails | OnRampTransactionDetails | OffRampTransactionDetails
62
+
63
+ input ActivityDetailsInput {
64
+ transactionDetails: TransactionDetailsInput
65
+ swapOrderDetails: SwapOrderDetailsInput
66
+ onRampTransactionDetails: OnRampTransactionDetailsInput
67
+ offRampTransactionDetails: OffRampTransactionDetailsInput
68
+ }
69
+
70
+ """
71
+ Enums (alphabetized):
72
+ deprecated and replaced with TransactionType, please do not use this
73
+ """
74
+ enum ActivityType {
75
+ APPROVE
76
+ CANCEL
77
+ CLAIM
78
+ SEND
79
+ RECEIVE
80
+ SWAP
81
+ DEPLOYMENT
82
+ UNKNOWN
83
+ money
84
+ market
85
+ LEND
86
+ BORROW
87
+ REPAY
88
+ WITHDRAW
89
+ NFT
90
+ MINT
91
+ BURN
92
+ Staking
93
+ STAKE
94
+ UNSTAKE
95
+ SWAP_ORDER
96
+ ON_RAMP
97
+ OFF_RAMP
98
+ }
99
+
100
+ type Amount implements IAmount {
101
+ id: ID!
102
+ currency: Currency
103
+ value: Float!
104
+ }
105
+
106
+ type AmountChange {
107
+ id: ID!
108
+ percentage: Amount
109
+ absolute: Amount
110
+ }
111
+
112
+ input AmountInput {
113
+ currency: Currency
114
+ value: Float!
115
+ }
116
+
117
+ type ApplicationContract implements IContract {
118
+ id: ID!
119
+ chain: Chain!
120
+ address: String!
121
+ name: String
122
+ icon: Image
123
+ }
124
+
125
+ input ApplicationContractInput {
126
+ chain: Chain!
127
+ address: String!
128
+ name: String
129
+ icon: ImageInput
130
+ }
131
+
132
+ type AssetActivity {
133
+ id: ID!
134
+ timestamp: Int!
135
+ type: ActivityType! @deprecated(reason: "use type field in details")
136
+ chain: Chain!
137
+ gasUsed: Float @deprecated(reason: "not required, remove usage")
138
+ transaction: Transaction! @deprecated(reason: "use fields from details")
139
+ assetChanges: [AssetChange]! @deprecated(reason: "use assetChanges field in details")
140
+ details: ActivityDetails!
141
+ addresses: [String!]
142
+ }
143
+
144
+ input AssetActivityInput {
145
+ timestamp: Int!
146
+ chain: Chain!
147
+ details: ActivityDetailsInput!
148
+ }
149
+
150
+ enum AssetActivitySwitch {
151
+ ALTERNATE
152
+ LEGACY
153
+ }
154
+
155
+ union AssetChange = TokenTransfer | NftTransfer | OnRampTransfer | TokenApproval | NftApproval | NftApproveForAll | OffRampTransfer
156
+
157
+ input AssetChangeInput {
158
+ tokenTransfer: TokenTransferInput
159
+ tokenApproval: TokenApprovalInput
160
+ nftTransfer: NftTransferInput
161
+ nftApproval: NftApprovalInput
162
+ nftApproveForAll: NftApproveForAllInput
163
+ onRampTransfer: OnRampTransferInput
164
+ offRampTransfer: OffRampTransferInput
165
+ }
166
+
167
+ """
168
+ The `AWSJSON` scalar type provided by AWS AppSync, represents a JSON string that
169
+ complies with [RFC 8259](https://tools.ietf.org/html/rfc8259). Maps like
170
+ "**{\\"upvotes\\": 10}**", lists like "**[1,2,3]**", and scalar values like
171
+ "**\\"AWSJSON example string\\"**", "**1**", and "**true**" are accepted as
172
+ valid JSON and will automatically be parsed and loaded in the resolver mapping
173
+ templates as Maps, Lists, or Scalar values rather than as the literal input
174
+ strings. Invalid JSON strings like "**{a: 1}**", "**{'a': 1}**" and "**Unquoted
175
+ string**" will throw GraphQL validation errors.
176
+ """
177
+ scalar AWSJSON
178
+
179
+ type BlockaidFees {
180
+ transfer: Float
181
+ buy: Float
182
+ sell: Float
183
+ }
184
+
185
+ type BridgedWithdrawalInfo {
186
+ chain: String!
187
+ provider: String!
188
+ url: String!
189
+ }
190
+
191
+ enum Chain {
192
+ ARBITRUM
193
+ AVALANCHE
194
+ ETHEREUM
195
+ ETHEREUM_GOERLI
196
+ ETHEREUM_SEPOLIA
197
+ OPTIMISM
198
+ POLYGON
199
+ CELO
200
+ BNB
201
+ BASE
202
+ BLAST
203
+ ZORA
204
+ ZKSYNC
205
+ UNICHAIN
206
+ SONEIUM
207
+ ASTROCHAIN_SEPOLIA
208
+ WORLDCHAIN
209
+ MONAD_TESTNET
210
+ MONAD
211
+ ARBITRUM_SEPOLIA
212
+ BASE_SEPOLIA
213
+ SOLANA
214
+ XLAYER
215
+ LUX
216
+ LUX_TESTNET
217
+ ZOO
218
+ UNKNOWN_CHAIN
219
+ }
220
+
221
+ enum CollectionSortableField {
222
+ VOLUME
223
+ }
224
+
225
+ input ContractInput {
226
+ chain: Chain!
227
+ address: String
228
+ }
229
+
230
+ enum Currency {
231
+ ARS
232
+ AUD
233
+ BRL
234
+ CAD
235
+ CNY
236
+ COP
237
+ ETH
238
+ EUR
239
+ GBP
240
+ HKD
241
+ IDR
242
+ INR
243
+ JPY
244
+ KRW
245
+ MATIC
246
+ MXN
247
+ NGN
248
+ NZD
249
+ PKR
250
+ RUB
251
+ SGD
252
+ THB
253
+ TRY
254
+ UAH
255
+ USD
256
+ VND
257
+ }
258
+
259
+ input CurrencyAmountInput {
260
+ currency: Currency!
261
+ value: Float!
262
+ }
263
+
264
+ type DescriptionTranslations {
265
+ id: ID!
266
+ descriptionZhHans: String
267
+ descriptionZhHant: String
268
+ descriptionNlNl: String
269
+ descriptionEnUs: String
270
+ descriptionFrFr: String
271
+ descriptionHiIn: String
272
+ descriptionIdId: String
273
+ descriptionJaJp: String
274
+ descriptionMsMy: String
275
+ descriptionPtPt: String
276
+ descriptionRuRu: String
277
+ descriptionEsEs: String
278
+ descriptionEs419: String
279
+ descriptionEsUs: String
280
+ descriptionThTh: String
281
+ descriptionTrTr: String
282
+ descriptionUkUa: String
283
+ descriptionUrPk: String
284
+ descriptionViVn: String
285
+ }
286
+
287
+ type Dimensions {
288
+ id: ID!
289
+ height: Float
290
+ width: Float
291
+ }
292
+
293
+ input DimensionsInput {
294
+ height: Float
295
+ width: Float
296
+ }
297
+
298
+ type FeeData {
299
+ sellFeeBps: String
300
+ buyFeeBps: String
301
+ feeTakenOnTransfer: Boolean
302
+ externalTransferFailed: Boolean
303
+ sellReverted: Boolean
304
+ }
305
+
306
+ enum HighLow {
307
+ HIGH
308
+ LOW
309
+ }
310
+
311
+ """ FIVE_MINUTE is only supported for TokenMarket.pricePercentChange"""
312
+ enum HistoryDuration {
313
+ FIVE_MINUTE
314
+ HOUR
315
+ DAY
316
+ WEEK
317
+ MONTH
318
+ YEAR
319
+ MAX
320
+ }
321
+
322
+ """ Interfaces (alphabetized):"""
323
+ interface IAmount {
324
+ currency: Currency
325
+ value: Float!
326
+ }
327
+
328
+ interface IContract {
329
+ chain: Chain!
330
+ address: String
331
+ }
332
+
333
+ type Image {
334
+ id: ID!
335
+ url: String!
336
+ dimensions: Dimensions
337
+ }
338
+
339
+ input ImageInput {
340
+ url: String!
341
+ dimensions: DimensionsInput
342
+ }
343
+
344
+ interface IPool {
345
+ id: ID!
346
+ protocolVersion: ProtocolVersion!
347
+ chain: Chain!
348
+ address: String!
349
+ createdAtTimestamp: Int
350
+ totalLiquidity: Amount
351
+ token0: Token
352
+ token0Supply: Float
353
+ token1: Token
354
+ token1Supply: Float
355
+ txCount: Int
356
+ totalLiquidityPercentChange24h: Amount
357
+ cumulativeVolume(duration: HistoryDuration!): Amount
358
+ historicalVolume(duration: HistoryDuration!): [TimestampedAmount]
359
+ priceHistory(duration: HistoryDuration!): [TimestampedPoolPrice]
360
+ transactions(first: Int!, timestampCursor: Int): [PoolTransaction]
361
+ }
362
+
363
+ enum MediaType {
364
+ VIDEO
365
+ IMAGE
366
+ RAW
367
+ AUDIO
368
+ }
369
+
370
+ type Mutation {
371
+ assetActivity(input: AssetActivityInput!): AssetActivity!
372
+ heartbeat(subscriptionId: ID!, type: SubscriptionType!): Status!
373
+ unsubscribe(subscriptionId: ID!, type: SubscriptionType!): Status!
374
+ }
375
+
376
+ type NetworkFee {
377
+ quantity: String
378
+ tokenSymbol: String
379
+ tokenAddress: String
380
+ tokenChain: String
381
+ }
382
+
383
+ type NftActivity {
384
+ id: ID!
385
+ address: String!
386
+ tokenId: String
387
+ asset: NftAsset
388
+ type: NftActivityType!
389
+ marketplace: String
390
+ fromAddress: String!
391
+ toAddress: String
392
+ transactionHash: String
393
+ price: Amount
394
+ quantity: Int
395
+ orderStatus: OrderStatus
396
+ url: String
397
+ timestamp: Int!
398
+ }
399
+
400
+ type NftActivityConnection {
401
+ pageInfo: PageInfo!
402
+ edges: [NftActivityEdge!]!
403
+ }
404
+
405
+ type NftActivityEdge {
406
+ cursor: String!
407
+ node: NftActivity!
408
+ }
409
+
410
+ input NftActivityFilterInput {
411
+ address: String
412
+ tokenId: String
413
+ activityTypes: [NftActivityType!]
414
+ }
415
+
416
+ enum NftActivityType {
417
+ LISTING
418
+ SALE
419
+ CANCEL_LISTING
420
+ TRANSFER
421
+ }
422
+
423
+ type NftApproval {
424
+ id: ID!
425
+ nftStandard: NftStandard!
426
+
427
+ """ can be erc721, erc1155, noncompliant"""
428
+ asset: NftAsset!
429
+ approvedAddress: String!
430
+ }
431
+
432
+ input NftApprovalInput {
433
+ nftStandard: NftStandard!
434
+ asset: NftAssetInput!
435
+ approvedAddress: String!
436
+ }
437
+
438
+ type NftApproveForAll {
439
+ id: ID!
440
+ nftStandard: NftStandard!
441
+
442
+ """ can be erc721, erc1155, noncompliant"""
443
+ asset: NftAsset!
444
+ operatorAddress: String!
445
+ approved: Boolean!
446
+ }
447
+
448
+ input NftApproveForAllInput {
449
+ nftStandard: NftStandard!
450
+ asset: NftAssetInput!
451
+ operatorAddress: String!
452
+ approved: Boolean!
453
+ }
454
+
455
+ type NftAsset {
456
+ id: ID!
457
+ collection: NftCollection
458
+ description: String
459
+ imageUrl: String @deprecated
460
+ thumbnailUrl: String @deprecated
461
+ animationUrl: String
462
+ smallImageUrl: String @deprecated
463
+ image: Image
464
+ thumbnail: Image
465
+ smallImage: Image
466
+ originalImage: Image
467
+ name: String
468
+ nftContract: NftContract
469
+
470
+ """ TODO: may need to be array to support erc1155 cases. not needed at the moment so will revisit.
471
+ """
472
+ ownerAddress: String
473
+ tokenId: String!
474
+ traits: [NftAssetTrait!]
475
+ rarities: [NftAssetRarity!]
476
+ listings(chain: Chain, asc: Boolean, first: Int, last: Int, after: String, before: String): NftOrderConnection
477
+ suspiciousFlag: Boolean
478
+ flaggedBy: String
479
+ metadataUrl: String
480
+ creator: NftProfile
481
+ mediaType: MediaType
482
+ isSpam: Boolean
483
+ protectionInfo: ProtectionInfo
484
+ chain: Chain
485
+ }
486
+
487
+ type NftAssetConnection {
488
+ pageInfo: PageInfo!
489
+ edges: [NftAssetEdge!]!
490
+ totalCount: Int
491
+ }
492
+
493
+ type NftAssetEdge {
494
+ cursor: String!
495
+ node: NftAsset!
496
+ }
497
+
498
+ input NftAssetInput {
499
+ collection: NftCollectionInput
500
+ description: String
501
+ animationUrl: String
502
+ image: ImageInput
503
+ thumbnail: ImageInput
504
+ smallImage: ImageInput
505
+ name: String
506
+ nftContract: NftContractInput
507
+ tokenId: String!
508
+ mediaType: MediaType
509
+ isSpam: Boolean
510
+ }
511
+
512
+ type NftAssetRarity {
513
+ id: ID!
514
+ score: Float
515
+ rank: Int
516
+ provider: NftRarityProvider
517
+ }
518
+
519
+ input NftAssetsFilterInput {
520
+ tokenSearchQuery: String
521
+ tokenIds: [String!]
522
+ traits: [NftAssetTraitInput!]
523
+ listed: Boolean
524
+ minPrice: String
525
+ maxPrice: String
526
+ marketplaces: [NftMarketplace!]
527
+ }
528
+
529
+ enum NftAssetSortableField {
530
+ PRICE
531
+ RARITY
532
+ }
533
+
534
+ type NftAssetTrait {
535
+ id: ID!
536
+ name: String
537
+ rarity: Float
538
+ value: String
539
+ }
540
+
541
+ input NftAssetTraitInput {
542
+ name: String!
543
+ values: [String!]!
544
+ }
545
+
546
+ type NftBalance {
547
+ id: ID!
548
+ ownedAsset: NftAsset
549
+ listedMarketplaces: [NftMarketplace!]
550
+ lastPrice: TimestampedAmount
551
+ listingFees: [NftFee]
552
+ quantity: Int
553
+ }
554
+
555
+ input NftBalanceAssetInput {
556
+ address: String!
557
+ tokenId: String!
558
+ }
559
+
560
+ type NftBalanceConnection {
561
+ pageInfo: PageInfo!
562
+ edges: [NftBalanceEdge!]!
563
+ }
564
+
565
+ type NftBalanceEdge {
566
+ cursor: String!
567
+ node: NftBalance!
568
+ }
569
+
570
+ input NftBalancesFilterInput {
571
+ addresses: [String!]
572
+ assets: [NftBalanceAssetInput!]
573
+ filterSpam: Boolean
574
+ }
575
+
576
+ type NftCollection {
577
+ id: ID!
578
+ collectionId: String!
579
+
580
+ """
581
+ TODO: support querying for collection assets here
582
+ assets(page: Int, pageSize: Int, orderBy: NftAssetSortableField): [NftAsset]
583
+ """
584
+ bannerImageUrl: String @deprecated
585
+ bannerImage: Image
586
+ description: String
587
+ discordUrl: String
588
+ homepageUrl: String
589
+ imageUrl: String @deprecated
590
+ image: Image
591
+ instagramName: String
592
+ markets(currencies: [Currency!]!): [NftCollectionMarket!]
593
+ name: String
594
+ nftContracts: [NftContract!]
595
+ openseaUrl: String @deprecated
596
+ traits: [NftCollectionTrait!]
597
+ twitterName: String
598
+ isVerified: Boolean
599
+ numAssets: Int
600
+ creator: NftProfile
601
+ }
602
+
603
+ type NftCollectionBalance {
604
+ id: ID!
605
+ address: String!
606
+ name: String!
607
+ logoImage: Image
608
+ balance: Float!
609
+ }
610
+
611
+ type NftCollectionBalanceConnection {
612
+ pageInfo: PageInfo!
613
+ edges: [NftCollectionBalanceEdge!]!
614
+ }
615
+
616
+ type NftCollectionBalanceEdge {
617
+ cursor: String!
618
+ node: NftCollectionBalance!
619
+ }
620
+
621
+ type NftCollectionConnection {
622
+ pageInfo: PageInfo!
623
+ edges: [NftCollectionEdge!]!
624
+ }
625
+
626
+ type NftCollectionEdge {
627
+ cursor: String!
628
+ node: NftCollection!
629
+ }
630
+
631
+ input NftCollectionInput {
632
+ collectionId: String!
633
+ name: String
634
+ nftContracts: [NftContractInput!]
635
+ }
636
+
637
+ type NftCollectionMarket {
638
+ id: ID!
639
+ nftContracts: [NftContract!]
640
+ floorPrice: TimestampedAmount
641
+ owners: Int
642
+ volume24h: Amount @deprecated
643
+ totalVolume: TimestampedAmount
644
+ volume(duration: HistoryDuration): TimestampedAmount
645
+ volumePercentChange(duration: HistoryDuration): TimestampedAmount
646
+ floorPricePercentChange(duration: HistoryDuration): TimestampedAmount
647
+ sales(duration: HistoryDuration): TimestampedAmount
648
+ listings: TimestampedAmount
649
+ marketplaces(marketplaces: [NftMarketplace!]): [NftCollectionMarketplace!]
650
+ percentUniqueOwners: TimestampedAmount
651
+ percentListed: TimestampedAmount
652
+ }
653
+
654
+ type NftCollectionMarketplace {
655
+ id: ID!
656
+ marketplace: NftMarketplace
657
+ listings: Int
658
+ floorPrice: Float
659
+ }
660
+
661
+ input NftCollectionsFilterInput {
662
+ addresses: [String!]
663
+ nameQuery: String
664
+ }
665
+
666
+ type NftCollectionTrait {
667
+ id: ID!
668
+ name: String
669
+ values: [String!]
670
+ stats: [NftCollectionTraitStats!]
671
+ }
672
+
673
+ type NftCollectionTraitStats {
674
+ id: ID!
675
+ name: String
676
+ value: String
677
+ assets: Int
678
+ listings: Int
679
+ }
680
+
681
+ type NftContract implements IContract {
682
+ id: ID!
683
+ address: String!
684
+ chain: Chain!
685
+ name: String
686
+ standard: NftStandard
687
+ symbol: String
688
+ totalSupply: Int
689
+ }
690
+
691
+ input NftContractInput {
692
+ address: String!
693
+ chain: Chain!
694
+ name: String
695
+ standard: NftStandard
696
+ symbol: String
697
+ totalSupply: Int
698
+ }
699
+
700
+ type NftFee {
701
+ id: ID!
702
+ payoutAddress: String!
703
+ basisPoints: Int!
704
+ }
705
+
706
+ enum NftMarketplace {
707
+ OPENSEA
708
+ LOOKSRARE
709
+ X2Y2
710
+ SUDOSWAP
711
+ NFTX
712
+ NFT20
713
+ FOUNDATION
714
+ CRYPTOPUNKS
715
+ }
716
+
717
+ type NftOrder {
718
+ id: ID!
719
+ address: String!
720
+ tokenId: String
721
+ type: OrderType!
722
+ marketplace: NftMarketplace!
723
+ marketplaceUrl: String!
724
+ price: Amount!
725
+ quantity: Int!
726
+ orderHash: String
727
+ status: OrderStatus!
728
+ createdAt: Float!
729
+ startAt: Float!
730
+ endAt: Float
731
+ maker: String!
732
+ taker: String
733
+ auctionType: String
734
+ protocolParameters: AWSJSON
735
+ poolPrices: [String!]
736
+ }
737
+
738
+ type NftOrderConnection {
739
+ pageInfo: PageInfo!
740
+ edges: [NftOrderEdge!]!
741
+ }
742
+
743
+ type NftOrderEdge {
744
+ cursor: String!
745
+ node: NftOrder!
746
+ }
747
+
748
+ type NftProfile {
749
+ id: ID!
750
+ address: String!
751
+ isVerified: Boolean
752
+ profileImage: Image
753
+ username: String
754
+ }
755
+
756
+ enum NftRarityProvider {
757
+ RARITY_SNIPER
758
+ }
759
+
760
+ type NftRouteResponse {
761
+ id: ID!
762
+ calldata: String!
763
+ toAddress: String!
764
+ sendAmount: TokenAmount!
765
+ route: [NftTrade!]
766
+ }
767
+
768
+ enum NftStandard {
769
+ ERC721
770
+ ERC1155
771
+ NONCOMPLIANT
772
+ }
773
+
774
+ type NftTrade {
775
+ id: ID!
776
+ contractAddress: String!
777
+ tokenId: String!
778
+ tokenType: NftStandard
779
+ marketplace: NftMarketplace!
780
+ amount: Int!
781
+
782
+ """ quotePrice represents the last quoted price of the NFT"""
783
+ quotePrice: TokenAmount
784
+
785
+ """ price represents the current price of the NFT, which can be different from quotePrice
786
+ """
787
+ price: TokenAmount!
788
+ }
789
+
790
+ input NftTradeInput {
791
+ id: ID!
792
+ contractAddress: String!
793
+ tokenId: String!
794
+ tokenType: NftStandard
795
+ marketplace: NftMarketplace!
796
+ amount: Int!
797
+ quotePrice: TokenAmountInput
798
+ }
799
+
800
+ type NftTransfer {
801
+ id: ID!
802
+ nftStandard: NftStandard!
803
+ asset: NftAsset!
804
+ sender: String!
805
+ recipient: String!
806
+ direction: TransactionDirection!
807
+ }
808
+
809
+ input NftTransferInput {
810
+ nftStandard: NftStandard!
811
+ asset: NftAssetInput!
812
+ sender: String!
813
+ recipient: String!
814
+ direction: TransactionDirection!
815
+ }
816
+
817
+ type OffRampServiceProvider {
818
+ id: ID!
819
+ serviceProvider: String!
820
+ name: String!
821
+ url: String!
822
+ logoLightUrl: String!
823
+ logoDarkUrl: String!
824
+ supportUrl: String
825
+ }
826
+
827
+ input OffRampServiceProviderInput {
828
+ serviceProvider: String!
829
+ name: String!
830
+ url: String!
831
+ logoLightUrl: String!
832
+ logoDarkUrl: String!
833
+ supportUrl: String
834
+ }
835
+
836
+ type OffRampTransactionDetails {
837
+ id: ID!
838
+ status: TransactionStatus!
839
+ senderAddress: String!
840
+ offRampTransfer: OffRampTransfer!
841
+ }
842
+
843
+ input OffRampTransactionDetailsInput {
844
+ status: TransactionStatus!
845
+ senderAddress: String!
846
+ offRampTransfer: OffRampTransferInput!
847
+ }
848
+
849
+ type OffRampTransfer {
850
+ id: ID!
851
+ token: Token!
852
+ tokenStandard: TokenStandard!
853
+ amount: Float!
854
+ destinationCurrency: String
855
+ destinationAmount: Float!
856
+ serviceProvider: OffRampServiceProvider!
857
+ transactionReferenceId: String!
858
+ externalSessionId: String!
859
+ networkFee: Float
860
+ transactionFee: Float
861
+ totalFee: Float
862
+ }
863
+
864
+ input OffRampTransferInput {
865
+ token: TokenAssetInput!
866
+ tokenStandard: TokenStandard!
867
+ amount: Float!
868
+ destinationCurrency: String
869
+ destinationAmount: Float!
870
+ serviceProvider: OffRampServiceProviderInput!
871
+ transactionReferenceId: String!
872
+ networkFee: Float
873
+ transactionFee: Float
874
+ totalFee: Float
875
+ }
876
+
877
+ type OnRampServiceProvider {
878
+ id: ID!
879
+ serviceProvider: String!
880
+ name: String!
881
+ url: String!
882
+ logoLightUrl: String!
883
+ logoDarkUrl: String!
884
+ supportUrl: String
885
+ }
886
+
887
+ input OnRampServiceProviderInput {
888
+ serviceProvider: String!
889
+ name: String!
890
+ url: String!
891
+ logoLightUrl: String!
892
+ logoDarkUrl: String!
893
+ supportUrl: String
894
+ }
895
+
896
+ type OnRampTransactionDetails {
897
+ id: ID!
898
+ status: TransactionStatus!
899
+ receiverAddress: String!
900
+ onRampTransfer: OnRampTransfer!
901
+ }
902
+
903
+ input OnRampTransactionDetailsInput {
904
+ status: TransactionStatus!
905
+ receiverAddress: String!
906
+ onRampTransfer: OnRampTransferInput!
907
+ }
908
+
909
+ input OnRampTransactionsAuth {
910
+ queryParams: String!
911
+ signature: String!
912
+ }
913
+
914
+ type OnRampTransfer {
915
+ id: ID!
916
+ token: Token!
917
+ tokenStandard: TokenStandard!
918
+ amount: Float!
919
+ sourceCurrency: String
920
+ sourceAmount: Float!
921
+ serviceProvider: OnRampServiceProvider!
922
+ transactionReferenceId: String!
923
+ externalSessionId: String!
924
+ networkFee: Float
925
+ transactionFee: Float
926
+ totalFee: Float
927
+ }
928
+
929
+ input OnRampTransferInput {
930
+ token: TokenAssetInput!
931
+ tokenStandard: TokenStandard!
932
+ amount: Float!
933
+ sourceCurrency: String
934
+ sourceAmount: Float!
935
+ serviceProvider: OnRampServiceProviderInput!
936
+ transactionReferenceId: String!
937
+ networkFee: Float
938
+ transactionFee: Float
939
+ totalFee: Float
940
+ }
941
+
942
+ enum OrderStatus {
943
+ VALID
944
+ EXECUTED
945
+ CANCELLED
946
+ EXPIRED
947
+ }
948
+
949
+ enum OrderType {
950
+ LISTING
951
+ OFFER
952
+ }
953
+
954
+ type PageInfo {
955
+ hasPreviousPage: Boolean
956
+ hasNextPage: Boolean
957
+ startCursor: String
958
+ endCursor: String
959
+ }
960
+
961
+ """ v2 pool parameters as defined by https://github.com/Lux/v2-sdk/blob/main/src/entities/pair.ts
962
+ """
963
+ input PairInput {
964
+ tokenAmountA: TokenAmountInput!
965
+ tokenAmountB: TokenAmountInput!
966
+ }
967
+
968
+ input PermitDetailsInput {
969
+ token: String!
970
+ amount: String!
971
+ expiration: String!
972
+ nonce: String!
973
+ }
974
+
975
+ input PermitInput {
976
+ signature: String!
977
+ details: PermitDetailsInput!
978
+ spender: String!
979
+ sigDeadline: String!
980
+ }
981
+
982
+ """ v3 pool parameters as defined by https://github.com/Lux/v3-sdk/blob/main/src/entities/pool.ts
983
+ """
984
+ input PoolInput {
985
+ tokenA: TokenInput!
986
+ tokenB: TokenInput!
987
+ fee: Int!
988
+ sqrtRatioX96: String!
989
+ liquidity: String!
990
+ tickCurrent: String!
991
+ }
992
+
993
+ type PoolTransaction {
994
+ id: ID!
995
+ chain: Chain!
996
+ protocolVersion: ProtocolVersion!
997
+ type: PoolTransactionType!
998
+ hash: String!
999
+ timestamp: Int!
1000
+ usdValue: Amount!
1001
+ account: String!
1002
+ token0: Token!
1003
+ token0Quantity: String!
1004
+ token1: Token!
1005
+ token1Quantity: String!
1006
+ }
1007
+
1008
+ enum PoolTransactionType {
1009
+ SWAP
1010
+ ADD
1011
+ REMOVE
1012
+ }
1013
+
1014
+ type Portfolio {
1015
+ id: ID!
1016
+ ownerAddress: String!
1017
+ tokensTotalDenominatedValue: Amount
1018
+ tokensTotalDenominatedValueChange(duration: HistoryDuration): AmountChange
1019
+ tokenBalances: [TokenBalance]
1020
+
1021
+ """ TODO: (michael.zhang) replace with paginated query"""
1022
+ nftBalances: [NftBalance]
1023
+ assetActivities(page: Int, pageSize: Int, includeOffChain: Boolean, onRampTransactionsAuth: OnRampTransactionsAuth, onRampTransactionIDs: [String!], chains: [Chain!], includeBridging: Boolean, _fs: AssetActivitySwitch): [AssetActivity]
1024
+ }
1025
+
1026
+ """ Specify how the portfolio value should be calculated for each `ownerAddress`.
1027
+ """
1028
+ input PortfolioValueModifier {
1029
+ ownerAddress: String!
1030
+ tokenIncludeOverrides: [ContractInput!]
1031
+ tokenExcludeOverrides: [ContractInput!]
1032
+ includeSmallBalances: Boolean
1033
+ includeSpamTokens: Boolean
1034
+ tokenBalancesLimit: Int
1035
+ }
1036
+
1037
+ enum PriceSource {
1038
+ SUBGRAPH_V2
1039
+ SUBGRAPH_V3
1040
+ SUBGRAPH_V4
1041
+ EXTERNAL
1042
+ }
1043
+
1044
+ enum ProtectionAttackType {
1045
+ UNKNOWN
1046
+ METADATA
1047
+ INORGANIC_VOLUME
1048
+ AIRDROP_PATTERN
1049
+ DYNAMIC_ANALYSIS
1050
+ STATIC_CODE_SIGNATURE
1051
+ KNOWN_MALICIOUS
1052
+ IMPERSONATOR
1053
+ UNSTABLE_TOKEN_PRICE
1054
+ RUGPULL
1055
+ HIGH_FEES
1056
+ HONEYPOT
1057
+ }
1058
+
1059
+ type ProtectionInfo {
1060
+ result: ProtectionResult
1061
+ attackTypes: [ProtectionAttackType]
1062
+ blockaidFees: BlockaidFees
1063
+ }
1064
+
1065
+ enum ProtectionResult {
1066
+ UNKNOWN
1067
+ MALICIOUS
1068
+ BENIGN
1069
+ SPAM
1070
+ WARNING
1071
+ }
1072
+
1073
+ enum ProtocolVersion {
1074
+ V2
1075
+ V3
1076
+ V4
1077
+ }
1078
+
1079
+ type PushNotification {
1080
+ id: ID!
1081
+ contents: AWSJSON!
1082
+ notifyAddress: String!
1083
+ viewerHeader: AWSJSON!
1084
+ signerHeader: AWSJSON!
1085
+ }
1086
+
1087
+ type Query {
1088
+ isV3SubgraphStale(chain: Chain!): Boolean
1089
+ historicalProtocolVolume(chain: Chain!, version: ProtocolVersion!, duration: HistoryDuration!): [TimestampedAmount!]
1090
+ dailyProtocolTvl(chain: Chain!, version: ProtocolVersion!): [TimestampedAmount!]
1091
+
1092
+ """ returns top v3 pools sorted by total value locked in desc order"""
1093
+ topV3Pools(chain: Chain!, first: Int!, tvlCursor: Float, tokenFilter: String, debugMode: Boolean): [V3Pool!]
1094
+ topV4Pools(chain: Chain!, first: Int!, tvlCursor: Float, tokenFilter: String, debugMode: Boolean): [V4Pool!]
1095
+ v3Pool(chain: Chain!, address: String!): V3Pool
1096
+ v4Pool(chain: Chain!, poolId: String!): V4Pool
1097
+ v3PoolsForTokenPair(chain: Chain!, token0: String!, token1: String!): [V3Pool!]
1098
+ v4PoolsForTokenPair(chain: Chain!, token0: String!, token1: String!): [V4Pool!]
1099
+ v3Transactions(chain: Chain!, first: Int!, timestampCursor: Int): [PoolTransaction!]
1100
+ v4Transactions(chain: Chain!, first: Int!, timestampCursor: Int): [PoolTransaction!]
1101
+
1102
+ """ returns top v2 pairs sorted by total value locked in desc order"""
1103
+ topV2Pairs(chain: Chain!, first: Int!, tvlCursor: Float, tokenFilter: String, debugMode: Boolean): [V2Pair!]
1104
+ v2Pair(chain: Chain!, address: String!): V2Pair
1105
+ v2Transactions(chain: Chain!, first: Int!, timestampCursor: Int): [PoolTransaction]
1106
+ convert(fromAmount: CurrencyAmountInput!, toCurrency: Currency!): Amount
1107
+ tokens(contracts: [ContractInput!]!): [Token]
1108
+
1109
+ """
1110
+ token consumes chain and address instead of contract because the apollo client request cache can only use
1111
+ keys from the response, and the token response does not contain a contract, but does contain an unwrapped
1112
+ contract: chain and address.
1113
+ """
1114
+ token(chain: Chain!, address: String): Token
1115
+ tokenProjects(contracts: [ContractInput!]!): [TokenProject]
1116
+ searchTokens(searchQuery: String!, chains: [Chain!], tokenSearchV2Enabled: Boolean): [Token]
1117
+ portfolios(ownerAddresses: [String!]!, chains: [Chain!], lookupTokens: [ContractInput!], fungibleIds: [String!], valueModifiers: [PortfolioValueModifier!]): [Portfolio]
1118
+ topTokens(chain: Chain, page: Int, pageSize: Int, orderBy: TokenSortableField): [Token]
1119
+ topCollections(chains: [Chain!], orderBy: CollectionSortableField, duration: HistoryDuration, after: String, first: Int, cursor: String, limit: Int): NftCollectionConnection
1120
+ nftAssets(chain: Chain, address: String!, orderBy: NftAssetSortableField, asc: Boolean, filter: NftAssetsFilterInput, after: String, first: Int, before: String, last: Int): NftAssetConnection
1121
+ nftCollections(chain: Chain, filter: NftCollectionsFilterInput, after: String, first: Int): NftCollectionConnection
1122
+ nftBalances(chain: Chain, ownerAddress: String!, filter: NftBalancesFilterInput, after: String, first: Int, before: String, last: Int, chains: [Chain!]): NftBalanceConnection
1123
+ nftRoute(chain: Chain, senderAddress: String!, nftTrades: [NftTradeInput!]!, tokenTrades: [TokenTradeInput!]): NftRouteResponse
1124
+ nftActivity(chain: Chain, filter: NftActivityFilterInput, after: String, first: Int): NftActivityConnection
1125
+ nftCollectionBalances(chain: Chain, ownerAddress: String!, after: String, first: Int, before: String, last: Int): NftCollectionBalanceConnection
1126
+ transactionNotification(chain: Chain!, address: String!, transactionHash: String!, isBridging: Boolean): TransactionNotification
1127
+ }
1128
+
1129
+ type RewardsCampaign {
1130
+ id: ID!
1131
+ boostedApr: Float!
1132
+ startTimestamp: Int
1133
+ endTimestamp: Int
1134
+ totalRewardAllocation: String
1135
+ distributedRewards: String
1136
+ }
1137
+
1138
+ enum SafetyLevel {
1139
+ VERIFIED
1140
+ MEDIUM_WARNING
1141
+ STRONG_WARNING
1142
+ BLOCKED
1143
+ }
1144
+
1145
+ type Status {
1146
+ success: Boolean!
1147
+ }
1148
+
1149
+ type Subscription {
1150
+ onAssetActivity(subscriptionId: ID!, addresses: [String!]!): AssetActivity
1151
+ }
1152
+
1153
+ enum SubscriptionType {
1154
+ ASSET_ACTIVITY
1155
+ }
1156
+
1157
+ type SwapOrderDetails {
1158
+ id: ID!
1159
+ offerer: String!
1160
+ hash: String!
1161
+ status: SwapOrderStatus! @deprecated(reason: "use swapOrderStatus to disambiguate from transactionStatus")
1162
+ swapOrderStatus: SwapOrderStatus!
1163
+ inputToken: Token!
1164
+ inputTokenQuantity: String!
1165
+ outputToken: Token!
1166
+ outputTokenQuantity: String!
1167
+ expiry: Int!
1168
+ encodedOrder: String!
1169
+ swapOrderType: SwapOrderType!
1170
+ }
1171
+
1172
+ input SwapOrderDetailsInput {
1173
+ offerer: String!
1174
+ hash: String!
1175
+ status: SwapOrderStatus
1176
+ swapOrderStatus: SwapOrderStatus!
1177
+ inputToken: TokenAssetInput!
1178
+ inputAmount: String!
1179
+ outputToken: TokenAssetInput!
1180
+ outputAmount: String!
1181
+ expiry: Int!
1182
+ encodedOrder: String!
1183
+ swapOrderType: SwapOrderType!
1184
+ }
1185
+
1186
+ enum SwapOrderStatus {
1187
+ OPEN
1188
+ EXPIRED
1189
+ ERROR
1190
+ INSUFFICIENT_FUNDS
1191
+ FILLED
1192
+ CANCELLED
1193
+ }
1194
+
1195
+ enum SwapOrderType {
1196
+ DUTCH
1197
+ LIMIT
1198
+ DUTCH_V2
1199
+ PRIORITY
1200
+ }
1201
+
1202
+ type TimestampedAmount implements IAmount {
1203
+ id: ID!
1204
+ currency: Currency
1205
+ value: Float!
1206
+ timestamp: Int!
1207
+ }
1208
+
1209
+ type TimestampedOhlc {
1210
+ id: ID!
1211
+ timestamp: Int!
1212
+ open: Amount!
1213
+ high: Amount!
1214
+ low: Amount!
1215
+ close: Amount!
1216
+ }
1217
+
1218
+ type TimestampedPoolPrice {
1219
+ id: ID!
1220
+ timestamp: Int!
1221
+ token0Price: Float!
1222
+ token1Price: Float!
1223
+ }
1224
+
1225
+ type Token implements IContract {
1226
+ id: ID!
1227
+ chain: Chain!
1228
+ address: String
1229
+ standard: TokenStandard
1230
+ decimals: Int
1231
+ name: String
1232
+ symbol: String
1233
+ project: TokenProject
1234
+ market(currency: Currency): TokenMarket
1235
+ feeData: FeeData
1236
+ protectionInfo: ProtectionInfo
1237
+ v4Transactions(first: Int!, timestampCursor: Int): [PoolTransaction]
1238
+ v3Transactions(first: Int!, timestampCursor: Int): [PoolTransaction]
1239
+ v2Transactions(first: Int!, timestampCursor: Int): [PoolTransaction]
1240
+ source: TokenSource
1241
+ isBridged: Boolean
1242
+ bridgedWithdrawalInfo: BridgedWithdrawalInfo
1243
+ }
1244
+
1245
+ type TokenAmount {
1246
+ id: ID!
1247
+ value: String!
1248
+ currency: Currency!
1249
+ }
1250
+
1251
+ input TokenAmountInput {
1252
+ token: TokenInput!
1253
+ amount: String!
1254
+ }
1255
+
1256
+ type TokenApproval {
1257
+ id: ID!
1258
+ tokenStandard: TokenStandard!
1259
+
1260
+ """ can be erc20 or native"""
1261
+ asset: Token!
1262
+ approvedAddress: String!
1263
+ quantity: String!
1264
+ }
1265
+
1266
+ input TokenApprovalInput {
1267
+ tokenStandard: TokenStandard!
1268
+ asset: TokenAssetInput!
1269
+ approvedAddress: String!
1270
+ quantity: String!
1271
+ }
1272
+
1273
+ input TokenAssetInput {
1274
+ chain: Chain!
1275
+ address: String
1276
+ standard: TokenStandard!
1277
+ decimals: Int
1278
+ name: String
1279
+ symbol: String
1280
+ }
1281
+
1282
+ type TokenBalance {
1283
+ id: ID!
1284
+ blockNumber: Int
1285
+ blockTimestamp: Int
1286
+ quantity: Float
1287
+ denominatedValue: Amount
1288
+ ownerAddress: String!
1289
+ token: Token
1290
+ tokenProjectMarket: TokenProjectMarket
1291
+ isHidden: Boolean
1292
+ }
1293
+
1294
+ input TokenInput {
1295
+ chainId: Int!
1296
+ address: String!
1297
+ decimals: Int!
1298
+ isNative: Boolean!
1299
+ }
1300
+
1301
+ type TokenMarket {
1302
+ id: ID!
1303
+ token: Token!
1304
+ price: Amount
1305
+ priceSource: PriceSource!
1306
+ totalValueLocked: Amount
1307
+ fullyDilutedValuation: Amount
1308
+ historicalVolume(duration: HistoryDuration!): [TimestampedAmount]
1309
+ historicalTvl(duration: HistoryDuration!): [TimestampedAmount]
1310
+ priceHistory(duration: HistoryDuration!, maxLength: Int): [TimestampedAmount]
1311
+ ohlc(duration: HistoryDuration!): [TimestampedOhlc]
1312
+
1313
+ """ this volume is cumulative volume over the specified duration"""
1314
+ volume(duration: HistoryDuration!): Amount
1315
+ pricePercentChange(duration: HistoryDuration!): Amount
1316
+ priceHighLow(duration: HistoryDuration!, highLow: HighLow!): Amount
1317
+ }
1318
+
1319
+ type TokenProject {
1320
+ id: ID!
1321
+ name: String
1322
+ tokens: [Token!]!
1323
+ description: String
1324
+ descriptionTranslations: DescriptionTranslations
1325
+ twitterName: String
1326
+ homepageUrl: String
1327
+ logoUrl: String @deprecated(reason: "use logo")
1328
+ logo: Image
1329
+ smallLogo: Image @deprecated(reason: "use logo")
1330
+ isSpam: Boolean
1331
+ spamCode: Int
1332
+ safetyLevel: SafetyLevel
1333
+ markets(currencies: [Currency!]!): [TokenProjectMarket]
1334
+ }
1335
+
1336
+ type TokenProjectMarket {
1337
+ id: ID!
1338
+ tokenProject: TokenProject!
1339
+ currency: Currency!
1340
+ price: Amount
1341
+ marketCap: Amount
1342
+ fullyDilutedValuation: Amount
1343
+ pricePercentChange24h: Amount
1344
+ priceHigh52w: Amount
1345
+ priceLow52w: Amount
1346
+ priceHistory(duration: HistoryDuration!, maxLength: Int): [TimestampedAmount]
1347
+ pricePercentChange(duration: HistoryDuration!): Amount
1348
+ priceHighLow(duration: HistoryDuration!, highLow: HighLow!): Amount
1349
+ }
1350
+
1351
+ enum TokenSortableField {
1352
+ TOTAL_VALUE_LOCKED
1353
+ MARKET_CAP
1354
+ VOLUME
1355
+ POPULARITY
1356
+ }
1357
+
1358
+ enum TokenSource {
1359
+ TOKEN_FACTORY
1360
+ }
1361
+
1362
+ enum TokenStandard {
1363
+ NATIVE
1364
+ ERC20
1365
+ SPL
1366
+ }
1367
+
1368
+ input TokenTradeInput {
1369
+ tokenAmount: TokenAmountInput!
1370
+ routes: TokenTradeRoutesInput
1371
+ slippageToleranceBasisPoints: Int
1372
+ permit: PermitInput
1373
+ }
1374
+
1375
+ input TokenTradeRouteInput {
1376
+ pools: [TradePoolInput!]!
1377
+ inputAmount: TokenAmountInput!
1378
+ outputAmount: TokenAmountInput!
1379
+ }
1380
+
1381
+ input TokenTradeRoutesInput {
1382
+ v2Routes: [TokenTradeRouteInput!]
1383
+ v3Routes: [TokenTradeRouteInput!]
1384
+ mixedRoutes: [TokenTradeRouteInput!]
1385
+ tradeType: TokenTradeType!
1386
+ }
1387
+
1388
+ enum TokenTradeType {
1389
+ EXACT_INPUT
1390
+ EXACT_OUTPUT
1391
+ }
1392
+
1393
+ type TokenTransfer {
1394
+ id: ID!
1395
+ tokenStandard: TokenStandard!
1396
+ asset: Token!
1397
+ sender: String!
1398
+ recipient: String!
1399
+ quantity: String!
1400
+ direction: TransactionDirection!
1401
+ transactedValue: Amount
1402
+ }
1403
+
1404
+ input TokenTransferInput {
1405
+ tokenStandard: TokenStandard!
1406
+ asset: TokenAssetInput!
1407
+ sender: String!
1408
+ recipient: String!
1409
+ quantity: String!
1410
+ direction: TransactionDirection!
1411
+ transactedValue: AmountInput
1412
+ }
1413
+
1414
+ input TradePoolInput {
1415
+ pair: PairInput
1416
+ pool: PoolInput
1417
+ }
1418
+
1419
+ type Transaction {
1420
+ id: ID!
1421
+ blockNumber: Int!
1422
+ from: String!
1423
+ to: String!
1424
+ hash: String!
1425
+ nonce: Int!
1426
+ gasLimit: Float
1427
+ maxFeePerGas: Float
1428
+ status: TransactionStatus!
1429
+ }
1430
+
1431
+ type TransactionDetails {
1432
+ id: ID!
1433
+ type: TransactionType!
1434
+ assetChanges: [AssetChange]!
1435
+ from: String!
1436
+ to: String!
1437
+ hash: String!
1438
+ status: TransactionStatus! @deprecated(reason: "use transactionStatus to disambiguate from swapOrderStatus")
1439
+ transactionStatus: TransactionStatus!
1440
+ nonce: Int!
1441
+ application: ApplicationContract
1442
+ networkFee: NetworkFee
1443
+ }
1444
+
1445
+ input TransactionDetailsInput {
1446
+ type: TransactionType!
1447
+ assetChanges: [AssetChangeInput]!
1448
+ from: String!
1449
+ to: String!
1450
+ hash: String!
1451
+ status: TransactionStatus
1452
+ transactionStatus: TransactionStatus!
1453
+ nonce: Int!
1454
+ application: ApplicationContractInput
1455
+ }
1456
+
1457
+ enum TransactionDirection {
1458
+ IN
1459
+ OUT
1460
+ SELF
1461
+ }
1462
+
1463
+ type TransactionNotification {
1464
+ id: ID!
1465
+ hash: String!
1466
+ push: [PushNotification!]!
1467
+ }
1468
+
1469
+ enum TransactionStatus {
1470
+ FAILED
1471
+ CONFIRMED
1472
+ PENDING
1473
+ }
1474
+
1475
+ enum TransactionType {
1476
+ APPROVE
1477
+ BORROW
1478
+ BRIDGING
1479
+ CANCEL
1480
+ CLAIM
1481
+ DEPLOYMENT
1482
+ EXECUTE
1483
+ LEND
1484
+ MINT
1485
+ RECEIVE
1486
+ REPAY
1487
+ SEND
1488
+ STAKE
1489
+ SWAP
1490
+ SWAP_ORDER
1491
+ UNKNOWN
1492
+ UNSTAKE
1493
+ WITHDRAW
1494
+ ON_RAMP
1495
+ OFF_RAMP
1496
+ }
1497
+
1498
+ type V2Pair implements IPool {
1499
+ id: ID!
1500
+ protocolVersion: ProtocolVersion!
1501
+ chain: Chain!
1502
+ address: String!
1503
+ createdAtTimestamp: Int
1504
+ totalLiquidity: Amount
1505
+ token0: Token
1506
+ token0Supply: Float
1507
+ token1: Token
1508
+ token1Supply: Float
1509
+ txCount: Int
1510
+ totalLiquidityPercentChange24h: Amount
1511
+ cumulativeVolume(duration: HistoryDuration!): Amount
1512
+ historicalVolume(duration: HistoryDuration!): [TimestampedAmount]
1513
+ priceHistory(duration: HistoryDuration!): [TimestampedPoolPrice]
1514
+ transactions(first: Int!, timestampCursor: Int): [PoolTransaction]
1515
+ }
1516
+
1517
+ type V3Pool implements IPool {
1518
+ id: ID!
1519
+ protocolVersion: ProtocolVersion!
1520
+ chain: Chain!
1521
+ address: String!
1522
+ createdAtTimestamp: Int
1523
+ totalLiquidity: Amount
1524
+ token0: Token
1525
+ token0Supply: Float
1526
+ token1: Token
1527
+ token1Supply: Float
1528
+ txCount: Int
1529
+ feeTier: Float
1530
+ totalLiquidityPercentChange24h: Amount
1531
+ cumulativeVolume(duration: HistoryDuration!): Amount
1532
+ historicalVolume(duration: HistoryDuration!): [TimestampedAmount]
1533
+ priceHistory(duration: HistoryDuration!): [TimestampedPoolPrice]
1534
+ transactions(first: Int!, timestampCursor: Int): [PoolTransaction]
1535
+ ticks(skip: Int, first: Int): [V3PoolTick]
1536
+ }
1537
+
1538
+ type V3PoolTick {
1539
+ id: ID!
1540
+ tickIdx: Int
1541
+ liquidityGross: String
1542
+ liquidityNet: String
1543
+ price0: String
1544
+ price1: String
1545
+ }
1546
+
1547
+ type V4Pool {
1548
+ id: ID!
1549
+ protocolVersion: ProtocolVersion!
1550
+ chain: Chain!
1551
+ poolId: String!
1552
+ createdAtTimestamp: Int
1553
+ totalLiquidity: Amount
1554
+ token0: Token
1555
+ token0Supply: Float
1556
+ token1: Token
1557
+ token1Supply: Float
1558
+ txCount: Int
1559
+ feeTier: Float
1560
+ isDynamicFee: Boolean
1561
+ hook: V4PoolHook
1562
+ tickSpacing: Int
1563
+ totalLiquidityPercentChange24h: Amount
1564
+ cumulativeVolume(duration: HistoryDuration!): Amount
1565
+ historicalVolume(duration: HistoryDuration!): [TimestampedAmount]
1566
+ priceHistory(duration: HistoryDuration!): [TimestampedPoolPrice]
1567
+ transactions(first: Int!, timestampCursor: Int): [PoolTransaction]
1568
+ ticks(skip: Int, first: Int): [V4PoolTick]
1569
+ rewardsCampaign: RewardsCampaign
1570
+ }
1571
+
1572
+ type V4PoolHook {
1573
+ id: ID!
1574
+ address: String!
1575
+ }
1576
+
1577
+ type V4PoolTick {
1578
+ id: ID!
1579
+ tickIdx: Int
1580
+ liquidityGross: String
1581
+ liquidityNet: String
1582
+ price0: String
1583
+ price1: String
1584
+ }
1585
+