@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
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import * as gql from "gql-query-builder";
|
|
3
|
+
import VariableOptions from "gql-query-builder/build/VariableOptions";
|
|
4
|
+
import { mkdirp } from "mkdirp";
|
|
5
|
+
import path from "path";
|
|
6
|
+
|
|
7
|
+
type SchemaTypeDefinition = {
|
|
8
|
+
kind:
|
|
9
|
+
| "NON_NULL"
|
|
10
|
+
| "SCALAR"
|
|
11
|
+
| "LIST"
|
|
12
|
+
| "OBJECT"
|
|
13
|
+
| "INPUT_OBJECT"
|
|
14
|
+
| "ENUM"
|
|
15
|
+
| "UNION"
|
|
16
|
+
| undefined
|
|
17
|
+
| null;
|
|
18
|
+
name?: string | null;
|
|
19
|
+
ofType?: SchemaTypeDefinition | null;
|
|
20
|
+
isDeprecated?: boolean | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type SchemaType = {
|
|
24
|
+
name: string;
|
|
25
|
+
description?: string | null;
|
|
26
|
+
type: SchemaTypeDefinition;
|
|
27
|
+
isDeprecated?: boolean | null;
|
|
28
|
+
fields?: SchemaType[];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type Fields = Array<string | { [key: string]: Fields }>;
|
|
32
|
+
|
|
33
|
+
function capitalize(str: string) {
|
|
34
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const getLeafType = (
|
|
38
|
+
type: SchemaTypeDefinition,
|
|
39
|
+
allTypes: SchemaType[],
|
|
40
|
+
result: Fields,
|
|
41
|
+
currentName: string,
|
|
42
|
+
level = 0,
|
|
43
|
+
): Fields => {
|
|
44
|
+
if (level > 8 || !type?.kind || type.kind === "UNION" || type.isDeprecated)
|
|
45
|
+
return result;
|
|
46
|
+
|
|
47
|
+
// If it's a scalar, return the name
|
|
48
|
+
if (type.kind === "SCALAR" || type.kind === "ENUM")
|
|
49
|
+
return [...result, currentName!];
|
|
50
|
+
|
|
51
|
+
// If it's an object resolve it.
|
|
52
|
+
if (type.kind === "OBJECT") {
|
|
53
|
+
// For each of the fields of the subtype, resolve them
|
|
54
|
+
const subType = allTypes.find((t) => t.name === type.name);
|
|
55
|
+
const subTypeLeaves = (subType?.fields ?? [])
|
|
56
|
+
.filter((t) => !t.isDeprecated)
|
|
57
|
+
.map((f: SchemaType) =>
|
|
58
|
+
getLeafType(f.type, allTypes, [], f.name, level + 1),
|
|
59
|
+
)
|
|
60
|
+
.flat();
|
|
61
|
+
return [
|
|
62
|
+
...result,
|
|
63
|
+
...(level === 0 ? subTypeLeaves : [{ [currentName]: subTypeLeaves }]),
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// If it's a list, resolve the first object type
|
|
68
|
+
if (type.kind === "LIST")
|
|
69
|
+
return getLeafType(type.ofType!, allTypes, [...result], currentName, level);
|
|
70
|
+
|
|
71
|
+
// If it's required, resolve the first object type
|
|
72
|
+
if (type.kind === "NON_NULL")
|
|
73
|
+
return getLeafType(type.ofType!, allTypes, [...result], currentName, level);
|
|
74
|
+
|
|
75
|
+
throw new Error(`Unknown type ${type.name} ${type.kind}`);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const getLeafArgs = (
|
|
79
|
+
type: SchemaTypeDefinition,
|
|
80
|
+
result: VariableOptions,
|
|
81
|
+
): VariableOptions => {
|
|
82
|
+
if (
|
|
83
|
+
type.kind === "NON_NULL" &&
|
|
84
|
+
["INPUT_OBJECT", "SCALAR", "OBJECT", "ENUM"].includes(
|
|
85
|
+
type.ofType?.kind as string,
|
|
86
|
+
)
|
|
87
|
+
)
|
|
88
|
+
return { ...result, type: `${type.ofType!.name!}!` };
|
|
89
|
+
|
|
90
|
+
// If it's a scalar, return the name
|
|
91
|
+
if (
|
|
92
|
+
type.kind === "SCALAR" ||
|
|
93
|
+
type.kind === "OBJECT" ||
|
|
94
|
+
type.kind === "ENUM" ||
|
|
95
|
+
type.kind === "INPUT_OBJECT"
|
|
96
|
+
)
|
|
97
|
+
return { ...result, type: type.name!, value: null };
|
|
98
|
+
|
|
99
|
+
// If it's a list, resolve the first object type
|
|
100
|
+
if (type.kind === "LIST")
|
|
101
|
+
return getLeafArgs(type.ofType!, { ...result, list: true });
|
|
102
|
+
|
|
103
|
+
// If it's required, resolve the first object type
|
|
104
|
+
if (type.kind === "NON_NULL")
|
|
105
|
+
return getLeafArgs(type.ofType!, { ...result, required: true });
|
|
106
|
+
|
|
107
|
+
throw new Error(`Unknown type ${type.name} ${type.kind}`);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export function parseVariables(args: SchemaType[]) {
|
|
111
|
+
const parsedVariables = args.reduce(
|
|
112
|
+
(acc: VariableOptions, arg: SchemaType) => {
|
|
113
|
+
return {
|
|
114
|
+
...acc,
|
|
115
|
+
[arg.name]: getLeafArgs(arg.type, {}),
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
{},
|
|
119
|
+
);
|
|
120
|
+
return parsedVariables;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Runs a query against the currently published graphql schema,
|
|
125
|
+
* and generates a query ts file for query.
|
|
126
|
+
*/
|
|
127
|
+
async function run() {
|
|
128
|
+
console.log("Generating...");
|
|
129
|
+
|
|
130
|
+
// Fetch schema from remote
|
|
131
|
+
const res = await fetch(`https://graph.codex.io/schema/latest.json`, {
|
|
132
|
+
method: "GET",
|
|
133
|
+
});
|
|
134
|
+
const schemaJson = await res.json();
|
|
135
|
+
|
|
136
|
+
const types = schemaJson.__schema.types;
|
|
137
|
+
const mutationType = types.find(
|
|
138
|
+
(type: SchemaType) => type.name === "Mutation",
|
|
139
|
+
);
|
|
140
|
+
const queryType = types.find((type: SchemaType) => type.name === "Query");
|
|
141
|
+
const subscriptionType = types.find(
|
|
142
|
+
(type: SchemaType) => type.name === "Subscription",
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
for (const field of mutationType.fields) {
|
|
146
|
+
const args = field.args;
|
|
147
|
+
const parsedVariables = parseVariables(args);
|
|
148
|
+
const parsedFields = getLeafType(field.type, types, [], "").filter(Boolean);
|
|
149
|
+
|
|
150
|
+
const mutationBuilderObject = gql.mutation({
|
|
151
|
+
operation: field.name,
|
|
152
|
+
variables: Object.keys(parsedVariables).length
|
|
153
|
+
? parsedVariables
|
|
154
|
+
: undefined,
|
|
155
|
+
fields: parsedFields.length ? parsedFields : undefined,
|
|
156
|
+
});
|
|
157
|
+
console.log(`Writing mutation: ${field.name}.graphql`);
|
|
158
|
+
const mutationsFolderPath = path.join(
|
|
159
|
+
__dirname,
|
|
160
|
+
"..",
|
|
161
|
+
"resources",
|
|
162
|
+
"generated_mutations",
|
|
163
|
+
);
|
|
164
|
+
await mkdirp(mutationsFolderPath);
|
|
165
|
+
fs.writeFileSync(
|
|
166
|
+
path.join(mutationsFolderPath, `${capitalize(field.name)}.graphql`),
|
|
167
|
+
`mutation ${capitalize(field.name)}${mutationBuilderObject.query
|
|
168
|
+
.toString()
|
|
169
|
+
.slice("mutation ".length)}`,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
for (const field of subscriptionType.fields) {
|
|
174
|
+
const args = field.args;
|
|
175
|
+
const parsedVariables = parseVariables(args);
|
|
176
|
+
const parsedFields = getLeafType(field.type, types, [], "").filter(Boolean);
|
|
177
|
+
|
|
178
|
+
const subscriptionBuilderObject = gql.subscription({
|
|
179
|
+
operation: field.name,
|
|
180
|
+
variables: Object.keys(parsedVariables).length
|
|
181
|
+
? parsedVariables
|
|
182
|
+
: undefined,
|
|
183
|
+
fields: parsedFields.length ? parsedFields : undefined,
|
|
184
|
+
});
|
|
185
|
+
console.log(`Writing subscription: ${field.name}.graphql`);
|
|
186
|
+
const subscriptionsFolderPath = path.join(
|
|
187
|
+
__dirname,
|
|
188
|
+
"..",
|
|
189
|
+
"resources",
|
|
190
|
+
"generated_subscriptions",
|
|
191
|
+
);
|
|
192
|
+
await mkdirp(subscriptionsFolderPath);
|
|
193
|
+
fs.writeFileSync(
|
|
194
|
+
path.join(subscriptionsFolderPath, `${capitalize(field.name)}.graphql`),
|
|
195
|
+
`subscription ${capitalize(field.name)}${subscriptionBuilderObject.query
|
|
196
|
+
.toString()
|
|
197
|
+
.slice("subscription ".length)}`,
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
for (const field of queryType.fields) {
|
|
202
|
+
if (field.isDeprecated) {
|
|
203
|
+
console.log("Skipping deprecated field", field.name);
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const args = field.args;
|
|
208
|
+
const parsedVariables = parseVariables(args);
|
|
209
|
+
const parsedFields = getLeafType(field.type, types, [], "").filter(Boolean);
|
|
210
|
+
|
|
211
|
+
const queryBuilderObject = gql.query({
|
|
212
|
+
operation: field.name,
|
|
213
|
+
variables: Object.keys(parsedVariables).length
|
|
214
|
+
? parsedVariables
|
|
215
|
+
: undefined,
|
|
216
|
+
fields: parsedFields.length ? parsedFields : undefined,
|
|
217
|
+
});
|
|
218
|
+
console.log(`Writing query: ${field.name}.graphql`);
|
|
219
|
+
|
|
220
|
+
const queriesFolderPath = path.join(
|
|
221
|
+
__dirname,
|
|
222
|
+
"..",
|
|
223
|
+
"resources",
|
|
224
|
+
"generated_queries",
|
|
225
|
+
);
|
|
226
|
+
await mkdirp(queriesFolderPath);
|
|
227
|
+
fs.writeFileSync(
|
|
228
|
+
path.join(queriesFolderPath, `${capitalize(field.name)}.graphql`),
|
|
229
|
+
`query ${capitalize(field.name)}${queryBuilderObject.query
|
|
230
|
+
.toString()
|
|
231
|
+
.slice("query ".length)}`,
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
run().then(() => process.exit());
|
package/src/sdk/Mutation.ts
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT IT DIRECTLY
|
|
2
2
|
import {
|
|
3
|
+
CreateApiTokensDocument,
|
|
4
|
+
CreateApiTokensMutationVariables,
|
|
3
5
|
CreateWebhooksDocument,
|
|
4
|
-
|
|
6
|
+
CreateWebhooksMutationVariables,
|
|
7
|
+
DeleteApiTokenDocument,
|
|
8
|
+
DeleteApiTokenMutationVariables,
|
|
5
9
|
DeleteWebhooksDocument,
|
|
10
|
+
DeleteWebhooksMutationVariables,
|
|
6
11
|
} from "./generated/graphql";
|
|
7
12
|
import { Codex } from "./index";
|
|
8
13
|
|
|
9
14
|
export class Mutation {
|
|
10
15
|
constructor(private sdk: Codex) {}
|
|
11
|
-
createWebhooks = async (vars:
|
|
16
|
+
createWebhooks = async (vars: CreateWebhooksMutationVariables) =>
|
|
12
17
|
this.sdk.mutation(CreateWebhooksDocument, vars);
|
|
13
|
-
|
|
18
|
+
deleteApiToken = async (vars: DeleteApiTokenMutationVariables) =>
|
|
19
|
+
this.sdk.mutation(DeleteApiTokenDocument, vars);
|
|
20
|
+
createApiTokens = async (vars: CreateApiTokensMutationVariables) =>
|
|
21
|
+
this.sdk.mutation(CreateApiTokensDocument, vars);
|
|
22
|
+
deleteWebhooks = async (vars: DeleteWebhooksMutationVariables) =>
|
|
14
23
|
this.sdk.mutation(DeleteWebhooksDocument, vars);
|
|
15
24
|
}
|
package/src/sdk/Query.ts
CHANGED
|
@@ -1,65 +1,280 @@
|
|
|
1
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT IT DIRECTLY
|
|
1
2
|
import {
|
|
3
|
+
ApiTokenDocument,
|
|
4
|
+
ApiTokenQueryVariables,
|
|
5
|
+
ApiTokensDocument,
|
|
6
|
+
ApiTokensQueryVariables,
|
|
7
|
+
BalancesDocument,
|
|
8
|
+
BalancesQueryVariables,
|
|
9
|
+
ChartUrlsDocument,
|
|
10
|
+
ChartUrlsQueryVariables,
|
|
2
11
|
FilterExchangesDocument,
|
|
3
12
|
FilterExchangesQueryVariables,
|
|
13
|
+
FilterNftCollectionsDocument,
|
|
14
|
+
FilterNftCollectionsQueryVariables,
|
|
15
|
+
FilterNftParallelAssetsDocument,
|
|
16
|
+
FilterNftParallelAssetsQueryVariables,
|
|
17
|
+
FilterNftPoolCollectionsDocument,
|
|
18
|
+
FilterNftPoolCollectionsQueryVariables,
|
|
19
|
+
FilterNftPoolsDocument,
|
|
20
|
+
FilterNftPoolsQueryVariables,
|
|
4
21
|
FilterPairsDocument,
|
|
5
22
|
FilterPairsQueryVariables,
|
|
6
23
|
FilterTokensDocument,
|
|
7
24
|
FilterTokensQueryVariables,
|
|
8
25
|
GetBarsDocument,
|
|
26
|
+
GetBarsQueryVariables,
|
|
27
|
+
GetCommunityNotesDocument,
|
|
28
|
+
GetCommunityNotesQueryVariables,
|
|
29
|
+
GetDetailedNftStatsDocument,
|
|
30
|
+
GetDetailedNftStatsQueryVariables,
|
|
31
|
+
GetDetailedPairsStatsDocument,
|
|
32
|
+
GetDetailedPairsStatsQueryVariables,
|
|
9
33
|
GetDetailedPairStatsDocument,
|
|
34
|
+
GetDetailedPairStatsQueryVariables,
|
|
35
|
+
GetEventLabelsDocument,
|
|
36
|
+
GetEventLabelsQueryVariables,
|
|
37
|
+
GetExchangesDocument,
|
|
38
|
+
GetExchangesQueryVariables,
|
|
39
|
+
GetLatestPairsDocument,
|
|
40
|
+
GetLatestPairsQueryVariables,
|
|
41
|
+
GetLatestTokensDocument,
|
|
42
|
+
GetLatestTokensQueryVariables,
|
|
10
43
|
GetNetworksDocument,
|
|
44
|
+
GetNetworksQueryVariables,
|
|
45
|
+
GetNetworkStatsDocument,
|
|
46
|
+
GetNetworkStatsQueryVariables,
|
|
11
47
|
GetNetworkStatusDocument,
|
|
12
|
-
|
|
13
|
-
|
|
48
|
+
GetNetworkStatusQueryVariables,
|
|
49
|
+
GetNftAssetsDocument,
|
|
50
|
+
GetNftAssetsQueryVariables,
|
|
51
|
+
GetNftCollectionMetadataDocument,
|
|
52
|
+
GetNftCollectionMetadataQueryVariables,
|
|
53
|
+
GetNftContractsDocument,
|
|
54
|
+
GetNftContractsQueryVariables,
|
|
55
|
+
GetNftEventsDocument,
|
|
56
|
+
GetNftEventsQueryVariables,
|
|
57
|
+
GetNftPoolCollectionDocument,
|
|
58
|
+
GetNftPoolCollectionQueryVariables,
|
|
59
|
+
GetNftPoolCollectionsByExchangeDocument,
|
|
60
|
+
GetNftPoolCollectionsByExchangeQueryVariables,
|
|
61
|
+
GetNftPoolDocument,
|
|
62
|
+
GetNftPoolEventsDocument,
|
|
63
|
+
GetNftPoolEventsQueryVariables,
|
|
64
|
+
GetNftPoolQueryVariables,
|
|
65
|
+
GetNftPoolsByCollectionAndExchangeDocument,
|
|
66
|
+
GetNftPoolsByCollectionAndExchangeQueryVariables,
|
|
67
|
+
GetNftPoolsByOwnerDocument,
|
|
68
|
+
GetNftPoolsByOwnerQueryVariables,
|
|
69
|
+
GetNftPoolStatsDocument,
|
|
70
|
+
GetNftPoolStatsQueryVariables,
|
|
71
|
+
GetParallelAssetsDocument,
|
|
72
|
+
GetParallelAssetsQueryVariables,
|
|
73
|
+
GetParallelCardChangesDocument,
|
|
74
|
+
GetParallelCardChangesQueryVariables,
|
|
75
|
+
GetPrimePoolAssetsDocument,
|
|
76
|
+
GetPrimePoolAssetsQueryVariables,
|
|
77
|
+
GetPrimePoolEventsDocument,
|
|
78
|
+
GetPrimePoolEventsQueryVariables,
|
|
79
|
+
GetPrimePoolsDocument,
|
|
80
|
+
GetPrimePoolsQueryVariables,
|
|
81
|
+
GetSimulateTokenContractResultsDocument,
|
|
82
|
+
GetSimulateTokenContractResultsQueryVariables,
|
|
14
83
|
GetSymbolDocument,
|
|
15
84
|
GetSymbolQueryVariables,
|
|
16
|
-
|
|
17
|
-
|
|
85
|
+
GetTokenCountDocument,
|
|
86
|
+
GetTokenCountQueryVariables,
|
|
87
|
+
GetTokenEventsDocument,
|
|
88
|
+
GetTokenEventsQueryVariables,
|
|
89
|
+
GetTokenInfoDocument,
|
|
90
|
+
GetTokenInfoQueryVariables,
|
|
91
|
+
GetTokenPricesDocument,
|
|
92
|
+
GetTokenPricesQueryVariables,
|
|
93
|
+
GetTokensInfoDocument,
|
|
94
|
+
GetTokensInfoQueryVariables,
|
|
95
|
+
GetUniV3TicksDocument,
|
|
96
|
+
GetUniV3TicksQueryVariables,
|
|
18
97
|
GetWebhooksDocument,
|
|
98
|
+
GetWebhooksQueryVariables,
|
|
99
|
+
HoldersDocument,
|
|
100
|
+
HoldersQueryVariables,
|
|
101
|
+
LiquidityLocksDocument,
|
|
102
|
+
LiquidityLocksQueryVariables,
|
|
103
|
+
LiquidityMetadataDocument,
|
|
104
|
+
LiquidityMetadataQueryVariables,
|
|
105
|
+
ListFavoriteTokensDocument,
|
|
106
|
+
ListFavoriteTokensQueryVariables,
|
|
19
107
|
ListPairsForTokenDocument,
|
|
20
108
|
ListPairsForTokenQueryVariables,
|
|
109
|
+
ListPairsWithMetadataForTokenDocument,
|
|
110
|
+
ListPairsWithMetadataForTokenQueryVariables,
|
|
21
111
|
ListTopTokensDocument,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
112
|
+
ListTopTokensQueryVariables,
|
|
113
|
+
NftHoldersDocument,
|
|
114
|
+
NftHoldersQueryVariables,
|
|
115
|
+
PairMetadataDocument,
|
|
116
|
+
PairMetadataQueryVariables,
|
|
117
|
+
PrimeBalanceDocument,
|
|
118
|
+
PrimeBalanceQueryVariables,
|
|
119
|
+
PrimeHoldersDocument,
|
|
120
|
+
PrimeHoldersQueryVariables,
|
|
121
|
+
SearchNftsDocument,
|
|
122
|
+
SearchNftsQueryVariables,
|
|
123
|
+
TokenDocument,
|
|
124
|
+
TokenLifecycleEventsDocument,
|
|
125
|
+
TokenLifecycleEventsQueryVariables,
|
|
126
|
+
TokenQueryVariables,
|
|
127
|
+
TokensDocument,
|
|
128
|
+
TokenSparklinesDocument,
|
|
129
|
+
TokenSparklinesQueryVariables,
|
|
130
|
+
TokensQueryVariables,
|
|
131
|
+
WalletNftCollectionAssetsDocument,
|
|
132
|
+
WalletNftCollectionAssetsQueryVariables,
|
|
133
|
+
WalletNftCollectionsDocument,
|
|
134
|
+
WalletNftCollectionsQueryVariables,
|
|
31
135
|
} from "./generated/graphql";
|
|
32
136
|
import { Codex } from "./index";
|
|
33
137
|
|
|
34
138
|
export class Query {
|
|
35
139
|
constructor(private sdk: Codex) {}
|
|
36
|
-
|
|
37
|
-
this.sdk.query(
|
|
38
|
-
|
|
39
|
-
this.sdk.query(
|
|
40
|
-
|
|
41
|
-
this.sdk.query(
|
|
42
|
-
|
|
43
|
-
this.sdk.query(
|
|
44
|
-
|
|
45
|
-
this.sdk.query(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
140
|
+
getLatestPairs = async (vars: GetLatestPairsQueryVariables) =>
|
|
141
|
+
this.sdk.query(GetLatestPairsDocument, vars);
|
|
142
|
+
token = async (vars: TokenQueryVariables) =>
|
|
143
|
+
this.sdk.query(TokenDocument, vars);
|
|
144
|
+
getNftPoolStats = async (vars: GetNftPoolStatsQueryVariables) =>
|
|
145
|
+
this.sdk.query(GetNftPoolStatsDocument, vars);
|
|
146
|
+
liquidityMetadata = async (vars: LiquidityMetadataQueryVariables) =>
|
|
147
|
+
this.sdk.query(LiquidityMetadataDocument, vars);
|
|
148
|
+
primeHolders = async (vars: PrimeHoldersQueryVariables) =>
|
|
149
|
+
this.sdk.query(PrimeHoldersDocument, vars);
|
|
150
|
+
filterNftPoolCollections = async (
|
|
151
|
+
vars: FilterNftPoolCollectionsQueryVariables,
|
|
152
|
+
) => this.sdk.query(FilterNftPoolCollectionsDocument, vars);
|
|
153
|
+
getNetworks = async (vars: GetNetworksQueryVariables) =>
|
|
154
|
+
this.sdk.query(GetNetworksDocument, vars);
|
|
155
|
+
searchNfts = async (vars: SearchNftsQueryVariables) =>
|
|
156
|
+
this.sdk.query(SearchNftsDocument, vars);
|
|
157
|
+
getSimulateTokenContractResults = async (
|
|
158
|
+
vars: GetSimulateTokenContractResultsQueryVariables,
|
|
159
|
+
) => this.sdk.query(GetSimulateTokenContractResultsDocument, vars);
|
|
160
|
+
filterNftPools = async (vars: FilterNftPoolsQueryVariables) =>
|
|
161
|
+
this.sdk.query(FilterNftPoolsDocument, vars);
|
|
162
|
+
getTokenEvents = async (vars: GetTokenEventsQueryVariables) =>
|
|
163
|
+
this.sdk.query(GetTokenEventsDocument, vars);
|
|
164
|
+
balances = async (vars: BalancesQueryVariables) =>
|
|
165
|
+
this.sdk.query(BalancesDocument, vars);
|
|
166
|
+
getDetailedPairsStats = async (vars: GetDetailedPairsStatsQueryVariables) =>
|
|
167
|
+
this.sdk.query(GetDetailedPairsStatsDocument, vars);
|
|
168
|
+
getNftEvents = async (vars: GetNftEventsQueryVariables) =>
|
|
169
|
+
this.sdk.query(GetNftEventsDocument, vars);
|
|
170
|
+
getNftPoolsByCollectionAndExchange = async (
|
|
171
|
+
vars: GetNftPoolsByCollectionAndExchangeQueryVariables,
|
|
172
|
+
) => this.sdk.query(GetNftPoolsByCollectionAndExchangeDocument, vars);
|
|
173
|
+
getNftPoolCollectionsByExchange = async (
|
|
174
|
+
vars: GetNftPoolCollectionsByExchangeQueryVariables,
|
|
175
|
+
) => this.sdk.query(GetNftPoolCollectionsByExchangeDocument, vars);
|
|
176
|
+
walletNftCollections = async (vars: WalletNftCollectionsQueryVariables) =>
|
|
177
|
+
this.sdk.query(WalletNftCollectionsDocument, vars);
|
|
52
178
|
filterPairs = async (vars: FilterPairsQueryVariables) =>
|
|
53
179
|
this.sdk.query(FilterPairsDocument, vars);
|
|
54
|
-
|
|
55
|
-
this.sdk.query(
|
|
180
|
+
filterTokens = async (vars: FilterTokensQueryVariables) =>
|
|
181
|
+
this.sdk.query(FilterTokensDocument, vars);
|
|
182
|
+
getNftCollectionMetadata = async (
|
|
183
|
+
vars: GetNftCollectionMetadataQueryVariables,
|
|
184
|
+
) => this.sdk.query(GetNftCollectionMetadataDocument, vars);
|
|
185
|
+
getTokenCount = async (vars: GetTokenCountQueryVariables) =>
|
|
186
|
+
this.sdk.query(GetTokenCountDocument, vars);
|
|
187
|
+
getParallelAssets = async (vars: GetParallelAssetsQueryVariables) =>
|
|
188
|
+
this.sdk.query(GetParallelAssetsDocument, vars);
|
|
189
|
+
getNftPoolCollection = async (vars: GetNftPoolCollectionQueryVariables) =>
|
|
190
|
+
this.sdk.query(GetNftPoolCollectionDocument, vars);
|
|
191
|
+
getNftPoolsByOwner = async (vars: GetNftPoolsByOwnerQueryVariables) =>
|
|
192
|
+
this.sdk.query(GetNftPoolsByOwnerDocument, vars);
|
|
193
|
+
getLatestTokens = async (vars: GetLatestTokensQueryVariables) =>
|
|
194
|
+
this.sdk.query(GetLatestTokensDocument, vars);
|
|
195
|
+
walletNftCollectionAssets = async (
|
|
196
|
+
vars: WalletNftCollectionAssetsQueryVariables,
|
|
197
|
+
) => this.sdk.query(WalletNftCollectionAssetsDocument, vars);
|
|
198
|
+
getTokenInfo = async (vars: GetTokenInfoQueryVariables) =>
|
|
199
|
+
this.sdk.query(GetTokenInfoDocument, vars);
|
|
200
|
+
getEventLabels = async (vars: GetEventLabelsQueryVariables) =>
|
|
201
|
+
this.sdk.query(GetEventLabelsDocument, vars);
|
|
202
|
+
getUniV3Ticks = async (vars: GetUniV3TicksQueryVariables) =>
|
|
203
|
+
this.sdk.query(GetUniV3TicksDocument, vars);
|
|
204
|
+
getSymbol = async (vars: GetSymbolQueryVariables) =>
|
|
205
|
+
this.sdk.query(GetSymbolDocument, vars);
|
|
206
|
+
getPrimePoolEvents = async (vars: GetPrimePoolEventsQueryVariables) =>
|
|
207
|
+
this.sdk.query(GetPrimePoolEventsDocument, vars);
|
|
208
|
+
getNftPool = async (vars: GetNftPoolQueryVariables) =>
|
|
209
|
+
this.sdk.query(GetNftPoolDocument, vars);
|
|
56
210
|
filterExchanges = async (vars: FilterExchangesQueryVariables) =>
|
|
57
211
|
this.sdk.query(FilterExchangesDocument, vars);
|
|
58
|
-
|
|
59
|
-
this.sdk.query(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
212
|
+
getPrimePools = async (vars: GetPrimePoolsQueryVariables) =>
|
|
213
|
+
this.sdk.query(GetPrimePoolsDocument, vars);
|
|
214
|
+
chartUrls = async (vars: ChartUrlsQueryVariables) =>
|
|
215
|
+
this.sdk.query(ChartUrlsDocument, vars);
|
|
216
|
+
apiToken = async (vars: ApiTokenQueryVariables) =>
|
|
217
|
+
this.sdk.query(ApiTokenDocument, vars);
|
|
218
|
+
holders = async (vars: HoldersQueryVariables) =>
|
|
219
|
+
this.sdk.query(HoldersDocument, vars);
|
|
220
|
+
tokens = async (vars: TokensQueryVariables) =>
|
|
221
|
+
this.sdk.query(TokensDocument, vars);
|
|
222
|
+
liquidityLocks = async (vars: LiquidityLocksQueryVariables) =>
|
|
223
|
+
this.sdk.query(LiquidityLocksDocument, vars);
|
|
224
|
+
tokenSparklines = async (vars: TokenSparklinesQueryVariables) =>
|
|
225
|
+
this.sdk.query(TokenSparklinesDocument, vars);
|
|
226
|
+
primeBalance = async (vars: PrimeBalanceQueryVariables) =>
|
|
227
|
+
this.sdk.query(PrimeBalanceDocument, vars);
|
|
228
|
+
nftHolders = async (vars: NftHoldersQueryVariables) =>
|
|
229
|
+
this.sdk.query(NftHoldersDocument, vars);
|
|
230
|
+
listPairsForToken = async (vars: ListPairsForTokenQueryVariables) =>
|
|
231
|
+
this.sdk.query(ListPairsForTokenDocument, vars);
|
|
232
|
+
getDetailedPairStats = async (vars: GetDetailedPairStatsQueryVariables) =>
|
|
233
|
+
this.sdk.query(GetDetailedPairStatsDocument, vars);
|
|
234
|
+
filterNftCollections = async (vars: FilterNftCollectionsQueryVariables) =>
|
|
235
|
+
this.sdk.query(FilterNftCollectionsDocument, vars);
|
|
236
|
+
getWebhooks = async (vars: GetWebhooksQueryVariables) =>
|
|
64
237
|
this.sdk.query(GetWebhooksDocument, vars);
|
|
238
|
+
getPrimePoolAssets = async (vars: GetPrimePoolAssetsQueryVariables) =>
|
|
239
|
+
this.sdk.query(GetPrimePoolAssetsDocument, vars);
|
|
240
|
+
getNetworkStats = async (vars: GetNetworkStatsQueryVariables) =>
|
|
241
|
+
this.sdk.query(GetNetworkStatsDocument, vars);
|
|
242
|
+
apiTokens = async (vars: ApiTokensQueryVariables) =>
|
|
243
|
+
this.sdk.query(ApiTokensDocument, vars);
|
|
244
|
+
getNftAssets = async (vars: GetNftAssetsQueryVariables) =>
|
|
245
|
+
this.sdk.query(GetNftAssetsDocument, vars);
|
|
246
|
+
getCommunityNotes = async (vars: GetCommunityNotesQueryVariables) =>
|
|
247
|
+
this.sdk.query(GetCommunityNotesDocument, vars);
|
|
248
|
+
getNftContracts = async (vars: GetNftContractsQueryVariables) =>
|
|
249
|
+
this.sdk.query(GetNftContractsDocument, vars);
|
|
250
|
+
getParallelCardChanges = async (vars: GetParallelCardChangesQueryVariables) =>
|
|
251
|
+
this.sdk.query(GetParallelCardChangesDocument, vars);
|
|
252
|
+
pairMetadata = async (vars: PairMetadataQueryVariables) =>
|
|
253
|
+
this.sdk.query(PairMetadataDocument, vars);
|
|
254
|
+
listFavoriteTokens = async (vars: ListFavoriteTokensQueryVariables) =>
|
|
255
|
+
this.sdk.query(ListFavoriteTokensDocument, vars);
|
|
256
|
+
getNetworkStatus = async (vars: GetNetworkStatusQueryVariables) =>
|
|
257
|
+
this.sdk.query(GetNetworkStatusDocument, vars);
|
|
258
|
+
getDetailedNftStats = async (vars: GetDetailedNftStatsQueryVariables) =>
|
|
259
|
+
this.sdk.query(GetDetailedNftStatsDocument, vars);
|
|
260
|
+
getTokensInfo = async (vars: GetTokensInfoQueryVariables) =>
|
|
261
|
+
this.sdk.query(GetTokensInfoDocument, vars);
|
|
262
|
+
filterNftParallelAssets = async (
|
|
263
|
+
vars: FilterNftParallelAssetsQueryVariables,
|
|
264
|
+
) => this.sdk.query(FilterNftParallelAssetsDocument, vars);
|
|
265
|
+
listPairsWithMetadataForToken = async (
|
|
266
|
+
vars: ListPairsWithMetadataForTokenQueryVariables,
|
|
267
|
+
) => this.sdk.query(ListPairsWithMetadataForTokenDocument, vars);
|
|
268
|
+
getTokenPrices = async (vars: GetTokenPricesQueryVariables) =>
|
|
269
|
+
this.sdk.query(GetTokenPricesDocument, vars);
|
|
270
|
+
tokenLifecycleEvents = async (vars: TokenLifecycleEventsQueryVariables) =>
|
|
271
|
+
this.sdk.query(TokenLifecycleEventsDocument, vars);
|
|
272
|
+
getExchanges = async (vars: GetExchangesQueryVariables) =>
|
|
273
|
+
this.sdk.query(GetExchangesDocument, vars);
|
|
274
|
+
getNftPoolEvents = async (vars: GetNftPoolEventsQueryVariables) =>
|
|
275
|
+
this.sdk.query(GetNftPoolEventsDocument, vars);
|
|
276
|
+
listTopTokens = async (vars: ListTopTokensQueryVariables) =>
|
|
277
|
+
this.sdk.query(ListTopTokensDocument, vars);
|
|
278
|
+
getBars = async (vars: GetBarsQueryVariables) =>
|
|
279
|
+
this.sdk.query(GetBarsDocument, vars);
|
|
65
280
|
}
|