Skip to content

Conversation

@Giri-Aayush
Copy link
Collaborator

Documentation Updates for v0.17.0 Follow-up

Hey team! This PR wraps up the remaining documentation improvements for the v0.17.0 release. We've been working through all the sections systematically to make sure everything is clean, consistent, and actually helpful for users.

What's Changed

Major Improvements

Account Package

  • Cleaned up the keystore documentation with a unified example that shows the full workflow (Put → Get → Sign)
  • Reorganized keystore methods in chronological order (GetRandomKeys → NewMemKeystore → Get → Put → Sign → SetNewMemKeystore)
  • Removed the orphaned Types section that wasn't being used
  • Fixed all account methods and functions to follow our documentation standards

Client Package

  • Rewrote the overview in natural language instead of bullet points
  • Added source code links to all 8 functions and 7 methods
  • Fixed 3 critical signature bugs in the docs:
    • PeerInfoFromContext: corrected return type from (*PeerInfo, bool) to PeerInfo
    • CallContext: fixed parameter from args ...interface{} to args interface{}
    • Subscribe: fixed parameter from args ...interface{} to args interface{}
  • Removed the orphaned Types section

RPC Package

  • Fixed broken internal links (turns out we renamed methods like get-nonce → nonce but forgot to update links)
  • Enhanced WebSocket methods documentation
  • Updated all method descriptions to be more helpful
  • Removed dead links to non-existent pages

Hash, Curve, and Merkle Packages

  • Added comprehensive examples with working code
  • Restructured documentation to match our standard pattern (Overview → Functions → Methods → Examples)
  • Synced hash examples with actual test files to make sure they work

Utils Package

  • Complete cleanup and reorganization
  • Added proper examples for all utility functions
  • Fixed transaction builder documentation

Contracts Package

  • Restructured to follow the same pattern as other packages
  • Added working examples
  • Cleaned up function documentation

Devnet and Paymaster

  • Fixed section structure
  • Updated permalinks
  • Enhanced method documentation

Documentation Cleanup

Following DOCUMENTATION_RULES.md, we removed several forbidden patterns:

  • ❌ Removed all "Expected Output" sections (9 files)
  • ❌ Removed all "Related Methods/Functions" sections
  • ❌ Removed all top-level "## Description" sections (19 files)
  • ❌ Deleted orphaned types.mdx files (account/types.mdx and client/types.mdx)

Files Changed

  • 295 files changed with ~19,365 insertions and ~20,175 deletions
  • Net result: Cleaner, more focused documentation

Testing

All code examples have been verified against actual test files in docs/tests/. The examples are real, working code that users can copy and run.

Notes

This PR is ready to merge! All changes follow the established documentation standards and have been tested. The branch is up to date with main.

- Removed outdated documentation for `get-class-hash-at`, `get-class`, `get-nonce`, `get-storage-at` methods.
- Added new detailed documentation for `ClassAt`, `ClassHashAt`, `Class`, `Nonce`, and `StorageAt` methods.
- Updated sidebar links to reflect new method paths.
- Improved usage examples and error handling sections across all methods.
- Ensured consistency in parameter descriptions and return types.
…ding contract upgrade detection and implementation verification
…rage_at demos

- Improved documentation for StorageProof method, including usage examples and error handling.
- Updated nonce demo to use utils for address conversion and improved error handling.
- Enhanced storage_at demo to read token details from storage, including name, symbol, and decimals.
- Added detailed comments and structured output for better clarity in examples.
- Removed outdated fee estimation demos and replaced them with comprehensive examples for estimating fees and message fees.
…tation

- Enhanced Events method documentation with pagination examples and comprehensive type definitions
- Fixed Trace methods (TraceTransaction, TraceBlockTransactions, SimulateTransactions):
  - Corrected FnInvocation type definition (L1Messages field and ExecutionResources type)
  - Fixed type assertions from pointer to value types for all trace results
  - Added missing L1HandlerTxnTrace to TxnTrace type definitions
  - Updated SimulateTransactions example with correct types and working code
  - Added SkipFeeCharge flag to handle dynamic gas prices
- Updated error handling documentation to distinguish validation failures from transaction reverts

All examples tested and verified working against starknet.go v0.17.0.
- Fix method signature receiver variable name from 'p' to 'provider'
- Add source code links for all types and method
- Move Type Definitions section before Usage Example (consistent with other methods)
- Update usage example to use godotenv pattern with .env file
- Fix CasmEntryPoint.Offset type from int to uint
- Add proper JSON tags to all struct definitions
- Remove forbidden RPC Specification and Notes sections
- Update error handling with proper switch statement
- Reformat Common Use Cases section
- Update test file to match documentation example

All changes verified with working code that compiles and runs successfully with starknet.go v0.17.0.
- Document all 5 WebSocket subscription methods following DOCUMENTATION_RULES.md
- Add SubscribeEvents with event filtering capabilities
- Add SubscribeNewHeads with block progression tracking
- Add SubscribeNewTransactionReceipts with finality status filters
- Add SubscribeNewTransactions for mempool monitoring
- Add SubscribeTransactionStatus for real-time transaction tracking

- Include comprehensive type definitions with source links for:
  - EventSubscriptionInput, EmittedEventWithFinalityStatus
  - SubscriptionBlockID, BlockHeader (with StarknetVersion field)
  - SubNewTxnReceiptsInput, TransactionReceiptWithBlockInfo
  - SubNewTxnsInput, TxnWithHashAndStatus
  - NewTxnStatus, TxnStatusResult

- Add working usage examples with godotenv pattern for all methods
- Update test files to use empty struct instead of nil for consistency
- Include proper error handling with switch statements
- Add provider support warnings with Juno node setup guide link
- Fix MDX parsing issues with HTML entity escaping in parameters

All examples tested with Alchemy WebSocket endpoint where supported.
Reorganized the Merkle section to follow with proper folder structure and comprehensive examples. Moved function documentation into functions/ directory and created separate methods/ directory for the Proof method. Updated all documentation to include source code links, concise descriptions, and human-toned explanations.

Key changes:
- Reorganized folder structure: functions/ (MerkleHash, ProofMerklePath, NewFixedSizeMerkleTree) and methods/ (Proof)
- Created comprehensive examples.mdx with 7 detailed examples covering all common use cases
- Updated all function documentation with source code links and "How It Works" sections
- Rewrote Common Use Cases sections as complete sentences with cross-links to examples
- Enhanced example descriptions to be 3-4 sentences explaining what each example demonstrates and why it's useful
- Updated Proof method documentation to remove redundant sections (Expected Output, Notes) per documentation rules
- Added test files to verify all examples work correctly
- Updated sidebar.ts to reflect new structure with Functions and Methods dropdowns

All examples are verified working and follow the established documentation patterns from RPC methods.
…es, educational overviews, and verified working code.

Merkle Section:
- Reorganized folder structure with functions/ and methods/ directories
- Updated all function documentation (MerkleHash, ProofMerklePath, NewFixedSizeMerkleTree) with source code links
- Moved Proof to dedicated methods/ directory
- Created comprehensive examples.mdx with 7 detailed examples covering all use cases
- Rewrote overview page with educational content explaining how Merkle trees work in Starknet
- Converted Common Use Cases to sentence format with cross-links to examples
- Removed redundant sections (Expected Output, Notes, Description)

Curve Section:
- Updated all 14 function documentation files with source code links and complete usage examples
- Removed legacy overview files (hashing.mdx, keys.mdx, cryptographic.mdx) that weren't in sidebar
- Created essential examples.mdx with 5 key examples (Pedersen, PedersenArray, StarknetKeccak, GetRandomKeys, Sign/Verify)
- Rewrote overview page with comprehensive educational content covering:
  - How cryptographic operations work in Starknet
  - Choosing the right hash function (Pedersen vs Poseidon vs Keccak)
  - Signature function selection (big.Int vs felt.Felt variants)
  - Security best practices
- Synchronized all 14 test files with documentation usage examples
- Added sidebar Examples link for both sections
Fixed all those annoying broken links in the RPC docs. Turns out we renamed a bunch of methods to drop the "get-" prefix (like get-nonce → nonce) but forgot to update all the internal links. Also removed a dead link to a non-existent helper-functions page.

For the hash section, added bidirectional navigation - now when you're reading about a hash function's use cases, you can jump straight to the relevant example. Makes the docs way more navigable.

The big one: copied all the verified usage examples from the MDX docs into the actual test files. These examples were manually tested and confirmed working, so now the test files have real, production-ready code instead of the old placeholder examples. All 14 test files compile cleanly now.

Also added a new hash/examples.mdx page to the sidebar that I somehow forgot to track before.

Everything builds without errors, all links work, and all test files compile. Should be good to go!

Changes:
- Fixed 8+ broken RPC method links (removed old "get-" prefixes)
- Added use case → example links in 5 hash function docs
- Updated 11 hash test files with verified working examples
- Added hash examples page to sidebar
Finally tackled the utils documentation that's been bugging me. Removed a bunch of redundant intermediate pages (conversions.mdx, cryptographic.mdx, etc.) that were just duplicating info - we don't need that extra layer.

Added proper "See Also" sections to all 23 function docs so people can actually find the examples they need. The links are natural now instead of that robotic "See X for Y" stuff.

Created a dedicated examples.mdx with real working code examples - moved all the use cases there instead of cluttering up the overview page. Everything now follows the same clean pattern as merkle/devnet sections.

Also fixed some documentation inconsistencies where the "Expected Output" sections were showing different values than the actual "Usage Example" code. Removed those conflicting sections and kept only the working examples.

All test files updated and verified - 23/23 compile and run successfully against v0.17.0. The examples in the docs are now exactly what's in the test files, so no more confusion.

This should make the utils section way more navigable and less redundant.
Simplified contracts documentation by removing unnecessary type reference files
and restructuring to follow the same clean pattern as merkle/utils sections.

Changes:
- Deleted 5 redundant type documentation files (abi-types, contract-classes,
  entry-points, and 2 misplaced type docs in functions/)
- Rewrote index.mdx with comprehensive overview, educational content about
  contract class formats, deployment flow, and deterministic addressing
- Created examples.mdx with 10 working examples (counterfactual deployment,
  factory patterns, UDC, account abstraction, etc.)
- Simplified function docs to match utils pattern (removed verbose sections,
  added "Common Use Cases" with links to examples)
- Added source links to both functions per DOCUMENTATION_RULES.md
- Updated sidebar to clean structure: Overview → Functions → Examples
- Fixed all examples to use real file paths from Scarb-built contracts
- Removed emojis from code examples
- Updated test files with working examples
- Documented all 6 keystore methods (GetRandomKeys, NewMemKeystore, Get, Put, Sign, SetNewMemKeystore) with unified example showing complete workflow
- Rewrote account package overview in natural language following merkle package style
- Added source links to all 8 client functions and 7 client methods
- Fixed 3 critical signature bugs in client package:
  * PeerInfoFromContext: corrected return type from (*PeerInfo, bool) to PeerInfo
  * CallContext: corrected args parameter from ...interface{} to interface{}
  * Subscribe: corrected args parameter from ...interface{} to interface{}
- Rewrote client package overview with natural explanations of JSON-RPC communication
- Removed Types sections from account and client sidebars
- Reordered keystore methods chronologically (GetRandomKeys → NewMemKeystore → Get → Put → Sign → SetNewMemKeystore)
- Removed all forbidden sections (Expected Output, Related Methods/Functions, Description headers)
- All documentation now follows DOCUMENTATION_RULES.md with verified signatures and source links
Fixed all dead links that were causing Vercel build to fail:
- Removed references to deleted /docs/client/types page from client/functions.mdx and client/methods.mdx
- Fixed all broken relative links in devnet/types.mdx (./methods.mdx references)
- Updated links to use correct absolute paths to individual method pages

This resolves the vite deadlinks error that was blocking deployment.
Empty commit to trigger GitHub Actions workflows that were not running.
@Giri-Aayush Giri-Aayush force-pushed the docs/strkgo-v0.17.0-followup branch from 500f22e to d90f8f3 Compare December 5, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants