hiero-ledger / hiero-ledger/hiero-enterprise-java

Add Mirror Node support for NFT transaction history

Open
#97 1 comment 0 reactions 2 assignees Claimed by @alejandroGM0 View on GitHub
approved enhancement
Dominant language
Java
Stars
6
Forks
21
Avg merge
10h 27m
Merged PRs (30d)
37

Description

## Summary

Add repository/client support for NFT transaction history from the Mirror Node REST API.

Public Mirror Node exposes:

`GET /api/v1/tokens/{tokenId}/nfts/{serialNumber}/transactions`

This returns the transaction history for a specific NFT serial, including sender, receiver, transaction id, transaction type, consensus timestamp, nonce, and approval status.

Related: #83 adds basic MicroProfile NFT listing/query support, but does not cover NFT-specific transaction history. NFT metadata/type discovery is tracked separately in #87.

## Current State

The repo supports NFT lookup by owner/type/serial through `NftRepository` and `MirrorNodeClient`, but there is no API for fetching the transaction history of a specific NFT.

## Proposed Scope

Add support for:

- `NftRepository.findTransactionHistory(TokenId tokenId, long serialNumber)`
- String overload for `tokenId`
- `MirrorNodeClient.queryNftTransactionHistory(TokenId tokenId, long serialNumber)`
- Spring and MicroProfile implementations
- Converter/data model support for the Mirror Node NFT transaction history response
- Tests for JSON conversion and paginated responses

## Acceptance Criteria

- Users can query transaction history for a specific NFT by token ID and serial number
- Both Spring and MicroProfile stacks call `/api/v1/tokens/{tokenId}/nfts/{serialNumber}/transactions`
- Response includes sender account, receiver account, transaction id, transaction type, consensus timestamp, nonce, and approval status
- Pagination via Mirror Node `links.next` works consistently with existing `Page` behavior
- Tests cover converter behavior and at least one client/repository path

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.