@codex-data/sdk 0.6.2 → 1.0.0-rc1

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 (232) hide show
  1. package/dist/resources/generated_mutations/CreateApiTokens.graphql +9 -0
  2. package/dist/resources/generated_mutations/CreateWebhooks.graphql +80 -0
  3. package/dist/resources/generated_mutations/DeleteApiToken.graphql +3 -0
  4. package/{src/sdk/graphql → dist/resources/generated_mutations}/DeleteWebhooks.graphql +1 -1
  5. package/dist/resources/generated_queries/ApiToken.graphql +9 -0
  6. package/dist/resources/generated_queries/ApiTokens.graphql +9 -0
  7. package/dist/resources/generated_queries/Balances.graphql +12 -0
  8. package/dist/resources/generated_queries/ChartUrls.graphql +7 -0
  9. package/dist/resources/generated_queries/FilterExchanges.graphql +43 -0
  10. package/dist/resources/generated_queries/FilterNftCollections.graphql +569 -0
  11. package/dist/resources/generated_queries/FilterNftParallelAssets.graphql +60 -0
  12. package/dist/resources/generated_queries/FilterNftPoolCollections.graphql +71 -0
  13. package/dist/resources/generated_queries/FilterNftPools.graphql +124 -0
  14. package/dist/resources/generated_queries/FilterPairs.graphql +339 -0
  15. package/dist/resources/generated_queries/FilterTokens.graphql +279 -0
  16. package/{src/sdk/graphql → dist/resources/generated_queries}/GetBars.graphql +21 -9
  17. package/dist/resources/generated_queries/GetCommunityNotes.graphql +20 -0
  18. package/dist/resources/generated_queries/GetDetailedNftStats.graphql +831 -0
  19. package/{src/sdk/graphql → dist/resources/generated_queries}/GetDetailedPairStats.graphql +370 -373
  20. package/dist/resources/generated_queries/GetDetailedPairsStats.graphql +922 -0
  21. package/dist/resources/generated_queries/GetEventLabels.graphql +24 -0
  22. package/dist/resources/generated_queries/GetExchanges.graphql +12 -0
  23. package/dist/resources/generated_queries/GetLatestPairs.graphql +57 -0
  24. package/dist/resources/generated_queries/GetLatestTokens.graphql +39 -0
  25. package/dist/resources/generated_queries/GetNetworkStats.graphql +13 -0
  26. package/{src/sdk/graphql → dist/resources/generated_queries}/GetNetworkStatus.graphql +2 -1
  27. package/{src/sdk/graphql → dist/resources/generated_queries}/GetNetworks.graphql +1 -0
  28. package/dist/resources/generated_queries/GetNftAssets.graphql +59 -0
  29. package/dist/resources/generated_queries/GetNftCollectionMetadata.graphql +75 -0
  30. package/dist/resources/generated_queries/GetNftContracts.graphql +39 -0
  31. package/dist/resources/generated_queries/GetNftEvents.graphql +54 -0
  32. package/dist/resources/generated_queries/GetNftPool.graphql +74 -0
  33. package/dist/resources/generated_queries/GetNftPoolCollection.graphql +33 -0
  34. package/dist/resources/generated_queries/GetNftPoolCollectionsByExchange.graphql +38 -0
  35. package/dist/resources/generated_queries/GetNftPoolEvents.graphql +41 -0
  36. package/dist/resources/generated_queries/GetNftPoolStats.graphql +40 -0
  37. package/dist/resources/generated_queries/GetNftPoolsByCollectionAndExchange.graphql +89 -0
  38. package/dist/resources/generated_queries/GetNftPoolsByOwner.graphql +89 -0
  39. package/dist/resources/generated_queries/GetParallelAssets.graphql +50 -0
  40. package/dist/resources/generated_queries/GetParallelCardChanges.graphql +57 -0
  41. package/dist/resources/generated_queries/GetPrimePoolAssets.graphql +32 -0
  42. package/dist/resources/generated_queries/GetPrimePoolEvents.graphql +38 -0
  43. package/dist/resources/generated_queries/GetPrimePools.graphql +62 -0
  44. package/dist/resources/generated_queries/GetSimulateTokenContractResults.graphql +128 -0
  45. package/{src/sdk/graphql → dist/resources/generated_queries}/GetSymbol.graphql +7 -7
  46. package/dist/resources/generated_queries/GetTokenCount.graphql +3 -0
  47. package/dist/resources/generated_queries/GetTokenEvents.graphql +49 -0
  48. package/dist/resources/generated_queries/GetTokenInfo.graphql +17 -0
  49. package/dist/resources/generated_queries/GetTokenPrices.graphql +9 -0
  50. package/dist/resources/generated_queries/GetTokensInfo.graphql +17 -0
  51. package/dist/resources/generated_queries/GetUniV3Ticks.graphql +22 -0
  52. package/dist/resources/generated_queries/GetWebhooks.graphql +36 -0
  53. package/dist/resources/generated_queries/Holders.graphql +14 -0
  54. package/dist/resources/generated_queries/LiquidityLocks.graphql +26 -0
  55. package/dist/resources/generated_queries/LiquidityMetadata.graphql +17 -0
  56. package/dist/resources/generated_queries/ListFavoriteTokens.graphql +58 -0
  57. package/{src/sdk/graphql → dist/resources/generated_queries}/ListPairsForToken.graphql +77 -41
  58. package/dist/resources/generated_queries/ListPairsWithMetadataForToken.graphql +282 -0
  59. package/{src/sdk/graphql → dist/resources/generated_queries}/ListTopTokens.graphql +22 -16
  60. package/dist/resources/generated_queries/NftHolders.graphql +12 -0
  61. package/{src/sdk/graphql/OnPairMetadataUpdated.graphql → dist/resources/generated_queries/PairMetadata.graphql} +21 -3
  62. package/dist/resources/generated_queries/PrimeBalance.graphql +12 -0
  63. package/dist/resources/generated_queries/PrimeHolders.graphql +13 -0
  64. package/dist/resources/generated_queries/SearchNfts.graphql +35 -0
  65. package/dist/resources/generated_queries/Token.graphql +62 -0
  66. package/dist/resources/generated_queries/TokenLifecycleEvents.graphql +22 -0
  67. package/{src/sdk/graphql/GetSparklines.graphql → dist/resources/generated_queries/TokenSparklines.graphql} +2 -2
  68. package/dist/resources/generated_queries/Tokens.graphql +62 -0
  69. package/dist/resources/generated_queries/WalletNftCollectionAssets.graphql +11 -0
  70. package/dist/resources/generated_queries/WalletNftCollections.graphql +10 -0
  71. package/dist/resources/generated_subscriptions/OnBarsUpdated.graphql +513 -0
  72. package/{src/sdk/graphql → dist/resources/generated_subscriptions}/OnDetailedStatsUpdated.graphql +119 -111
  73. package/dist/resources/generated_subscriptions/OnEventLabelCreated.graphql +11 -0
  74. package/dist/resources/generated_subscriptions/OnEventsCreated.graphql +46 -0
  75. package/dist/resources/generated_subscriptions/OnLatestPairUpdated.graphql +42 -0
  76. package/dist/resources/generated_subscriptions/OnLatestTokens.graphql +37 -0
  77. package/{src/sdk/graphql → dist/resources/generated_subscriptions}/OnNftAssetsCreated.graphql +30 -17
  78. package/dist/resources/generated_subscriptions/OnNftEventsCreated.graphql +36 -0
  79. package/dist/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +37 -0
  80. package/dist/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +73 -0
  81. package/{src/sdk/graphql → dist/resources/generated_subscriptions}/OnPriceUpdated.graphql +1 -1
  82. package/dist/resources/generated_subscriptions/OnPricesUpdated.graphql +9 -0
  83. package/dist/resources/generated_subscriptions/OnSimulateTokenContract.graphql +121 -0
  84. package/dist/resources/generated_subscriptions/OnTokenEventsCreated.graphql +39 -0
  85. package/dist/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +18 -0
  86. package/dist/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +32 -0
  87. package/dist/resources/graphql.d.ts +131 -0
  88. package/dist/resources/graphql.d.ts.map +1 -1
  89. package/dist/resources/graphql.js.map +1 -1
  90. package/dist/resources/graphql.schema.json +1570 -0
  91. package/dist/resources/graphql.ts +148 -0
  92. package/dist/resources/schema.graphql +184 -0
  93. package/dist/scripts/buildSdk.d.ts +2 -0
  94. package/dist/scripts/buildSdk.d.ts.map +1 -0
  95. package/dist/scripts/buildSdk.js +135 -0
  96. package/dist/scripts/buildSdk.js.map +1 -0
  97. package/dist/scripts/generateGraphql.d.ts +30 -0
  98. package/dist/scripts/generateGraphql.d.ts.map +1 -0
  99. package/dist/scripts/generateGraphql.js +179 -0
  100. package/dist/scripts/generateGraphql.js.map +1 -0
  101. package/dist/sdk/Mutation.d.ts +5 -8
  102. package/dist/sdk/Mutation.d.ts.map +1 -1
  103. package/dist/sdk/Mutation.js +3 -0
  104. package/dist/sdk/Mutation.js.map +1 -1
  105. package/dist/sdk/Query.d.ts +65 -14
  106. package/dist/sdk/Query.d.ts.map +1 -1
  107. package/dist/sdk/Query.js +64 -12
  108. package/dist/sdk/Query.js.map +1 -1
  109. package/dist/sdk/Subscribe.d.ts +18 -11
  110. package/dist/sdk/Subscribe.d.ts.map +1 -1
  111. package/dist/sdk/Subscribe.js +112 -9
  112. package/dist/sdk/Subscribe.js.map +1 -1
  113. package/dist/sdk/generated/gql.d.ts +636 -66
  114. package/dist/sdk/generated/gql.d.ts.map +1 -1
  115. package/dist/sdk/generated/gql.js +84 -22
  116. package/dist/sdk/generated/gql.js.map +1 -1
  117. package/dist/sdk/generated/graphql.d.ts +8407 -2195
  118. package/dist/sdk/generated/graphql.d.ts.map +1 -1
  119. package/dist/sdk/generated/graphql.js +87 -25
  120. package/dist/sdk/generated/graphql.js.map +1 -1
  121. package/package.json +12 -4
  122. package/src/resources/generated_mutations/CreateApiTokens.graphql +9 -0
  123. package/src/resources/generated_mutations/CreateWebhooks.graphql +80 -0
  124. package/src/resources/generated_mutations/DeleteApiToken.graphql +3 -0
  125. package/src/resources/generated_mutations/DeleteWebhooks.graphql +5 -0
  126. package/src/resources/generated_queries/ApiToken.graphql +9 -0
  127. package/src/resources/generated_queries/ApiTokens.graphql +9 -0
  128. package/src/resources/generated_queries/Balances.graphql +12 -0
  129. package/src/resources/generated_queries/ChartUrls.graphql +7 -0
  130. package/src/resources/generated_queries/FilterExchanges.graphql +43 -0
  131. package/src/resources/generated_queries/FilterNftCollections.graphql +569 -0
  132. package/src/resources/generated_queries/FilterNftParallelAssets.graphql +60 -0
  133. package/src/resources/generated_queries/FilterNftPoolCollections.graphql +71 -0
  134. package/src/resources/generated_queries/FilterNftPools.graphql +124 -0
  135. package/src/resources/generated_queries/FilterPairs.graphql +339 -0
  136. package/src/resources/generated_queries/FilterTokens.graphql +279 -0
  137. package/src/resources/generated_queries/GetBars.graphql +44 -0
  138. package/src/resources/generated_queries/GetCommunityNotes.graphql +20 -0
  139. package/src/resources/generated_queries/GetDetailedNftStats.graphql +831 -0
  140. package/src/resources/generated_queries/GetDetailedPairStats.graphql +938 -0
  141. package/src/resources/generated_queries/GetDetailedPairsStats.graphql +922 -0
  142. package/src/resources/generated_queries/GetEventLabels.graphql +24 -0
  143. package/src/resources/generated_queries/GetExchanges.graphql +12 -0
  144. package/src/resources/generated_queries/GetLatestPairs.graphql +57 -0
  145. package/src/resources/generated_queries/GetLatestTokens.graphql +39 -0
  146. package/src/resources/generated_queries/GetNetworkStats.graphql +13 -0
  147. package/src/resources/generated_queries/GetNetworkStatus.graphql +8 -0
  148. package/src/resources/generated_queries/GetNetworks.graphql +7 -0
  149. package/src/resources/generated_queries/GetNftAssets.graphql +59 -0
  150. package/src/resources/generated_queries/GetNftCollectionMetadata.graphql +75 -0
  151. package/src/resources/generated_queries/GetNftContracts.graphql +39 -0
  152. package/src/resources/generated_queries/GetNftEvents.graphql +54 -0
  153. package/src/resources/generated_queries/GetNftPool.graphql +74 -0
  154. package/src/resources/generated_queries/GetNftPoolCollection.graphql +33 -0
  155. package/src/resources/generated_queries/GetNftPoolCollectionsByExchange.graphql +38 -0
  156. package/src/resources/generated_queries/GetNftPoolEvents.graphql +41 -0
  157. package/src/resources/generated_queries/GetNftPoolStats.graphql +40 -0
  158. package/src/resources/generated_queries/GetNftPoolsByCollectionAndExchange.graphql +89 -0
  159. package/src/resources/generated_queries/GetNftPoolsByOwner.graphql +89 -0
  160. package/src/resources/generated_queries/GetParallelAssets.graphql +50 -0
  161. package/src/resources/generated_queries/GetParallelCardChanges.graphql +57 -0
  162. package/src/resources/generated_queries/GetPrimePoolAssets.graphql +32 -0
  163. package/src/resources/generated_queries/GetPrimePoolEvents.graphql +38 -0
  164. package/src/resources/generated_queries/GetPrimePools.graphql +62 -0
  165. package/src/resources/generated_queries/GetSimulateTokenContractResults.graphql +128 -0
  166. package/src/resources/generated_queries/GetSymbol.graphql +11 -0
  167. package/src/resources/generated_queries/GetTokenCount.graphql +3 -0
  168. package/src/resources/generated_queries/GetTokenEvents.graphql +49 -0
  169. package/src/resources/generated_queries/GetTokenInfo.graphql +17 -0
  170. package/src/resources/generated_queries/GetTokenPrices.graphql +9 -0
  171. package/src/resources/generated_queries/GetTokensInfo.graphql +17 -0
  172. package/src/resources/generated_queries/GetUniV3Ticks.graphql +22 -0
  173. package/src/resources/generated_queries/GetWebhooks.graphql +36 -0
  174. package/src/resources/generated_queries/Holders.graphql +14 -0
  175. package/src/resources/generated_queries/LiquidityLocks.graphql +26 -0
  176. package/src/resources/generated_queries/LiquidityMetadata.graphql +17 -0
  177. package/src/resources/generated_queries/ListFavoriteTokens.graphql +58 -0
  178. package/src/resources/generated_queries/ListPairsForToken.graphql +141 -0
  179. package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +282 -0
  180. package/src/resources/generated_queries/ListTopTokens.graphql +54 -0
  181. package/src/resources/generated_queries/NftHolders.graphql +12 -0
  182. package/src/resources/generated_queries/PairMetadata.graphql +73 -0
  183. package/src/resources/generated_queries/PrimeBalance.graphql +12 -0
  184. package/src/resources/generated_queries/PrimeHolders.graphql +13 -0
  185. package/src/resources/generated_queries/SearchNfts.graphql +35 -0
  186. package/src/resources/generated_queries/Token.graphql +62 -0
  187. package/src/resources/generated_queries/TokenLifecycleEvents.graphql +22 -0
  188. package/src/resources/generated_queries/TokenSparklines.graphql +10 -0
  189. package/src/resources/generated_queries/Tokens.graphql +62 -0
  190. package/src/resources/generated_queries/WalletNftCollectionAssets.graphql +11 -0
  191. package/src/resources/generated_queries/WalletNftCollections.graphql +10 -0
  192. package/src/resources/generated_subscriptions/OnBarsUpdated.graphql +513 -0
  193. package/src/resources/generated_subscriptions/OnDetailedStatsUpdated.graphql +332 -0
  194. package/src/resources/generated_subscriptions/OnEventLabelCreated.graphql +11 -0
  195. package/src/resources/generated_subscriptions/OnEventsCreated.graphql +46 -0
  196. package/src/resources/generated_subscriptions/OnLatestPairUpdated.graphql +42 -0
  197. package/src/resources/generated_subscriptions/OnLatestTokens.graphql +37 -0
  198. package/src/resources/generated_subscriptions/OnNftAssetsCreated.graphql +42 -0
  199. package/src/resources/generated_subscriptions/OnNftEventsCreated.graphql +36 -0
  200. package/src/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +37 -0
  201. package/src/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +73 -0
  202. package/src/resources/generated_subscriptions/OnPriceUpdated.graphql +9 -0
  203. package/src/resources/generated_subscriptions/OnPricesUpdated.graphql +9 -0
  204. package/src/resources/generated_subscriptions/OnSimulateTokenContract.graphql +121 -0
  205. package/src/resources/generated_subscriptions/OnTokenEventsCreated.graphql +39 -0
  206. package/src/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +18 -0
  207. package/src/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +32 -0
  208. package/src/resources/graphql.schema.json +1570 -0
  209. package/src/resources/graphql.ts +148 -0
  210. package/src/resources/schema.graphql +184 -0
  211. package/src/scripts/buildSdk.ts +173 -0
  212. package/src/scripts/generateGraphql.ts +236 -0
  213. package/src/sdk/Mutation.ts +13 -4
  214. package/src/sdk/Query.ts +252 -37
  215. package/src/sdk/Subscribe.ts +230 -41
  216. package/src/sdk/generated/gql.ts +354 -44
  217. package/src/sdk/generated/graphql.ts +889 -151
  218. package/dist/sdk/Query.test.d.ts +0 -2
  219. package/dist/sdk/Query.test.d.ts.map +0 -1
  220. package/dist/sdk/Query.test.js +0 -50
  221. package/dist/sdk/Query.test.js.map +0 -1
  222. package/src/sdk/Query.test.ts +0 -40
  223. package/src/sdk/graphql/CreateWebhooks.graphql +0 -464
  224. package/src/sdk/graphql/FilterExchanges.graphql +0 -23
  225. package/src/sdk/graphql/FilterPairs.graphql +0 -126
  226. package/src/sdk/graphql/FilterTokens.graphql +0 -131
  227. package/src/sdk/graphql/GetPrice.graphql +0 -9
  228. package/src/sdk/graphql/GetTokens.graphql +0 -14
  229. package/src/sdk/graphql/GetWebhooks.graphql +0 -120
  230. package/src/sdk/graphql/OnBarsUpdated.graphql +0 -68
  231. package/src/sdk/graphql/OnEventsCreated.graphql +0 -62
  232. package/src/sdk/graphql/OnNftEventsCreated.graphql +0 -83
@@ -1,61 +1,250 @@
1
- import { ExecutionResult, print } from "graphql";
2
- import { Sink } from "graphql-ws";
1
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT IT DIRECTLY
2
+ import { ExecutionResult, Sink } from "graphql-ws";
3
3
 
4
4
  import {
5
- SubscriptionOnDetailedStatsUpdatedArgs,
6
- SubscriptionOnNftAssetsCreatedArgs,
7
- SubscriptionOnNftEventsCreatedArgs,
8
- } from "../resources/graphql";
9
- import {
10
- OnBarsUpdatedDocument,
11
5
  OnBarsUpdatedSubscription,
12
- OnDetailedStatsUpdatedDocument,
6
+ OnBarsUpdatedSubscriptionVariables,
13
7
  OnDetailedStatsUpdatedSubscription,
14
- OnEventsCreatedDocument,
8
+ OnDetailedStatsUpdatedSubscriptionVariables,
9
+ OnEventLabelCreatedSubscription,
10
+ OnEventLabelCreatedSubscriptionVariables,
15
11
  OnEventsCreatedSubscription,
16
- OnNftAssetsCreatedDocument,
12
+ OnEventsCreatedSubscriptionVariables,
13
+ OnLatestPairUpdatedSubscription,
14
+ OnLatestPairUpdatedSubscriptionVariables,
15
+ OnLatestTokensSubscription,
16
+ OnLatestTokensSubscriptionVariables,
17
17
  OnNftAssetsCreatedSubscription,
18
- OnNftEventsCreatedDocument,
18
+ OnNftAssetsCreatedSubscriptionVariables,
19
19
  OnNftEventsCreatedSubscription,
20
- OnPairMetadataUpdatedDocument,
20
+ OnNftEventsCreatedSubscriptionVariables,
21
+ OnNftPoolEventsCreatedSubscription,
22
+ OnNftPoolEventsCreatedSubscriptionVariables,
21
23
  OnPairMetadataUpdatedSubscription,
22
- OnPriceUpdatedDocument,
24
+ OnPairMetadataUpdatedSubscriptionVariables,
25
+ OnPricesUpdatedSubscription,
26
+ OnPricesUpdatedSubscriptionVariables,
23
27
  OnPriceUpdatedSubscription,
24
- SubscriptionOnBarsUpdatedArgs,
25
- SubscriptionOnEventsCreatedArgs,
26
- SubscriptionOnPairMetadataUpdatedArgs,
27
- SubscriptionOnPriceUpdatedArgs,
28
+ OnPriceUpdatedSubscriptionVariables,
29
+ OnSimulateTokenContractSubscription,
30
+ OnSimulateTokenContractSubscriptionVariables,
31
+ OnTokenEventsCreatedSubscription,
32
+ OnTokenEventsCreatedSubscriptionVariables,
33
+ OnTokenLifecycleEventsCreatedSubscription,
34
+ OnTokenLifecycleEventsCreatedSubscriptionVariables,
35
+ OnUnconfirmedEventsCreatedSubscription,
36
+ OnUnconfirmedEventsCreatedSubscriptionVariables,
28
37
  } from "./generated/graphql";
29
38
  import { Codex } from "./index";
30
39
 
31
40
  export class Subscribe {
32
41
  constructor(private sdk: Codex) {}
33
- tokenPrices = async (
34
- vars: SubscriptionOnPriceUpdatedArgs,
35
- sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
36
- ) => this.sdk.subscribe(print(OnPriceUpdatedDocument), vars, sink);
37
- tokenEvents = async (
38
- vars: SubscriptionOnEventsCreatedArgs,
42
+ onPricesUpdated = async (
43
+ vars: OnPricesUpdatedSubscriptionVariables,
44
+ sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
45
+ ) =>
46
+ this.sdk.subscribe(
47
+ `subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
48
+ onPricesUpdated (input: $input) {
49
+ address, confidence, networkId, priceUsd, timestamp
50
+ }
51
+ }`,
52
+ vars,
53
+ sink,
54
+ );
55
+ onDetailedStatsUpdated = async (
56
+ vars: OnDetailedStatsUpdatedSubscriptionVariables,
57
+ sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
58
+ ) =>
59
+ this.sdk.subscribe(
60
+ `subscription OnDetailedStatsUpdated($pairId: String, $statsType: TokenPairStatisticsType, $tokenOfInterest: TokenOfInterest) {
61
+ onDetailedStatsUpdated (pairId: $pairId, statsType: $statsType, tokenOfInterest: $tokenOfInterest) {
62
+ bucketCount, pairId, queryTimestamp, statsType, stats_day1 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour1 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour4 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour12 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_min5 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, tokenOfInterest
63
+ }
64
+ }`,
65
+ vars,
66
+ sink,
67
+ );
68
+ onLatestPairUpdated = async (
69
+ vars: OnLatestPairUpdatedSubscriptionVariables,
70
+ sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
71
+ ) =>
72
+ this.sdk.subscribe(
73
+ `subscription OnLatestPairUpdated($id: String, $networkId: Int) {
74
+ onLatestPairUpdated (id: $id, networkId: $networkId) {
75
+ address, exchangeHash, id, initialPriceUsd, liquidAt, liquidity, liquidityToken, networkId, newToken, nonLiquidityToken, oldToken, priceChange, priceUsd, token0 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, token1 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, transactionHash
76
+ }
77
+ }`,
78
+ vars,
79
+ sink,
80
+ );
81
+ onEventsCreated = async (
82
+ vars: OnEventsCreatedSubscriptionVariables,
39
83
  sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
40
- ) => this.sdk.subscribe(print(OnEventsCreatedDocument), vars, sink);
41
- bars = async (
42
- vars: SubscriptionOnBarsUpdatedArgs,
84
+ ) =>
85
+ this.sdk.subscribe(
86
+ `subscription OnEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
87
+ onEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
88
+ address, events { address, baseTokenPrice, blockHash, blockNumber, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex }, id, networkId, quoteToken
89
+ }
90
+ }`,
91
+ vars,
92
+ sink,
93
+ );
94
+ onSimulateTokenContract = async (
95
+ vars: OnSimulateTokenContractSubscriptionVariables,
96
+ sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
97
+ ) =>
98
+ this.sdk.subscribe(
99
+ `subscription OnSimulateTokenContract($contractAddress: String, $networkId: Int!, $simulationId: String) {
100
+ onSimulateTokenContract (contractAddress: $contractAddress, networkId: $networkId, simulationId: $simulationId) {
101
+ analysisType, blockNumber, contractBalance { tokenContractEthBalance, tokenContractTokenBalance }, contractHashKey, creator { creatorAddress, creatorEthBalance, creatorTokenBalance }, deploy { deploySuccess, tokenMintedToDeployer }, errors { contractBalanceErrors { tokenContractEthBalanceError, tokenContractTokenBalanceError }, creatorErrors { creatorEthBalanceError, creatorTokenBalanceError }, deployErrors { deployError, tokenMintedToDeployerError }, liquidityErrors { addLiquidityError, lpTotalSupplyError, postLiquidityEnableTradingError, preLiquidityEnableTradingError }, ownerErrors { ownerAddressError, ownerEthBalanceError, ownerTokenBalanceError }, simulatorError, swapErrors { buyError, buyErrorEnum, sellError, sellErrorEnum }, tokenErrors { canRenounceOwnershipError, canTransferOwnershipError, decimalsError, tokenNameError, tokenSymbolError, totalSupplyError }, transferErrors { tokenContractApprovalError, tokenTransferredToContractError, userApprovalError } }, id, liquidity { addLiquiditySuccess, liquiditySetByPreLiquidityOpenTradingCall, lpTotalSupply, pairAddress, postLiquidityEnableTradingCall, postLiquidityEnableTradingSuccess, preLiquidityEnableTradingCall, preLiquidityEnableTradingSuccess, preLiquidityEnableTradingSupportsTransfer }, networkId, owner { ownerAddress, ownerEthBalance, ownerTokenBalance }, sortKey, status, swap { buyGasUsed, buySuccess, buyTax, maxBuyAmount, maxSellAmount, sellGasUsed, sellSuccess, sellTax }, timestamp, token { canRenounceOwnership, canTransferOwnership, contractAddress, decimals, isOwnerRenounced, tokenName, tokenSymbol, totalSupply }, transfer { tokenContractApprovalSuccess, tokenTransferredToContractSuccess, userApprovalSuccess }, uuid, uuidHashKey
102
+ }
103
+ }`,
104
+ vars,
105
+ sink,
106
+ );
107
+ onBarsUpdated = async (
108
+ vars: OnBarsUpdatedSubscriptionVariables,
43
109
  sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
44
- ) => this.sdk.subscribe(print(OnBarsUpdatedDocument), vars, sink);
45
- detailedPairStats = async (
46
- vars: SubscriptionOnDetailedStatsUpdatedArgs,
47
- sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
48
- ) => this.sdk.subscribe(print(OnDetailedStatsUpdatedDocument), vars, sink);
49
- pairMetadata = async (
50
- vars: SubscriptionOnPairMetadataUpdatedArgs,
110
+ ) =>
111
+ this.sdk.subscribe(
112
+ `subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
113
+ onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken, statsType: $statsType) {
114
+ aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, statsType, timestamp
115
+ }
116
+ }`,
117
+ vars,
118
+ sink,
119
+ );
120
+ onPairMetadataUpdated = async (
121
+ vars: OnPairMetadataUpdatedSubscriptionVariables,
51
122
  sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
52
- ) => this.sdk.subscribe(print(OnPairMetadataUpdatedDocument), vars, sink);
53
- nftAssets = async (
54
- vars: SubscriptionOnNftAssetsCreatedArgs,
123
+ ) =>
124
+ this.sdk.subscribe(
125
+ `subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
126
+ onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, statsType: $statsType) {
127
+ exchangeId, fee, highPrice1, highPrice1w, highPrice4, highPrice12, highPrice24, id, liquidity, liquidityToken, lowPrice1, lowPrice1w, lowPrice4, lowPrice12, lowPrice24, networkId, nonLiquidityToken, pairAddress, price, priceChange1, priceChange1w, priceChange4, priceChange5m, priceChange12, priceChange24, quoteToken, statsType, tickSpacing, token0 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, token1 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, volume1, volume1w, volume4, volume12, volume24
128
+ }
129
+ }`,
130
+ vars,
131
+ sink,
132
+ );
133
+ onLatestTokens = async (
134
+ vars: OnLatestTokensSubscriptionVariables,
135
+ sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
136
+ ) =>
137
+ this.sdk.subscribe(
138
+ `subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
139
+ onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
140
+ blockHash, blockNumber, creatorAddress, creatorBalance, decimals, id, networkId, simulationResults { buyGasUsed, buySuccess, buyTax, canRenounceOwnership, canTransferOwnership, isOwnerRenounced, maxBuyAmount, maxSellAmount, openTradingCall, sellGasUsed, sellSuccess, sellTax }, timeCreated, tokenAddress, tokenName, tokenSymbol, totalSupply, traceIndex, transactionHash, transactionIndex
141
+ }
142
+ }`,
143
+ vars,
144
+ sink,
145
+ );
146
+ onNftAssetsCreated = async (
147
+ vars: OnNftAssetsCreatedSubscriptionVariables,
55
148
  sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
56
- ) => this.sdk.subscribe(print(OnNftAssetsCreatedDocument), vars, sink);
57
- nftEvents = async (
58
- vars: SubscriptionOnNftEventsCreatedArgs,
149
+ ) =>
150
+ this.sdk.subscribe(
151
+ `subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
152
+ onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
153
+ address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri
154
+ }
155
+ }`,
156
+ vars,
157
+ sink,
158
+ );
159
+ onUnconfirmedEventsCreated = async (
160
+ vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
161
+ sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
162
+ ) =>
163
+ this.sdk.subscribe(
164
+ `subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
165
+ onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
166
+ address, events { address, blockHash, blockNumber, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
167
+ }
168
+ }`,
169
+ vars,
170
+ sink,
171
+ );
172
+ onEventLabelCreated = async (
173
+ vars: OnEventLabelCreatedSubscriptionVariables,
174
+ sink: Sink<ExecutionResult<OnEventLabelCreatedSubscription>>,
175
+ ) =>
176
+ this.sdk.subscribe(
177
+ `subscription OnEventLabelCreated($id: String) {
178
+ onEventLabelCreated (id: $id) {
179
+ id, label, logIndex, networkId, timestamp, transactionHash, transactionIndex
180
+ }
181
+ }`,
182
+ vars,
183
+ sink,
184
+ );
185
+ onPriceUpdated = async (
186
+ vars: OnPriceUpdatedSubscriptionVariables,
187
+ sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
188
+ ) =>
189
+ this.sdk.subscribe(
190
+ `subscription OnPriceUpdated($address: String, $networkId: Int) {
191
+ onPriceUpdated (address: $address, networkId: $networkId) {
192
+ address, confidence, networkId, priceUsd, timestamp
193
+ }
194
+ }`,
195
+ vars,
196
+ sink,
197
+ );
198
+ onNftPoolEventsCreated = async (
199
+ vars: OnNftPoolEventsCreatedSubscriptionVariables,
200
+ sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
201
+ ) =>
202
+ this.sdk.subscribe(
203
+ `subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
204
+ onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
205
+ collectionAddress, events { blockHash, blockNumber, collectionAddress, collectionId, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
206
+ }
207
+ }`,
208
+ vars,
209
+ sink,
210
+ );
211
+ onTokenLifecycleEventsCreated = async (
212
+ vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
213
+ sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
214
+ ) =>
215
+ this.sdk.subscribe(
216
+ `subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
217
+ onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
218
+ events { blockHash, blockNumber, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
219
+ }
220
+ }`,
221
+ vars,
222
+ sink,
223
+ );
224
+ onTokenEventsCreated = async (
225
+ vars: OnTokenEventsCreatedSubscriptionVariables,
226
+ sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
227
+ ) =>
228
+ this.sdk.subscribe(
229
+ `subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
230
+ onTokenEventsCreated (input: $input) {
231
+ events { address, baseTokenPrice, blockHash, blockNumber, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex }, id
232
+ }
233
+ }`,
234
+ vars,
235
+ sink,
236
+ );
237
+ onNftEventsCreated = async (
238
+ vars: OnNftEventsCreatedSubscriptionVariables,
59
239
  sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
60
- ) => this.sdk.subscribe(print(OnNftEventsCreatedDocument), vars, sink);
240
+ ) =>
241
+ this.sdk.subscribe(
242
+ `subscription OnNftEventsCreated($address: String, $networkId: Int) {
243
+ onNftEventsCreated (address: $address, networkId: $networkId) {
244
+ address, events { aggregatorAddress, blockNumber, contractAddress, eventType, exchangeAddress, fillSource, id, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, logIndex, maker, networkId, numberOfTokens, orderDirection, paymentTokenAddress, poolAddress, priceError, sortKey, taker, timestamp, tokenId, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, transactionHash, transactionIndex }, id, networkId
245
+ }
246
+ }`,
247
+ vars,
248
+ sink,
249
+ );
61
250
  }