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

Offile data provider #339

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Offile data provider #339

merged 3 commits into from
Oct 17, 2024

Conversation

lisicky
Copy link
Collaborator

@lisicky lisicky commented Oct 17, 2024

Summary

This pull request introduces an OfflineFetcher implementation for the Mesh SDK. The OfflineFetcher allows for offline storage and retrieval of Cardano blockchain data, including account information, UTxOs, asset metadata, block information, protocol parameters, and transactions. This addition will enable developers to work with Cardano data in offline environments or scenarios where direct access to third-party API's is not available or desired.

Type of Change

Feature Change

  • mesh-provider - New feature

Checklist

  • My code is appropriately commented and includes relevant documentation (no documentation needed on this step)
  • I have added tests to cover my changes
  • All new and existing tests pass -- there are couple test that is not related to current feature

Additional Information

The main components of this PR include:

  1. Implementation of the OfflineFetcher class, which implements the IFetcher interface.
  2. Methods for adding various types of Cardano data to the offline data provider.
  3. Fetch methods that retrieve stored data, mimicking online fetcher behavior.
  4. Comprehensive input validation for all data types to ensure data integrity.
  5. Pagination support for collection assets retrieval.
  6. JSON serialization and deserialization support for easy data persistence and sharing.
  7. Extensive unit tests covering all aspects of the OfflineFetcher functionality.

Key features of the OfflineFetcher:

  • Supports all major Cardano data types that are used in IFetcher interface: accounts, UTxOs, assets, blocks, transactions, and protocol parameters.
  • Implements strict validation rules to ensure data consistency and integrity.
  • Provides a paginated interface for fetching collection assets, similar to online APIs.
  • Allows for easy serialization and deserialization of the entire fetcher state.

This addition to the Mesh SDK will greatly enhance its flexibility, allowing for offline development, testing, and usage scenarios where direct blockchain access is not feasible or desirable.

Copy link

vercel bot commented Oct 17, 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 Oct 17, 2024 9:40am
mesh-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 9:40am

Copy link
Member

@HinsonSIDAN HinsonSIDAN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@HinsonSIDAN HinsonSIDAN merged commit bda1d10 into main Oct 17, 2024
4 checks passed
@lisicky lisicky deleted the fature-offline-fetcher branch October 17, 2024 10:28
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