docs(solana): split Photon API into its own OpenRPC spec and sidebar group#1240
docs(solana): split Photon API into its own OpenRPC spec and sidebar group#1240SahilAujla merged 11 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.
…hoton-api-split # Conflicts: # content/redirects.yml
|
Thanks for the review @cosmin — all three points addressed and pushed to this branch: 1. Flattened the sidebar nav — switched from the nested - api: Solana Photon API
api-name: solana-photon
summary: >-
api-reference/data/nft-api/alchemy-photon-apis-for-solana.mdxConfirmed 2. Dropped Beta markers — removed "(Beta)" from 3. Populated CU cost / Throughput — filled in the overview table: 120 / 100 for all 24 standard methods, 1200 / 500 for Also merged Validation:
|
- Revert nav to section+path+contents[api flattened:true] pattern so Photon overview page (Background / Methods / Docs & Sandbox) is preserved as a clickable landing page while method entries appear directly under the section. - Populate CU costs for all 26 Photon methods on compute-unit-costs.mdx under a new 'Solana: Photon APIs (ZK Compression)' section between DAS and Yellowstone.
|
Round 2 fixes pushed (c72da3a6):
|
…rom Photon overview; drop stale deprecation note on getCompressedTokenBalancesByOwner
|
Thanks for the review! Addressed all three points in cb4d002:
Ran |
The Solana Photon API section was nested under Chain APIs → Solana (slug: solana), so Fern generated /docs/chains/solana/... URLs for each method even though the overview MDX's slug frontmatter forced the overview itself to /docs/reference/alchemy-photon-apis-for-solana. The 26 method pages therefore 404'd under /docs/reference/... — failing Link Check and breaking the overview's method table links. Mirror the DAS pattern: move the Photon section to be a sibling of Solana DAS API under Data APIs → NFT API, and add a cross-link under Chain APIs → Solana so users browsing by chain can still navigate to Photon.
|
Round 4 fix pushed (27383e9). Root cause: The Solana Photon Fix: Mirror the DAS pattern exactly. Moved the Photon DAS structure untouched. Ran |
…so method URLs resolve
|
Round 5 addressed on commit
|
…ive at old paths) (#1259) * [Writer] Remove Solana Photon redirects (methods were never live at old paths) The 26 static redirects added in PR #1240 pointed from /docs/chains/solana/solana-api-endpoints/<photon-method> to the new /docs/chains/solana/solana-photon-api/solana-photon-api/<method> location. Per Sahil's clarification: Photon methods were never actually served at the old /docs/chains/solana/solana-api-endpoints/* path (that path only ever resolved to Core Solana RPC methods). No redirect is needed -- there's nothing to redirect from. Removing the block entirely frees 26 entries against our redirect budget. * docs(specs): update OpenRPC specifications from Daikon * feat(solana): add alchemy_requestFeePayer_prefundRent method component Resolves the P1 review comment on PR #1257: the Daikon-generated $ref to alchemy_requestFeePayer_prefundRent in src/openrpc/chains/solana/solana.yaml was unresolvable because the component was not defined in methods.yaml. This adds the component as a documented variant of alchemy_requestFeePayer invoked with prefundRent: true, with matching params/result/examples/errors drawn from the canonical definition in src/openrpc/alchemy/gas-manager-coverage/gas-manager-coverage.yaml. * Revert "feat(solana): add alchemy_requestFeePayer_prefundRent method component" This reverts commit 0ff2e28. * chore(solana): opt alchemy_requestFeePayer_prefundRent out of Daikon automation Remove the auto-added $ref and add the method to x-bot-ignore so Daikon stops re-adding the reference on future runs. Paired with the revert of 0ff2e28 (manually-added component definition) per DevRel decision. * docs(solana): remove alchemy_requestFeePayer_prefundRent from overview table * docs(specs): update OpenRPC specifications from Daikon * chore(solana): re-remove alchemy_requestFeePayer_prefundRent $ref and restore x-bot-ignore * fix(solana): restore overview table after Daikon regression * docs(solana): update Photon method links in overview to new paths * Revert "docs(solana): update Photon method links in overview to new paths" This reverts commit 1f69fce. * docs(solana): remove Photon methods from overview per Sahil — already listed on Photon overview page Per Sahil's Slack direction, the 26 Photon (ZK Compression) methods are dropped from the Solana API overview table rather than having their links redirected. They already canonically live on the Photon overview page (content/api-reference/data/nft-api/alchemy-photon-apis-for-solana.mdx), so no audience loses access. This replaces the earlier link-update approach (reverted in the previous commit) with a clean deletion and alphabetical reflow of the remaining Core Solana RPC methods in the two-column table. --------- Co-authored-by: alchemy-bot <80712764+alchemy-bot@users.noreply.github.com>
Apply STYLE_RULES.md preferred-forms to terminology violations introduced this week. - content/api-reference/data/nft-api/alchemy-photon-apis-for-solana.mdx: Background section had two terminology misses in the same paragraph. off-chain -> offchain, on-chain -> onchain. The page was newly added in #1240. The rest of the audited PRs only contained single-instance, warning-level findings (noted in the audit summary, not PR'd per the playbook).
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.