docs(solana): split Photon API into its own OpenRPC spec and sidebar group#1240
Open
JackReacher0807 wants to merge 3 commits intomainfrom
Open
docs(solana): split Photon API into its own OpenRPC spec and sidebar group#1240JackReacher0807 wants to merge 3 commits intomainfrom
JackReacher0807 wants to merge 3 commits intomainfrom
Conversation
🔗 Preview Mode
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a652a58aec
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The Photon methods were moved out of the Solana API endpoints list and into a dedicated Solana Photon API spec. Their generated pages used to live at /docs/chains/solana/solana-api-endpoints/<method-slug>; they now live at /docs/reference/alchemy-photon-apis-for-solana/solana-photon-api-endpoints/<method-slug>. Add permanent redirects for all 26 methods so existing links from the Solana API overview (and anywhere else on the web) keep working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Splits the 26 Photon methods (the Helius ZK Compression indexer surface) out of the Solana chain OpenRPC spec into a standalone
solana-photonspec, and wires up a dedicated "Solana Photon API" sidebar group under both NFT API and the Solana chain section. This mirrors the earlier Solana DAS split.Linear: DOCS-47
Follow-up to #1238 (DOCS-45 — overview page sections). Once this lands, the three-section Solana API overview page from #1238 will need a tiny redirect update so its Photon method links point at the new
reference/alchemy-photon-apis-for-solana/...paths. I'll open that as a separate PR after #1238 merges so neither branch stomps on the other.Why
Before this PR, Photon methods lived inside
src/openrpc/chains/solana/solana.yamlalongside the Core RPC methods, so the left-sidebar "Solana API Endpoints" group was a single flat list of Core + Photon methods. Sahil wants Photon methods surfaced under their own sidebar group — same pattern as Solana DAS.Changes
src/openrpc/alchemy/solana-photon/solana-photon.yaml— standalone OpenRPC 1.2.4 spec with all 26 Photon methods. It references the existing method definitions insrc/openrpc/chains/_components/solana/methods.yaml#/components/methods/<name>via cross-tree$refs (see "Ref approach" below), so the method schemas stay DRY.src/openrpc/chains/solana/solana.yaml— removes the 26 Photon$reflines from themethodsarray and adds those method names to thex-bot-ignorelist so Daikon stops managing them from the chain spec side. Core RPC ordering is preserved; existing DAS / legacy entries inx-bot-ignorekeep their original grouping.content/api-reference/data/nft-api/alchemy-photon-apis-for-solana.mdx— overview page with frontmatter, a short ZK Compression / Photon background (with a link tohttps://github.com/helius-labs/photon), and a methods table linking to the new/docs/reference/alchemy-photon-apis-for-solana/solana-photon-api-endpoints/<method-kebab>endpoint slugs. Location mirrors where the DAS overview lives (data/nft-api/) for consistency.content/docs.yml— adds aSolana Photon APIsection under the NFT API area (withapi-name: solana-photon) and aSolana Photon APIslink under the Solana chain section, matching the DAS entries right above them.Method count: 26
(Task description mentioned 27, but the list itself contained 26 unique method names — confirmed against
src/openrpc/chains/solana/solana.yaml's existing Photon$refs.)Ref approach: cross-tree
$ref✅I went with cross-tree
$refs intosrc/openrpc/chains/_components/solana/methods.yaml#/components/methods/<name>rather than inlining the full method definitions the waysolana-das.yamldoes. Reasons:scripts/generate-rpc.ts(@apidevtools/json-schema-ref-parser) handles cross-tree refs cleanly.pnpm run generate:rpcproduced a fully-dereferencedcontent/api-specs/alchemy/json-rpc/solana-photon.jsonwith all 26 methods and their transitivecompression.yamlschemas inlined correctly.pnpm run validate:rpcpasses on both the new spec and the trimmedsolana.json.methods.yaml), which matches how the chain spec already referenced them — less drift risk than duplicating the bodies.If the bundler ever starts rejecting cross-tree refs, the fallback (inline the method bodies as DAS does) is mechanical — just paste the entries from
methods.yamlintosolana-photon.yaml. Flagging for review in case there's a convention I missed.CU costs in the overview table
The DAS overview has hardcoded CU cost / throughput values. Photon CU pricing isn't published yet, so the new page leaves those columns as
-and includes a short note that they'll be filled in as the API exits Beta. Happy to swap in real numbers if there's a table somewhere I missed.Redirects
Did not add per-method redirects in
content/redirects.yml. The DAS split didn't add per-method redirects either when DAS moved to its own spec — it relied on the new slugs being the only canonical ones going forward. Following that precedent to keep the PRs symmetric. If you'd rather have 26301s from/docs/chains/solana/solana-api-endpoints/<photon-method>→/docs/reference/alchemy-photon-apis-for-solana/solana-photon-api-endpoints/<photon-method>, say the word and I'll add them in a follow-up.What I did NOT touch
content/api-reference/solana/solana-api-overview.mdx— that file is being edited ondocs/writer/solana-api-overview-sections(PR [Writer] docs(solana): separate API overview into Core RPC, DAS, and Photon sections #1238). Sahil is handling the link update as a follow-up once this merges.Validation
Note:
pnpm run lintruns eslint + prettier + typecheck in parallel; prettier flagged two unrelated files (scripts/upload-specs.ts,src/content-indexer/indexers/changelog.ts) andMDX_FEATURES.mdhad pre-existing remark warnings — none are in files this PR changes.Testing this locally
pnpm run generate:rpc— regeneratescontent/api-specs/alchemy/json-rpc/solana-photon.json(26 methods) and a trimmedcontent/api-specs/chains/solana.json(no more Photon methods).pnpm run validate:rpc— both specs pass validation.