Skip to content

Commit 7da1e61

Browse files
committed
updated readme with additional instructions on erc20 transfer endpoint and added new endpoints
1 parent fe9d7a7 commit 7da1e61

File tree

1 file changed

+59
-1
lines changed

1 file changed

+59
-1
lines changed

README.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ transferOwnership & kill functions both catch an 'invalid address'. The response
465465

466466
There is always room for improvement, but below is a list of tasks to tackle first.
467467

468+
- error handling needs to be better and standarized. Using combination of promises/catch and try/catch but only some error are sent as a response, most stop the server and the requests gets timedout.
468469
- add a way to calculate default gas when transferring tokens for multi-token and owner-token apis
469470
- Get `transferFrom` branch working and debugged, which also included payments to the contract. This branch is for the owner api but can be integrated into the multi-tokens api once it works correctly.
470471
- Add unit tests via mocha, jest
@@ -616,9 +617,18 @@ Transfer tokens between any two addresses.
616617

617618
Url:
618619
```
619-
http://localhost:3000/api/token/threshodl/getbalance/0x07CE1F5852f222cc261ca803a1DA4a4016154539
620+
http://localhost:3000/api/token/threshodl/transfer
620621
```
621622

623+
Options:
624+
625+
- gas[optional] - Example: "gas": 41000. Defaults to gas from web3.eth.estimateGas()
626+
- fromAddres[required]
627+
- toAddress[required]
628+
- value[required] - number/string. Keep in mind the decimal spaces for the token contract. Usually is 18. Example below is 2, so 100 is actually 100 tokens.
629+
- privateKey[required] - sender(fromAddress) private key.
630+
- priority[required] - low, medium, high. Based on thi [api](https://ethgasstation.info/json/ethgasAPI.json) and fast, average and safelow are divided by 10.
631+
622632
Request:
623633
```
624634
{
@@ -968,6 +978,12 @@ Response:
968978
"GET"
969979
]
970980
},
981+
{
982+
"path": "/api/token/check-for-contract/:address",
983+
"methods": [
984+
"GET"
985+
]
986+
},
971987
{
972988
"path": "/api/token/node-accounts",
973989
"methods": [
@@ -1046,6 +1062,12 @@ Response:
10461062
"POST"
10471063
]
10481064
},
1065+
{
1066+
"path": "/api/token/:tokenName/decode-tx-input",
1067+
"methods": [
1068+
"POST"
1069+
]
1070+
},
10491071
{
10501072
"path": "/api/eth",
10511073
"methods": [
@@ -1082,6 +1104,12 @@ Response:
10821104
"GET"
10831105
]
10841106
},
1107+
{
1108+
"path": "/api/eth/tx-receipt/:transactionHash",
1109+
"methods": [
1110+
"GET"
1111+
]
1112+
},
10851113
{
10861114
"path": "/api/eth/tx-from-block/:hashStringOrNumber",
10871115
"methods": [
@@ -1106,6 +1134,36 @@ Response:
11061134
"GET"
11071135
]
11081136
},
1137+
{
1138+
"path": "/api/eth/wallet",
1139+
"methods": [
1140+
"GET"
1141+
]
1142+
},
1143+
{
1144+
"path": "/api/eth/wallet/create",
1145+
"methods": [
1146+
"GET"
1147+
]
1148+
},
1149+
{
1150+
"path": "/api/eth/wallet/add/:privateKey",
1151+
"methods": [
1152+
"POST"
1153+
]
1154+
},
1155+
{
1156+
"path": "/api/eth/wallet/remove/:publicKey",
1157+
"methods": [
1158+
"POST"
1159+
]
1160+
},
1161+
{
1162+
"path": "/api/eth/wallet/clear",
1163+
"methods": [
1164+
"POST"
1165+
]
1166+
},
11091167
{
11101168
"path": "/api/eth/send-tx-info",
11111169
"methods": [

0 commit comments

Comments
 (0)