Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OfflineFetcher Update #388

Merged
merged 9 commits into from
Nov 15, 2024
Merged

OfflineFetcher Update #388

merged 9 commits into from
Nov 15, 2024

Conversation

lisicky
Copy link
Collaborator

@lisicky lisicky commented Nov 14, 2024

Summary

This PR enhances the OfflineFetcher component with improved functionality and comprehensive documentation. The changes include:

  • Enhanced fetchAssetAddresses to compile addresses from both registry and UTXOs for more complete results
  • Added new fetchAddressAssets method to query assets held by an address
  • Made epoch parameter optional in fetchProtocolParameters with fallback to max epoch
  • Added detailed JSDoc documentation to all OfflineFetcher methods
  • Created a new playground page with examples and usage instructions
  • Added OfflineFetcher to the providers list and navigation

Affect components

  • @meshsdk/provider
  • @meshsdk/common
  • @meshsdk/contract
  • @meshsdk/core
  • @meshsdk/core-csl
  • @meshsdk/core-cst
  • @meshsdk/react
  • @meshsdk/transaction
  • @meshsdk/wallet
  • Mesh playground (i.e. https://meshjs.dev/)
  • Mesh CLI

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Bug fix (non-breaking change which fixes an issue)
  • Code refactoring (improving code quality without changing its behavior)
  • Documentation update (adding or updating documentation related to the project)

Related Issues

No related issues.

Checklist

  • My code is appropriately commented and includes relevant documentation, if necessary
  • I have added tests to cover my changes, if necessary
  • I have updated the documentation, if necessary
  • All new and existing tests pass (i.e. npm run test)
  • The build is pass (i.e. npm run build)

Additional Information

Key functionality improvements:

  1. fetchAssetAddresses now provides more complete results by combining data from both the asset addresses registry and UTXOs
  2. New fetchAddressAssets method enables querying all assets held by an address
  3. Optional epoch parameter in fetchProtocolParameters with automatic fallback to the most recent epoch
  4. Removed unnecessary error throw in fetchAssetAddresses when no addresses found in registry (now checks UTXOs first)

Documentation additions include:

  1. Comprehensive JSDoc comments for all methods
  2. New playground page with detailed examples and explanations
  3. Integration with existing providers documentation
  4. Code examples for data addition and state management
  5. Clear explanation of offline usage scenarios and benefits

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mesh-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 9:45am
mesh-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 9:45am

@jinglescode jinglescode merged commit 93aa2dc into main Nov 15, 2024
4 checks passed
@jinglescode jinglescode deleted the feature-update/offline-fetcher-doc branch November 18, 2024 00:48
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.

2 participants