@codex-data/sdk 1.0.0-rc2 → 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 (93) hide show
  1. package/dist/resources/generated_mutations/CreateWebhooks.graphql +392 -0
  2. package/dist/resources/generated_queries/FilterPairs.graphql +4 -0
  3. package/dist/resources/generated_queries/FilterTokens.graphql +4 -0
  4. package/dist/resources/generated_queries/GetCommunityNotes.graphql +100 -0
  5. package/dist/resources/generated_queries/GetEventLabels.graphql +11 -0
  6. package/dist/resources/generated_queries/GetNftEvents.graphql +46 -0
  7. package/dist/resources/generated_queries/GetNftPoolEvents.graphql +375 -0
  8. package/dist/resources/generated_queries/GetPrimePoolEvents.graphql +118 -0
  9. package/dist/resources/generated_queries/GetTokenEvents.graphql +49 -0
  10. package/dist/resources/generated_queries/GetTokenEventsForMaker.graphql +49 -0
  11. package/dist/resources/generated_queries/GetTokenPrices.graphql +1 -0
  12. package/dist/resources/generated_queries/GetWebhooks.graphql +98 -0
  13. package/dist/resources/generated_queries/TokenLifecycleEvents.graphql +12 -0
  14. package/dist/resources/generated_subscriptions/OnBarsUpdated.graphql +42 -0
  15. package/dist/resources/generated_subscriptions/OnEventLabelCreated.graphql +11 -0
  16. package/dist/resources/generated_subscriptions/OnEventsCreated.graphql +49 -0
  17. package/dist/resources/generated_subscriptions/OnNftEventsCreated.graphql +46 -0
  18. package/dist/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +375 -0
  19. package/dist/resources/generated_subscriptions/OnPriceUpdated.graphql +1 -0
  20. package/dist/resources/generated_subscriptions/OnPricesUpdated.graphql +1 -0
  21. package/dist/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +551 -0
  22. package/dist/resources/generated_subscriptions/OnTokenEventsCreated.graphql +49 -0
  23. package/dist/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +12 -0
  24. package/dist/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +70 -0
  25. package/dist/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +17 -0
  26. package/dist/resources/graphql.d.ts +161 -12
  27. package/dist/resources/graphql.d.ts.map +1 -1
  28. package/dist/resources/graphql.js +8 -0
  29. package/dist/resources/graphql.js.map +1 -1
  30. package/dist/resources/graphql.schema.json +1012 -118
  31. package/dist/resources/graphql.ts +169 -13
  32. package/dist/resources/mutations_override/CreateWebhooks.graphql +472 -0
  33. package/dist/resources/queries_override/GetEventLabels.graphql +35 -0
  34. package/dist/resources/queries_override/GetWebhooks.graphql +134 -0
  35. package/dist/resources/schema.graphql +230 -14
  36. package/dist/resources/subscriptions_override/OnEventLabelCreated.graphql +22 -0
  37. package/dist/scripts/generateGraphql.d.ts +1 -0
  38. package/dist/scripts/generateGraphql.d.ts.map +1 -1
  39. package/dist/scripts/generateGraphql.js +48 -12
  40. package/dist/scripts/generateGraphql.js.map +1 -1
  41. package/dist/sdk/Subscribe.d.ts +3 -1
  42. package/dist/sdk/Subscribe.d.ts.map +1 -1
  43. package/dist/sdk/Subscribe.js +44 -12
  44. package/dist/sdk/Subscribe.js.map +1 -1
  45. package/dist/sdk/generated/gql.d.ts +62 -46
  46. package/dist/sdk/generated/gql.d.ts.map +1 -1
  47. package/dist/sdk/generated/gql.js +25 -23
  48. package/dist/sdk/generated/gql.js.map +1 -1
  49. package/dist/sdk/generated/graphql.d.ts +2917 -68
  50. package/dist/sdk/generated/graphql.d.ts.map +1 -1
  51. package/dist/sdk/generated/graphql.js +34 -24
  52. package/dist/sdk/generated/graphql.js.map +1 -1
  53. package/dist/sdk/index.d.ts.map +1 -1
  54. package/dist/sdk/index.js +1 -0
  55. package/dist/sdk/index.js.map +1 -1
  56. package/package.json +2 -2
  57. package/src/resources/generated_mutations/CreateWebhooks.graphql +392 -0
  58. package/src/resources/generated_queries/FilterPairs.graphql +4 -0
  59. package/src/resources/generated_queries/FilterTokens.graphql +4 -0
  60. package/src/resources/generated_queries/GetCommunityNotes.graphql +100 -0
  61. package/src/resources/generated_queries/GetEventLabels.graphql +11 -0
  62. package/src/resources/generated_queries/GetNftEvents.graphql +46 -0
  63. package/src/resources/generated_queries/GetNftPoolEvents.graphql +375 -0
  64. package/src/resources/generated_queries/GetPrimePoolEvents.graphql +118 -0
  65. package/src/resources/generated_queries/GetTokenEvents.graphql +49 -0
  66. package/src/resources/generated_queries/GetTokenEventsForMaker.graphql +49 -0
  67. package/src/resources/generated_queries/GetTokenPrices.graphql +1 -0
  68. package/src/resources/generated_queries/GetWebhooks.graphql +98 -0
  69. package/src/resources/generated_queries/TokenLifecycleEvents.graphql +12 -0
  70. package/src/resources/generated_subscriptions/OnBarsUpdated.graphql +42 -0
  71. package/src/resources/generated_subscriptions/OnEventLabelCreated.graphql +11 -0
  72. package/src/resources/generated_subscriptions/OnEventsCreated.graphql +49 -0
  73. package/src/resources/generated_subscriptions/OnNftEventsCreated.graphql +46 -0
  74. package/src/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +375 -0
  75. package/src/resources/generated_subscriptions/OnPriceUpdated.graphql +1 -0
  76. package/src/resources/generated_subscriptions/OnPricesUpdated.graphql +1 -0
  77. package/src/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +551 -0
  78. package/src/resources/generated_subscriptions/OnTokenEventsCreated.graphql +49 -0
  79. package/src/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +12 -0
  80. package/src/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +70 -0
  81. package/src/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +17 -0
  82. package/src/resources/graphql.schema.json +1012 -118
  83. package/src/resources/graphql.ts +169 -13
  84. package/src/resources/mutations_override/CreateWebhooks.graphql +472 -0
  85. package/src/resources/queries_override/GetEventLabels.graphql +35 -0
  86. package/src/resources/queries_override/GetWebhooks.graphql +134 -0
  87. package/src/resources/schema.graphql +230 -14
  88. package/src/resources/subscriptions_override/OnEventLabelCreated.graphql +22 -0
  89. package/src/scripts/generateGraphql.ts +87 -17
  90. package/src/sdk/Subscribe.ts +60 -12
  91. package/src/sdk/generated/gql.ts +56 -46
  92. package/src/sdk/generated/graphql.ts +233 -59
  93. package/src/sdk/index.ts +1 -0
@@ -28,10 +28,14 @@ import {
28
28
  OnPriceUpdatedSubscriptionVariables,
29
29
  OnSimulateTokenContractSubscription,
30
30
  OnSimulateTokenContractSubscriptionVariables,
31
+ OnTokenBarsUpdatedSubscription,
32
+ OnTokenBarsUpdatedSubscriptionVariables,
31
33
  OnTokenEventsCreatedSubscription,
32
34
  OnTokenEventsCreatedSubscriptionVariables,
33
35
  OnTokenLifecycleEventsCreatedSubscription,
34
36
  OnTokenLifecycleEventsCreatedSubscriptionVariables,
37
+ OnUnconfirmedBarsUpdatedSubscription,
38
+ OnUnconfirmedBarsUpdatedSubscriptionVariables,
35
39
  OnUnconfirmedEventsCreatedSubscription,
36
40
  OnUnconfirmedEventsCreatedSubscriptionVariables,
37
41
  } from "./generated/graphql";
@@ -46,7 +50,7 @@ export class Subscribe {
46
50
  this.sdk.subscribe(
47
51
  `subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
48
52
  onPricesUpdated (input: $input) {
49
- address, confidence, networkId, priceUsd, timestamp
53
+ address, confidence, networkId, poolAddress, priceUsd, timestamp
50
54
  }
51
55
  }`,
52
56
  vars,
@@ -59,7 +63,7 @@ export class Subscribe {
59
63
  this.sdk.subscribe(
60
64
  `subscription OnNftEventsCreated($address: String, $networkId: Int) {
61
65
  onNftEventsCreated (address: $address, networkId: $networkId) {
62
- 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
66
+ 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, tradeOffer { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, tradeReceived { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, transactionHash, transactionIndex }, id, networkId
63
67
  }
64
68
  }`,
65
69
  vars,
@@ -72,7 +76,20 @@ export class Subscribe {
72
76
  this.sdk.subscribe(
73
77
  `subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
74
78
  onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken, statsType: $statsType) {
75
- 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
79
+ 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 } }, r30S { 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, quoteTokenAddress, statsType, timestamp
80
+ }
81
+ }`,
82
+ vars,
83
+ sink,
84
+ );
85
+ onTokenBarsUpdated = async (
86
+ vars: OnTokenBarsUpdatedSubscriptionVariables,
87
+ sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
88
+ ) =>
89
+ this.sdk.subscribe(
90
+ `subscription OnTokenBarsUpdated($statsType: TokenPairStatisticsType, $tokenId: String) {
91
+ onTokenBarsUpdated (statsType: $statsType, tokenId: $tokenId) {
92
+ 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 } }, r30S { 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, tokenAddress, tokenId
76
93
  }
77
94
  }`,
78
95
  vars,
@@ -85,7 +102,7 @@ export class Subscribe {
85
102
  this.sdk.subscribe(
86
103
  `subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
87
104
  onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
88
- address, events { address, blockHash, blockNumber, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
105
+ address, events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
89
106
  }
90
107
  }`,
91
108
  vars,
@@ -111,7 +128,7 @@ export class Subscribe {
111
128
  this.sdk.subscribe(
112
129
  `subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
113
130
  onTokenEventsCreated (input: $input) {
114
- 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
131
+ events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, 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
115
132
  }
116
133
  }`,
117
134
  vars,
@@ -137,7 +154,7 @@ export class Subscribe {
137
154
  this.sdk.subscribe(
138
155
  `subscription OnPriceUpdated($address: String, $networkId: Int) {
139
156
  onPriceUpdated (address: $address, networkId: $networkId) {
140
- address, confidence, networkId, priceUsd, timestamp
157
+ address, confidence, networkId, poolAddress, priceUsd, timestamp
141
158
  }
142
159
  }`,
143
160
  vars,
@@ -163,7 +180,7 @@ export class Subscribe {
163
180
  this.sdk.subscribe(
164
181
  `subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
165
182
  onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
166
- collectionAddress, events { blockHash, blockNumber, collectionAddress, collectionId, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
183
+ collectionAddress, events { blockHash, blockNumber, collectionAddress, collectionId, data { ... on NewPoolEventData { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftTokenBalance, ownerAddress, poolAddress, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NewPoolEventDataV2 { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftAssets { 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 }, nftTokenIds, nftTokenQuantities, ownerAddress, poolAddress, poolNftType, propertyChecker, royalties { percent, recipient }, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NftPoolAssetRecipientUpdateEventData { newAssetRecipient, type }, ... on NftPoolDeltaUpdateEventData { newDelta, type }, ... on NftPoolFeeUpdateEventData { nbtRatio, newFeeT, type, usdRatio }, ... on NftPoolNftDepositEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftDepositEventDataV2 { nftAssets { 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 }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventDataV2 { nftAssets { 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 }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolOwnershipTransferredEventDataV2 { newOwner, type }, ... on NftPoolSpotPriceUpdateEventData { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolSpotPriceUpdateEventDataV2 { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolTokenDepositEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenDepositEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on SwapNftInPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftInPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { 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 }, nftsTransfered { amountT, nftQuantity, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { 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 }, nftsTransfered { amountT, nftQuantity, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio } }, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
167
184
  }
168
185
  }`,
169
186
  vars,
@@ -189,7 +206,7 @@ export class Subscribe {
189
206
  this.sdk.subscribe(
190
207
  `subscription OnEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
191
208
  onEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
192
- 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
209
+ address, events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, 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
193
210
  }
194
211
  }`,
195
212
  vars,
@@ -201,10 +218,28 @@ export class Subscribe {
201
218
  ) =>
202
219
  this.sdk.subscribe(
203
220
  `subscription OnEventLabelCreated($id: String) {
204
- onEventLabelCreated (id: $id) {
205
- id, label, logIndex, networkId, timestamp, transactionHash, transactionIndex
221
+ onEventLabelCreated(id: $id) {
222
+ data {
223
+ ... on FrontRunLabelData {
224
+ index
225
+ token0DrainedAmount
226
+ token1DrainedAmount
227
+ }
228
+ ... on SandwichedLabelData {
229
+ token0DrainedAmountSandwich: token0DrainedAmount
230
+ token1DrainedAmountSandwich: token1DrainedAmount
231
+ }
232
+ }
233
+ id
234
+ label
235
+ logIndex
236
+ networkId
237
+ timestamp
238
+ transactionHash
239
+ transactionIndex
206
240
  }
207
- }`,
241
+ }
242
+ `,
208
243
  vars,
209
244
  sink,
210
245
  );
@@ -215,7 +250,20 @@ export class Subscribe {
215
250
  this.sdk.subscribe(
216
251
  `subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
217
252
  onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
218
- events { blockHash, blockNumber, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
253
+ events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
254
+ }
255
+ }`,
256
+ vars,
257
+ sink,
258
+ );
259
+ onUnconfirmedBarsUpdated = async (
260
+ vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
261
+ sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
262
+ ) =>
263
+ this.sdk.subscribe(
264
+ `subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
265
+ onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
266
+ aggregates { r1 { c, h, l, o, t, v, volume }, r1S { c, h, l, o, t, v, volume }, r5 { c, h, l, o, t, v, volume }, r5S { c, h, l, o, t, v, volume }, r15 { c, h, l, o, t, v, volume }, r15S { c, h, l, o, t, v, volume } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, timestamp
219
267
  }
220
268
  }`,
221
269
  vars,