Skip to content

Expose blockchain via RESTful API using Fiber or Gin #4

@devduart

Description

@devduart

Summary

Create a REST API to interact with the blockchain over HTTP using either Fiber or Gin.

Tasks

  • Setup HTTP server (Fiber or Gin)
  • Endpoints:
    • GET /blocks – list all blocks
    • POST /mine – mine a new block with JSON data
    • GET /block/:hash – get block by hash
  • Return data in JSON format
  • Validate request body and handle errors

Bonus

  • Include difficulty in JSON response
  • Add timestamp to responses

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions