Skip to content

feat: migrate NFT history endpoint to v3 and retire v1 NFT mints - #2648

Open
rafa-stacks wants to merge 3 commits into
mainfrom
v3-nft
Open

feat: migrate NFT history endpoint to v3 and retire v1 NFT mints#2648
rafa-stacks wants to merge 3 commits into
mainfrom
v3-nft

Conversation

@rafa-stacks

@rafa-stacks rafa-stacks commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Migrates the v1 NFT history endpoint to v3, and retires the v1 NFT mints endpoint without a replacement.

Endpoint Status
GET /extended/v3/tokens/nft/{asset_identifier}/{value}/history New — replaces GET /extended/v1/tokens/nft/history
GET /extended/v1/tokens/nft/mints Deprecated, no v3 replacement — it serves negligible traffic, so it is being retired rather than rebuilt

Sample response

GET /extended/v3/tokens/nft/SP2X0TZ59D5SZ8ACQ6YMCHHNR2ZN51Z32E2CJ173.the-explorer-guild::The-Explorer-Guild/2051/history

{
  "total": 3,
  "limit": 50,
  "cursor": { "next": null, "previous": null, "current": "2:0:0:1" },
  "results": [
    {
      "sender": "SP1JTCR202ECC6333N7ZXD7MK7E3ZTEEE1MJ73C60.marketplace-v1",
      "recipient": "SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP",
      "transaction": { "tx_id": "0x…c2", "event_index": 1 },
      "block": { "height": 2, "hash": "0x…a2", "index_hash": "0x…b2", "time": 94869287, "tx_index": 0 }
    },
    {
      "sender": "SP2X0TZ59D5SZ8ACQ6YMCHHNR2ZN51Z32E2CJ173",
      "recipient": "SP1JTCR202ECC6333N7ZXD7MK7E3ZTEEE1MJ73C60.marketplace-v1",
      "transaction": { "tx_id": "0x…c2", "event_index": 0 },
      "block": { "height": 2, "hash": "0x…a2", "index_hash": "0x…b2", "time": 94869287, "tx_index": 0 }
    },
    {
      "sender": null,
      "recipient": "SP2X0TZ59D5SZ8ACQ6YMCHHNR2ZN51Z32E2CJ173",
      "transaction": { "tx_id": "0x…c1", "event_index": 0 },
      "block": { "height": 1, "hash": "0x…a1", "index_hash": "0x…b1", "time": 94869287, "tx_index": 0 }
    }
  ]
}

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.76161% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/datastore/v3/pg-store-v3.ts 98.52% 2 Missing ⚠️
...grations/1779800000013_nft-events-history-index.ts 97.14% 0 Missing and 1 partial ⚠️
src/api/routes/v3/tokens-nft.ts 99.02% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Migrates NFT history and mint APIs to V3 while deprecating their V1 counterparts.

Changes:

  • Adds cursor-paginated V3 NFT endpoints with serialization and tests.
  • Adds optimized NFT event indexes.
  • Updates package and repository ownership metadata.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/api/tokens/nft-events.test.ts Tests V3 NFT endpoints.
src/datastore/v3/types.ts Defines NFT database result types.
src/datastore/v3/pg-store-v3.ts Implements NFT queries and pagination.
src/api/serializers/v3/nft-events.ts Serializes NFT responses.
src/api/schemas/v3/entities/nft-events.ts Defines response schemas.
src/api/routes/v3/tokens-nft.ts Adds V3 routes.
src/api/routes/v1/tokens.ts Deprecates V1 routes.
src/api/init.ts Registers NFT routes.
migrations/1779800000013_nft-events-history-mints-indexes.ts Adds query indexes.
package.json Updates package ownership metadata.
package-lock.json Synchronizes package identity.
client/package.json Updates client repository metadata.
.github/RELEASE_TEMPLATE.md Updates container image path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/api/routes/v3/tokens-nft.ts
Comment thread src/api/schemas/v3/entities/nft-events.ts Outdated
Comment thread package.json
@rafa-stacks rafa-stacks changed the title feat: migrate NFT history and mints endpoints to v3 feat: migrate NFT history endpoint to v3 and retire v1 NFT mints Aug 28, 2026
@rafa-stacks
rafa-stacks marked this pull request as ready for review August 28, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants