{
  "info": {
    "title": "Deficarrot API",
    "version": "0.0.1"
  },
  "servers": [
    {
      "url": "https://deficarrot.dial.to/api"
    }
  ],
  "openapi": "3.1.1",
  "paths": {
    "/v0/crt/mint/{poolToken}": {
      "get": {
        "operationId": "deficarrot.mint.getMintBlink",
        "summary": "Mint",
        "description": "Get a blink for mint operations",
        "tags": [
          "Earn"
        ],
        "parameters": [
          {
            "name": "poolToken",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Supported token address or label",
              "default": "PYUSD",
              "example": "PYUSD"
            },
            "x-default": "PYUSD",
            "example": "PYUSD"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "icon": {
                      "type": "string"
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "enum": [
                                  "transaction",
                                  "external-link"
                                ]
                              },
                              "href": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "parameters": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "type",
                                    "label"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "type",
                              "href",
                              "label"
                            ]
                          }
                        }
                      },
                      "required": [
                        "actions"
                      ]
                    }
                  },
                  "required": [
                    "title",
                    "description",
                    "label",
                    "icon",
                    "links"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "api-reference/deficarrot/earn/mint-get"
        }
      },
      "post": {
        "operationId": "deficarrot.mint.mint",
        "summary": "Mint",
        "description": "Execute a mint operation",
        "tags": [
          "Earn"
        ],
        "parameters": [
          {
            "name": "poolToken",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Supported token address or label",
              "default": "PYUSD",
              "example": "PYUSD"
            },
            "x-default": "PYUSD",
            "example": "PYUSD"
          },
          {
            "name": "percentage",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "The percentage of funds to use (alternative to amount)",
              "default": 10,
              "example": 10
            },
            "allowEmptyValue": true,
            "allowReserved": true,
            "x-default": 10,
            "example": 10
          },
          {
            "name": "amount",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0,
              "description": "The amount to use. Human-readable value, e.g. 0.1 USDC"
            },
            "allowEmptyValue": true,
            "allowReserved": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "transaction"
                    ],
                    "default": "transaction",
                    "example": "transaction"
                  },
                  "account": {
                    "type": "string",
                    "description": "The public key of the account that executes the transaction",
                    "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176",
                    "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176"
                  }
                },
                "required": [
                  "type",
                  "account"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "const": "transaction"
                    },
                    "transaction": {
                      "type": "string"
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "next": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            },
                            "href": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "href"
                          ]
                        }
                      },
                      "required": [
                        "next"
                      ]
                    },
                    "dialectExperimental": {
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "transaction"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "api-reference/deficarrot/earn/mint-post"
        }
      }
    },
    "/v0/crt/redeem/{poolToken}": {
      "get": {
        "operationId": "deficarrot.redeem.getRedeemBlink",
        "summary": "Redeem",
        "description": "Get a blink for redeem operations. Please note that the amount you redeem will be the amount of the stable coin you input, not the amount of the CRT token you will receive. Also there might be a small difference in the amount you receive due to the price of the stable coin and the CRT token and a withdrawal fee. Please check protocol documentation for more details.",
        "tags": [
          "Earn"
        ],
        "parameters": [
          {
            "name": "poolToken",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Supported token address or label",
              "default": "PYUSD",
              "example": "PYUSD"
            },
            "x-default": "PYUSD",
            "example": "PYUSD"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "icon": {
                      "type": "string"
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "enum": [
                                  "transaction",
                                  "external-link"
                                ]
                              },
                              "href": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "parameters": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "type",
                                    "label"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "type",
                              "href",
                              "label"
                            ]
                          }
                        }
                      },
                      "required": [
                        "actions"
                      ]
                    }
                  },
                  "required": [
                    "title",
                    "description",
                    "label",
                    "icon",
                    "links"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "api-reference/deficarrot/earn/redeem-get"
        }
      },
      "post": {
        "operationId": "deficarrot.redeem.redeem",
        "summary": "Redeem",
        "description": "Execute a redeem operation",
        "tags": [
          "Earn"
        ],
        "parameters": [
          {
            "name": "poolToken",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Supported token address or label",
              "default": "PYUSD",
              "example": "PYUSD"
            },
            "x-default": "PYUSD",
            "example": "PYUSD"
          },
          {
            "name": "percentage",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "The percentage of funds to use (alternative to amount)",
              "default": 10,
              "example": 10
            },
            "allowEmptyValue": true,
            "allowReserved": true,
            "x-default": 10,
            "example": 10
          },
          {
            "name": "amount",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0,
              "description": "The amount to use. Human-readable value, e.g. 0.1 USDC"
            },
            "allowEmptyValue": true,
            "allowReserved": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "transaction"
                    ],
                    "default": "transaction",
                    "example": "transaction"
                  },
                  "account": {
                    "type": "string",
                    "description": "The public key of the account that executes the transaction",
                    "default": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176",
                    "example": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176"
                  }
                },
                "required": [
                  "type",
                  "account"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "const": "transaction"
                    },
                    "transaction": {
                      "type": "string"
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "next": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            },
                            "href": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "href"
                          ]
                        }
                      },
                      "required": [
                        "next"
                      ]
                    },
                    "dialectExperimental": {
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "transaction"
                  ]
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "api-reference/deficarrot/earn/redeem-post"
        }
      }
    }
  },
  "x-mcp": {
    "enabled": true
  }
}
