@codex-data/sdk 1.0.37 → 1.0.39
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.
- package/package.json +2 -3
- package/dist/scripts/buildSdk.d.ts +0 -2
- package/dist/scripts/buildSdk.d.ts.map +0 -1
- package/dist/scripts/buildSdk.js +0 -135
- package/dist/scripts/buildSdk.js.map +0 -1
- package/dist/scripts/generateGraphql.d.ts +0 -31
- package/dist/scripts/generateGraphql.d.ts.map +0 -1
- package/dist/scripts/generateGraphql.js +0 -224
- package/dist/scripts/generateGraphql.js.map +0 -1
- package/dist/scripts/generateNetworkConfigs.d.ts +0 -2
- package/dist/scripts/generateNetworkConfigs.d.ts.map +0 -1
- package/dist/scripts/generateNetworkConfigs.js +0 -248
- package/dist/scripts/generateNetworkConfigs.js.map +0 -1
- package/src/index.ts +0 -2
- package/src/resources/.keep +0 -0
- package/src/resources/generated_mutations/BackfillWalletAggregates.graphql +0 -6
- package/src/resources/generated_mutations/CreateApiTokens.graphql +0 -9
- package/src/resources/generated_mutations/CreateWebhooks.graphql +0 -472
- package/src/resources/generated_mutations/DeleteApiToken.graphql +0 -3
- package/src/resources/generated_mutations/DeleteWebhooks.graphql +0 -5
- package/src/resources/generated_queries/ApiToken.graphql +0 -9
- package/src/resources/generated_queries/ApiTokens.graphql +0 -9
- package/src/resources/generated_queries/Balances.graphql +0 -97
- package/src/resources/generated_queries/Blocks.graphql +0 -7
- package/src/resources/generated_queries/ChartUrls.graphql +0 -7
- package/src/resources/generated_queries/DetailedWalletStats.graphql +0 -197
- package/src/resources/generated_queries/FilterExchanges.graphql +0 -43
- package/src/resources/generated_queries/FilterNftCollections.graphql +0 -569
- package/src/resources/generated_queries/FilterNftParallelAssets.graphql +0 -60
- package/src/resources/generated_queries/FilterNftPoolCollections.graphql +0 -71
- package/src/resources/generated_queries/FilterNftPools.graphql +0 -124
- package/src/resources/generated_queries/FilterPairs.graphql +0 -448
- package/src/resources/generated_queries/FilterTokenWallets.graphql +0 -144
- package/src/resources/generated_queries/FilterTokens.graphql +0 -579
- package/src/resources/generated_queries/FilterWallets.graphql +0 -57
- package/src/resources/generated_queries/GetBars.graphql +0 -233
- package/src/resources/generated_queries/GetCommunityNotes.graphql +0 -140
- package/src/resources/generated_queries/GetDetailedNftStats.graphql +0 -831
- package/src/resources/generated_queries/GetDetailedPairStats.graphql +0 -991
- package/src/resources/generated_queries/GetDetailedPairsStats.graphql +0 -975
- package/src/resources/generated_queries/GetEventLabels.graphql +0 -35
- package/src/resources/generated_queries/GetExchanges.graphql +0 -12
- package/src/resources/generated_queries/GetNetworkConfigs.graphql +0 -129
- package/src/resources/generated_queries/GetNetworkStats.graphql +0 -20
- package/src/resources/generated_queries/GetNetworkStatus.graphql +0 -8
- package/src/resources/generated_queries/GetNetworks.graphql +0 -7
- package/src/resources/generated_queries/GetNftAssets.graphql +0 -59
- package/src/resources/generated_queries/GetNftCollectionMetadata.graphql +0 -75
- package/src/resources/generated_queries/GetNftContracts.graphql +0 -39
- package/src/resources/generated_queries/GetNftEvents.graphql +0 -100
- package/src/resources/generated_queries/GetNftPool.graphql +0 -74
- package/src/resources/generated_queries/GetNftPoolCollection.graphql +0 -33
- package/src/resources/generated_queries/GetNftPoolCollectionsByExchange.graphql +0 -38
- package/src/resources/generated_queries/GetNftPoolEvents.graphql +0 -416
- package/src/resources/generated_queries/GetNftPoolStats.graphql +0 -40
- package/src/resources/generated_queries/GetNftPoolsByCollectionAndExchange.graphql +0 -89
- package/src/resources/generated_queries/GetNftPoolsByOwner.graphql +0 -89
- package/src/resources/generated_queries/GetParallelCardChanges.graphql +0 -57
- package/src/resources/generated_queries/GetPrimePoolAssets.graphql +0 -32
- package/src/resources/generated_queries/GetPrimePoolEvents.graphql +0 -156
- package/src/resources/generated_queries/GetPrimePools.graphql +0 -62
- package/src/resources/generated_queries/GetSymbol.graphql +0 -11
- package/src/resources/generated_queries/GetTokenBars.graphql +0 -121
- package/src/resources/generated_queries/GetTokenEvents.graphql +0 -102
- package/src/resources/generated_queries/GetTokenEventsForMaker.graphql +0 -102
- package/src/resources/generated_queries/GetTokenPrices.graphql +0 -9
- package/src/resources/generated_queries/GetWebhooks.graphql +0 -134
- package/src/resources/generated_queries/Holders.graphql +0 -100
- package/src/resources/generated_queries/LiquidityLocks.graphql +0 -32
- package/src/resources/generated_queries/LiquidityMetadata.graphql +0 -17
- package/src/resources/generated_queries/LiquidityMetadataByToken.graphql +0 -19
- package/src/resources/generated_queries/ListPairsForToken.graphql +0 -194
- package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +0 -375
- package/src/resources/generated_queries/NftHolders.graphql +0 -12
- package/src/resources/generated_queries/PairMetadata.graphql +0 -234
- package/src/resources/generated_queries/PrimeHolders.graphql +0 -98
- package/src/resources/generated_queries/SearchNfts.graphql +0 -35
- package/src/resources/generated_queries/Token.graphql +0 -82
- package/src/resources/generated_queries/TokenLifecycleEvents.graphql +0 -34
- package/src/resources/generated_queries/TokenSparklines.graphql +0 -11
- package/src/resources/generated_queries/TokenTopTraders.graphql +0 -26
- package/src/resources/generated_queries/Tokens.graphql +0 -82
- package/src/resources/generated_queries/Top10HoldersPercent.graphql +0 -3
- package/src/resources/generated_queries/WalletAggregateBackfillState.graphql +0 -6
- package/src/resources/generated_queries/WalletChart.graphql +0 -20
- package/src/resources/generated_queries/WalletNftCollectionAssets.graphql +0 -11
- package/src/resources/generated_queries/WalletNftCollections.graphql +0 -10
- package/src/resources/generated_subscriptions/OnBalanceUpdated.graphql +0 -94
- package/src/resources/generated_subscriptions/OnBarsUpdated.graphql +0 -547
- package/src/resources/generated_subscriptions/OnDetailedStatsUpdated.graphql +0 -325
- package/src/resources/generated_subscriptions/OnEventLabelCreated.graphql +0 -22
- package/src/resources/generated_subscriptions/OnEventsCreated.graphql +0 -105
- package/src/resources/generated_subscriptions/OnEventsCreatedByMaker.graphql +0 -92
- package/src/resources/generated_subscriptions/OnHoldersUpdated.graphql +0 -100
- package/src/resources/generated_subscriptions/OnLatestPairUpdated.graphql +0 -42
- package/src/resources/generated_subscriptions/OnLatestTokens.graphql +0 -37
- package/src/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +0 -104
- package/src/resources/generated_subscriptions/OnLaunchpadTokenEventBatch.graphql +0 -96
- package/src/resources/generated_subscriptions/OnNftAssetsCreated.graphql +0 -42
- package/src/resources/generated_subscriptions/OnNftEventsCreated.graphql +0 -82
- package/src/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +0 -412
- package/src/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +0 -234
- package/src/resources/generated_subscriptions/OnPriceUpdated.graphql +0 -17
- package/src/resources/generated_subscriptions/OnPricesUpdated.graphql +0 -9
- package/src/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +0 -545
- package/src/resources/generated_subscriptions/OnTokenEventsCreated.graphql +0 -92
- package/src/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +0 -30
- package/src/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +0 -115
- package/src/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +0 -50
- package/src/resources/generated_subscriptions/OnUnconfirmedEventsCreatedByMaker.graphql +0 -41
- package/src/resources/graphql.schema.json +0 -63699
- package/src/resources/graphql.ts +0 -10477
- package/src/resources/mutations_override/CreateWebhooks.graphql +0 -472
- package/src/resources/networkConfigs.json +0 -3757
- package/src/resources/queries_override/FilterTokenWallets.graphql +0 -144
- package/src/resources/queries_override/GetEventLabels.graphql +0 -35
- package/src/resources/queries_override/GetNetworkConfigs.graphql +0 -129
- package/src/resources/queries_override/GetWebhooks.graphql +0 -134
- package/src/resources/schema.graphql +0 -9972
- package/src/resources/subscriptions_override/OnEventLabelCreated.graphql +0 -22
- package/src/resources/subscriptions_override/OnLaunchpadTokenEventBatch.graphql +0 -96
- package/src/scripts/buildSdk.ts +0 -173
- package/src/scripts/generateGraphql.ts +0 -305
- package/src/scripts/generateNetworkConfigs.ts +0 -250
- package/src/sdk/Mutation.ts +0 -29
- package/src/sdk/Query.ts +0 -285
- package/src/sdk/Subscribe.ts +0 -465
- package/src/sdk/generated/fragment-masking.ts +0 -87
- package/src/sdk/generated/gql.ts +0 -610
- package/src/sdk/generated/graphql.ts +0 -11417
- package/src/sdk/generated/index.ts +0 -2
- package/src/sdk/graphql/GetPairEvents.graphql +0 -71
- package/src/sdk/index.test.ts +0 -454
- package/src/sdk/index.ts +0 -239
- package/src/sdk/invariant.ts +0 -34
package/src/sdk/Subscribe.ts
DELETED
|
@@ -1,465 +0,0 @@
|
|
|
1
|
-
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT IT DIRECTLY
|
|
2
|
-
import { ExecutionResult, Sink } from "graphql-ws";
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
OnBalanceUpdatedSubscription,
|
|
6
|
-
OnBalanceUpdatedSubscriptionVariables,
|
|
7
|
-
OnBarsUpdatedSubscription,
|
|
8
|
-
OnBarsUpdatedSubscriptionVariables,
|
|
9
|
-
OnDetailedStatsUpdatedSubscription,
|
|
10
|
-
OnDetailedStatsUpdatedSubscriptionVariables,
|
|
11
|
-
OnEventLabelCreatedSubscription,
|
|
12
|
-
OnEventLabelCreatedSubscriptionVariables,
|
|
13
|
-
OnEventsCreatedByMakerSubscription,
|
|
14
|
-
OnEventsCreatedByMakerSubscriptionVariables,
|
|
15
|
-
OnEventsCreatedSubscription,
|
|
16
|
-
OnEventsCreatedSubscriptionVariables,
|
|
17
|
-
OnHoldersUpdatedSubscription,
|
|
18
|
-
OnHoldersUpdatedSubscriptionVariables,
|
|
19
|
-
OnLatestPairUpdatedSubscription,
|
|
20
|
-
OnLatestPairUpdatedSubscriptionVariables,
|
|
21
|
-
OnLatestTokensSubscription,
|
|
22
|
-
OnLatestTokensSubscriptionVariables,
|
|
23
|
-
OnLaunchpadTokenEventBatchSubscription,
|
|
24
|
-
OnLaunchpadTokenEventBatchSubscriptionVariables,
|
|
25
|
-
OnLaunchpadTokenEventSubscription,
|
|
26
|
-
OnLaunchpadTokenEventSubscriptionVariables,
|
|
27
|
-
OnNftAssetsCreatedSubscription,
|
|
28
|
-
OnNftAssetsCreatedSubscriptionVariables,
|
|
29
|
-
OnNftEventsCreatedSubscription,
|
|
30
|
-
OnNftEventsCreatedSubscriptionVariables,
|
|
31
|
-
OnNftPoolEventsCreatedSubscription,
|
|
32
|
-
OnNftPoolEventsCreatedSubscriptionVariables,
|
|
33
|
-
OnPairMetadataUpdatedSubscription,
|
|
34
|
-
OnPairMetadataUpdatedSubscriptionVariables,
|
|
35
|
-
OnPricesUpdatedSubscription,
|
|
36
|
-
OnPricesUpdatedSubscriptionVariables,
|
|
37
|
-
OnPriceUpdatedSubscription,
|
|
38
|
-
OnPriceUpdatedSubscriptionVariables,
|
|
39
|
-
OnTokenBarsUpdatedSubscription,
|
|
40
|
-
OnTokenBarsUpdatedSubscriptionVariables,
|
|
41
|
-
OnTokenEventsCreatedSubscription,
|
|
42
|
-
OnTokenEventsCreatedSubscriptionVariables,
|
|
43
|
-
OnTokenLifecycleEventsCreatedSubscription,
|
|
44
|
-
OnTokenLifecycleEventsCreatedSubscriptionVariables,
|
|
45
|
-
OnUnconfirmedBarsUpdatedSubscription,
|
|
46
|
-
OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
47
|
-
OnUnconfirmedEventsCreatedByMakerSubscription,
|
|
48
|
-
OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
|
|
49
|
-
OnUnconfirmedEventsCreatedSubscription,
|
|
50
|
-
OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
51
|
-
} from "./generated/graphql";
|
|
52
|
-
import { Codex } from "./index";
|
|
53
|
-
|
|
54
|
-
export class Subscribe {
|
|
55
|
-
constructor(private sdk: Codex) {}
|
|
56
|
-
onUnconfirmedEventsCreatedByMaker = (
|
|
57
|
-
vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
|
|
58
|
-
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
|
|
59
|
-
) =>
|
|
60
|
-
this.sdk.subscribe(
|
|
61
|
-
`subscription OnUnconfirmedEventsCreatedByMaker($input: OnUnconfirmedEventsCreatedByMakerInput!) {
|
|
62
|
-
onUnconfirmedEventsCreatedByMaker (input: $input) {
|
|
63
|
-
events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, makerAddress
|
|
64
|
-
}
|
|
65
|
-
}`,
|
|
66
|
-
vars,
|
|
67
|
-
sink,
|
|
68
|
-
);
|
|
69
|
-
onNftPoolEventsCreated = (
|
|
70
|
-
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
71
|
-
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
72
|
-
) =>
|
|
73
|
-
this.sdk.subscribe(
|
|
74
|
-
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
75
|
-
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
76
|
-
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
|
|
77
|
-
}
|
|
78
|
-
}`,
|
|
79
|
-
vars,
|
|
80
|
-
sink,
|
|
81
|
-
);
|
|
82
|
-
onNftAssetsCreated = (
|
|
83
|
-
vars: OnNftAssetsCreatedSubscriptionVariables,
|
|
84
|
-
sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
|
|
85
|
-
) =>
|
|
86
|
-
this.sdk.subscribe(
|
|
87
|
-
`subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
|
|
88
|
-
onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
|
|
89
|
-
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
|
|
90
|
-
}
|
|
91
|
-
}`,
|
|
92
|
-
vars,
|
|
93
|
-
sink,
|
|
94
|
-
);
|
|
95
|
-
onTokenEventsCreated = (
|
|
96
|
-
vars: OnTokenEventsCreatedSubscriptionVariables,
|
|
97
|
-
sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
|
|
98
|
-
) =>
|
|
99
|
-
this.sdk.subscribe(
|
|
100
|
-
`subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
|
|
101
|
-
onTokenEventsCreated (input: $input) {
|
|
102
|
-
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, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, id
|
|
103
|
-
}
|
|
104
|
-
}`,
|
|
105
|
-
vars,
|
|
106
|
-
sink,
|
|
107
|
-
);
|
|
108
|
-
onLatestPairUpdated = (
|
|
109
|
-
vars: OnLatestPairUpdatedSubscriptionVariables,
|
|
110
|
-
sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
|
|
111
|
-
) =>
|
|
112
|
-
this.sdk.subscribe(
|
|
113
|
-
`subscription OnLatestPairUpdated($id: String, $networkId: Int) {
|
|
114
|
-
onLatestPairUpdated (id: $id, networkId: $networkId) {
|
|
115
|
-
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
|
|
116
|
-
}
|
|
117
|
-
}`,
|
|
118
|
-
vars,
|
|
119
|
-
sink,
|
|
120
|
-
);
|
|
121
|
-
onBarsUpdated = (
|
|
122
|
-
vars: OnBarsUpdatedSubscriptionVariables,
|
|
123
|
-
sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
|
|
124
|
-
) =>
|
|
125
|
-
this.sdk.subscribe(
|
|
126
|
-
`subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
127
|
-
onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
128
|
-
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
|
|
129
|
-
}
|
|
130
|
-
}`,
|
|
131
|
-
vars,
|
|
132
|
-
sink,
|
|
133
|
-
);
|
|
134
|
-
onTokenBarsUpdated = (
|
|
135
|
-
vars: OnTokenBarsUpdatedSubscriptionVariables,
|
|
136
|
-
sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
|
|
137
|
-
) =>
|
|
138
|
-
this.sdk.subscribe(
|
|
139
|
-
`subscription OnTokenBarsUpdated($networkId: Int, $tokenId: String) {
|
|
140
|
-
onTokenBarsUpdated (networkId: $networkId, tokenId: $tokenId) {
|
|
141
|
-
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, statsType, timestamp, tokenAddress, tokenId
|
|
142
|
-
}
|
|
143
|
-
}`,
|
|
144
|
-
vars,
|
|
145
|
-
sink,
|
|
146
|
-
);
|
|
147
|
-
onLatestTokens = (
|
|
148
|
-
vars: OnLatestTokensSubscriptionVariables,
|
|
149
|
-
sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
|
|
150
|
-
) =>
|
|
151
|
-
this.sdk.subscribe(
|
|
152
|
-
`subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
|
|
153
|
-
onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
|
|
154
|
-
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
|
|
155
|
-
}
|
|
156
|
-
}`,
|
|
157
|
-
vars,
|
|
158
|
-
sink,
|
|
159
|
-
);
|
|
160
|
-
onHoldersUpdated = (
|
|
161
|
-
vars: OnHoldersUpdatedSubscriptionVariables,
|
|
162
|
-
sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
|
|
163
|
-
) =>
|
|
164
|
-
this.sdk.subscribe(
|
|
165
|
-
`subscription OnHoldersUpdated($tokenId: String!) {
|
|
166
|
-
onHoldersUpdated (tokenId: $tokenId) {
|
|
167
|
-
balances { address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, tokenAddress, tokenId, tokenPriceUsd, walletId }, holders, networkId, tokenAddress, tokenId
|
|
168
|
-
}
|
|
169
|
-
}`,
|
|
170
|
-
vars,
|
|
171
|
-
sink,
|
|
172
|
-
);
|
|
173
|
-
onNftEventsCreated = (
|
|
174
|
-
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
175
|
-
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
176
|
-
) =>
|
|
177
|
-
this.sdk.subscribe(
|
|
178
|
-
`subscription OnNftEventsCreated($address: String, $networkId: Int) {
|
|
179
|
-
onNftEventsCreated (address: $address, networkId: $networkId) {
|
|
180
|
-
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
|
|
181
|
-
}
|
|
182
|
-
}`,
|
|
183
|
-
vars,
|
|
184
|
-
sink,
|
|
185
|
-
);
|
|
186
|
-
onEventsCreated = (
|
|
187
|
-
vars: OnEventsCreatedSubscriptionVariables,
|
|
188
|
-
sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
|
|
189
|
-
) =>
|
|
190
|
-
this.sdk.subscribe(
|
|
191
|
-
`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
192
|
-
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
193
|
-
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, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, id, networkId, quoteToken
|
|
194
|
-
}
|
|
195
|
-
}`,
|
|
196
|
-
vars,
|
|
197
|
-
sink,
|
|
198
|
-
);
|
|
199
|
-
onTokenLifecycleEventsCreated = (
|
|
200
|
-
vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
|
|
201
|
-
sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
|
|
202
|
-
) =>
|
|
203
|
-
this.sdk.subscribe(
|
|
204
|
-
`subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
|
|
205
|
-
onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
|
|
206
|
-
events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
|
|
207
|
-
}
|
|
208
|
-
}`,
|
|
209
|
-
vars,
|
|
210
|
-
sink,
|
|
211
|
-
);
|
|
212
|
-
onUnconfirmedEventsCreated = (
|
|
213
|
-
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
214
|
-
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
215
|
-
) =>
|
|
216
|
-
this.sdk.subscribe(
|
|
217
|
-
`subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
|
|
218
|
-
onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
|
|
219
|
-
address, events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
|
|
220
|
-
}
|
|
221
|
-
}`,
|
|
222
|
-
vars,
|
|
223
|
-
sink,
|
|
224
|
-
);
|
|
225
|
-
onLaunchpadTokenEventBatch = (
|
|
226
|
-
vars: OnLaunchpadTokenEventBatchSubscriptionVariables,
|
|
227
|
-
sink: Sink<ExecutionResult<OnLaunchpadTokenEventBatchSubscription>>,
|
|
228
|
-
) =>
|
|
229
|
-
this.sdk.subscribe(
|
|
230
|
-
`subscription OnLaunchpadTokenEventBatch(
|
|
231
|
-
$input: OnLaunchpadTokenEventBatchInput
|
|
232
|
-
) {
|
|
233
|
-
onLaunchpadTokenEventBatch(input: $input) {
|
|
234
|
-
address
|
|
235
|
-
buyCount1
|
|
236
|
-
eventType
|
|
237
|
-
holders
|
|
238
|
-
marketCap
|
|
239
|
-
networkId
|
|
240
|
-
price
|
|
241
|
-
protocol
|
|
242
|
-
sellCount1
|
|
243
|
-
launchpadName
|
|
244
|
-
token {
|
|
245
|
-
address
|
|
246
|
-
cmcId
|
|
247
|
-
createBlockNumber
|
|
248
|
-
createTransactionHash
|
|
249
|
-
createdAt
|
|
250
|
-
creatorAddress
|
|
251
|
-
decimals
|
|
252
|
-
exchanges {
|
|
253
|
-
address
|
|
254
|
-
color
|
|
255
|
-
exchangeVersion
|
|
256
|
-
iconUrl
|
|
257
|
-
id
|
|
258
|
-
name
|
|
259
|
-
networkId
|
|
260
|
-
tradeUrl
|
|
261
|
-
}
|
|
262
|
-
freezable
|
|
263
|
-
id
|
|
264
|
-
info {
|
|
265
|
-
address
|
|
266
|
-
circulatingSupply
|
|
267
|
-
cmcId
|
|
268
|
-
description
|
|
269
|
-
id
|
|
270
|
-
imageBannerUrl
|
|
271
|
-
imageLargeUrl
|
|
272
|
-
imageSmallUrl
|
|
273
|
-
imageThumbUrl
|
|
274
|
-
isScam
|
|
275
|
-
name
|
|
276
|
-
networkId
|
|
277
|
-
symbol
|
|
278
|
-
totalSupply
|
|
279
|
-
}
|
|
280
|
-
isScam
|
|
281
|
-
launchpad {
|
|
282
|
-
completed
|
|
283
|
-
completedAt
|
|
284
|
-
completedSlot
|
|
285
|
-
graduationPercent
|
|
286
|
-
launchpadProtocol
|
|
287
|
-
migrated
|
|
288
|
-
migratedAt
|
|
289
|
-
migratedPoolAddress
|
|
290
|
-
migratedSlot
|
|
291
|
-
name
|
|
292
|
-
launchpadName
|
|
293
|
-
poolAddress
|
|
294
|
-
}
|
|
295
|
-
mintable
|
|
296
|
-
name
|
|
297
|
-
networkId
|
|
298
|
-
socialLinks {
|
|
299
|
-
bitcointalk
|
|
300
|
-
blog
|
|
301
|
-
coingecko
|
|
302
|
-
coinmarketcap
|
|
303
|
-
discord
|
|
304
|
-
email
|
|
305
|
-
facebook
|
|
306
|
-
github
|
|
307
|
-
instagram
|
|
308
|
-
linkedin
|
|
309
|
-
reddit
|
|
310
|
-
slack
|
|
311
|
-
telegram
|
|
312
|
-
twitch
|
|
313
|
-
twitter
|
|
314
|
-
website
|
|
315
|
-
wechat
|
|
316
|
-
whitepaper
|
|
317
|
-
youtube
|
|
318
|
-
}
|
|
319
|
-
symbol
|
|
320
|
-
}
|
|
321
|
-
transactions1
|
|
322
|
-
volume1
|
|
323
|
-
liquidity
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
`,
|
|
327
|
-
vars,
|
|
328
|
-
sink,
|
|
329
|
-
);
|
|
330
|
-
onLaunchpadTokenEvent = (
|
|
331
|
-
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
332
|
-
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
333
|
-
) =>
|
|
334
|
-
this.sdk.subscribe(
|
|
335
|
-
`subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
|
|
336
|
-
onLaunchpadTokenEvent (input: $input) {
|
|
337
|
-
address, bundlerCount, bundlerHeldPercentage, buyCount1, devHeldPercentage, eventType, holders, insiderCount, insiderHeldPercentage, launchpadName, liquidity, marketCap, networkId, price, protocol, sellCount1, sniperCount, sniperHeldPercentage, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, transactions1, volume1
|
|
338
|
-
}
|
|
339
|
-
}`,
|
|
340
|
-
vars,
|
|
341
|
-
sink,
|
|
342
|
-
);
|
|
343
|
-
onPairMetadataUpdated = (
|
|
344
|
-
vars: OnPairMetadataUpdatedSubscriptionVariables,
|
|
345
|
-
sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
|
|
346
|
-
) =>
|
|
347
|
-
this.sdk.subscribe(
|
|
348
|
-
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $useNonLiquidityTokenAsQuoteToken: Boolean) {
|
|
349
|
-
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, useNonLiquidityTokenAsQuoteToken: $useNonLiquidityTokenAsQuoteToken) {
|
|
350
|
-
createdAt, enhancedToken0 { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, enhancedToken1 { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, exchangeId, fee, highPrice1, highPrice4, highPrice5m, highPrice12, highPrice24, id, liquidity, liquidityToken, lowPrice1, lowPrice4, lowPrice5m, lowPrice12, lowPrice24, networkId, nonLiquidityToken, pairAddress, price, priceChange1, priceChange4, priceChange5m, priceChange12, priceChange24, priceNonQuoteToken, 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, volume4, volume5m, volume12, volume24
|
|
351
|
-
}
|
|
352
|
-
}`,
|
|
353
|
-
vars,
|
|
354
|
-
sink,
|
|
355
|
-
);
|
|
356
|
-
onPricesUpdated = (
|
|
357
|
-
vars: OnPricesUpdatedSubscriptionVariables,
|
|
358
|
-
sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
|
|
359
|
-
) =>
|
|
360
|
-
this.sdk.subscribe(
|
|
361
|
-
`subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
|
|
362
|
-
onPricesUpdated (input: $input) {
|
|
363
|
-
address, blockNumber, networkId, priceUsd, timestamp
|
|
364
|
-
}
|
|
365
|
-
}`,
|
|
366
|
-
vars,
|
|
367
|
-
sink,
|
|
368
|
-
);
|
|
369
|
-
onUnconfirmedBarsUpdated = (
|
|
370
|
-
vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
371
|
-
sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
|
|
372
|
-
) =>
|
|
373
|
-
this.sdk.subscribe(
|
|
374
|
-
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
375
|
-
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
376
|
-
aggregates { r1 { c, h, l, o, t, v, volume }, r1D { 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 }, r7D { c, h, l, o, t, v, volume }, r15 { c, h, l, o, t, v, volume }, r15S { c, h, l, o, t, v, volume }, r60 { c, h, l, o, t, v, volume }, r240 { c, h, l, o, t, v, volume }, r720 { c, h, l, o, t, v, volume } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, timestamp
|
|
377
|
-
}
|
|
378
|
-
}`,
|
|
379
|
-
vars,
|
|
380
|
-
sink,
|
|
381
|
-
);
|
|
382
|
-
onPriceUpdated = (
|
|
383
|
-
vars: OnPriceUpdatedSubscriptionVariables,
|
|
384
|
-
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
385
|
-
) =>
|
|
386
|
-
this.sdk.subscribe(
|
|
387
|
-
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
388
|
-
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
389
|
-
address, blockNumber, networkId, priceUsd, timestamp
|
|
390
|
-
}
|
|
391
|
-
}`,
|
|
392
|
-
vars,
|
|
393
|
-
sink,
|
|
394
|
-
);
|
|
395
|
-
onEventsCreatedByMaker = (
|
|
396
|
-
vars: OnEventsCreatedByMakerSubscriptionVariables,
|
|
397
|
-
sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
|
|
398
|
-
) =>
|
|
399
|
-
this.sdk.subscribe(
|
|
400
|
-
`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
401
|
-
onEventsCreatedByMaker (input: $input) {
|
|
402
|
-
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, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, makerAddress
|
|
403
|
-
}
|
|
404
|
-
}`,
|
|
405
|
-
vars,
|
|
406
|
-
sink,
|
|
407
|
-
);
|
|
408
|
-
onDetailedStatsUpdated = (
|
|
409
|
-
vars: OnDetailedStatsUpdatedSubscriptionVariables,
|
|
410
|
-
sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
|
|
411
|
-
) =>
|
|
412
|
-
this.sdk.subscribe(
|
|
413
|
-
`subscription OnDetailedStatsUpdated($pairId: String, $tokenOfInterest: TokenOfInterest) {
|
|
414
|
-
onDetailedStatsUpdated (pairId: $pairId, tokenOfInterest: $tokenOfInterest) {
|
|
415
|
-
pairId, 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
|
|
416
|
-
}
|
|
417
|
-
}`,
|
|
418
|
-
vars,
|
|
419
|
-
sink,
|
|
420
|
-
);
|
|
421
|
-
onBalanceUpdated = (
|
|
422
|
-
vars: OnBalanceUpdatedSubscriptionVariables,
|
|
423
|
-
sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
|
|
424
|
-
) =>
|
|
425
|
-
this.sdk.subscribe(
|
|
426
|
-
`subscription OnBalanceUpdated($walletAddress: String!) {
|
|
427
|
-
onBalanceUpdated (walletAddress: $walletAddress) {
|
|
428
|
-
address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, tokenAddress, tokenId, tokenPriceUsd, walletId
|
|
429
|
-
}
|
|
430
|
-
}`,
|
|
431
|
-
vars,
|
|
432
|
-
sink,
|
|
433
|
-
);
|
|
434
|
-
onEventLabelCreated = (
|
|
435
|
-
vars: OnEventLabelCreatedSubscriptionVariables,
|
|
436
|
-
sink: Sink<ExecutionResult<OnEventLabelCreatedSubscription>>,
|
|
437
|
-
) =>
|
|
438
|
-
this.sdk.subscribe(
|
|
439
|
-
`subscription OnEventLabelCreated($id: String) {
|
|
440
|
-
onEventLabelCreated(id: $id) {
|
|
441
|
-
data {
|
|
442
|
-
... on FrontRunLabelData {
|
|
443
|
-
index
|
|
444
|
-
token0DrainedAmount
|
|
445
|
-
token1DrainedAmount
|
|
446
|
-
}
|
|
447
|
-
... on SandwichedLabelData {
|
|
448
|
-
token0DrainedAmountSandwich: token0DrainedAmount
|
|
449
|
-
token1DrainedAmountSandwich: token1DrainedAmount
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
id
|
|
453
|
-
label
|
|
454
|
-
logIndex
|
|
455
|
-
networkId
|
|
456
|
-
timestamp
|
|
457
|
-
transactionHash
|
|
458
|
-
transactionIndex
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
`,
|
|
462
|
-
vars,
|
|
463
|
-
sink,
|
|
464
|
-
);
|
|
465
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
-
import { FragmentDefinitionNode } from 'graphql';
|
|
4
|
-
import { Incremental } from './graphql';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<
|
|
8
|
-
infer TType,
|
|
9
|
-
any
|
|
10
|
-
>
|
|
11
|
-
? [TType] extends [{ ' $fragmentName'?: infer TKey }]
|
|
12
|
-
? TKey extends string
|
|
13
|
-
? { ' $fragmentRefs'?: { [key in TKey]: TType } }
|
|
14
|
-
: never
|
|
15
|
-
: never
|
|
16
|
-
: never;
|
|
17
|
-
|
|
18
|
-
// return non-nullable if `fragmentType` is non-nullable
|
|
19
|
-
export function useFragment<TType>(
|
|
20
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
21
|
-
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>
|
|
22
|
-
): TType;
|
|
23
|
-
// return nullable if `fragmentType` is undefined
|
|
24
|
-
export function useFragment<TType>(
|
|
25
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
26
|
-
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined
|
|
27
|
-
): TType | undefined;
|
|
28
|
-
// return nullable if `fragmentType` is nullable
|
|
29
|
-
export function useFragment<TType>(
|
|
30
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
31
|
-
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null
|
|
32
|
-
): TType | null;
|
|
33
|
-
// return nullable if `fragmentType` is nullable or undefined
|
|
34
|
-
export function useFragment<TType>(
|
|
35
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
36
|
-
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined
|
|
37
|
-
): TType | null | undefined;
|
|
38
|
-
// return array of non-nullable if `fragmentType` is array of non-nullable
|
|
39
|
-
export function useFragment<TType>(
|
|
40
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
41
|
-
fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>
|
|
42
|
-
): Array<TType>;
|
|
43
|
-
// return array of nullable if `fragmentType` is array of nullable
|
|
44
|
-
export function useFragment<TType>(
|
|
45
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
46
|
-
fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined
|
|
47
|
-
): Array<TType> | null | undefined;
|
|
48
|
-
// return readonly array of non-nullable if `fragmentType` is array of non-nullable
|
|
49
|
-
export function useFragment<TType>(
|
|
50
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
51
|
-
fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
|
|
52
|
-
): ReadonlyArray<TType>;
|
|
53
|
-
// return readonly array of nullable if `fragmentType` is array of nullable
|
|
54
|
-
export function useFragment<TType>(
|
|
55
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
56
|
-
fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined
|
|
57
|
-
): ReadonlyArray<TType> | null | undefined;
|
|
58
|
-
export function useFragment<TType>(
|
|
59
|
-
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
60
|
-
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | Array<FragmentType<DocumentTypeDecoration<TType, any>>> | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined
|
|
61
|
-
): TType | Array<TType> | ReadonlyArray<TType> | null | undefined {
|
|
62
|
-
return fragmentType as any;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export function makeFragmentData<
|
|
67
|
-
F extends DocumentTypeDecoration<any, any>,
|
|
68
|
-
FT extends ResultOf<F>
|
|
69
|
-
>(data: FT, _fragment: F): FragmentType<F> {
|
|
70
|
-
return data as FragmentType<F>;
|
|
71
|
-
}
|
|
72
|
-
export function isFragmentReady<TQuery, TFrag>(
|
|
73
|
-
queryNode: DocumentTypeDecoration<TQuery, any>,
|
|
74
|
-
fragmentNode: TypedDocumentNode<TFrag>,
|
|
75
|
-
data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined
|
|
76
|
-
): data is FragmentType<typeof fragmentNode> {
|
|
77
|
-
const deferredFields = (queryNode as { __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> } }).__meta__
|
|
78
|
-
?.deferredFields;
|
|
79
|
-
|
|
80
|
-
if (!deferredFields) return true;
|
|
81
|
-
|
|
82
|
-
const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined;
|
|
83
|
-
const fragName = fragDef?.name?.value;
|
|
84
|
-
|
|
85
|
-
const fields = (fragName && deferredFields[fragName]) || [];
|
|
86
|
-
return fields.length > 0 && fields.every(field => data && field in data);
|
|
87
|
-
}
|