{
  "openapi": "3.1.0",
  "info": {
    "title": "Stake Vault API",
    "description": "<div><h3>Quick Start</h3><table><tr><td>code</td><td>description</td></tr></table>NOTICE:Please return <code>success</code> to notify the notification server after successfully receives the callback request. After the notification server receiving success, the notification stops. Otherwise, the notification will be sent 10 times at the frequency of 0s/15s/30s/3m/10m/20m/30m/60m/3h/6h.</div>",
    "version": "0.1#243"
  },
  "servers": [
    {
      "url": "http://api.catfee.io",
      "description": "Generated server url"
    }
  ],
  "tags": [
    {
      "name": "PUBLIC SERVICE",
      "description": "公共服务"
    }
  ],
  "paths": {
    "/v1/stake/public/transaction": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "代理列表",
        "operationId": "addressTransaction",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "description": "地址",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project_type",
            "in": "query",
            "description": "项目类型",
            "required": false,
            "schema": {
              "type": "string",
              "default": "DELEGATION",
              "enum": [
                "DELEGATION",
                "PERMISSION",
                "CUSTOMIZE",
                "SUBLET"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "第几页",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "每页几条",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XPageTransactionPayload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/stat": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "地址统计",
        "operationId": "addressStat",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "description": "地址",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XStakedAddressStat"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/seller_monitor_url": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "绑定监控地址",
        "operationId": "sellerMonitorUrl",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "description": "地址",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XString"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/project/{id}": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "项目信息",
        "operationId": "project",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "项目ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XProjectPayload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/project/stat": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "项目统计",
        "operationId": "projectStat",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XProjectStat"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/project/daily_bill": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "项目结算列表",
        "operationId": "projectDailyBill",
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "description": "项目ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "第几页",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "每页几条",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XPageDailyBillPayload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/project": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "项目列表",
        "operationId": "projectList",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XListProjectPayload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/payout/{payHash}": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "付款详情",
        "operationId": "payoutDetail",
        "parameters": [
          {
            "name": "payHash",
            "in": "path",
            "description": "付款hash",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XPayoutDetailPayload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/payout": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "付款列表",
        "operationId": "addressPayout",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "description": "地址",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "第几页",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "每页几条",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XPagePayoutPayload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/future": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "未来收益",
        "operationId": "addressFuture",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "description": "地址",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XListFutureDailyBillPayload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/daily_bill/{id}": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "结算详情",
        "operationId": "dailyBillDetail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "结算ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XDailyBillDetailPayload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stake/public/daily_bill": {
      "get": {
        "tags": [
          "PUBLIC SERVICE"
        ],
        "summary": "结算列表",
        "operationId": "addressDailyBill",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "description": "地址",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project_type",
            "in": "query",
            "description": "项目类型",
            "required": false,
            "schema": {
              "type": "string",
              "default": "DELEGATION",
              "enum": [
                "DELEGATION",
                "PERMISSION",
                "CUSTOMIZE",
                "SUBLET"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "第几页",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "每页几条",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XPageDailyBillPayload"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PageTransactionPayload": {
        "properties": {
          "total_elements": {
            "type": "integer",
            "format": "int64"
          },
          "total_pages": {
            "type": "integer",
            "format": "int32"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionPayload"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "number_of_elements": {
            "type": "integer",
            "format": "int32"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "PageableObject": {
        "properties": {
          "paged": {
            "type": "boolean"
          },
          "page_number": {
            "type": "integer",
            "format": "int32"
          },
          "page_size": {
            "type": "integer",
            "format": "int32"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "unpaged": {
            "type": "boolean"
          }
        }
      },
      "SortObject": {
        "properties": {
          "empty": {
            "type": "boolean"
          },
          "sorted": {
            "type": "boolean"
          },
          "unsorted": {
            "type": "boolean"
          }
        }
      },
      "TransactionPayload": {
        "properties": {
          "hash": {
            "type": "string",
            "description": "交易hash"
          },
          "project_id": {
            "type": "integer",
            "format": "int64",
            "description": "关联项目ID"
          },
          "project_name_en": {
            "type": "string",
            "description": "项目英文名称"
          },
          "project_name_zh": {
            "type": "string",
            "description": "项目中文名称"
          },
          "owner": {
            "type": "string",
            "description": "资源所属地址"
          },
          "receiver": {
            "type": "string",
            "description": "目标地址"
          },
          "resource_type": {
            "type": "string",
            "description": "资源类型",
            "enum": [
              "ENERGY",
              "BANDWIDTH"
            ]
          },
          "transaction_type": {
            "type": "string",
            "description": "交易类型，12：代理，13：回收",
            "enum": [
              "PERMISSION",
              "STAKE",
              "UNSTAKE",
              "DELEGATE",
              "RECLAIM"
            ]
          },
          "staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押金额"
          },
          "valid_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押有效金额"
          },
          "block_id": {
            "type": "integer",
            "format": "int64",
            "description": "交易区块"
          },
          "block_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "交易时间"
          }
        }
      },
      "XPageTransactionPayload": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PageTransactionPayload"
          }
        }
      },
      "StakedAddressStat": {
        "properties": {
          "staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "总质押量"
          },
          "valid_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "总有效质押量"
          },
          "earning_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "累计收益"
          },
          "latest_earning_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "上次最新收益"
          }
        }
      },
      "XStakedAddressStat": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/StakedAddressStat"
          }
        }
      },
      "XString": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "type": "string"
          }
        }
      },
      "ProjectPayload": {
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "项目ID"
          },
          "name_en": {
            "type": "string",
            "description": "项目英文名称"
          },
          "name_zh": {
            "type": "string",
            "description": "项目中文名称"
          },
          "resource_type": {
            "type": "string",
            "description": "资源类型",
            "enum": [
              "ENERGY",
              "BANDWIDTH"
            ]
          },
          "receiver": {
            "type": "string",
            "description": "接收资源地址,当前运行中的地址只能有一个"
          },
          "quota_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "资源质押数配额"
          },
          "current_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "当前资源质押数"
          },
          "min_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "每次代理最小质押数"
          },
          "quota_quantity": {
            "type": "integer",
            "format": "int64",
            "description": "资源配额"
          },
          "current_quantity": {
            "type": "integer",
            "format": "int64",
            "description": "当前资源数量"
          },
          "min_quantity": {
            "type": "integer",
            "format": "int64",
            "description": "每次代理最小数量"
          },
          "apy": {
            "type": "integer",
            "format": "int32",
            "description": "年化*100 存整数"
          },
          "price": {
            "type": "integer",
            "format": "int32",
            "description": "项目单价sun/天"
          },
          "margin_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "买家累计保证金金额"
          },
          "payment_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "买家累计支付金额"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间"
          },
          "expired_at": {
            "type": "integer",
            "format": "int64",
            "description": "截止时间"
          },
          "project_type": {
            "type": "string",
            "description": "项目类型",
            "enum": [
              "DELEGATION",
              "PERMISSION",
              "CUSTOMIZE",
              "SUBLET"
            ]
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "CLOSED",
              "NORMAL",
              "WARNING",
              "DANGER",
              "FULL"
            ]
          }
        }
      },
      "XProjectPayload": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ProjectPayload"
          }
        }
      },
      "ProjectStat": {
        "properties": {
          "total_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "总质押量"
          },
          "total_power_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "累计能源"
          },
          "total_payment_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "累计发放收益"
          }
        }
      },
      "XProjectStat": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ProjectStat"
          }
        }
      },
      "DailyBillPayload": {
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "last_billing_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "结算开始时间，上次结算时间"
          },
          "billing_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "结算时间"
          },
          "project_id": {
            "type": "integer",
            "format": "int64",
            "description": "关联的项目ID"
          },
          "project_name_en": {
            "type": "string",
            "description": "项目英文名称"
          },
          "project_name_zh": {
            "type": "string",
            "description": "项目中文名称"
          },
          "resource_type": {
            "type": "string",
            "description": "资源类型",
            "enum": [
              "ENERGY",
              "BANDWIDTH"
            ]
          },
          "receiver": {
            "type": "string",
            "description": "接收资源地址"
          },
          "staked_address": {
            "type": "string",
            "description": "质押地址"
          },
          "last_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "上次质押金额"
          },
          "staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押给该项目的金额"
          },
          "valid_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押给该项目的有效金额"
          },
          "power_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "用于计费的依据，单位是 能量x时"
          },
          "earning_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "收益金额"
          },
          "apy": {
            "type": "integer",
            "format": "int32",
            "description": "年化*100 存整数"
          },
          "status": {
            "type": "string",
            "description": "状态：1：已记录，2:准备付款 3:已支付",
            "enum": [
              "RECORDED",
              "PAYING",
              "PAID"
            ]
          }
        }
      },
      "PageDailyBillPayload": {
        "properties": {
          "total_elements": {
            "type": "integer",
            "format": "int64"
          },
          "total_pages": {
            "type": "integer",
            "format": "int32"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DailyBillPayload"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "number_of_elements": {
            "type": "integer",
            "format": "int32"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "XPageDailyBillPayload": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PageDailyBillPayload"
          }
        }
      },
      "XListProjectPayload": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectPayload"
            }
          }
        }
      },
      "PayoutDetailPayload": {
        "properties": {
          "staked_address": {
            "type": "string",
            "description": "质押地址"
          },
          "receiving_address": {
            "type": "string",
            "description": "收款账户"
          },
          "amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "付款金额"
          },
          "payment_hash": {
            "type": "string",
            "description": "付款hash"
          },
          "payment_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "付款时间"
          },
          "daily_bill_list": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DailyBillPayload"
            }
          }
        }
      },
      "XPayoutDetailPayload": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PayoutDetailPayload"
          }
        }
      },
      "PagePayoutPayload": {
        "properties": {
          "total_elements": {
            "type": "integer",
            "format": "int64"
          },
          "total_pages": {
            "type": "integer",
            "format": "int32"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PayoutPayload"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "number_of_elements": {
            "type": "integer",
            "format": "int32"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "PayoutPayload": {
        "properties": {
          "staked_address": {
            "type": "string",
            "description": "质押地址"
          },
          "receiving_address": {
            "type": "string",
            "description": "收款账户"
          },
          "amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "付款金额"
          },
          "payment_hash": {
            "type": "string",
            "description": "付款hash"
          },
          "payment_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "付款时间"
          }
        }
      },
      "XPagePayoutPayload": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PagePayoutPayload"
          }
        }
      },
      "FutureDailyBillPayload": {
        "properties": {
          "billing_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "下一次计费时间"
          },
          "project_id": {
            "type": "integer",
            "format": "int64",
            "description": "关联的项目ID"
          },
          "project_name_en": {
            "type": "string",
            "description": "项目英文名称"
          },
          "project_name_zh": {
            "type": "string",
            "description": "项目中文名称"
          },
          "resource_type": {
            "type": "string",
            "description": "资源类型",
            "enum": [
              "ENERGY",
              "BANDWIDTH"
            ]
          },
          "staked_address": {
            "type": "string",
            "description": "质押地址"
          },
          "receiver": {
            "type": "string",
            "description": "接收资源地址"
          },
          "staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押给该项目的金额"
          },
          "valid_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押给该项目的有效金额"
          },
          "power_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "用于计费的依据，单位是 能量x时"
          },
          "apy": {
            "type": "integer",
            "format": "int32",
            "description": "年化*100 存整数"
          },
          "earning_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "预计下一次收益金额"
          },
          "daily_earning_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "预计日收益"
          },
          "transaction_bill_list": {
            "type": "array",
            "description": "结算周期内代理信息变化",
            "items": {
              "$ref": "#/components/schemas/TransactionBillPayload"
            }
          }
        }
      },
      "TransactionBillPayload": {
        "description": "结算周期内代理信息变化",
        "properties": {
          "hash": {
            "type": "string",
            "description": "交易hash"
          },
          "last_billing_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "结算开始时间，上次结算时间"
          },
          "last_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "上次质押金额"
          },
          "last_valid_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "上次质押有效金额"
          },
          "billing_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "结算时间,代理时间"
          },
          "transaction_type": {
            "type": "string",
            "description": "交易类型，12：代理，13：回收",
            "enum": [
              "PERMISSION",
              "STAKE",
              "UNSTAKE",
              "DELEGATE",
              "RECLAIM"
            ]
          },
          "staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押给该项目的金额"
          },
          "valid_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押给该项目的有效金额"
          },
          "power_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "用于计费的依据，单位是 能量x时"
          },
          "earning_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "收益金额"
          }
        }
      },
      "XListFutureDailyBillPayload": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FutureDailyBillPayload"
            }
          }
        }
      },
      "DailyBillDetailPayload": {
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "last_billing_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "结算开始时间，上次结算时间"
          },
          "billing_timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "结算时间"
          },
          "project_id": {
            "type": "integer",
            "format": "int64",
            "description": "关联的项目ID"
          },
          "project_name_en": {
            "type": "string",
            "description": "项目英文名称"
          },
          "project_name_zh": {
            "type": "string",
            "description": "项目中文名称"
          },
          "resource_type": {
            "type": "string",
            "description": "资源类型",
            "enum": [
              "ENERGY",
              "BANDWIDTH"
            ]
          },
          "receiver": {
            "type": "string",
            "description": "接收资源地址"
          },
          "staked_address": {
            "type": "string",
            "description": "质押地址"
          },
          "last_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "上次质押金额"
          },
          "staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押给该项目的金额"
          },
          "valid_staked_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "质押给该项目的有效金额"
          },
          "power_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "用于计费的依据，单位是 能量x时"
          },
          "earning_amount_sun": {
            "type": "integer",
            "format": "int64",
            "description": "收益金额"
          },
          "apy": {
            "type": "integer",
            "format": "int32",
            "description": "年化*100 存整数"
          },
          "status": {
            "type": "string",
            "description": "状态：1：已记录，2:准备付款 3:已支付",
            "enum": [
              "RECORDED",
              "PAYING",
              "PAID"
            ]
          },
          "transaction_bill_list": {
            "type": "array",
            "description": "结算周期内代理信息变化",
            "items": {
              "$ref": "#/components/schemas/TransactionBillPayload"
            }
          }
        }
      },
      "XDailyBillDetailPayload": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "成功返回0，其他均为错误"
          },
          "msg": {
            "type": "string",
            "description": "发生错误时候返回的消息"
          },
          "sub_code": {
            "type": "string"
          },
          "sub_msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/DailyBillDetailPayload"
          }
        }
      }
    },
    "securitySchemes": {
      "Authorization": {
        "type": "http",
        "scheme": "bearer"
      },
      "StakingVaultApiKey": {
        "type": "apiKey",
        "name": "X-CF-SV-KEY",
        "in": "header"
      }
    }
  }
}