Validating Proofs for Token Burns

When you use the /v1/tokenomics/burn endpoint, you provide a type (e.g., "PRODUCT_BUY") and a corresponding proof object.

This document provides guidance on how to:

  1. Conceptualize the different proof types your application might use.
  2. Define the actual JSON Schema for each of these proof types

Conceptualizing Your Proof Types

Before defining the detailed JSON Schemas, it’s helpful to list out the different types of events in your application that could trigger a token burn. For each type, you should have a clear understanding of the data that constitutes valid proof for that event.

Here’s an illustrative example of how you might catalogue your proof types:

{
  "proofTypes": [
    {
      "type": "PRODUCT_BUY",
      "description": "Used when a user buys a product on your platform."
    },
    {
      "type": "PRODUCT_REFUND",
      "description": "Used when a user is refunded for a product on your platform."
    },
    // Add other custom proof types relevant to your application
  ]
}

This list helps you identify each unique event type for which you’ll need to create a specific JSON Schema.

Defining JSON Schemas for Your Proof Types

For each unique type of burn event your application supports (like those conceptualized above), you need to create a detailed JSON Schema. By clearly defining these JSON Schemas for each of your proof types, you ensure that the data sent to the burn endpoint is structured correctly, leading to reliable validation and processing.

You can find more details about the burn endpoint itself in the Burn Tokens API reference.