Skip to content

Commit 8caea03

Browse files
committed
Merge branch 'main' into chore/upgrade-next
2 parents 2bb2470 + 5e18340 commit 8caea03

File tree

95 files changed

+4143
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+4143
-49
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/developer-hub/content/docs/price-feeds/pro/payload-reference.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik
7171
"bestAskPrice": "11224513591935",
7272
"publisherCount": 9,
7373
"exponent": -8,
74-
"confidence": 1373488286
74+
"confidence": 1373488286,
75+
"marketSession": "regular"
7576
},
7677
{
7778
"priceFeedId": 2,
@@ -80,7 +81,8 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik
8081
"bestAskPrice": "448508987987",
8182
"publisherCount": 12,
8283
"exponent": -8,
83-
"confidence": 106965585
84+
"confidence": 106965585,
85+
"marketSession": "regular"
8486
}
8587
]
8688
},
@@ -154,6 +156,15 @@ Confidence interval representing price uncertainty
154156
- **Invariants**: Positive when present
155157
- **Usage**: Risk management and price quality assessment
156158

159+
#### Market Session - `marketSession`
160+
161+
Represents the trading session status during which the price update was produced.
162+
This helps consumers understand whether a price comes from active trading hours or a more illiquid session such as pre-market or overnight trading.
163+
164+
- **Type**: `string`
165+
- **Possible Values**: `regular`, `preMarket`, `postMarket`, `overNight`, `closed`
166+
- **Availability**: Only included if requested in subscription properties
167+
157168
### Market Depth Properties
158169

159170
#### Highest Market Bid - `best_bid_price`
@@ -209,6 +220,7 @@ Based on the [API documentation](https://pyth-lazer.dourolabs.app/docs), you can
209220

210221
- `publisherCount` - Number of contributing data publishers
211222
- `exponent` - Decimal exponent for proper price representation
223+
- `marketSession` - Indicates the market session during which the price update was produced.
212224

213225
### Spot Trading Properties
214226

apps/developer-hub/src/components/EntropyTable/entropy-api-data-fetcher.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,14 @@ const apiChainConfigToEntrySchema = ApiChainConfigSchema.transform((chain) => {
5454

5555
const entropyDeploymentsSchema = z.array(apiChainConfigToEntrySchema);
5656

57+
const HIDDEN_CHAINS = new Set(["taiko"]);
58+
5759
export async function fetchEntropyDeployments(
5860
url: string,
5961
): Promise<Record<string, EntropyDeployment>> {
6062
const response = await fetch(url);
6163
const entries = entropyDeploymentsSchema.parse(await response.json());
62-
return Object.fromEntries(entries);
64+
return Object.fromEntries(
65+
entries.filter(([name]) => !HIDDEN_CHAINS.has(name)),
66+
);
6367
}

apps/developer-hub/src/components/EntropyTable/entropy-deployments-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ export const EntropyDeploymentsConfig: Record<string, ChainOverride> = {
2424
},
2525
"143": {
2626
nativeCurrency: "MON",
27+
explorer: "https://monadvision.com",
2728
},
2829
};

apps/insights/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
"@pythnetwork/component-library": "workspace:*",
2727
"@pythnetwork/hermes-client": "workspace:*",
2828
"@pythnetwork/known-publishers": "workspace:*",
29+
"@pythnetwork/shared-lib": "workspace:*",
2930
"@react-hookz/web": "catalog:",
3031
"@solana/web3.js": "catalog:",
3132
"async-cache-dedupe": "catalog:",
3233
"bs58": "catalog:",
34+
"change-case": "catalog:",
3335
"clsx": "catalog:",
3436
"date-fns": "catalog:",
3537
"csv-stringify": "catalog:",
@@ -43,8 +45,10 @@
4345
"@pythnetwork/react-hooks": "workspace:",
4446
"react": "catalog:",
4547
"react-aria": "catalog:",
48+
"react-aria-components": "catalog:",
4649
"react-dom": "catalog:",
4750
"recharts": "catalog:",
51+
"sockette": "catalog:",
4852
"superjson": "catalog:",
4953
"swr": "catalog:",
5054
"zod": "catalog:",
@@ -73,4 +77,4 @@
7377
"stylelint-config-standard-scss": "catalog:",
7478
"vercel": "catalog:"
7579
}
76-
}
80+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { Metadata } from "next";
2+
export { PythFeedsDemoPage as default } from "../../components/PythFeedsDemoPage";
3+
4+
export const metadata: Metadata = {
5+
title: {
6+
default: "Pyth Realtime Feed Comparison Tool",
7+
template: "%s | Realtime Feed Comparison | Pyth Network Insights",
8+
},
9+
description:
10+
"A real-time price monitoring demo that fetches live price data from multiple exchanges and displays it in an interactive chart.",
11+
robots: {
12+
index: false,
13+
follow: false,
14+
},
15+
};

apps/insights/src/app/robots.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ import type { MetadataRoute } from "next";
33
import { IS_PRODUCTION_SERVER } from "../config/server";
44

55
const robots = (): MetadataRoute.Robots => ({
6-
rules: {
7-
userAgent: "*",
8-
...(IS_PRODUCTION_SERVER ? { allow: "/" } : { disallow: "/" }),
9-
},
6+
rules: IS_PRODUCTION_SERVER
7+
? {
8+
userAgent: "*",
9+
allow: "/",
10+
disallow: ["/pyth-feeds-demo"],
11+
}
12+
: {
13+
userAgent: "*",
14+
disallow: "/",
15+
},
1016
});
1117
export default robots;
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
@use "@pythnetwork/component-library/theme";
2+
3+
.body {
4+
padding-top: theme.spacing(4);
5+
}
6+
7+
.subheader {
8+
border-bottom: 1px solid theme.color("border");
9+
display: flex;
10+
flex-flow: column;
11+
gap: theme.spacing(4);
12+
padding-bottom: theme.spacing(4);
13+
14+
@include theme.breakpoint("sm") {
15+
align-items: flex-end;
16+
flex-flow: initial;
17+
justify-content: space-between;
18+
}
19+
20+
& > div {
21+
&:first-child {
22+
display: flex;
23+
flex-flow: column;
24+
gap: theme.spacing(4);
25+
26+
& > h3,
27+
& > h4 {
28+
margin: 0;
29+
}
30+
31+
& > h4 {
32+
color: theme.color("muted");
33+
}
34+
}
35+
36+
&:last-child {
37+
align-items: center;
38+
display: flex;
39+
gap: theme.spacing(2);
40+
}
41+
}
42+
}
43+
44+
.pythFeedsDemoPageRoot {
45+
@include theme.max-width;
46+
47+
// this holds the chart
48+
& > aside {
49+
margin-top: theme.spacing(2);
50+
}
51+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
"use client";
2+
3+
import classes from "./index.module.scss";
4+
import {
5+
PythProApiTokensProvider,
6+
PythProAppStateProvider,
7+
WebSocketsProvider,
8+
} from "../../context/pyth-pro-demo";
9+
import { PythProApiTokensMenu } from "../PythProApiTokensMenu";
10+
import { PythProDemoCards } from "../PythProDemoCards";
11+
import { PythProDemoPriceChart } from "../PythProDemoPriceChart";
12+
import { PythProDemoSourceSelector } from "../PythProDemoSourceSelector";
13+
14+
export function PythFeedsDemoPage() {
15+
return (
16+
<PythProApiTokensProvider>
17+
<PythProAppStateProvider>
18+
<WebSocketsProvider>
19+
<article className={classes.pythFeedsDemoPageRoot}>
20+
<section>
21+
<div className={classes.subheader}>
22+
<div>
23+
<h3>Pyth Pro</h3>
24+
<h4>Real-time feed comparison tool</h4>
25+
</div>
26+
<div>
27+
<PythProApiTokensMenu />
28+
<PythProDemoSourceSelector />
29+
</div>
30+
</div>
31+
<div className={classes.body}>
32+
<PythProDemoCards />
33+
</div>
34+
</section>
35+
<aside>
36+
<PythProDemoPriceChart />
37+
</aside>
38+
</article>
39+
</WebSocketsProvider>
40+
</PythProAppStateProvider>
41+
</PythProApiTokensProvider>
42+
);
43+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
@use "@pythnetwork/component-library/theme";
2+
3+
.apiTokensModalBody {
4+
overflow-y: auto;
5+
padding: theme.spacing(6);
6+
padding-top: 0;
7+
}
8+
9+
.apiTokensForm {
10+
border-top: 1px solid theme.color("border");
11+
display: flex;
12+
flex-flow: column;
13+
gap: theme.spacing(2);
14+
padding-top: theme.spacing(4);
15+
margin-top: theme.spacing(4);
16+
}
17+
18+
.apiTokensMenu {
19+
@include theme.breakpoint("sm") {
20+
width: 600px;
21+
}
22+
}
23+
24+
.apiTokensMenuHeader {
25+
align-items: center;
26+
display: flex;
27+
font-size: 1.4rem;
28+
justify-content: space-between;
29+
padding: theme.spacing(6);
30+
padding-right: theme.spacing(2);
31+
}
32+
33+
.fyi {
34+
margin-bottom: theme.spacing(2);
35+
}
36+
37+
.tooltip {
38+
@include theme.elevation("default", 1);
39+
40+
background-color: theme.color("background", "tooltip");
41+
border-radius: theme.border-radius("md");
42+
color: theme.color("tooltip");
43+
min-height: 0;
44+
overflow-y: auto;
45+
padding: theme.spacing(4);
46+
margin-top: theme.spacing(2);
47+
}
48+
49+
.modal {
50+
@include theme.elevation("default", 1);
51+
52+
background-color: theme.color("background", "secondary");
53+
border-radius: theme.border-radius("md");
54+
left: 50%;
55+
max-height: 80vh;
56+
overflow-y: auto;
57+
position: fixed;
58+
transform: translate3d(-50%, -50%, 0);
59+
top: 50%;
60+
width: 90vw;
61+
z-index: 10;
62+
63+
@include theme.breakpoint("sm") {
64+
width: initial;
65+
}
66+
}
67+
68+
.modalOverlay {
69+
background-color: theme.color("background", "nav-blur");
70+
inset: 0;
71+
position: fixed;
72+
z-index: 1;
73+
}
74+
75+
.tokenInputWrapper {
76+
display: flex;
77+
flex-flow: column;
78+
gap: theme.spacing(1);
79+
}

0 commit comments

Comments
 (0)