111 lines
3.9 KiB
Python
111 lines
3.9 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': 'reportResult',
|
||
'desc': '上报链调用结果',
|
||
'group': 'BlockChain',
|
||
'url': 'webapp/index.php?c=BlockChain&a=reportResult',
|
||
'params': [
|
||
['trans_id', '', '事务id'],
|
||
['result', '', '合约返回值'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},
|
||
{
|
||
'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', [''], '合约参数列表'],
|
||
]
|
||
}
|
||
]
|