Skip to content

docs(solana): split Photon API into its own OpenRPC spec and sidebar group#1240

Merged
SahilAujla merged 11 commits intomainfrom
docs/openrpc/solana-photon-api-split
Apr 24, 2026
Merged

docs(solana): split Photon API into its own OpenRPC spec and sidebar group#1240
SahilAujla merged 11 commits intomainfrom
docs/openrpc/solana-photon-api-split

Conversation

@JackReacher0807
Copy link
Copy Markdown
Collaborator

What

Splits the 26 Photon methods (the Helius ZK Compression indexer surface) out of the Solana chain OpenRPC spec into a standalone solana-photon spec, 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.yaml alongside 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

  • New 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 in src/openrpc/chains/_components/solana/methods.yaml#/components/methods/<name> via cross-tree $refs (see "Ref approach" below), so the method schemas stay DRY.
  • Updated src/openrpc/chains/solana/solana.yaml — removes the 26 Photon $ref lines from the methods array and adds those method names to the x-bot-ignore list so Daikon stops managing them from the chain spec side. Core RPC ordering is preserved; existing DAS / legacy entries in x-bot-ignore keep their original grouping.
  • New 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 to https://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.
  • Updated content/docs.yml — adds a Solana Photon API section under the NFT API area (with api-name: solana-photon) and a Solana Photon APIs link under the Solana chain section, matching the DAS entries right above them.

Method count: 26

getCompressedAccount, getCompressedAccountProof, getCompressedAccountsByOwner,
getCompressedBalance, getCompressedBalanceByOwner, getCompressedMintTokenHolders,
getCompressedTokenAccountBalance, getCompressedTokenAccountsByDelegate,
getCompressedTokenAccountsByOwner, getCompressedTokenBalancesByOwner,
getCompressedTokenBalancesByOwnerV2, getCompressionSignaturesForAccount,
getCompressionSignaturesForAddress, getCompressionSignaturesForOwner,
getCompressionSignaturesForTokenOwner, getLatestCompressionSignatures,
getLatestNonVotingSignatures, getMultipleCompressedAccountProofs,
getMultipleCompressedAccounts, getMultipleNewAddressProofs,
getMultipleNewAddressProofsV2, getTransactionWithCompressionInfo,
getValidityProof, getValidityProofV2, getIndexerHealth, getIndexerSlot

(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 into src/openrpc/chains/_components/solana/methods.yaml#/components/methods/<name> rather than inlining the full method definitions the way solana-das.yaml does. Reasons:

  • The dereferencer used by scripts/generate-rpc.ts (@apidevtools/json-schema-ref-parser) handles cross-tree refs cleanly.
  • pnpm run generate:rpc produced a fully-dereferenced content/api-specs/alchemy/json-rpc/solana-photon.json with all 26 methods and their transitive compression.yaml schemas inlined correctly.
  • pnpm run validate:rpc passes on both the new spec and the trimmed solana.json.
  • Keeps Photon method definitions in one place (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.yaml into solana-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 26 301s 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

Validation

pnpm run generate:rpc    ✅
pnpm run validate:rpc    ✅
pnpm run typecheck       ✅
pnpm run lint:prettier   ✅ (warnings only on pre-existing untouched files)

Note: pnpm run lint runs eslint + prettier + typecheck in parallel; prettier flagged two unrelated files (scripts/upload-specs.ts, src/content-indexer/indexers/changelog.ts) and MDX_FEATURES.md had pre-existing remark warnings — none are in files this PR changes.

Testing this locally

  1. pnpm run generate:rpc — regenerates content/api-specs/alchemy/json-rpc/solana-photon.json (26 methods) and a trimmed content/api-specs/chains/solana.json (no more Photon methods).
  2. pnpm run validate:rpc — both specs pass validation.
  3. Preview build: the sidebar under NFT API should now show a "Solana Photon API" section with 26 endpoints; the Solana chain section should show a "Solana Photon APIs" link under "Solana DAS APIs".

@JackReacher0807 JackReacher0807 requested a review from a team as a code owner April 20, 2026 18:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Apr 24, 2026, 2:23 PM

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/openrpc/chains/solana/solana.yaml
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

🔍 Link Check

Status: ❌ Failed

Summary

Status Count
🔍 Total 8034
✅ Successful 6850
⏳ Timeouts 0
🔀 Redirected 460
👻 Excluded 676
❓ Unknown 0
🚫 Errors 47
⛔ Unsupported 1
Broken links (47) — click to expand

Errors per input

Errors in ./content/api-reference/data/nft-api/alchemy-photon-apis-for-solana.mdx

Errors in ./content/api-reference/arbitrum-nova/arbitrum-nova-deprecation-notice.mdx

Errors in ./content/wallets/wallet-integrations/privy/jwt-auth-migration.mdx

Errors in ./content/wallets/wallet-integrations/privy/react-migration.mdx

Errors in ./content/wallets/wallet-integrations/privy/signer-migration-overview.mdx

Errors in ./content/tutorials/smart-wallets/learn-account-abstraction/introduction-to-account-abstraction.mdx

View workflow run

JackReacher0807 and others added 4 commits April 20, 2026 15:28
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
@JackReacher0807
Copy link
Copy Markdown
Collaborator Author

Thanks for the review @cosmin — all three points addressed and pushed to this branch:

1. Flattened the sidebar nav — switched from the nested section + inner api group pattern to a single api: entry using Fern's summary: field, which attaches the overview MDX directly to the API Reference title. Clicking "Solana Photon API" now loads alchemy-photon-apis-for-solana.mdx and expands to reveal the 26 endpoints at the same depth (no more double-nest). The nav block only exists under the Solana chain section (I only found it there, not duplicated under NFT API). Current shape:

- api: Solana Photon API
  api-name: solana-photon
  summary: >-
    api-reference/data/nft-api/alchemy-photon-apis-for-solana.mdx

Confirmed summary: is supported on api: entries by the Fern docs-yml.json schema and Fern's own docs for customizing API references (it's the exact "link the API Reference title to a summary page" pattern).

2. Dropped Beta markers — removed "(Beta)" from title / description / subtitle in the overview MDX frontmatter, removed the "This API is in Beta and CU values may change in the future…" callout, and kept the "Questions? Contact us…" callout. The OpenRPC source (src/openrpc/alchemy/solana-photon/solana-photon.yaml) already had no Beta language in info.title / info.description, so nothing to change there.

3. Populated CU cost / Throughput — filled in the overview table: 120 / 100 for all 24 standard methods, 1200 / 500 for getValidityProof and getValidityProofV2, with a footnote on those two noting the extended 30,000 ms timeout. Searched the OpenRPC specs for any existing CU-metadata extension convention (x-alchemy-cu, x-compute-units, defaultTimeoutMs, etc.) — none is used on any other method, so per the task guidance I only populated the overview table and left the method definitions untouched (no new extension invented).

Also merged origin/main into the branch to clear the CONFLICTING state — the only actual conflict was in content/redirects.yml (Hyperliquid rename block added alongside my Photon split redirects); kept both. The Daikon bot PRs (#1246, #1249) didn't actually touch src/openrpc/chains/solana/solana.yaml or the Solana methods.yaml, so the Photon $ref removals and x-bot-ignore additions on our branch are intact.

Validation:

  • pnpm run generate:rpc → all specs generated
  • pnpm run validate:rpc → json-rpc + chains both ✅
  • pnpm run lint → 0 errors (pre-existing warnings only in unrelated files: MDX_FEATURES.md, what-is-a-signer.mdx, legacy-session-keys.mdx)
  • prettier --check on every touched file → clean

- 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.
@JackReacher0807
Copy link
Copy Markdown
Collaborator Author

Round 2 fixes pushed (c72da3a6):

  1. Photon landing page preserved — reverted to the nested section: Solana Photon API + path: + contents: [api: ... flattened: true] pattern (same shape as NFT API Endpoints at content/docs.yml ~L717). The overview mdx now renders as the clickable section page (Background / Methods table / Docs & Sandbox content all intact) and the method entries sit directly under the section without a duplicate inner label.
  2. CU costs populated — added # Solana: Photon APIs (ZK Compression) in content/api-reference/pricing-resources/pricing/compute-unit-costs.mdx between the DAS and Yellowstone sections, with all 26 Photon methods (120 CU / 100 throughput, except getValidityProof and getValidityProofV2 at 1200 / 500). Matched the DAS table's column alignment and straight-into-the-table (no prose) style.

pnpm run generate:rpc && pnpm run validate:rpc && pnpm run lint all clean.

…rom Photon overview; drop stale deprecation note on getCompressedTokenBalancesByOwner
@JackReacher0807
Copy link
Copy Markdown
Collaborator Author

Thanks for the review! Addressed all three points in cb4d002:

  1. Dead dev-docs.alchemy.com link — removed entirely. The solana-photon.json bundle is only published to dev-docs post-merge by scripts/upload-specs.ts, so linking to it from the overview page was always going to 404 on first view. Rather than wait for publish timing, I deleted the whole ## Docs & Sandbox section — the per-method endpoint pages already ship with Fern's built-in interactive inspector, so users can test requests right from each method page without needing a sandbox redirect.
  2. Metaplex / DAS screenshots — gone with the section above. Good catch; that whole block was copy-pasted from the DAS overview page (alchemy-das-apis-for-solana.mdx), screenshots and all, which is why the getAsset / getAssetProof examples were showing up on the Photon page.
  3. getCompressedTokenBalancesByOwner deprecation — removed from both the methods table in the overview page and the description in src/openrpc/chains/_components/solana/methods.yaml. Confirmed the regenerated solana-photon.json bundle no longer has the **Deprecated** string. (Note: this note was pre-existing on main, not introduced by this PR, but fixed it here since it's factually wrong.)

Ran pnpm run generate:rpc && pnpm run validate:rpc clean; pnpm run lint has two pre-existing prettier warnings in scripts/upload-specs.ts and src/content-indexer/indexers/changelog.ts that are on main and unrelated to this PR.

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.
@JackReacher0807
Copy link
Copy Markdown
Collaborator Author

Round 4 fix pushed (27383e9).

Root cause: The Solana Photon section: was nested under Chain APIs → Solana (slug: solana), so Fern's URL generator inherited the solana slug chain and emitted each method at /docs/chains/solana/solana-photon-api/solana-photon-api-endpoints/<method>. The overview MDX's frontmatter slug: reference/alchemy-photon-apis-for-solana only overrode the overview's own URL — it did not propagate to the api: child or its generated endpoint pages. Result: the overview's method table (and the redirects) pointed at /docs/reference/alchemy-photon-apis-for-solana/solana-photon-api-endpoints/<method>, which didn't exist, so all 26 method URLs 404'd and Link Check failed.

Fix: Mirror the DAS pattern exactly. Moved the Photon section: block out of Chain APIs → Solana and placed it under Data APIs → NFT API as a sibling of Solana DAS API (right between DAS and NFT API Endpoints). Added a - link: Solana Photon APIs cross-entry under Chain APIs → Solana (right after the existing DAS link) so users browsing by chain can still navigate to Photon. Inner api: Solana Photon API label kept with flattened: true (round-2 UX preserved — no duplicate label).

DAS structure untouched. Ran generate:rpc + validate:rpc clean. Link Check CI should now pass since the methods will resolve at the expected /docs/reference/alchemy-photon-apis-for-solana/solana-photon-api-endpoints/<method> URLs.

@JackReacher0807
Copy link
Copy Markdown
Collaborator Author

Round 5 addressed on commit 8eb9c15:

  1. Moved Solana Photon API to Chains > Solana. Removed the nested section from Data APIs > NFT API (and the temporary - link: Solana Photon APIs cross-entry), and nested the real section: Solana Photon API block directly under section: Solana right after the DAS APIs link — so the Solana tab now reads Overview → Endpoints → DAS APIs → Photon API.
  2. Dropped the data-services-product email callout from the Photon overview MDX.
  3. Fixed the 404s. The slug: reference/alchemy-photon-apis-for-solana frontmatter override on the overview MDX simply wasn't being honored for this new api-name — the override works for DAS today because that route was registered (and likely cached) the first time DAS shipped, but for a fresh api-name Fern keeps routing via the nav-derived path and the custom slug never registers the method children. Rather than fight that, I dropped the slug override entirely and let Fern derive URLs from the nav placement. Under section: Solana (slug solana) + section: Solana Photon API + api: Solana Photon API (flattened), the methods now resolve at /docs/chains/solana/solana-photon-api/solana-photon-api-endpoints/<method> — same shape as the Core Solana RPC methods at /docs/chains/solana/solana-api-endpoints/<method>. All 26 method links in the overview table were rewritten to this scheme, and the 26 redirects in redirects.yml were repointed to match. generate:rpc + validate:rpc clean; lint shows only the pre-existing warnings on scripts/upload-specs.ts and src/content-indexer/indexers/changelog.ts (unchanged by this PR). Link Check should go green on the next CI run.

@SahilAujla SahilAujla merged commit 1d1f1db into main Apr 24, 2026
12 of 13 checks passed
@SahilAujla SahilAujla deleted the docs/openrpc/solana-photon-api-split branch April 24, 2026 14:23
SahilAujla pushed a commit that referenced this pull request Apr 24, 2026
…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>
SahilAujla pushed a commit that referenced this pull request Apr 29, 2026
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants