172 lines
6.6 KiB
Python
172 lines
6.6 KiB
Python
# -*- coding: utf-8 -*-
|
||
|
||
import _common
|
||
|
||
class BlockChain(object):
|
||
|
||
def __init__(self):
|
||
self.apis = [
|
||
{
|
||
'name': 'getTransactionList',
|
||
'desc': '获取列交易列表',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=getTransactionList',
|
||
'params': [
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['!transactions', [_common.NftTransaction()], '交易列表']
|
||
]
|
||
},
|
||
{
|
||
'name': 'getTransactionInfo',
|
||
'desc': '查看链交易状态',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=getTransactionInfo',
|
||
'params': [
|
||
['trans_id', '', '事务id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['!data', [_common.NftTransaction()], '交易记录']
|
||
]
|
||
},
|
||
{
|
||
'name': 'reportResult',
|
||
'desc': '上报链调用结果',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=reportResult',
|
||
'params': [
|
||
['trans_id', '', '事务id'],
|
||
['result', '', '合约返回值'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},
|
||
{
|
||
'name': 'getJumpInfo',
|
||
'desc': '获取跳转信息',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=getJumpInfo',
|
||
'params': [
|
||
['trans_id', '', '事务id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['action', 0,'动作 1:特定英雄详情,2:特定枪械详情,3:NFTs芯片列表,4:英雄进阶介面,5:枪械进阶介面,6:芯片升级介面,7:NFTs碎片列表 ,8:目标英雄详情介面的Chip页签,9:目标枪械详情介面的Chip页签 '],
|
||
['!params', [''], '参数列表 params[0]: token_id'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'active721Nft',
|
||
'desc': '激活721nft',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=active721Nft',
|
||
'params': [
|
||
['type', 0, '1:英雄 2:枪械'],
|
||
['uniid', 0, '唯一id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', '', '事务id'],
|
||
['!params', [''], '合约参数列表'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'evolve721Nft',
|
||
'desc': 'nft进阶(英雄,武器)',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=evolve721Nft',
|
||
'params': [
|
||
['type', 0, '1:英雄 2:枪械'],
|
||
['token_id1', 0, 'tokenid1'],
|
||
['token_id2', 0, 'tokenid2'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', '', '事务id'],
|
||
['!params', [''], '合约参数列表'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'evolveChip',
|
||
'desc': '芯片进阶',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=evolveChip',
|
||
'params': [
|
||
['token_id1', 0, 'tokenid1'],
|
||
['token_ids', '', 'tokenids材料id(|分割)'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', '', '事务id'],
|
||
['!params', [''], '合约参数列表'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'mintShardBatchUser',
|
||
'desc': '碎片生成',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=mintShardBatchUser',
|
||
'params': [
|
||
['item_uniid', 0, '道具唯一id'],
|
||
['num', 0, '使用数量'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', '', '事务id'],
|
||
['!params', [''], '合约参数列表'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'shardMixByUser',
|
||
'desc': '碎片合成',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=shardMixByUser',
|
||
'params': [
|
||
['item_id', '', '指定的英雄id或者武器id'],
|
||
['token_ids', '', 'token_ids多个用|分割'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', '', '事务id'],
|
||
['!params', [''], '合约参数列表'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'pluginChipBatch',
|
||
'desc': '批量装上芯片',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=pluginChipBatch',
|
||
'params': [
|
||
['type', 0, '1:英雄 2:枪械'],
|
||
['token_id', '', 'token_id'],
|
||
['chip_ids', '', '需要卸下的chip token_ids多个用|分割'],
|
||
['slot_ids', '', '槽位0-3多个用|分割'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', '', '事务id'],
|
||
['!params', [''], '合约参数列表'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'unplugChip',
|
||
'desc': '卸下芯片',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=unplugChip',
|
||
'params': [
|
||
['type', 0, '1:英雄 2:枪械'],
|
||
['token_id', '', 'token_id'],
|
||
['chip_ids', '', '需要卸下的chip token_ids多个用|分割'],
|
||
['slot_ids', '', '槽位0-3多个用|分割'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', '', '事务id'],
|
||
['!params', [''], '合约参数列表'],
|
||
]
|
||
}
|
||
]
|