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

Created an example for 'Get file contents' functionality #2561

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

b-l-u-e
Copy link

@b-l-u-e b-l-u-e commented Oct 4, 2024

Description:
This PR adds a get-file-contents example to demonstrate how to retrieve file contents using the Hedera JavaScript SDK. This functionality is important for developers who need to access and work with file data stored on the Hedera network.

  • Add get-file-contents.js example file
  • Implement file contents query using FileContentsQuery
  • Include error handling and logging for better developer experience
  • Demonstrate proper use of ECDSA keys with the SDK

Related issue(s):

Fixes # 2513

Notes for reviewer:
The example demonstrates:

  • Setting up the Hedera client with proper operator credentials
  • Querying file contents using FileContentsQuery
  • Handling potential errors during the query process
  • Logging steps and results for clarity

Please pay special attention to the error handling section, as it's been designed to provide comprehensive information for debugging.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)
  • Follows SDK best practices
  • Example runs successfully against testnet

@b-l-u-e b-l-u-e requested review from a team as code owners October 4, 2024 16:06
@b-l-u-e b-l-u-e requested a review from rwalworth October 4, 2024 16:06
Copy link

sonarcloud bot commented Oct 4, 2024

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