62 lines
2.1 KiB
Python
62 lines
2.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class Staking(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'info',
|
|
'desc': '获取质押信息',
|
|
'group': 'Staking',
|
|
'url': 'webapp/index.php?c=Staking&a=info',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['total_staking_value', '', '质押总ceg价值'],
|
|
['daily_staking_value', '', '当天总ceg价值'],
|
|
['planet', _common.Staking(), '星球质押'],
|
|
['badge', _common.Staking(), '徽章质押'],
|
|
['cec', _common.Staking(), 'cec质押'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'stacking',
|
|
'desc': '质押中nft列表',
|
|
'group': 'Staking',
|
|
'url': 'webapp/index.php?c=Staking&a=stacking',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['type', '', '1: planet 2: badge 3:cec'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!items', [Union([
|
|
[NftHeroDetail(), '英雄'],
|
|
[NftGunDetail(), '枪支'],
|
|
[NftChipDetail(), '芯片'],
|
|
])], '星球质押'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'history',
|
|
'desc': '领取历史',
|
|
'group': 'Staking',
|
|
'url': 'webapp/index.php?c=Staking&a=history',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!items', [Union([
|
|
[NftHeroDetail(), '英雄'],
|
|
[NftGunDetail(), '枪支'],
|
|
[NftChipDetail(), '芯片'],
|
|
])], '星球质押'],
|
|
]
|
|
},
|
|
]
|