@codex-data/sdk 1.0.0-rc1 → 1.0.0-rc2

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 (59) hide show
  1. package/dist/resources/generated_queries/FilterPairs.graphql +4 -0
  2. package/dist/resources/generated_queries/FilterTokens.graphql +3 -0
  3. package/dist/resources/generated_queries/GetDetailedPairStats.graphql +2 -0
  4. package/dist/resources/generated_queries/GetDetailedPairsStats.graphql +2 -0
  5. package/dist/resources/generated_queries/GetTokenEventsForMaker.graphql +49 -0
  6. package/dist/resources/generated_queries/GetTokenInfo.graphql +1 -0
  7. package/dist/resources/generated_queries/GetTokensInfo.graphql +1 -0
  8. package/dist/resources/generated_queries/ListFavoriteTokens.graphql +1 -0
  9. package/dist/resources/generated_queries/ListPairsForToken.graphql +2 -0
  10. package/dist/resources/generated_queries/ListPairsWithMetadataForToken.graphql +4 -0
  11. package/dist/resources/generated_queries/ListTopTokens.graphql +1 -0
  12. package/dist/resources/generated_queries/Token.graphql +1 -0
  13. package/dist/resources/generated_queries/Tokens.graphql +1 -0
  14. package/dist/resources/graphql.d.ts +44 -1
  15. package/dist/resources/graphql.d.ts.map +1 -1
  16. package/dist/resources/graphql.js.map +1 -1
  17. package/dist/resources/graphql.schema.json +334 -5
  18. package/dist/resources/graphql.ts +51 -1
  19. package/dist/resources/schema.graphql +48 -3
  20. package/dist/sdk/Mutation.d.ts +1 -1
  21. package/dist/sdk/Mutation.js +1 -1
  22. package/dist/sdk/Query.d.ts +55 -54
  23. package/dist/sdk/Query.d.ts.map +1 -1
  24. package/dist/sdk/Query.js +54 -53
  25. package/dist/sdk/Query.js.map +1 -1
  26. package/dist/sdk/Subscribe.d.ts +10 -10
  27. package/dist/sdk/Subscribe.d.ts.map +1 -1
  28. package/dist/sdk/Subscribe.js +53 -53
  29. package/dist/sdk/Subscribe.js.map +1 -1
  30. package/dist/sdk/generated/gql.d.ts +34 -24
  31. package/dist/sdk/generated/gql.d.ts.map +1 -1
  32. package/dist/sdk/generated/gql.js +13 -12
  33. package/dist/sdk/generated/gql.js.map +1 -1
  34. package/dist/sdk/generated/graphql.d.ts +124 -1
  35. package/dist/sdk/generated/graphql.d.ts.map +1 -1
  36. package/dist/sdk/generated/graphql.js +15 -14
  37. package/dist/sdk/generated/graphql.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/resources/generated_queries/FilterPairs.graphql +4 -0
  40. package/src/resources/generated_queries/FilterTokens.graphql +3 -0
  41. package/src/resources/generated_queries/GetDetailedPairStats.graphql +2 -0
  42. package/src/resources/generated_queries/GetDetailedPairsStats.graphql +2 -0
  43. package/src/resources/generated_queries/GetTokenEventsForMaker.graphql +49 -0
  44. package/src/resources/generated_queries/GetTokenInfo.graphql +1 -0
  45. package/src/resources/generated_queries/GetTokensInfo.graphql +1 -0
  46. package/src/resources/generated_queries/ListFavoriteTokens.graphql +1 -0
  47. package/src/resources/generated_queries/ListPairsForToken.graphql +2 -0
  48. package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +4 -0
  49. package/src/resources/generated_queries/ListTopTokens.graphql +1 -0
  50. package/src/resources/generated_queries/Token.graphql +1 -0
  51. package/src/resources/generated_queries/Tokens.graphql +1 -0
  52. package/src/resources/graphql.schema.json +334 -5
  53. package/src/resources/graphql.ts +51 -1
  54. package/src/resources/schema.graphql +48 -3
  55. package/src/sdk/Mutation.ts +2 -2
  56. package/src/sdk/Query.ts +117 -113
  57. package/src/sdk/Subscribe.ts +84 -84
  58. package/src/sdk/generated/gql.ts +29 -24
  59. package/src/sdk/generated/graphql.ts +86 -25
@@ -52,157 +52,157 @@ export class Subscribe {
52
52
  vars,
53
53
  sink,
54
54
  );
55
- onDetailedStatsUpdated = async (
56
- vars: OnDetailedStatsUpdatedSubscriptionVariables,
57
- sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
55
+ onNftEventsCreated = async (
56
+ vars: OnNftEventsCreatedSubscriptionVariables,
57
+ sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
58
58
  ) =>
59
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
60
+ `subscription OnNftEventsCreated($address: String, $networkId: Int) {
61
+ 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
63
63
  }
64
64
  }`,
65
65
  vars,
66
66
  sink,
67
67
  );
68
- onLatestPairUpdated = async (
69
- vars: OnLatestPairUpdatedSubscriptionVariables,
70
- sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
68
+ onBarsUpdated = async (
69
+ vars: OnBarsUpdatedSubscriptionVariables,
70
+ sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
71
71
  ) =>
72
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
73
+ `subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
74
+ 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
76
76
  }
77
77
  }`,
78
78
  vars,
79
79
  sink,
80
80
  );
81
- onEventsCreated = async (
82
- vars: OnEventsCreatedSubscriptionVariables,
83
- sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
81
+ onUnconfirmedEventsCreated = async (
82
+ vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
83
+ sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
84
84
  ) =>
85
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
86
+ `subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
87
+ 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
89
89
  }
90
90
  }`,
91
91
  vars,
92
92
  sink,
93
93
  );
94
- onSimulateTokenContract = async (
95
- vars: OnSimulateTokenContractSubscriptionVariables,
96
- sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
94
+ onLatestPairUpdated = async (
95
+ vars: OnLatestPairUpdatedSubscriptionVariables,
96
+ sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
97
97
  ) =>
98
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
99
+ `subscription OnLatestPairUpdated($id: String, $networkId: Int) {
100
+ onLatestPairUpdated (id: $id, networkId: $networkId) {
101
+ 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
102
102
  }
103
103
  }`,
104
104
  vars,
105
105
  sink,
106
106
  );
107
- onBarsUpdated = async (
108
- vars: OnBarsUpdatedSubscriptionVariables,
109
- sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
107
+ onTokenEventsCreated = async (
108
+ vars: OnTokenEventsCreatedSubscriptionVariables,
109
+ sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
110
110
  ) =>
111
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
112
+ `subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
113
+ 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
115
115
  }
116
116
  }`,
117
117
  vars,
118
118
  sink,
119
119
  );
120
- onPairMetadataUpdated = async (
121
- vars: OnPairMetadataUpdatedSubscriptionVariables,
122
- sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
120
+ onNftAssetsCreated = async (
121
+ vars: OnNftAssetsCreatedSubscriptionVariables,
122
+ sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
123
123
  ) =>
124
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
125
+ `subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
126
+ onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
127
+ 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
128
128
  }
129
129
  }`,
130
130
  vars,
131
131
  sink,
132
132
  );
133
- onLatestTokens = async (
134
- vars: OnLatestTokensSubscriptionVariables,
135
- sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
133
+ onPriceUpdated = async (
134
+ vars: OnPriceUpdatedSubscriptionVariables,
135
+ sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
136
136
  ) =>
137
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
138
+ `subscription OnPriceUpdated($address: String, $networkId: Int) {
139
+ onPriceUpdated (address: $address, networkId: $networkId) {
140
+ address, confidence, networkId, priceUsd, timestamp
141
141
  }
142
142
  }`,
143
143
  vars,
144
144
  sink,
145
145
  );
146
- onNftAssetsCreated = async (
147
- vars: OnNftAssetsCreatedSubscriptionVariables,
148
- sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
146
+ onLatestTokens = async (
147
+ vars: OnLatestTokensSubscriptionVariables,
148
+ sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
149
149
  ) =>
150
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
151
+ `subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
152
+ onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
153
+ 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
154
154
  }
155
155
  }`,
156
156
  vars,
157
157
  sink,
158
158
  );
159
- onUnconfirmedEventsCreated = async (
160
- vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
161
- sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
159
+ onNftPoolEventsCreated = async (
160
+ vars: OnNftPoolEventsCreatedSubscriptionVariables,
161
+ sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
162
162
  ) =>
163
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
164
+ `subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
165
+ 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
167
167
  }
168
168
  }`,
169
169
  vars,
170
170
  sink,
171
171
  );
172
- onEventLabelCreated = async (
173
- vars: OnEventLabelCreatedSubscriptionVariables,
174
- sink: Sink<ExecutionResult<OnEventLabelCreatedSubscription>>,
172
+ onSimulateTokenContract = async (
173
+ vars: OnSimulateTokenContractSubscriptionVariables,
174
+ sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
175
175
  ) =>
176
176
  this.sdk.subscribe(
177
- `subscription OnEventLabelCreated($id: String) {
178
- onEventLabelCreated (id: $id) {
179
- id, label, logIndex, networkId, timestamp, transactionHash, transactionIndex
177
+ `subscription OnSimulateTokenContract($contractAddress: String, $networkId: Int!, $simulationId: String) {
178
+ onSimulateTokenContract (contractAddress: $contractAddress, networkId: $networkId, simulationId: $simulationId) {
179
+ 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
180
180
  }
181
181
  }`,
182
182
  vars,
183
183
  sink,
184
184
  );
185
- onPriceUpdated = async (
186
- vars: OnPriceUpdatedSubscriptionVariables,
187
- sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
185
+ onEventsCreated = async (
186
+ vars: OnEventsCreatedSubscriptionVariables,
187
+ sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
188
188
  ) =>
189
189
  this.sdk.subscribe(
190
- `subscription OnPriceUpdated($address: String, $networkId: Int) {
191
- onPriceUpdated (address: $address, networkId: $networkId) {
192
- address, confidence, networkId, priceUsd, timestamp
190
+ `subscription OnEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
191
+ 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
193
193
  }
194
194
  }`,
195
195
  vars,
196
196
  sink,
197
197
  );
198
- onNftPoolEventsCreated = async (
199
- vars: OnNftPoolEventsCreatedSubscriptionVariables,
200
- sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
198
+ onEventLabelCreated = async (
199
+ vars: OnEventLabelCreatedSubscriptionVariables,
200
+ sink: Sink<ExecutionResult<OnEventLabelCreatedSubscription>>,
201
201
  ) =>
202
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
203
+ `subscription OnEventLabelCreated($id: String) {
204
+ onEventLabelCreated (id: $id) {
205
+ id, label, logIndex, networkId, timestamp, transactionHash, transactionIndex
206
206
  }
207
207
  }`,
208
208
  vars,
@@ -221,27 +221,27 @@ export class Subscribe {
221
221
  vars,
222
222
  sink,
223
223
  );
224
- onTokenEventsCreated = async (
225
- vars: OnTokenEventsCreatedSubscriptionVariables,
226
- sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
224
+ onDetailedStatsUpdated = async (
225
+ vars: OnDetailedStatsUpdatedSubscriptionVariables,
226
+ sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
227
227
  ) =>
228
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
229
+ `subscription OnDetailedStatsUpdated($pairId: String, $statsType: TokenPairStatisticsType, $tokenOfInterest: TokenOfInterest) {
230
+ onDetailedStatsUpdated (pairId: $pairId, statsType: $statsType, tokenOfInterest: $tokenOfInterest) {
231
+ 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
232
232
  }
233
233
  }`,
234
234
  vars,
235
235
  sink,
236
236
  );
237
- onNftEventsCreated = async (
238
- vars: OnNftEventsCreatedSubscriptionVariables,
239
- sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
237
+ onPairMetadataUpdated = async (
238
+ vars: OnPairMetadataUpdatedSubscriptionVariables,
239
+ sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
240
240
  ) =>
241
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
242
+ `subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
243
+ onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, statsType: $statsType) {
244
+ 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
245
245
  }
246
246
  }`,
247
247
  vars,