# -*- 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(), ['pool_size', '', '池子数量'], ['total_staking_value', '', '质押总ceg价值,包含利息'], ['daily_staking_value', '', '当天总ceg价值,包含利息'], ['planet', _common.Staking(), '星球质押'], ['badge', _common.Staking(), '徽章质押'], ['cec', _common.Staking(), 'cec质押'], ] }, { 'name': 'staking', 'desc': '质押中nft列表', 'group': 'Staking', 'url': 'webapp/index.php?c=Staking&a=staking', 'params': [ _common.ReqHead(), ['type', '', '1: planet 2: badge 3:cec'], ], 'response': [ _common.RspHead(), ['type', '', '1: planet 2: badge 3:cec'], ['stacked_quant', '', '当前该类型质押总数'], ['!items', [_common.StakingDetail()], '质押列表'], ] }, { 'name': 'history', 'desc': '领取历史', 'group': 'Staking', 'url': 'webapp/index.php?c=Staking&a=history', 'params': [ _common.ReqHead(), ['from_time', '', '开始时间(utc时间)'], ['to_time', '', '结束时间(utc时间)'], ], 'response': [ _common.RspHead(), ['!items', [_common.StakingDetail()], '领取历史'], ] }, { 'name': 'redeemPreview', 'desc': '赎回预览', 'group': 'Staking', 'url': 'webapp/index.php?c=Staking&a=redeemPreview', 'params': [ _common.ReqHead(), ['trans_id', '', 'trans_id'], ], 'response': [ _common.RspHead(), ['cec_rewards', 0, '该nft结算得到的ceg数量'], ] }, { 'name': 'stakingPreview', 'desc': '质押预览', 'group': 'Staking', 'url': 'webapp/index.php?c=Staking&a=stakingPreview', 'params': [ _common.ReqHead(), ['token_id_list', '', 'token_id多个|分割'], ['contract_address_list', '', 'contract_address多个|分割'], ['net_id', '', 'net_id'], ], 'response': [ _common.RspHead(), ['nft_value', 0, 'nft价值'], ['!items', [_common.StakingPreview()], ''], ] }, ]