Skip to content

Conversation

@GuiBibeau
Copy link
Collaborator

@GuiBibeau GuiBibeau commented Jan 5, 2026

Summary

  • Adds owner and executable fields to AccountCacheEntry type
  • Updates fetchAccount to extract these fields from RPC response
  • Updates fetchBalance to preserve existing values when available
  • Updates account watchers to populate these fields from notifications

Why not rentEpoch?

While rentEpoch exists in the raw Solana RPC response (docs), it is not included in the @solana/kit typed response. This is likely because:

  1. All Solana accounts are now rent-exempt (mandatory since 2022)
  2. The field always returns u64::MAX for rent-exempt accounts
  3. The SDK maintainers chose not to expose this deprecated/unused field

If rentEpoch is needed in the future, it would require either:

  • A PR to @solana/kit to add the field to their types
  • Casting the response to access the raw field (not type-safe)

Breaking Changes

None - this is additive. Existing code continues to work.

Test plan

  • All existing tests pass (222/222)
  • Typecheck passes
  • Updated test fixtures to include new fields

Closes #111

Expose complete account metadata from getAccountInfo RPC response
at the top level of AccountCacheEntry. Previously only lamports
was extracted while owner and executable remained buried in the
data field.

Note: rentEpoch is not included as it's not exposed in the @solana/kit
typed RPC response (all accounts are now rent-exempt).

Closes #111
@GuiBibeau GuiBibeau force-pushed the fix/useaccount-incomplete-data branch from 4b85c41 to fcb79a5 Compare January 5, 2026 04:55
@GuiBibeau GuiBibeau merged commit d25f4f3 into main Jan 5, 2026
7 checks passed
@github-actions github-actions bot mentioned this pull request Jan 5, 2026
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.

[Bug]: useAccount returns incomplete account data (missing owner, executable, data)

2 participants