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