Data Models
Perks

Perk Data Model

The current data schema for an NFT is below, as a javascript object with types:

{
    Date: 
        {
            dt: <UTC Timestamp>,
            timeSet: <boolean>
        },
    Location: 
        {
            address: <string>,
            latitude: <number>,
            longitude: number,
            placeId: <string>
        }
    ShortDescription: <string>,
    LongDescription: <string>,
    OneTime: <boolean>,
    Site: <string>,
    Status: <string> one of options: Upcoming, Available, Past,
    ThreshrNFTId: <string>,
    ThreshrPerkId: <string> provided by Threshr,
    TokensRequired: <number>
}

Users are likely to see extra fields while the schema is being solidified. The above fields are guaranteed.

Notes about Intent and Usage

Date

Intent: This object indicates the date and time the token gate activates. The "dt" field is a UTC timestamp. The "timeSet" field indicates that the time of the UTC timestamp actually matters - the difference between saying a gate activates on a day vs at a specific time on a day.

Location

Intent: This object indicates the location of the token gate. Latitude and longitude are required, the other parameters are optional but may make parsing easier for users. Sample:

{
    address: "2602 S Bayshore Dr, Miami, FL 33133, USA", //optional
    latitude: 25.7313879, //required
    longitude: 80.23400819999999, //required
    placeId: "ChIJW-kXcsu32YgReSsyLX3U9H0" //optional
}

ShortDescription

Mandatory
Intent: A short description, as a title, for a Perk. This appears on the Threshr Widget cards on back side.

LongDescription

Mandatory
Intent: A longer description, perhaps multiple lines, with all the details necessary to describe a Perk.

OneTime

Intent: A boolean describing whether the token gate can only be activated once.

Site

Intent: A link to an appropriate website for the Perk.

Status

Intent: Indicate whether the Perk is available, upcoming, or has already passed.

ThreshrNFTId

Intent: An id provided by Threshr that links back to the NFT collection which hosts the Perk.

ThreshrPerkId

Intent: A unique identifier provided by Threshr that tracks this Perk.

TokensRequired

Intent: A number to indicate how many tokens are required to activate the token gate.

Schema Updates

This schema is likely to be updated. If you have a request for updates, please email help@threshr.co.
Current proposals include:

  • Standardized blockchain hosted location for this perk data
  • "Other" field allowing minters to host necessary utility data that may not conform to the above standard but may still be useful