Skip to content

Add nft CLI command for querying NFT metadata #417

Description

@Levi-Ojukwu

Description:

The contract has NFT functions (query_nft_metadata, query_nft_owner at nft.rs:247-254) but the CLI has no command to query them. Invoice NFTs represent ownership of funded invoices and are critical for secondary market features.

The CLI command should have two subcommands:

  • iln nft metadata --invoice-id <id> — display NFT metadata (amount, due date, discount rate, token, owner, minted_at)
  • iln nft owner --invoice-id <id> — display just the current owner address

Why it matters: NFT querying is essential for marketplace features and verifying invoice ownership.

Acceptance Criteria:

  • Create cli/src/commands/nft.ts with metadata and owner subcommands
  • Accept --invoice-id parameter
  • Format metadata as a readable table
  • Register in cli/src/index.ts as iln nft
  • Add tests

Relevant Files: contracts/invoice_liquidity/src/nft.rs, cli/src/index.ts


Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions