You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+81-1Lines changed: 81 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -358,6 +358,20 @@ The following endpoints can be used to get information about blocks and even tra
358
358
359
359
-`api/eth/block/2?showTx=true&useString=latest` : 1 is the blocknumber, the query `showTx` will show the transaction object in the output when set to true, and the query `useString` will overwrite the block number and use one of the strings used in the [getBlock api](http://web3js.readthedocs.io/en/1.0/web3-eth.html#getblock) such as `latest` to get the most recent block.
@@ -425,7 +439,7 @@ Note: you may notice that `nonce` is not a parameter accepted for changing becau
425
439
426
440
### Send Transaction
427
441
428
-
Sending a transaction uses the `paramsUpdated` object and passes it to `web3.eth.sendTransaction(paramsUpdated)`
442
+
Sending a transaction uses the `paramsUpdated` object and passes it to `web3.eth.sendTransaction(paramsUpdated)` and **requires a the from address to be an unlocked keystore address from inside the node**
429
443
430
444
output
431
445
@@ -444,6 +458,54 @@ output
444
458
}
445
459
```
446
460
461
+
### Sign and Send Manually
462
+
463
+
To sign with a private key and send the raw transaction follow these instructions for constructing your request:
464
+
465
+
#### Get Transaction Info
466
+
467
+
`http://localhost:3000/api/eth/send-tx-info` POST request with the following json to see your data:
If you are sending transactions from the same `from` address consecutively, you will need to increase the nonce by one so add it to your request
478
+
479
+
```
480
+
"nonce": 1
481
+
```
482
+
You will see the a change in the nonce. You want to pay attention to the `paramsToSign` parameter because it will be used to sign the transaction next.
483
+
484
+
#### Sign transaction
485
+
486
+
`http://localhost:3000/api/eth/sign-tx` and pass the POST request json:
See [web3 api](http://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#signtransaction) for details on the out put and grab the `rawTransaction` parameter hex encoded transaction
497
+
498
+
499
+
#### Send Signed Transaction
500
+
501
+
`http://localhost:3000/api/eth/send-signed-tx` POST request with json:
0 commit comments