@codex-data/sdk 1.0.0-rc3 → 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_queries/GetTokenPrices.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnPriceUpdated.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnPricesUpdated.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +70 -0
- package/dist/resources/graphql.d.ts +67 -0
- package/dist/resources/graphql.d.ts.map +1 -1
- package/dist/resources/graphql.js.map +1 -1
- package/dist/resources/graphql.schema.json +406 -1
- package/dist/resources/graphql.ts +72 -0
- package/dist/resources/schema.graphql +93 -1
- package/dist/sdk/Subscribe.d.ts +2 -1
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +9 -2
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/gql.d.ts +14 -6
- package/dist/sdk/generated/gql.d.ts.map +1 -1
- package/dist/sdk/generated/gql.js +4 -3
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +154 -0
- package/dist/sdk/generated/graphql.d.ts.map +1 -1
- package/dist/sdk/generated/graphql.js +5 -4
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/package.json +2 -2
- package/src/resources/generated_queries/GetTokenPrices.graphql +1 -0
- package/src/resources/generated_subscriptions/OnPriceUpdated.graphql +1 -0
- package/src/resources/generated_subscriptions/OnPricesUpdated.graphql +1 -0
- package/src/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +70 -0
- package/src/resources/graphql.schema.json +406 -1
- package/src/resources/graphql.ts +72 -0
- package/src/resources/schema.graphql +93 -1
- package/src/sdk/Subscribe.ts +17 -2
- package/src/sdk/generated/gql.ts +11 -6
- package/src/sdk/generated/graphql.ts +87 -6
|
@@ -1209,6 +1209,8 @@ export type GetPriceInput = {
|
|
|
1209
1209
|
maxDeviations?: InputMaybe<Scalars['Float']['input']>;
|
|
1210
1210
|
/** The network ID the token is deployed on. */
|
|
1211
1211
|
networkId: Scalars['Int']['input'];
|
|
1212
|
+
/** The address of the pool, when omitted the top pool is used. */
|
|
1213
|
+
poolAddress?: InputMaybe<Scalars['String']['input']>;
|
|
1212
1214
|
/** The unix timestamp for the price. */
|
|
1213
1215
|
timestamp?: InputMaybe<Scalars['Int']['input']>;
|
|
1214
1216
|
};
|
|
@@ -4202,6 +4204,29 @@ export type OnTokenEventsCreatedInput = {
|
|
|
4202
4204
|
networkId: Scalars['Int']['input'];
|
|
4203
4205
|
tokenAddress: Scalars['String']['input'];
|
|
4204
4206
|
};
|
|
4207
|
+
/** Response returned by `onUnconfirmedBarsUpdated`. */
|
|
4208
|
+
export type OnUnconfirmedBarsUpdated = {
|
|
4209
|
+
__typename?: 'OnUnconfirmedBarsUpdated';
|
|
4210
|
+
/** Price data broken down by resolution. */
|
|
4211
|
+
aggregates: UnconfirmedResolutionBarData;
|
|
4212
|
+
/**
|
|
4213
|
+
* The sortKey for the bar (`blockNumber`#`transactionIndex`#`logIndex`, zero padded).
|
|
4214
|
+
* For example, `0000000016414564#00000224#00000413`.
|
|
4215
|
+
*/
|
|
4216
|
+
eventSortKey: Scalars['String']['output'];
|
|
4217
|
+
/** The network ID the pair is deployed on. */
|
|
4218
|
+
networkId: Scalars['Int']['output'];
|
|
4219
|
+
/** The contract address for the pair. */
|
|
4220
|
+
pairAddress: Scalars['String']['output'];
|
|
4221
|
+
/** The ID for the pair (`pairAddress`:`networkId`). */
|
|
4222
|
+
pairId: Scalars['String']['output'];
|
|
4223
|
+
/** The quote token within the pair. */
|
|
4224
|
+
quoteToken?: Maybe<QuoteToken>;
|
|
4225
|
+
/** The address of the token being quoted */
|
|
4226
|
+
quoteTokenAddress: Scalars['String']['output'];
|
|
4227
|
+
/** The unix timestamp for the new bar. */
|
|
4228
|
+
timestamp: Scalars['Int']['output'];
|
|
4229
|
+
};
|
|
4205
4230
|
export type OneOfNumberCondition = {
|
|
4206
4231
|
__typename?: 'OneOfNumberCondition';
|
|
4207
4232
|
oneOf: Array<Scalars['Int']['output']>;
|
|
@@ -4964,6 +4989,8 @@ export type Price = {
|
|
|
4964
4989
|
confidence?: Maybe<Scalars['Float']['output']>;
|
|
4965
4990
|
/** The network ID the token is deployed on. */
|
|
4966
4991
|
networkId: Scalars['Int']['output'];
|
|
4992
|
+
/** The pool that emitted the swap generating this price */
|
|
4993
|
+
poolAddress: Scalars['String']['output'];
|
|
4967
4994
|
/** The token price in USD. */
|
|
4968
4995
|
priceUsd: Scalars['Float']['output'];
|
|
4969
4996
|
/** The unix timestamp for the price. */
|
|
@@ -6426,6 +6453,8 @@ export type Subscription = {
|
|
|
6426
6453
|
onTokenEventsCreated: AddTokenEventsOutput;
|
|
6427
6454
|
/** Live-streamed token lifecycle events (mints and burns) */
|
|
6428
6455
|
onTokenLifecycleEventsCreated: AddTokenLifecycleEventsOutput;
|
|
6456
|
+
/** Unconfirmed live-streamed bar chart data to track price changes over time. (Solana only) */
|
|
6457
|
+
onUnconfirmedBarsUpdated?: Maybe<OnUnconfirmedBarsUpdated>;
|
|
6429
6458
|
/** Live-streamed unconfirmed transactions for a token. (Solana only) */
|
|
6430
6459
|
onUnconfirmedEventsCreated?: Maybe<AddUnconfirmedEventsOutput>;
|
|
6431
6460
|
};
|
|
@@ -6499,6 +6528,10 @@ export type SubscriptionOnTokenLifecycleEventsCreatedArgs = {
|
|
|
6499
6528
|
address?: InputMaybe<Scalars['String']['input']>;
|
|
6500
6529
|
networkId?: InputMaybe<Scalars['Int']['input']>;
|
|
6501
6530
|
};
|
|
6531
|
+
export type SubscriptionOnUnconfirmedBarsUpdatedArgs = {
|
|
6532
|
+
pairId?: InputMaybe<Scalars['String']['input']>;
|
|
6533
|
+
quoteToken?: InputMaybe<QuoteToken>;
|
|
6534
|
+
};
|
|
6502
6535
|
export type SubscriptionOnUnconfirmedEventsCreatedArgs = {
|
|
6503
6536
|
address?: InputMaybe<Scalars['String']['input']>;
|
|
6504
6537
|
id?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -7287,6 +7320,24 @@ export type UnconfirmedEvent = {
|
|
|
7287
7320
|
transactionIndex: Scalars['Int']['output'];
|
|
7288
7321
|
};
|
|
7289
7322
|
export type UnconfirmedEventData = UnconfirmedLiquidityChangeEventData | UnconfirmedSwapEventData;
|
|
7323
|
+
/** Unconfirmed bar chart data. */
|
|
7324
|
+
export type UnconfirmedIndividualBarData = {
|
|
7325
|
+
__typename?: 'UnconfirmedIndividualBarData';
|
|
7326
|
+
/** The closing price. */
|
|
7327
|
+
c: Scalars['Float']['output'];
|
|
7328
|
+
/** The high price. */
|
|
7329
|
+
h: Scalars['Float']['output'];
|
|
7330
|
+
/** The low price. */
|
|
7331
|
+
l: Scalars['Float']['output'];
|
|
7332
|
+
/** The opening price. */
|
|
7333
|
+
o: Scalars['Float']['output'];
|
|
7334
|
+
/** The timestamp for the bar. */
|
|
7335
|
+
t: Scalars['Int']['output'];
|
|
7336
|
+
/** The volume. */
|
|
7337
|
+
v?: Maybe<Scalars['Int']['output']>;
|
|
7338
|
+
/** The volume with higher precision. */
|
|
7339
|
+
volume: Scalars['String']['output'];
|
|
7340
|
+
};
|
|
7290
7341
|
export type UnconfirmedLiquidityChangeEventData = {
|
|
7291
7342
|
__typename?: 'UnconfirmedLiquidityChangeEventData';
|
|
7292
7343
|
/** The amount of `token0` added or removed from the pair. */
|
|
@@ -7300,6 +7351,22 @@ export type UnconfirmedLiquidityChangeEventData = {
|
|
|
7300
7351
|
/** The type of token event, `Mint` or 'Burn'. */
|
|
7301
7352
|
type: EventType;
|
|
7302
7353
|
};
|
|
7354
|
+
/** Unconfirmed price data for each supported resolution. */
|
|
7355
|
+
export type UnconfirmedResolutionBarData = {
|
|
7356
|
+
__typename?: 'UnconfirmedResolutionBarData';
|
|
7357
|
+
/** 1 minute resolution. */
|
|
7358
|
+
r1?: Maybe<UnconfirmedIndividualBarData>;
|
|
7359
|
+
/** 1 second resolution. */
|
|
7360
|
+
r1S?: Maybe<UnconfirmedIndividualBarData>;
|
|
7361
|
+
/** 5 minute resolution. */
|
|
7362
|
+
r5?: Maybe<UnconfirmedIndividualBarData>;
|
|
7363
|
+
/** 5 second resolution. */
|
|
7364
|
+
r5S?: Maybe<UnconfirmedIndividualBarData>;
|
|
7365
|
+
/** 15 minute resolution. */
|
|
7366
|
+
r15?: Maybe<UnconfirmedIndividualBarData>;
|
|
7367
|
+
/** 15 second resolution. */
|
|
7368
|
+
r15S?: Maybe<UnconfirmedIndividualBarData>;
|
|
7369
|
+
};
|
|
7303
7370
|
export type UnconfirmedSwapEventData = {
|
|
7304
7371
|
__typename?: 'UnconfirmedSwapEventData';
|
|
7305
7372
|
/** 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. */
|
|
@@ -15281,6 +15348,7 @@ export type GetTokenPricesQuery = {
|
|
|
15281
15348
|
address: string;
|
|
15282
15349
|
confidence?: number | null;
|
|
15283
15350
|
networkId: number;
|
|
15351
|
+
poolAddress: string;
|
|
15284
15352
|
priceUsd: number;
|
|
15285
15353
|
timestamp: number;
|
|
15286
15354
|
} | null> | null;
|
|
@@ -18382,6 +18450,7 @@ export type OnPriceUpdatedSubscription = {
|
|
|
18382
18450
|
address: string;
|
|
18383
18451
|
confidence?: number | null;
|
|
18384
18452
|
networkId: number;
|
|
18453
|
+
poolAddress: string;
|
|
18385
18454
|
priceUsd: number;
|
|
18386
18455
|
timestamp: number;
|
|
18387
18456
|
} | null;
|
|
@@ -18396,6 +18465,7 @@ export type OnPricesUpdatedSubscription = {
|
|
|
18396
18465
|
address: string;
|
|
18397
18466
|
confidence?: number | null;
|
|
18398
18467
|
networkId: number;
|
|
18468
|
+
poolAddress: string;
|
|
18399
18469
|
priceUsd: number;
|
|
18400
18470
|
timestamp: number;
|
|
18401
18471
|
};
|
|
@@ -19263,6 +19333,86 @@ export type OnTokenLifecycleEventsCreatedSubscription = {
|
|
|
19263
19333
|
}>;
|
|
19264
19334
|
};
|
|
19265
19335
|
};
|
|
19336
|
+
export type OnUnconfirmedBarsUpdatedSubscriptionVariables = Exact<{
|
|
19337
|
+
pairId?: InputMaybe<Scalars['String']['input']>;
|
|
19338
|
+
quoteToken?: InputMaybe<QuoteToken>;
|
|
19339
|
+
}>;
|
|
19340
|
+
export type OnUnconfirmedBarsUpdatedSubscription = {
|
|
19341
|
+
__typename?: 'Subscription';
|
|
19342
|
+
onUnconfirmedBarsUpdated?: {
|
|
19343
|
+
__typename?: 'OnUnconfirmedBarsUpdated';
|
|
19344
|
+
eventSortKey: string;
|
|
19345
|
+
networkId: number;
|
|
19346
|
+
pairAddress: string;
|
|
19347
|
+
pairId: string;
|
|
19348
|
+
quoteToken?: QuoteToken | null;
|
|
19349
|
+
quoteTokenAddress: string;
|
|
19350
|
+
timestamp: number;
|
|
19351
|
+
aggregates: {
|
|
19352
|
+
__typename?: 'UnconfirmedResolutionBarData';
|
|
19353
|
+
r1?: {
|
|
19354
|
+
__typename?: 'UnconfirmedIndividualBarData';
|
|
19355
|
+
c: number;
|
|
19356
|
+
h: number;
|
|
19357
|
+
l: number;
|
|
19358
|
+
o: number;
|
|
19359
|
+
t: number;
|
|
19360
|
+
v?: number | null;
|
|
19361
|
+
volume: string;
|
|
19362
|
+
} | null;
|
|
19363
|
+
r1S?: {
|
|
19364
|
+
__typename?: 'UnconfirmedIndividualBarData';
|
|
19365
|
+
c: number;
|
|
19366
|
+
h: number;
|
|
19367
|
+
l: number;
|
|
19368
|
+
o: number;
|
|
19369
|
+
t: number;
|
|
19370
|
+
v?: number | null;
|
|
19371
|
+
volume: string;
|
|
19372
|
+
} | null;
|
|
19373
|
+
r5?: {
|
|
19374
|
+
__typename?: 'UnconfirmedIndividualBarData';
|
|
19375
|
+
c: number;
|
|
19376
|
+
h: number;
|
|
19377
|
+
l: number;
|
|
19378
|
+
o: number;
|
|
19379
|
+
t: number;
|
|
19380
|
+
v?: number | null;
|
|
19381
|
+
volume: string;
|
|
19382
|
+
} | null;
|
|
19383
|
+
r5S?: {
|
|
19384
|
+
__typename?: 'UnconfirmedIndividualBarData';
|
|
19385
|
+
c: number;
|
|
19386
|
+
h: number;
|
|
19387
|
+
l: number;
|
|
19388
|
+
o: number;
|
|
19389
|
+
t: number;
|
|
19390
|
+
v?: number | null;
|
|
19391
|
+
volume: string;
|
|
19392
|
+
} | null;
|
|
19393
|
+
r15?: {
|
|
19394
|
+
__typename?: 'UnconfirmedIndividualBarData';
|
|
19395
|
+
c: number;
|
|
19396
|
+
h: number;
|
|
19397
|
+
l: number;
|
|
19398
|
+
o: number;
|
|
19399
|
+
t: number;
|
|
19400
|
+
v?: number | null;
|
|
19401
|
+
volume: string;
|
|
19402
|
+
} | null;
|
|
19403
|
+
r15S?: {
|
|
19404
|
+
__typename?: 'UnconfirmedIndividualBarData';
|
|
19405
|
+
c: number;
|
|
19406
|
+
h: number;
|
|
19407
|
+
l: number;
|
|
19408
|
+
o: number;
|
|
19409
|
+
t: number;
|
|
19410
|
+
v?: number | null;
|
|
19411
|
+
volume: string;
|
|
19412
|
+
} | null;
|
|
19413
|
+
};
|
|
19414
|
+
} | null;
|
|
19415
|
+
};
|
|
19266
19416
|
export type OnUnconfirmedEventsCreatedSubscriptionVariables = Exact<{
|
|
19267
19417
|
address?: InputMaybe<Scalars['String']['input']>;
|
|
19268
19418
|
id?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -19760,6 +19910,10 @@ export declare const OnTokenLifecycleEventsCreatedDocument: DocumentNode<OnToken
|
|
|
19760
19910
|
address?: InputMaybe<string> | undefined;
|
|
19761
19911
|
networkId?: InputMaybe<number> | undefined;
|
|
19762
19912
|
}>>;
|
|
19913
|
+
export declare const OnUnconfirmedBarsUpdatedDocument: DocumentNode<OnUnconfirmedBarsUpdatedSubscription, Exact<{
|
|
19914
|
+
pairId?: InputMaybe<string> | undefined;
|
|
19915
|
+
quoteToken?: InputMaybe<QuoteToken> | undefined;
|
|
19916
|
+
}>>;
|
|
19763
19917
|
export declare const OnUnconfirmedEventsCreatedDocument: DocumentNode<OnUnconfirmedEventsCreatedSubscription, Exact<{
|
|
19764
19918
|
address?: InputMaybe<string> | undefined;
|
|
19765
19919
|
id?: InputMaybe<string> | undefined;
|