nft质押任务逻辑
This commit is contained in:
@@ -32,6 +32,90 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/gapi/task/v1/nft/stake": {
|
||||
"post": {
|
||||
"summary": "质押NFT",
|
||||
"operationId": "StakeNft",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"description": " StakeNftList 质押请求参数NFT列表",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/StakeNftList"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"task"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"apiKey": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/gapi/task/v1/nft/unstake": {
|
||||
"post": {
|
||||
"summary": "取消质押NFT",
|
||||
"operationId": "UnStakeNft",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"description": " UnStakeNftReq 取消质押请求参数",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/UnStakeNftReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"task"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"apiKey": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/gapi/task/v1/nfts": {
|
||||
"get": {
|
||||
"summary": "拉取玩家持有的nft列表",
|
||||
"operationId": "GetNftList",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/UserNftList"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"task"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"apiKey": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/gapi/task/v1/reward/{id}": {
|
||||
"get": {
|
||||
"summary": "领取任务奖励",
|
||||
@@ -104,6 +188,28 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/gapi/task/v1/task/stake": {
|
||||
"get": {
|
||||
"summary": "质押任务详情",
|
||||
"operationId": "GetStakeTaskDetail",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/StakeTaskDetail"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"task"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"apiKey": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/gapi/task/v1/tasks": {
|
||||
"get": {
|
||||
"summary": "获取任务列表",
|
||||
@@ -233,6 +339,64 @@
|
||||
"points"
|
||||
]
|
||||
},
|
||||
"StakeNftList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": " nft列表"
|
||||
}
|
||||
},
|
||||
"title": "StakeNftList",
|
||||
"required": [
|
||||
"token_ids"
|
||||
]
|
||||
},
|
||||
"StakeTaskDetail": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"start_date": {
|
||||
"type": "string",
|
||||
"description": " 开始日期"
|
||||
},
|
||||
"end_date": {
|
||||
"type": "string",
|
||||
"description": " 结束日期"
|
||||
},
|
||||
"count_down": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": " 剩余结算时间"
|
||||
},
|
||||
"produce_token_today": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": " 今日产出代币"
|
||||
},
|
||||
"game_bonus": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": " 游戏加成比率"
|
||||
},
|
||||
"can_receive_tokens": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": " 可领取代币数量"
|
||||
}
|
||||
},
|
||||
"title": "StakeTaskDetail",
|
||||
"required": [
|
||||
"start_date",
|
||||
"end_date",
|
||||
"count_down",
|
||||
"produce_token_today",
|
||||
"game_bonus",
|
||||
"can_receive_tokens"
|
||||
]
|
||||
},
|
||||
"Task": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -333,6 +497,58 @@
|
||||
"type": "object",
|
||||
"title": "TaskIdPath"
|
||||
},
|
||||
"UnStakeNftReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token_id": {
|
||||
"type": "string",
|
||||
"description": " nftID"
|
||||
}
|
||||
},
|
||||
"title": "UnStakeNftReq",
|
||||
"required": [
|
||||
"token_id"
|
||||
]
|
||||
},
|
||||
"UserNft": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token_id": {
|
||||
"type": "string",
|
||||
"description": " nftID"
|
||||
},
|
||||
"has_stake": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": " 是否已质押"
|
||||
},
|
||||
"stake_at": {
|
||||
"type": "string",
|
||||
"description": " 质押时间"
|
||||
}
|
||||
},
|
||||
"title": "UserNft",
|
||||
"required": [
|
||||
"token_id",
|
||||
"has_stake",
|
||||
"stake_at"
|
||||
]
|
||||
},
|
||||
"UserNftList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nft_list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/UserNft"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "UserNftList",
|
||||
"required": [
|
||||
"nft_list"
|
||||
]
|
||||
},
|
||||
"VerifyTaskResultReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user