wallet/README.md

41 lines
1.3 KiB
Markdown

# start
```
npm install
npm run start --${port} // default: 12345
```
# api
```
1, /checkPayment/eth
[request]
method:post
params:coin string, address string, amount float64, ts uint64 (request-body)
[response]
success: {code:0, result:true, data:array[]{
"blockNumber": "23088543",
"timeStamp": "1754561951",
"hash": "0x887ba171af3ed43cec6dfaef5f0379e2718cdc91a538eea7173947461dbcfd90",
"nonce": "0",
"blockHash": "0x5752c8fc343db877853c76aa14ecdfa6aa19bc9f273e1df715cd03020395152f",
"from": "0xfdd78d01030956dc417a3057b205159490b3919e",
"contractAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"to": "0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
"value": "1100000000",
"tokenName": "USDC",
"tokenSymbol": "USDC",
"tokenDecimal": "6",
"transactionIndex": "110",
"gas": "45746",
"gasPrice": "2240053599",
"gasUsed": "40348",
"cumulativeGasUsed": "16503510",
"input": "deprecated",
"methodId": "0xa9059cbb",
"functionName": "transfer(address _to, uint256 _value)",
"confirmations": "4768"
}, ... }
error: {code:-1, result:false, data: array[]} // 未转账
{code:-2, result:false, data: array[]} // coin参数不支持
```