@codex-data/sdk 1.0.0-rc2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/resources/generated_mutations/CreateWebhooks.graphql +392 -0
- package/dist/resources/generated_queries/FilterPairs.graphql +4 -0
- package/dist/resources/generated_queries/FilterTokens.graphql +4 -0
- package/dist/resources/generated_queries/GetCommunityNotes.graphql +100 -0
- package/dist/resources/generated_queries/GetEventLabels.graphql +11 -0
- package/dist/resources/generated_queries/GetNftEvents.graphql +46 -0
- package/dist/resources/generated_queries/GetNftPoolEvents.graphql +375 -0
- package/dist/resources/generated_queries/GetPrimePoolEvents.graphql +118 -0
- package/dist/resources/generated_queries/GetTokenEvents.graphql +49 -0
- package/dist/resources/generated_queries/GetTokenEventsForMaker.graphql +49 -0
- package/dist/resources/generated_queries/GetTokenPrices.graphql +1 -0
- package/dist/resources/generated_queries/GetWebhooks.graphql +98 -0
- package/dist/resources/generated_queries/TokenLifecycleEvents.graphql +12 -0
- package/dist/resources/generated_subscriptions/OnBarsUpdated.graphql +42 -0
- package/dist/resources/generated_subscriptions/OnEventLabelCreated.graphql +11 -0
- package/dist/resources/generated_subscriptions/OnEventsCreated.graphql +49 -0
- package/dist/resources/generated_subscriptions/OnNftEventsCreated.graphql +46 -0
- package/dist/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +375 -0
- package/dist/resources/generated_subscriptions/OnPriceUpdated.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnPricesUpdated.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +551 -0
- package/dist/resources/generated_subscriptions/OnTokenEventsCreated.graphql +49 -0
- package/dist/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +12 -0
- package/dist/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +70 -0
- package/dist/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +17 -0
- package/dist/resources/graphql.d.ts +161 -12
- package/dist/resources/graphql.d.ts.map +1 -1
- package/dist/resources/graphql.js +8 -0
- package/dist/resources/graphql.js.map +1 -1
- package/dist/resources/graphql.schema.json +1012 -118
- package/dist/resources/graphql.ts +169 -13
- package/dist/resources/mutations_override/CreateWebhooks.graphql +472 -0
- package/dist/resources/queries_override/GetEventLabels.graphql +35 -0
- package/dist/resources/queries_override/GetWebhooks.graphql +134 -0
- package/dist/resources/schema.graphql +230 -14
- package/dist/resources/subscriptions_override/OnEventLabelCreated.graphql +22 -0
- package/dist/scripts/generateGraphql.d.ts +1 -0
- package/dist/scripts/generateGraphql.d.ts.map +1 -1
- package/dist/scripts/generateGraphql.js +48 -12
- package/dist/scripts/generateGraphql.js.map +1 -1
- package/dist/sdk/Subscribe.d.ts +3 -1
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +44 -12
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/gql.d.ts +62 -46
- package/dist/sdk/generated/gql.d.ts.map +1 -1
- package/dist/sdk/generated/gql.js +25 -23
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +2917 -68
- package/dist/sdk/generated/graphql.d.ts.map +1 -1
- package/dist/sdk/generated/graphql.js +34 -24
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -0
- package/dist/sdk/index.js.map +1 -1
- package/package.json +2 -2
- package/src/resources/generated_mutations/CreateWebhooks.graphql +392 -0
- package/src/resources/generated_queries/FilterPairs.graphql +4 -0
- package/src/resources/generated_queries/FilterTokens.graphql +4 -0
- package/src/resources/generated_queries/GetCommunityNotes.graphql +100 -0
- package/src/resources/generated_queries/GetEventLabels.graphql +11 -0
- package/src/resources/generated_queries/GetNftEvents.graphql +46 -0
- package/src/resources/generated_queries/GetNftPoolEvents.graphql +375 -0
- package/src/resources/generated_queries/GetPrimePoolEvents.graphql +118 -0
- package/src/resources/generated_queries/GetTokenEvents.graphql +49 -0
- package/src/resources/generated_queries/GetTokenEventsForMaker.graphql +49 -0
- package/src/resources/generated_queries/GetTokenPrices.graphql +1 -0
- package/src/resources/generated_queries/GetWebhooks.graphql +98 -0
- package/src/resources/generated_queries/TokenLifecycleEvents.graphql +12 -0
- package/src/resources/generated_subscriptions/OnBarsUpdated.graphql +42 -0
- package/src/resources/generated_subscriptions/OnEventLabelCreated.graphql +11 -0
- package/src/resources/generated_subscriptions/OnEventsCreated.graphql +49 -0
- package/src/resources/generated_subscriptions/OnNftEventsCreated.graphql +46 -0
- package/src/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +375 -0
- package/src/resources/generated_subscriptions/OnPriceUpdated.graphql +1 -0
- package/src/resources/generated_subscriptions/OnPricesUpdated.graphql +1 -0
- package/src/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +551 -0
- package/src/resources/generated_subscriptions/OnTokenEventsCreated.graphql +49 -0
- package/src/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +12 -0
- package/src/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +70 -0
- package/src/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +17 -0
- package/src/resources/graphql.schema.json +1012 -118
- package/src/resources/graphql.ts +169 -13
- package/src/resources/mutations_override/CreateWebhooks.graphql +472 -0
- package/src/resources/queries_override/GetEventLabels.graphql +35 -0
- package/src/resources/queries_override/GetWebhooks.graphql +134 -0
- package/src/resources/schema.graphql +230 -14
- package/src/resources/subscriptions_override/OnEventLabelCreated.graphql +22 -0
- package/src/scripts/generateGraphql.ts +87 -17
- package/src/sdk/Subscribe.ts +60 -12
- package/src/sdk/generated/gql.ts +56 -46
- package/src/sdk/generated/graphql.ts +233 -59
- package/src/sdk/index.ts +1 -0
|
@@ -443,9 +443,7 @@ input CreateApiTokensInput {
|
|
|
443
443
|
"""
|
|
444
444
|
requestLimit: String
|
|
445
445
|
|
|
446
|
-
"""
|
|
447
|
-
Number of milliseconds until the token expires, defaults to 1 hour (3600000)
|
|
448
|
-
"""
|
|
446
|
+
"""Number of seconds until the token expires, defaults to 1 hour (3600)"""
|
|
449
447
|
expiresIn: Int
|
|
450
448
|
}
|
|
451
449
|
|
|
@@ -460,6 +458,7 @@ input CreateNftEventWebhookArgs {
|
|
|
460
458
|
bucketId: String
|
|
461
459
|
bucketSortkey: String
|
|
462
460
|
publishingType: PublishingType
|
|
461
|
+
deduplicate: Boolean
|
|
463
462
|
}
|
|
464
463
|
|
|
465
464
|
input CreateNftEventWebhooksInput {
|
|
@@ -477,6 +476,7 @@ input CreatePriceWebhookArgs {
|
|
|
477
476
|
bucketId: String
|
|
478
477
|
bucketSortkey: String
|
|
479
478
|
publishingType: PublishingType
|
|
479
|
+
deduplicate: Boolean
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
input CreatePriceWebhooksInput {
|
|
@@ -494,6 +494,7 @@ input CreateRawTransactionWebhookArgs {
|
|
|
494
494
|
bucketId: String
|
|
495
495
|
bucketSortkey: String
|
|
496
496
|
publishingType: PublishingType
|
|
497
|
+
deduplicate: Boolean
|
|
497
498
|
}
|
|
498
499
|
|
|
499
500
|
input CreateRawTransactionWebhooksInput {
|
|
@@ -511,6 +512,7 @@ input CreateTokenPairEventWebhookArgs {
|
|
|
511
512
|
bucketId: String
|
|
512
513
|
bucketSortkey: String
|
|
513
514
|
publishingType: PublishingType
|
|
515
|
+
deduplicate: Boolean
|
|
514
516
|
}
|
|
515
517
|
|
|
516
518
|
input CreateTokenPairEventWebhooksInput {
|
|
@@ -1473,6 +1475,7 @@ input GetGasEstimateInput {
|
|
|
1473
1475
|
walletId: Int
|
|
1474
1476
|
customGas: String
|
|
1475
1477
|
sendWithPrivateRpc: Boolean
|
|
1478
|
+
slippage: Float
|
|
1476
1479
|
}
|
|
1477
1480
|
|
|
1478
1481
|
"""Response returned by `getNetworkStats`."""
|
|
@@ -1519,6 +1522,9 @@ input GetPriceInput {
|
|
|
1519
1522
|
"""The unix timestamp for the price."""
|
|
1520
1523
|
timestamp: Int
|
|
1521
1524
|
|
|
1525
|
+
"""The address of the pool, when omitted the top pool is used."""
|
|
1526
|
+
poolAddress: String
|
|
1527
|
+
|
|
1522
1528
|
"""
|
|
1523
1529
|
The maximum number of deviations from the token's Liquidity-Weighted Mean Price. This is used to mitigate low liquidity pairs producing prices that are not representative of reality. Default is `1`.
|
|
1524
1530
|
"""
|
|
@@ -1534,6 +1540,7 @@ input GetQuoteInput {
|
|
|
1534
1540
|
exchangeAddress: String
|
|
1535
1541
|
userId: Int
|
|
1536
1542
|
customGas: String
|
|
1543
|
+
slippage: Float
|
|
1537
1544
|
}
|
|
1538
1545
|
|
|
1539
1546
|
type GetSimulateTokenContractResultsConnection {
|
|
@@ -5667,6 +5674,9 @@ type OnBarsUpdatedResponse {
|
|
|
5667
5674
|
|
|
5668
5675
|
"""The quote token within the pair."""
|
|
5669
5676
|
quoteToken: QuoteToken
|
|
5677
|
+
|
|
5678
|
+
"""The address of the token being quoted"""
|
|
5679
|
+
quoteTokenAddress: String!
|
|
5670
5680
|
}
|
|
5671
5681
|
|
|
5672
5682
|
type OneOfNumberCondition {
|
|
@@ -5682,11 +5692,77 @@ input OnPricesUpdatedInput {
|
|
|
5682
5692
|
networkId: Int!
|
|
5683
5693
|
}
|
|
5684
5694
|
|
|
5695
|
+
"""Response returned by `onBarsUpdated`."""
|
|
5696
|
+
type OnTokenBarsUpdatedResponse {
|
|
5697
|
+
"""The contract address for the pair."""
|
|
5698
|
+
pairAddress: String!
|
|
5699
|
+
|
|
5700
|
+
"""The network ID the pair is deployed on."""
|
|
5701
|
+
networkId: Int!
|
|
5702
|
+
|
|
5703
|
+
"""The ID for the pair (`pairAddress`:`networkId`)."""
|
|
5704
|
+
pairId: String!
|
|
5705
|
+
|
|
5706
|
+
"""The unix timestamp for the new bar."""
|
|
5707
|
+
timestamp: Int!
|
|
5708
|
+
|
|
5709
|
+
"""The type of statistics used. Can be `Filtered` or `Unfiltered`."""
|
|
5710
|
+
statsType: TokenPairStatisticsType!
|
|
5711
|
+
|
|
5712
|
+
"""
|
|
5713
|
+
The sortKey for the bar (`blockNumber`#`transactionIndex`#`logIndex`, zero padded).
|
|
5714
|
+
For example, `0000000016414564#00000224#00000413`.
|
|
5715
|
+
"""
|
|
5716
|
+
eventSortKey: String!
|
|
5717
|
+
|
|
5718
|
+
"""Price data broken down by resolution."""
|
|
5719
|
+
aggregates: ResolutionBarData!
|
|
5720
|
+
|
|
5721
|
+
"""The quote token within the pair."""
|
|
5722
|
+
quoteToken: QuoteToken
|
|
5723
|
+
|
|
5724
|
+
"""The address of the token being quoted"""
|
|
5725
|
+
tokenAddress: String!
|
|
5726
|
+
|
|
5727
|
+
"""The address of the token being quoted"""
|
|
5728
|
+
tokenId: String!
|
|
5729
|
+
}
|
|
5730
|
+
|
|
5685
5731
|
input OnTokenEventsCreatedInput {
|
|
5686
5732
|
tokenAddress: String!
|
|
5687
5733
|
networkId: Int!
|
|
5688
5734
|
}
|
|
5689
5735
|
|
|
5736
|
+
"""Response returned by `onUnconfirmedBarsUpdated`."""
|
|
5737
|
+
type OnUnconfirmedBarsUpdated {
|
|
5738
|
+
"""The contract address for the pair."""
|
|
5739
|
+
pairAddress: String!
|
|
5740
|
+
|
|
5741
|
+
"""The network ID the pair is deployed on."""
|
|
5742
|
+
networkId: Int!
|
|
5743
|
+
|
|
5744
|
+
"""The ID for the pair (`pairAddress`:`networkId`)."""
|
|
5745
|
+
pairId: String!
|
|
5746
|
+
|
|
5747
|
+
"""The unix timestamp for the new bar."""
|
|
5748
|
+
timestamp: Int!
|
|
5749
|
+
|
|
5750
|
+
"""
|
|
5751
|
+
The sortKey for the bar (`blockNumber`#`transactionIndex`#`logIndex`, zero padded).
|
|
5752
|
+
For example, `0000000016414564#00000224#00000413`.
|
|
5753
|
+
"""
|
|
5754
|
+
eventSortKey: String!
|
|
5755
|
+
|
|
5756
|
+
"""Price data broken down by resolution."""
|
|
5757
|
+
aggregates: UnconfirmedResolutionBarData!
|
|
5758
|
+
|
|
5759
|
+
"""The quote token within the pair."""
|
|
5760
|
+
quoteToken: QuoteToken
|
|
5761
|
+
|
|
5762
|
+
"""The address of the token being quoted"""
|
|
5763
|
+
quoteTokenAddress: String!
|
|
5764
|
+
}
|
|
5765
|
+
|
|
5690
5766
|
enum OrderState {
|
|
5691
5767
|
CREATED
|
|
5692
5768
|
PENDING
|
|
@@ -5882,6 +5958,18 @@ type PairFilterResult {
|
|
|
5882
5958
|
"""The percent price change in the past 24 hours. Decimal format."""
|
|
5883
5959
|
priceChange24: String
|
|
5884
5960
|
|
|
5961
|
+
"""The percent volume change in the past hour. Decimal format."""
|
|
5962
|
+
volumeChange1: String
|
|
5963
|
+
|
|
5964
|
+
"""The percent volume change in the past 4 hours. Decimal format."""
|
|
5965
|
+
volumeChange4: String
|
|
5966
|
+
|
|
5967
|
+
"""The percent volume change in the past 12 hours. Decimal format."""
|
|
5968
|
+
volumeChange12: String
|
|
5969
|
+
|
|
5970
|
+
"""The percent volume change in the past 24 hours. Decimal format."""
|
|
5971
|
+
volumeChange24: String
|
|
5972
|
+
|
|
5885
5973
|
"""The number of sells in the past hour."""
|
|
5886
5974
|
sellCount1: Int
|
|
5887
5975
|
|
|
@@ -6032,6 +6120,18 @@ input PairFilters {
|
|
|
6032
6120
|
"""The percent price change in the past 4 hours. Decimal format."""
|
|
6033
6121
|
priceChange4: NumberFilter
|
|
6034
6122
|
|
|
6123
|
+
"""The percent volume change in the past hour. Decimal format."""
|
|
6124
|
+
volumeChange1: NumberFilter
|
|
6125
|
+
|
|
6126
|
+
"""The percent volume change in the past 4 hours. Decimal format."""
|
|
6127
|
+
volumeChange4: NumberFilter
|
|
6128
|
+
|
|
6129
|
+
"""The percent volume change in the past 12 hours. Decimal format."""
|
|
6130
|
+
volumeChange12: NumberFilter
|
|
6131
|
+
|
|
6132
|
+
"""The percent volume change in the past 24 hours. Decimal format."""
|
|
6133
|
+
volumeChange24: NumberFilter
|
|
6134
|
+
|
|
6035
6135
|
"""The number of sells in the past hour."""
|
|
6036
6136
|
sellCount1: NumberFilter
|
|
6037
6137
|
|
|
@@ -6196,6 +6296,10 @@ enum PairRankingAttribute {
|
|
|
6196
6296
|
priceChange4
|
|
6197
6297
|
priceChange12
|
|
6198
6298
|
priceChange24
|
|
6299
|
+
volumeChange1
|
|
6300
|
+
volumeChange4
|
|
6301
|
+
volumeChange12
|
|
6302
|
+
volumeChange24
|
|
6199
6303
|
sellCount1
|
|
6200
6304
|
sellCount4
|
|
6201
6305
|
sellCount12
|
|
@@ -6698,6 +6802,9 @@ type Price {
|
|
|
6698
6802
|
"""The unix timestamp for the price."""
|
|
6699
6803
|
timestamp: Int!
|
|
6700
6804
|
|
|
6805
|
+
"""The pool that emitted the swap generating this price"""
|
|
6806
|
+
poolAddress: String!
|
|
6807
|
+
|
|
6701
6808
|
"""Ratio of how confident we are in the price"""
|
|
6702
6809
|
confidence: Float
|
|
6703
6810
|
}
|
|
@@ -7868,7 +7975,7 @@ type Query {
|
|
|
7868
7975
|
phrase: String
|
|
7869
7976
|
|
|
7870
7977
|
"""
|
|
7871
|
-
A list of token IDs (`address:networkId`). Can be left blank to discover new tokens.
|
|
7978
|
+
A list of token IDs (`address:networkId`) or addresses. Can be left blank to discover new tokens.
|
|
7872
7979
|
"""
|
|
7873
7980
|
tokens: [String]
|
|
7874
7981
|
|
|
@@ -8359,6 +8466,7 @@ type Quote {
|
|
|
8359
8466
|
poolFee: String
|
|
8360
8467
|
poolFeeBps: Float
|
|
8361
8468
|
quotedAmount: String!
|
|
8469
|
+
outputAmountMin: String
|
|
8362
8470
|
quoteType: QuoteType!
|
|
8363
8471
|
tradeFee: String!
|
|
8364
8472
|
tradeFeeBps: Float!
|
|
@@ -8392,16 +8500,6 @@ enum QuoteType {
|
|
|
8392
8500
|
OUTPUT
|
|
8393
8501
|
}
|
|
8394
8502
|
|
|
8395
|
-
type QuoteV2 {
|
|
8396
|
-
poolFee: String
|
|
8397
|
-
poolFeeBps: Float
|
|
8398
|
-
quotedAmount: String!
|
|
8399
|
-
quoteType: QuoteType!
|
|
8400
|
-
tradeFee: String!
|
|
8401
|
-
tradeFeeBps: Float!
|
|
8402
|
-
exchange: QuoteExchange!
|
|
8403
|
-
}
|
|
8404
|
-
|
|
8405
8503
|
"""The order of ranking."""
|
|
8406
8504
|
enum RankingDirection {
|
|
8407
8505
|
ASC
|
|
@@ -8486,6 +8584,9 @@ type ResolutionBarData {
|
|
|
8486
8584
|
"""15 second resolution."""
|
|
8487
8585
|
r15S: CurrencyBarData
|
|
8488
8586
|
|
|
8587
|
+
"""30 second resolution."""
|
|
8588
|
+
r30S: CurrencyBarData
|
|
8589
|
+
|
|
8489
8590
|
"""1 minute resolution."""
|
|
8490
8591
|
r1: CurrencyBarData
|
|
8491
8592
|
|
|
@@ -8954,6 +9055,28 @@ type Subscription {
|
|
|
8954
9055
|
statsType: TokenPairStatisticsType
|
|
8955
9056
|
): OnBarsUpdatedResponse
|
|
8956
9057
|
|
|
9058
|
+
"""
|
|
9059
|
+
Unconfirmed live-streamed bar chart data to track price changes over time. (Solana only)
|
|
9060
|
+
"""
|
|
9061
|
+
onUnconfirmedBarsUpdated(
|
|
9062
|
+
"""The ID of the pair (`address`:`networkId`)."""
|
|
9063
|
+
pairId: String
|
|
9064
|
+
|
|
9065
|
+
"""The token of interest within the pair. Can be `token0` or `token1`."""
|
|
9066
|
+
quoteToken: QuoteToken
|
|
9067
|
+
): OnUnconfirmedBarsUpdated
|
|
9068
|
+
|
|
9069
|
+
"""
|
|
9070
|
+
Live-streamed bar chart data to track price changes over time for a token.
|
|
9071
|
+
"""
|
|
9072
|
+
onTokenBarsUpdated(
|
|
9073
|
+
"""The ID of the pair (`address`:`networkId`)."""
|
|
9074
|
+
tokenId: String
|
|
9075
|
+
|
|
9076
|
+
"""docs: hide"""
|
|
9077
|
+
statsType: TokenPairStatisticsType
|
|
9078
|
+
): OnTokenBarsUpdatedResponse
|
|
9079
|
+
|
|
8957
9080
|
"""Live-streamed transactions for a token."""
|
|
8958
9081
|
onEventsCreated(
|
|
8959
9082
|
"""The pair contract address."""
|
|
@@ -9422,6 +9545,18 @@ type TokenFilterResult {
|
|
|
9422
9545
|
"""The percent price change in the past 4 hours. Decimal format."""
|
|
9423
9546
|
change4: String
|
|
9424
9547
|
|
|
9548
|
+
"""The percent volume change in the past hour. Decimal format."""
|
|
9549
|
+
volumeChange1: String
|
|
9550
|
+
|
|
9551
|
+
"""The percent volume change in the past 4 hours. Decimal format."""
|
|
9552
|
+
volumeChange4: String
|
|
9553
|
+
|
|
9554
|
+
"""The percent volume change in the past 12 hours. Decimal format."""
|
|
9555
|
+
volumeChange12: String
|
|
9556
|
+
|
|
9557
|
+
"""The percent volume change in the past 24 hours. Decimal format."""
|
|
9558
|
+
volumeChange24: String
|
|
9559
|
+
|
|
9425
9560
|
"""The exchanges the token is listed on."""
|
|
9426
9561
|
exchanges: [Exchange]
|
|
9427
9562
|
fdv: String @deprecated(reason: "FDV isn't supported - use marketCap instead")
|
|
@@ -9582,6 +9717,18 @@ input TokenFilters {
|
|
|
9582
9717
|
"""The percent price change in the past 4 hours. Decimal format."""
|
|
9583
9718
|
change4: NumberFilter
|
|
9584
9719
|
|
|
9720
|
+
"""The percent volume change in the past hour. Decimal format."""
|
|
9721
|
+
volumeChange1: NumberFilter
|
|
9722
|
+
|
|
9723
|
+
"""The percent volume change in the past 4 hours. Decimal format."""
|
|
9724
|
+
volumeChange4: NumberFilter
|
|
9725
|
+
|
|
9726
|
+
"""The percent volume change in the past 12 hours. Decimal format."""
|
|
9727
|
+
volumeChange12: NumberFilter
|
|
9728
|
+
|
|
9729
|
+
"""The percent volume change in the past 24 hours. Decimal format."""
|
|
9730
|
+
volumeChange24: NumberFilter
|
|
9731
|
+
|
|
9585
9732
|
"""
|
|
9586
9733
|
The list of exchange contract IDs to filter by. Applied in conjunction with `network` filter using an OR condition. When used together, the query returns results that match either the specified exchanges or the specified network.
|
|
9587
9734
|
"""
|
|
@@ -9925,6 +10072,10 @@ enum TokenRankingAttribute {
|
|
|
9925
10072
|
change4
|
|
9926
10073
|
change12
|
|
9927
10074
|
change24
|
|
10075
|
+
volumeChange1
|
|
10076
|
+
volumeChange4
|
|
10077
|
+
volumeChange12
|
|
10078
|
+
volumeChange24
|
|
9928
10079
|
high1
|
|
9929
10080
|
high4
|
|
9930
10081
|
high12
|
|
@@ -10183,6 +10334,30 @@ type UnconfirmedEvent {
|
|
|
10183
10334
|
|
|
10184
10335
|
union UnconfirmedEventData = UnconfirmedSwapEventData | UnconfirmedLiquidityChangeEventData
|
|
10185
10336
|
|
|
10337
|
+
"""Unconfirmed bar chart data."""
|
|
10338
|
+
type UnconfirmedIndividualBarData {
|
|
10339
|
+
"""The opening price."""
|
|
10340
|
+
o: Float!
|
|
10341
|
+
|
|
10342
|
+
"""The high price."""
|
|
10343
|
+
h: Float!
|
|
10344
|
+
|
|
10345
|
+
"""The low price."""
|
|
10346
|
+
l: Float!
|
|
10347
|
+
|
|
10348
|
+
"""The closing price."""
|
|
10349
|
+
c: Float!
|
|
10350
|
+
|
|
10351
|
+
"""The volume."""
|
|
10352
|
+
v: Int
|
|
10353
|
+
|
|
10354
|
+
"""The volume with higher precision."""
|
|
10355
|
+
volume: String!
|
|
10356
|
+
|
|
10357
|
+
"""The timestamp for the bar."""
|
|
10358
|
+
t: Int!
|
|
10359
|
+
}
|
|
10360
|
+
|
|
10186
10361
|
type UnconfirmedLiquidityChangeEventData {
|
|
10187
10362
|
"""The amount of `token0` added or removed from the pair."""
|
|
10188
10363
|
amount0: String
|
|
@@ -10204,12 +10379,53 @@ type UnconfirmedLiquidityChangeEventData {
|
|
|
10204
10379
|
type: EventType!
|
|
10205
10380
|
}
|
|
10206
10381
|
|
|
10382
|
+
"""Unconfirmed price data for each supported resolution."""
|
|
10383
|
+
type UnconfirmedResolutionBarData {
|
|
10384
|
+
"""1 second resolution."""
|
|
10385
|
+
r1S: UnconfirmedIndividualBarData
|
|
10386
|
+
|
|
10387
|
+
"""5 second resolution."""
|
|
10388
|
+
r5S: UnconfirmedIndividualBarData
|
|
10389
|
+
|
|
10390
|
+
"""15 second resolution."""
|
|
10391
|
+
r15S: UnconfirmedIndividualBarData
|
|
10392
|
+
|
|
10393
|
+
"""1 minute resolution."""
|
|
10394
|
+
r1: UnconfirmedIndividualBarData
|
|
10395
|
+
|
|
10396
|
+
"""5 minute resolution."""
|
|
10397
|
+
r5: UnconfirmedIndividualBarData
|
|
10398
|
+
|
|
10399
|
+
"""15 minute resolution."""
|
|
10400
|
+
r15: UnconfirmedIndividualBarData
|
|
10401
|
+
}
|
|
10402
|
+
|
|
10207
10403
|
type UnconfirmedSwapEventData {
|
|
10208
10404
|
"""
|
|
10209
10405
|
The amount of `quoteToken` involved in the swap. For example, if `quoteToken` is USDC for a USDC/WETH pair, `amountNonLiquidityToken` would be the amount of USDC involved in the swap.
|
|
10210
10406
|
"""
|
|
10211
10407
|
amountNonLiquidityToken: String
|
|
10212
10408
|
|
|
10409
|
+
"""
|
|
10410
|
+
The price per `quoteToken` at the time of the swap in the network's base token. For example, if `quoteToken` is USDC for a USDC/WETH pair on ETH network, `priceBaseToken` would the price of USDC in ETH.
|
|
10411
|
+
"""
|
|
10412
|
+
priceBaseToken: String
|
|
10413
|
+
|
|
10414
|
+
"""
|
|
10415
|
+
The total amount of `quoteToken` involved in the swap in the network's base token (`amountNonLiquidityToken` x `priceBaseToken`).
|
|
10416
|
+
"""
|
|
10417
|
+
priceBaseTokenTotal: String
|
|
10418
|
+
|
|
10419
|
+
"""
|
|
10420
|
+
The price per `quoteToken` at the time of the swap in USD. For example, if `quoteToken` is USDC for a USDC/WETH pair on ETH network, `priceBaseToken` would the price of USDC in USD ($1.00).
|
|
10421
|
+
"""
|
|
10422
|
+
priceUsd: String
|
|
10423
|
+
|
|
10424
|
+
"""
|
|
10425
|
+
The total amount of `quoteToken` involved in the swap in USD (`amountNonLiquidityToken` x `priceUsd`).
|
|
10426
|
+
"""
|
|
10427
|
+
priceUsdTotal: String
|
|
10428
|
+
|
|
10213
10429
|
"""The type of token event, `Swap`."""
|
|
10214
10430
|
type: EventType!
|
|
10215
10431
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
subscription OnEventLabelCreated($id: String) {
|
|
2
|
+
onEventLabelCreated(id: $id) {
|
|
3
|
+
data {
|
|
4
|
+
... on FrontRunLabelData {
|
|
5
|
+
index
|
|
6
|
+
token0DrainedAmount
|
|
7
|
+
token1DrainedAmount
|
|
8
|
+
}
|
|
9
|
+
... on SandwichedLabelData {
|
|
10
|
+
token0DrainedAmountSandwich: token0DrainedAmount
|
|
11
|
+
token1DrainedAmountSandwich: token1DrainedAmount
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
id
|
|
15
|
+
label
|
|
16
|
+
logIndex
|
|
17
|
+
networkId
|
|
18
|
+
timestamp
|
|
19
|
+
transactionHash
|
|
20
|
+
transactionIndex
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -25,6 +25,7 @@ type SchemaType = {
|
|
|
25
25
|
description?: string | null;
|
|
26
26
|
type: SchemaTypeDefinition;
|
|
27
27
|
isDeprecated?: boolean | null;
|
|
28
|
+
possibleTypes?: SchemaType[];
|
|
28
29
|
fields?: SchemaType[];
|
|
29
30
|
};
|
|
30
31
|
|
|
@@ -41,13 +42,41 @@ export const getLeafType = (
|
|
|
41
42
|
currentName: string,
|
|
42
43
|
level = 0,
|
|
43
44
|
): Fields => {
|
|
44
|
-
if (level > 8 || !type?.kind || type.
|
|
45
|
-
return result;
|
|
45
|
+
if (level > 8 || !type?.kind || type.isDeprecated) return result;
|
|
46
46
|
|
|
47
47
|
// If it's a scalar, return the name
|
|
48
48
|
if (type.kind === "SCALAR" || type.kind === "ENUM")
|
|
49
49
|
return [...result, currentName!];
|
|
50
50
|
|
|
51
|
+
if (type.kind === "UNION") {
|
|
52
|
+
// Find all the possible types
|
|
53
|
+
const possibleTypes = allTypes.find((t) => t.name === type.name)
|
|
54
|
+
?.possibleTypes;
|
|
55
|
+
|
|
56
|
+
// For each of the possible types, treat it as a sub object with a set of fields
|
|
57
|
+
const possibleTypeLeaves = possibleTypes
|
|
58
|
+
?.map((f: SchemaType) => {
|
|
59
|
+
const resolvedType = allTypes.find(
|
|
60
|
+
(t) => t.name === f.name,
|
|
61
|
+
) as unknown as SchemaTypeDefinition;
|
|
62
|
+
return getLeafType(
|
|
63
|
+
resolvedType,
|
|
64
|
+
allTypes,
|
|
65
|
+
[],
|
|
66
|
+
`... on ${f.name}`,
|
|
67
|
+
level + 1,
|
|
68
|
+
);
|
|
69
|
+
})
|
|
70
|
+
.flat();
|
|
71
|
+
|
|
72
|
+
if (!possibleTypeLeaves?.length) {
|
|
73
|
+
console.log("No possible types for union", type);
|
|
74
|
+
throw new Error(`No possible types for union type ${currentName}`);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return [...result, ...[{ [currentName]: possibleTypeLeaves }]];
|
|
78
|
+
}
|
|
79
|
+
|
|
51
80
|
// If it's an object resolve it.
|
|
52
81
|
if (type.kind === "OBJECT") {
|
|
53
82
|
// For each of the fields of the subtype, resolve them
|
|
@@ -162,12 +191,26 @@ async function run() {
|
|
|
162
191
|
"generated_mutations",
|
|
163
192
|
);
|
|
164
193
|
await mkdirp(mutationsFolderPath);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
194
|
+
|
|
195
|
+
const overridePath = path.join(
|
|
196
|
+
__dirname,
|
|
197
|
+
"..",
|
|
198
|
+
"resources",
|
|
199
|
+
"mutations_override",
|
|
170
200
|
);
|
|
201
|
+
const filename = `${capitalize(field.name)}.graphql`;
|
|
202
|
+
const filePath = path.join(mutationsFolderPath, filename);
|
|
203
|
+
|
|
204
|
+
// If we have an override, use it.
|
|
205
|
+
if (fs.existsSync(path.join(overridePath, filename)))
|
|
206
|
+
fs.copyFileSync(path.join(overridePath, filename), filePath);
|
|
207
|
+
else
|
|
208
|
+
fs.writeFileSync(
|
|
209
|
+
filePath,
|
|
210
|
+
`mutation ${capitalize(field.name)}${mutationBuilderObject.query
|
|
211
|
+
.toString()
|
|
212
|
+
.slice("mutation ".length)}`,
|
|
213
|
+
);
|
|
171
214
|
}
|
|
172
215
|
|
|
173
216
|
for (const field of subscriptionType.fields) {
|
|
@@ -190,14 +233,28 @@ async function run() {
|
|
|
190
233
|
"generated_subscriptions",
|
|
191
234
|
);
|
|
192
235
|
await mkdirp(subscriptionsFolderPath);
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
236
|
+
|
|
237
|
+
const overridePath = path.join(
|
|
238
|
+
__dirname,
|
|
239
|
+
"..",
|
|
240
|
+
"resources",
|
|
241
|
+
"subscriptions_override",
|
|
198
242
|
);
|
|
243
|
+
const filename = `${capitalize(field.name)}.graphql`;
|
|
244
|
+
const subPath = path.join(subscriptionsFolderPath, filename);
|
|
245
|
+
// If we have an override, use it.
|
|
246
|
+
if (fs.existsSync(path.join(overridePath, filename)))
|
|
247
|
+
fs.copyFileSync(path.join(overridePath, filename), subPath);
|
|
248
|
+
else
|
|
249
|
+
fs.writeFileSync(
|
|
250
|
+
subPath,
|
|
251
|
+
`subscription ${capitalize(field.name)}${subscriptionBuilderObject.query
|
|
252
|
+
.toString()
|
|
253
|
+
.slice("subscription ".length)}`,
|
|
254
|
+
);
|
|
199
255
|
}
|
|
200
256
|
|
|
257
|
+
// Write queries
|
|
201
258
|
for (const field of queryType.fields) {
|
|
202
259
|
if (field.isDeprecated) {
|
|
203
260
|
console.log("Skipping deprecated field", field.name);
|
|
@@ -224,12 +281,25 @@ async function run() {
|
|
|
224
281
|
"generated_queries",
|
|
225
282
|
);
|
|
226
283
|
await mkdirp(queriesFolderPath);
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
284
|
+
|
|
285
|
+
const overridePath = path.join(
|
|
286
|
+
__dirname,
|
|
287
|
+
"..",
|
|
288
|
+
"resources",
|
|
289
|
+
"queries_override",
|
|
232
290
|
);
|
|
291
|
+
const queryFileName = `${capitalize(field.name)}.graphql`;
|
|
292
|
+
const queryPath = path.join(queriesFolderPath, queryFileName);
|
|
293
|
+
// If we have an override, use it.
|
|
294
|
+
if (fs.existsSync(path.join(overridePath, queryFileName)))
|
|
295
|
+
fs.copyFileSync(path.join(overridePath, queryFileName), queryPath);
|
|
296
|
+
else
|
|
297
|
+
fs.writeFileSync(
|
|
298
|
+
queryPath,
|
|
299
|
+
`query ${capitalize(field.name)}${queryBuilderObject.query
|
|
300
|
+
.toString()
|
|
301
|
+
.slice("query ".length)}`,
|
|
302
|
+
);
|
|
233
303
|
}
|
|
234
304
|
}
|
|
235
305
|
|