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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/resources/generated_mutations/CreateWebhooks.graphql +392 -0
  2. package/dist/resources/generated_queries/FilterPairs.graphql +4 -0
  3. package/dist/resources/generated_queries/FilterTokens.graphql +4 -0
  4. package/dist/resources/generated_queries/GetCommunityNotes.graphql +100 -0
  5. package/dist/resources/generated_queries/GetEventLabels.graphql +11 -0
  6. package/dist/resources/generated_queries/GetNftEvents.graphql +46 -0
  7. package/dist/resources/generated_queries/GetNftPoolEvents.graphql +375 -0
  8. package/dist/resources/generated_queries/GetPrimePoolEvents.graphql +118 -0
  9. package/dist/resources/generated_queries/GetTokenEvents.graphql +49 -0
  10. package/dist/resources/generated_queries/GetTokenEventsForMaker.graphql +49 -0
  11. package/dist/resources/generated_queries/GetWebhooks.graphql +98 -0
  12. package/dist/resources/generated_queries/TokenLifecycleEvents.graphql +12 -0
  13. package/dist/resources/generated_subscriptions/OnBarsUpdated.graphql +42 -0
  14. package/dist/resources/generated_subscriptions/OnEventLabelCreated.graphql +11 -0
  15. package/dist/resources/generated_subscriptions/OnEventsCreated.graphql +49 -0
  16. package/dist/resources/generated_subscriptions/OnNftEventsCreated.graphql +46 -0
  17. package/dist/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +375 -0
  18. package/dist/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +551 -0
  19. package/dist/resources/generated_subscriptions/OnTokenEventsCreated.graphql +49 -0
  20. package/dist/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +12 -0
  21. package/dist/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +17 -0
  22. package/dist/resources/graphql.d.ts +94 -12
  23. package/dist/resources/graphql.d.ts.map +1 -1
  24. package/dist/resources/graphql.js +8 -0
  25. package/dist/resources/graphql.js.map +1 -1
  26. package/dist/resources/graphql.schema.json +606 -117
  27. package/dist/resources/graphql.ts +97 -13
  28. package/dist/resources/mutations_override/CreateWebhooks.graphql +472 -0
  29. package/dist/resources/queries_override/GetEventLabels.graphql +35 -0
  30. package/dist/resources/queries_override/GetWebhooks.graphql +134 -0
  31. package/dist/resources/schema.graphql +137 -13
  32. package/dist/resources/subscriptions_override/OnEventLabelCreated.graphql +22 -0
  33. package/dist/scripts/generateGraphql.d.ts +1 -0
  34. package/dist/scripts/generateGraphql.d.ts.map +1 -1
  35. package/dist/scripts/generateGraphql.js +48 -12
  36. package/dist/scripts/generateGraphql.js.map +1 -1
  37. package/dist/sdk/Subscribe.d.ts +2 -1
  38. package/dist/sdk/Subscribe.d.ts.map +1 -1
  39. package/dist/sdk/Subscribe.js +35 -10
  40. package/dist/sdk/Subscribe.js.map +1 -1
  41. package/dist/sdk/generated/gql.d.ts +48 -40
  42. package/dist/sdk/generated/gql.d.ts.map +1 -1
  43. package/dist/sdk/generated/gql.js +21 -20
  44. package/dist/sdk/generated/gql.js.map +1 -1
  45. package/dist/sdk/generated/graphql.d.ts +2842 -147
  46. package/dist/sdk/generated/graphql.d.ts.map +1 -1
  47. package/dist/sdk/generated/graphql.js +30 -21
  48. package/dist/sdk/generated/graphql.js.map +1 -1
  49. package/dist/sdk/index.d.ts.map +1 -1
  50. package/dist/sdk/index.js +1 -0
  51. package/dist/sdk/index.js.map +1 -1
  52. package/package.json +1 -1
  53. package/src/resources/generated_mutations/CreateWebhooks.graphql +392 -0
  54. package/src/resources/generated_queries/FilterPairs.graphql +4 -0
  55. package/src/resources/generated_queries/FilterTokens.graphql +4 -0
  56. package/src/resources/generated_queries/GetCommunityNotes.graphql +100 -0
  57. package/src/resources/generated_queries/GetEventLabels.graphql +11 -0
  58. package/src/resources/generated_queries/GetNftEvents.graphql +46 -0
  59. package/src/resources/generated_queries/GetNftPoolEvents.graphql +375 -0
  60. package/src/resources/generated_queries/GetPrimePoolEvents.graphql +118 -0
  61. package/src/resources/generated_queries/GetTokenEvents.graphql +49 -0
  62. package/src/resources/generated_queries/GetTokenEventsForMaker.graphql +49 -0
  63. package/src/resources/generated_queries/GetWebhooks.graphql +98 -0
  64. package/src/resources/generated_queries/TokenLifecycleEvents.graphql +12 -0
  65. package/src/resources/generated_subscriptions/OnBarsUpdated.graphql +42 -0
  66. package/src/resources/generated_subscriptions/OnEventLabelCreated.graphql +11 -0
  67. package/src/resources/generated_subscriptions/OnEventsCreated.graphql +49 -0
  68. package/src/resources/generated_subscriptions/OnNftEventsCreated.graphql +46 -0
  69. package/src/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +375 -0
  70. package/src/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +551 -0
  71. package/src/resources/generated_subscriptions/OnTokenEventsCreated.graphql +49 -0
  72. package/src/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +12 -0
  73. package/src/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +17 -0
  74. package/src/resources/graphql.schema.json +606 -117
  75. package/src/resources/graphql.ts +97 -13
  76. package/src/resources/mutations_override/CreateWebhooks.graphql +472 -0
  77. package/src/resources/queries_override/GetEventLabels.graphql +35 -0
  78. package/src/resources/queries_override/GetWebhooks.graphql +134 -0
  79. package/src/resources/schema.graphql +137 -13
  80. package/src/resources/subscriptions_override/OnEventLabelCreated.graphql +22 -0
  81. package/src/scripts/generateGraphql.ts +87 -17
  82. package/src/sdk/Subscribe.ts +43 -10
  83. package/src/sdk/generated/gql.ts +45 -40
  84. package/src/sdk/generated/graphql.ts +146 -53
  85. package/src/sdk/index.ts +1 -0
@@ -375,7 +375,7 @@ export declare enum CostBasisMethod {
375
375
  export type CreateApiTokensInput = {
376
376
  /** Number of tokens to create, default is 1 */
377
377
  count?: InputMaybe<Scalars['Int']['input']>;
378
- /** Number of milliseconds until the token expires, defaults to 1 hour (3600000) */
378
+ /** Number of seconds until the token expires, defaults to 1 hour (3600) */
379
379
  expiresIn?: InputMaybe<Scalars['Int']['input']>;
380
380
  /** Number of requests allowed per token, represented as a string, default is 5000 */
381
381
  requestLimit?: InputMaybe<Scalars['String']['input']>;
@@ -386,6 +386,7 @@ export type CreateNftEventWebhookArgs = {
386
386
  bucketSortkey?: InputMaybe<Scalars['String']['input']>;
387
387
  callbackUrl: Scalars['String']['input'];
388
388
  conditions: NftEventWebhookConditionInput;
389
+ deduplicate?: InputMaybe<Scalars['Boolean']['input']>;
389
390
  groupId?: InputMaybe<Scalars['String']['input']>;
390
391
  name: Scalars['String']['input'];
391
392
  publishingType?: InputMaybe<PublishingType>;
@@ -401,6 +402,7 @@ export type CreatePriceWebhookArgs = {
401
402
  bucketSortkey?: InputMaybe<Scalars['String']['input']>;
402
403
  callbackUrl: Scalars['String']['input'];
403
404
  conditions: PriceEventWebhookConditionInput;
405
+ deduplicate?: InputMaybe<Scalars['Boolean']['input']>;
404
406
  groupId?: InputMaybe<Scalars['String']['input']>;
405
407
  name: Scalars['String']['input'];
406
408
  publishingType?: InputMaybe<PublishingType>;
@@ -416,6 +418,7 @@ export type CreateRawTransactionWebhookArgs = {
416
418
  bucketSortkey?: InputMaybe<Scalars['String']['input']>;
417
419
  callbackUrl: Scalars['String']['input'];
418
420
  conditions: RawTransactionWebhookConditionInput;
421
+ deduplicate?: InputMaybe<Scalars['Boolean']['input']>;
419
422
  groupId?: InputMaybe<Scalars['String']['input']>;
420
423
  name: Scalars['String']['input'];
421
424
  publishingType?: InputMaybe<PublishingType>;
@@ -431,6 +434,7 @@ export type CreateTokenPairEventWebhookArgs = {
431
434
  bucketSortkey?: InputMaybe<Scalars['String']['input']>;
432
435
  callbackUrl: Scalars['String']['input'];
433
436
  conditions: TokenPairEventWebhookConditionInput;
437
+ deduplicate?: InputMaybe<Scalars['Boolean']['input']>;
434
438
  groupId?: InputMaybe<Scalars['String']['input']>;
435
439
  name: Scalars['String']['input'];
436
440
  publishingType?: InputMaybe<PublishingType>;
@@ -1160,6 +1164,7 @@ export type GetGasEstimateInput = {
1160
1164
  outputTokenAddress: Scalars['String']['input'];
1161
1165
  poolAddress?: InputMaybe<Scalars['String']['input']>;
1162
1166
  sendWithPrivateRpc?: InputMaybe<Scalars['Boolean']['input']>;
1167
+ slippage?: InputMaybe<Scalars['Float']['input']>;
1163
1168
  userId?: InputMaybe<Scalars['Int']['input']>;
1164
1169
  walletId?: InputMaybe<Scalars['Int']['input']>;
1165
1170
  };
@@ -1214,6 +1219,7 @@ export type GetQuoteInput = {
1214
1219
  networkId: Scalars['Int']['input'];
1215
1220
  outputTokenAddress: Scalars['String']['input'];
1216
1221
  poolAddress?: InputMaybe<Scalars['String']['input']>;
1222
+ slippage?: InputMaybe<Scalars['Float']['input']>;
1217
1223
  userId?: InputMaybe<Scalars['Int']['input']>;
1218
1224
  };
1219
1225
  export type GetSimulateTokenContractResultsConnection = {
@@ -4153,6 +4159,8 @@ export type OnBarsUpdatedResponse = {
4153
4159
  pairId: Scalars['String']['output'];
4154
4160
  /** The quote token within the pair. */
4155
4161
  quoteToken?: Maybe<QuoteToken>;
4162
+ /** The address of the token being quoted */
4163
+ quoteTokenAddress: Scalars['String']['output'];
4156
4164
  /** The type of statistics used. Can be `Filtered` or `Unfiltered`. */
4157
4165
  statsType: TokenPairStatisticsType;
4158
4166
  /** The unix timestamp for the new bar. */
@@ -4162,6 +4170,33 @@ export type OnPricesUpdatedInput = {
4162
4170
  address: Scalars['String']['input'];
4163
4171
  networkId: Scalars['Int']['input'];
4164
4172
  };
4173
+ /** Response returned by `onBarsUpdated`. */
4174
+ export type OnTokenBarsUpdatedResponse = {
4175
+ __typename?: 'OnTokenBarsUpdatedResponse';
4176
+ /** Price data broken down by resolution. */
4177
+ aggregates: ResolutionBarData;
4178
+ /**
4179
+ * The sortKey for the bar (`blockNumber`#`transactionIndex`#`logIndex`, zero padded).
4180
+ * For example, `0000000016414564#00000224#00000413`.
4181
+ */
4182
+ eventSortKey: Scalars['String']['output'];
4183
+ /** The network ID the pair is deployed on. */
4184
+ networkId: Scalars['Int']['output'];
4185
+ /** The contract address for the pair. */
4186
+ pairAddress: Scalars['String']['output'];
4187
+ /** The ID for the pair (`pairAddress`:`networkId`). */
4188
+ pairId: Scalars['String']['output'];
4189
+ /** The quote token within the pair. */
4190
+ quoteToken?: Maybe<QuoteToken>;
4191
+ /** The type of statistics used. Can be `Filtered` or `Unfiltered`. */
4192
+ statsType: TokenPairStatisticsType;
4193
+ /** The unix timestamp for the new bar. */
4194
+ timestamp: Scalars['Int']['output'];
4195
+ /** The address of the token being quoted */
4196
+ tokenAddress: Scalars['String']['output'];
4197
+ /** The address of the token being quoted */
4198
+ tokenId: Scalars['String']['output'];
4199
+ };
4165
4200
  export type OnTokenEventsCreatedInput = {
4166
4201
  networkId: Scalars['Int']['input'];
4167
4202
  tokenAddress: Scalars['String']['input'];
@@ -4352,6 +4387,14 @@ export type PairFilterResult = {
4352
4387
  uniqueTransactions12?: Maybe<Scalars['Int']['output']>;
4353
4388
  /** The unique number of transactions in the past 24 hours. */
4354
4389
  uniqueTransactions24?: Maybe<Scalars['Int']['output']>;
4390
+ /** The percent volume change in the past hour. Decimal format. */
4391
+ volumeChange1?: Maybe<Scalars['String']['output']>;
4392
+ /** The percent volume change in the past 4 hours. Decimal format. */
4393
+ volumeChange4?: Maybe<Scalars['String']['output']>;
4394
+ /** The percent volume change in the past 12 hours. Decimal format. */
4395
+ volumeChange12?: Maybe<Scalars['String']['output']>;
4396
+ /** The percent volume change in the past 24 hours. Decimal format. */
4397
+ volumeChange24?: Maybe<Scalars['String']['output']>;
4355
4398
  /** The trade volume in USD in the past hour. */
4356
4399
  volumeUSD1?: Maybe<Scalars['String']['output']>;
4357
4400
  /** The trade volume in USD in the past 4 hours. */
@@ -4455,6 +4498,14 @@ export type PairFilters = {
4455
4498
  uniqueTransactions12?: InputMaybe<NumberFilter>;
4456
4499
  /** The unique number of transactions in the past 24 hours. */
4457
4500
  uniqueTransactions24?: InputMaybe<NumberFilter>;
4501
+ /** The percent volume change in the past hour. Decimal format. */
4502
+ volumeChange1?: InputMaybe<NumberFilter>;
4503
+ /** The percent volume change in the past 4 hours. Decimal format. */
4504
+ volumeChange4?: InputMaybe<NumberFilter>;
4505
+ /** The percent volume change in the past 12 hours. Decimal format. */
4506
+ volumeChange12?: InputMaybe<NumberFilter>;
4507
+ /** The percent volume change in the past 24 hours. Decimal format. */
4508
+ volumeChange24?: InputMaybe<NumberFilter>;
4458
4509
  /** The trade volume in USD in the past hour. */
4459
4510
  volumeUSD1?: InputMaybe<NumberFilter>;
4460
4511
  /** The trade volume in USD in the past 4 hours. */
@@ -4569,6 +4620,10 @@ export declare enum PairRankingAttribute {
4569
4620
  UniqueTransactions4 = "uniqueTransactions4",
4570
4621
  UniqueTransactions12 = "uniqueTransactions12",
4571
4622
  UniqueTransactions24 = "uniqueTransactions24",
4623
+ VolumeChange1 = "volumeChange1",
4624
+ VolumeChange4 = "volumeChange4",
4625
+ VolumeChange12 = "volumeChange12",
4626
+ VolumeChange24 = "volumeChange24",
4572
4627
  VolumeUsd1 = "volumeUSD1",
4573
4628
  VolumeUsd4 = "volumeUSD4",
4574
4629
  VolumeUsd12 = "volumeUSD12",
@@ -5909,6 +5964,7 @@ export type QueryWalletNftCollectionsArgs = {
5909
5964
  export type Quote = {
5910
5965
  __typename?: 'Quote';
5911
5966
  exchange: QuoteExchange;
5967
+ outputAmountMin?: Maybe<Scalars['String']['output']>;
5912
5968
  poolFee?: Maybe<Scalars['String']['output']>;
5913
5969
  poolFeeBps?: Maybe<Scalars['Float']['output']>;
5914
5970
  quoteType: QuoteType;
@@ -5940,16 +5996,6 @@ export declare enum QuoteType {
5940
5996
  Input = "INPUT",
5941
5997
  Output = "OUTPUT"
5942
5998
  }
5943
- export type QuoteV2 = {
5944
- __typename?: 'QuoteV2';
5945
- exchange: QuoteExchange;
5946
- poolFee?: Maybe<Scalars['String']['output']>;
5947
- poolFeeBps?: Maybe<Scalars['Float']['output']>;
5948
- quoteType: QuoteType;
5949
- quotedAmount: Scalars['String']['output'];
5950
- tradeFee: Scalars['String']['output'];
5951
- tradeFeeBps: Scalars['Float']['output'];
5952
- };
5953
5999
  /** The order of ranking. */
5954
6000
  export declare enum RankingDirection {
5955
6001
  Asc = "ASC",
@@ -6030,6 +6076,8 @@ export type ResolutionBarData = {
6030
6076
  r15S?: Maybe<CurrencyBarData>;
6031
6077
  /** 30 minute resolution. */
6032
6078
  r30?: Maybe<CurrencyBarData>;
6079
+ /** 30 second resolution. */
6080
+ r30S?: Maybe<CurrencyBarData>;
6033
6081
  /** 60 minute resolution. */
6034
6082
  r60?: Maybe<CurrencyBarData>;
6035
6083
  /** 4 hour resolution. */
@@ -6371,6 +6419,8 @@ export type Subscription = {
6371
6419
  /** Live-streamed price updates for multiple tokens. */
6372
6420
  onPricesUpdated: Price;
6373
6421
  onSimulateTokenContract: SimulateTokenContractResult;
6422
+ /** Live-streamed bar chart data to track price changes over time for a token. */
6423
+ onTokenBarsUpdated?: Maybe<OnTokenBarsUpdatedResponse>;
6374
6424
  /** Live streamed events for a given token across all it's pools */
6375
6425
  onTokenEventsCreated: AddTokenEventsOutput;
6376
6426
  /** Live-streamed token lifecycle events (mints and burns) */
@@ -6437,6 +6487,10 @@ export type SubscriptionOnSimulateTokenContractArgs = {
6437
6487
  networkId: Scalars['Int']['input'];
6438
6488
  simulationId?: InputMaybe<Scalars['String']['input']>;
6439
6489
  };
6490
+ export type SubscriptionOnTokenBarsUpdatedArgs = {
6491
+ statsType?: InputMaybe<TokenPairStatisticsType>;
6492
+ tokenId?: InputMaybe<Scalars['String']['input']>;
6493
+ };
6440
6494
  export type SubscriptionOnTokenEventsCreatedArgs = {
6441
6495
  input: OnTokenEventsCreatedInput;
6442
6496
  };
@@ -6754,6 +6808,14 @@ export type TokenFilterResult = {
6754
6808
  volume12?: Maybe<Scalars['String']['output']>;
6755
6809
  /** The trade volume in USD in the past 24 hours. */
6756
6810
  volume24?: Maybe<Scalars['String']['output']>;
6811
+ /** The percent volume change in the past hour. Decimal format. */
6812
+ volumeChange1?: Maybe<Scalars['String']['output']>;
6813
+ /** The percent volume change in the past 4 hours. Decimal format. */
6814
+ volumeChange4?: Maybe<Scalars['String']['output']>;
6815
+ /** The percent volume change in the past 12 hours. Decimal format. */
6816
+ volumeChange12?: Maybe<Scalars['String']['output']>;
6817
+ /** The percent volume change in the past 24 hours. Decimal format. */
6818
+ volumeChange24?: Maybe<Scalars['String']['output']>;
6757
6819
  };
6758
6820
  /** Input type of `TokenFilters`. */
6759
6821
  export type TokenFilters = {
@@ -6867,6 +6929,14 @@ export type TokenFilters = {
6867
6929
  volume12?: InputMaybe<NumberFilter>;
6868
6930
  /** The trade volume in USD in the past 24 hours. */
6869
6931
  volume24?: InputMaybe<NumberFilter>;
6932
+ /** The percent volume change in the past hour. Decimal format. */
6933
+ volumeChange1?: InputMaybe<NumberFilter>;
6934
+ /** The percent volume change in the past 4 hours. Decimal format. */
6935
+ volumeChange4?: InputMaybe<NumberFilter>;
6936
+ /** The percent volume change in the past 12 hours. Decimal format. */
6937
+ volumeChange12?: InputMaybe<NumberFilter>;
6938
+ /** The percent volume change in the past 24 hours. Decimal format. */
6939
+ volumeChange24?: InputMaybe<NumberFilter>;
6870
6940
  };
6871
6941
  /** Metadata for a token. */
6872
6942
  export type TokenInfo = {
@@ -7072,7 +7142,11 @@ export declare enum TokenRankingAttribute {
7072
7142
  Volume1 = "volume1",
7073
7143
  Volume4 = "volume4",
7074
7144
  Volume12 = "volume12",
7075
- Volume24 = "volume24"
7145
+ Volume24 = "volume24",
7146
+ VolumeChange1 = "volumeChange1",
7147
+ VolumeChange4 = "volumeChange4",
7148
+ VolumeChange12 = "volumeChange12",
7149
+ VolumeChange24 = "volumeChange24"
7076
7150
  }
7077
7151
  /** Response returned by `searchTokens`. */
7078
7152
  export type TokenSearchResponse = {
@@ -7229,6 +7303,14 @@ export type UnconfirmedSwapEventData = {
7229
7303
  __typename?: 'UnconfirmedSwapEventData';
7230
7304
  /** 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. */
7231
7305
  amountNonLiquidityToken?: Maybe<Scalars['String']['output']>;
7306
+ /** 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. */
7307
+ priceBaseToken?: Maybe<Scalars['String']['output']>;
7308
+ /** The total amount of `quoteToken` involved in the swap in the network's base token (`amountNonLiquidityToken` x `priceBaseToken`). */
7309
+ priceBaseTokenTotal?: Maybe<Scalars['String']['output']>;
7310
+ /** 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). */
7311
+ priceUsd?: Maybe<Scalars['String']['output']>;
7312
+ /** The total amount of `quoteToken` involved in the swap in USD (`amountNonLiquidityToken` x `priceUsd`). */
7313
+ priceUsdTotal?: Maybe<Scalars['String']['output']>;
7232
7314
  /** The type of token event, `Swap`. */
7233
7315
  type: EventType;
7234
7316
  };