Skip to content

fix(types): Add missing fields to request and response types#3217

Open
mpint wants to merge 6 commits intoXRPLF:mainfrom
mpint:mpint/missing-fields
Open

fix(types): Add missing fields to request and response types#3217
mpint wants to merge 6 commits intoXRPLF:mainfrom
mpint:mpint/missing-fields

Conversation

@mpint
Copy link
Contributor

@mpint mpint commented Feb 27, 2026

Summary

This PR adds missing fields to various request and response types to improve type completeness and accuracy.

Changes

  • VaultInfoResponse: Add ledger_current_index field
  • NFTSellOffersRequest/Response: Add limit and marker fields for pagination
  • NFTBuyOffersRequest/Response: Add limit and marker fields for pagination
  • AMMInfoRequest: Add account field
  • AccountNFTsResponse: Add ledger_hash, ledger_index, and validated fields
  • AccountLinesRequest: Add ignore_default field
  • AccountLinesResponse: Add limit field

Motivation

These fields are documented in the XRP Ledger API but were missing from the TypeScript type definitions, which could lead to type errors when using these fields in applications.

Testing

  • Type definitions have been updated
  • No breaking changes to existing code

Pull Request opened by Augment Code with guidance from the PR author

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ea2e4e7 and 32e9dc3.

📒 Files selected for processing (6)
  • packages/xrpl/src/models/methods/accountLines.ts
  • packages/xrpl/src/models/methods/accountNFTs.ts
  • packages/xrpl/src/models/methods/ammInfo.ts
  • packages/xrpl/src/models/methods/nftBuyOffers.ts
  • packages/xrpl/src/models/methods/nftSellOffers.ts
  • packages/xrpl/src/models/methods/vaultInfo.ts

Walkthrough

This PR expands multiple xrpl method request and response interfaces by adding optional fields to support ledger metadata exposure, pagination controls, filtering options, and account-specific queries across trust lines, NFT operations, AMM, and vault functionality.

Changes

Cohort / File(s) Summary
NFT offer pagination
packages/xrpl/src/models/methods/nftBuyOffers.ts, packages/xrpl/src/models/methods/nftSellOffers.ts
Added limit?: number and marker?: unknown fields to both request and response interfaces to support pagination of NFT buy and sell offer queries.
Ledger metadata
packages/xrpl/src/models/methods/accountNFTs.ts, packages/xrpl/src/models/methods/vaultInfo.ts
Made ledger_current_index and validated optional in AccountNFTsResponse.result; added ledger_hash?: string and ledger_index?: number to AccountNFTsResponse; added ledger_current_index?: number to VaultInfoResponse.result.
Request enhancements
packages/xrpl/src/models/methods/accountLines.ts, packages/xrpl/src/models/methods/ammInfo.ts
Added ignore_default?: boolean to AccountLinesRequest for trust line filtering and limit?: number to AccountLinesResponse; added account?: string to AMMInfoRequest for account-specific LP token queries.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • achowdhry-ripple
  • Patel-Raj11
  • ckeshava

Poem

🐰 Optional fields bloom in every nest,

From NFTs to vaults, requests pass the test,

Pagination hops, ledgers leap with cheer,

The schema grows richer, year after year! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The pull request description provides a clear summary of changes, motivation, and testing approach. However, it does not follow the repository's description template structure, lacking sections for 'High Level Overview', 'Context of Change', 'Type of Change' checkboxes, or HISTORY.md update status. Restructure the description to match the repository template: add 'Context of Change' section explaining why these fields were missing, check the 'Type of Change' boxes (appears to be 'New feature'), and explicitly state whether HISTORY.md was updated.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: adding missing fields to request and response types across multiple interfaces.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

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.

1 participant