game2006api/doc/BlockChain.py
aozhiwei 3fd99ce02a 1
2022-11-03 18:33:37 +08:00

110 lines
3.9 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- 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': [
['token_ids', '', 'token_ids多个用|分割'],
],
'response': [
_common.RspHead(),
['trans_id', '', '事务id'],
['!params', [''], '合约参数列表'],
]
}
]