Skip to content

docs: view information about transaction action#140

Merged
MicBun merged 1 commit intomainfrom
docsTrasacFee
Nov 11, 2025
Merged

docs: view information about transaction action#140
MicBun merged 1 commit intomainfrom
docsTrasacFee

Conversation

@MicBun
Copy link
Copy Markdown
Member

@MicBun MicBun commented Nov 11, 2025

resolves: https://github.com/trufnetwork/truf-network/issues/1331

Summary by CodeRabbit

  • Documentation
    • Added Transaction Ledger Queries documentation with examples for retrieving transaction details and listing transaction fees.
    • Included practical use cases for auditing, analytics, and fee distribution tracking.
    • Updated Quick Reference table with new transaction query entries.
    • Extended API reference with comprehensive field descriptions and workflow examples.

@MicBun MicBun requested a review from outerlook November 11, 2025 12:08
@MicBun MicBun self-assigned this Nov 11, 2025
@MicBun MicBun added the documentation Improvements or additions to documentation label Nov 11, 2025
@holdex
Copy link
Copy Markdown

holdex bot commented Nov 11, 2025

Time Submission Status

Member Status Time Action Last Update
MicBun ✅ Submitted 1h 30min Update time Nov 11, 2025, 12:35 PM
@outerlook ❌ Missing - ⚠️ Submit time -

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

Documentation-only updates to README.md and docs/api-reference.md introduce Transaction Ledger Query methods (getTransactionEvent and listTransactionFees) with comprehensive API documentation, type definitions (FeeDistribution), usage examples, and use-case descriptions for transaction auditing and analytics.

Changes

Cohort / File(s) Change Summary
README.md
README.md
Adds new "Transaction Ledger Queries" section with usage examples for transactionAction.getTransactionEvent and transactionAction.listTransactionFees; updates Quick Reference table with entries for both methods
API Reference Documentation
docs/api-reference.md
Adds comprehensive API documentation for transaction ledger query methods, including method signatures, input/output type definitions (GetTransactionEventInput, TransactionEvent, ListTransactionFeesInput, TransactionFeeEntry, FeeDistribution), detailed field descriptions, use cases (Auditing, Analytics, Fee Distribution Tracking), and illustrative code examples with pagination and aggregation patterns

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review documentation accuracy and completeness of API method signatures and type definitions
  • Verify consistency of examples and code snippets across README.md and docs/api-reference.md
  • Confirm alignment with the TransactionAction implementation from referenced PR

Possibly related PRs

  • trufnetwork/sdk-js#135: Introduces the TransactionAction class and the getTransactionEvent and listTransactionFees methods being documented in this PR.

Suggested reviewers

  • outerlook

Poem

🐰 ✨ New docs hop into view,
Transaction queries, tried and true,
Fees and events, all mapped with care,
Ledger insights, ready to share!
Documentation blooms so bright, 📚

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding documentation to view information about transaction actions, which aligns with the file changes in README.md and docs/api-reference.md.
Linked Issues check ✅ Passed The PR successfully addresses issue #1331 by adding comprehensive documentation for transaction action methods (getTransactionEvent and listTransactionFees) that enable fetching fee history details.
Out of Scope Changes check ✅ Passed All changes are documentation-only and directly related to the linked issue objective of enabling SDKs to fetch fee history details; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docsTrasacFee

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 35754f3 and a461227.

📒 Files selected for processing (2)
  • README.md (2 hunks)
  • docs/api-reference.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (5)
docs/api-reference.md (3)

497-545: Well-documented transaction event API with clear parameter and type definitions.

The getTransactionEvent documentation is comprehensive with clear parameter descriptions, complete return type specification, and a practical example showing how to iterate over fee distributions. The inline FeeDistribution type definition is appropriately placed and matches the field references in the example code.


547-629: Comprehensive listTransactionFees documentation with clear pagination, mode filtering, and practical examples.

The method documentation clearly explains the mode parameter values ('paid', 'received', 'both'), pagination behavior (limit/offset), and the important semantic detail that one row is emitted per fee distribution. The three examples effectively cover the main use cases: filtering by mode, pagination, and the aggregation pattern with BigInt for handling large numbers.


630-688: Use-case examples are concrete and demonstrate real-world workflows.

The three use cases (Auditing, Analytics, Fee Distribution Tracking) provide practical patterns for common operations. The Analytics example correctly uses BigInt for arithmetic on large fee amounts, and the Fee Distribution Tracking example clearly shows how to work with multiple distributions from a single transaction.

README.md (2)

294-315: README section appropriately introduces Transaction Ledger Queries with clear cross-reference to detailed docs.

The section provides a concise overview with practical code examples and correctly references the full documentation in docs/api-reference.md. The inline example demonstrates both getTransactionEvent and listTransactionFees in realistic usage patterns, and the Quick Reference table entries are consistent with other operations.

The AI-generated summary indicates this section is duplicated in two places within README.md, but I only see one occurrence in the provided code (lines 294-315). Please verify the full README.md to confirm whether actual duplication exists, as it would create maintenance burden if identical sections appear multiple times.


454-455: Quick Reference table entries follow established conventions and are accurately representative.

The new entries for "Get transaction event" and "List transaction fees" match the naming pattern of other operations and include representative parameters. The method signatures are consistent with the detailed documentation in the API Reference.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MicBun MicBun merged commit f049ffe into main Nov 11, 2025
4 of 7 checks passed
@MicBun MicBun deleted the docsTrasacFee branch November 11, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants