Validate

Ownership validation enables the developer to check if the purchaser is holding an NFT from a specified collection. The transaction will fail if the purchaser does not have the NFT and succeed if they do.

How it Works

  1. Developer specifies an NFT collection or an SPL mint address for an SFT as the verification target. mtnAPI uses the index API to query all the NFTs and SFTs in the user's wallet.

  2. mtnAPI verifies whether an NFT belongs to a collection or an SFT belongs to a specific SPL token address.

  3. If mtnAPI validates the above, there is a program with instruction included in the transaction that verifies NFT or SFT collection on-chain to provide a trusted solution.

Use Case

Let's use a concert as an example where NFTs and SFTs could be used and how they would be different.

For SFTs, assume the user holds an SFT granting them general admission to the event. mtnAPI would verify that the user has the specified SPL address of the SFT and verify it on the blockchain. In the case of NFTs, assume the user holds an NFT that includes a specific row and seat number. The verification process is similar, with the only difference being validating the user is holding an NFT of a specific collection.

The POST request will return the desired discounted payment transaction

POST https://api.mtnapi.com/validate

Query Parameters

Request Body

{
    "transaction": "<transaction>"
}

GET https://api.mtnapi.com/validate

Query Parameters

Request Body

{
    label: "<Name of the merchant>",
    icon: "https://mtnphotobooth7afc22e0692f4205b848b9c01e02200e211757-dev.s3.amazonaws.com/public/2022-03-25+11.20.17.jpg"
}

Last updated