This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
[PAN-2845] Added eea_getPrivateTransaction #1729
Merged
MadelineMurray
merged 13 commits into
PegaSysEng:master
from
MadelineMurray:eeaGetPrivateTransaction
Jul 25, 2019
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
272c614
WIP
MadelineMurray 080fa58
Added eea_getPrivateTransaction
MadelineMurray 3446f6e
Rework
MadelineMurray 36bad80
Merge branch 'master' into eeaGetPrivateTransaction
MadelineMurray 775c027
WIP
MadelineMurray f1c8ac8
WIP
MadelineMurray 85faecc
rework
MadelineMurray 957bcb5
rework
MadelineMurray 4a577d3
edit
MadelineMurray 202ca61
Merge branch 'master' into eeaGetPrivateTransaction
MadelineMurray 02de52b
Merge branch 'master' into eeaGetPrivateTransaction
MadelineMurray 56d156c
Merge branch 'master' into eeaGetPrivateTransaction
MadelineMurray 1cb2ad0
Merge branch 'master' into eeaGetPrivateTransaction
MadelineMurray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3771,6 +3771,54 @@ None | |
The `EEA` API methods are not enabled by default for JSON-RPC. Use the [`--rpc-http-api`](Pantheon-CLI-Syntax.md#rpc-http-api) | ||
or [`--rpc-ws-api`](Pantheon-CLI-Syntax.md#rpc-ws-api) options to enable the `EEA` API methods. | ||
|
||
### eea_getPrivateTransaction | ||
|
||
Returns the private transaction if you are a participant; otherwise, null. Get the public transaction | ||
using [`eth_getTransactionByHash`](#eth_gettransactionbyhash) with the transaction hash returned by | ||
[`eea_sendRawTransaction`](#eea_sendrawtransaction) or [`eea_sendTransction`](https://docs.ethsigner.pegasys.tech/en/latest/Using-EthSigner/Using-EthSigner/#eea_sendtransaction). | ||
|
||
**Parameters** | ||
|
||
`data` - Value of `input` from the public transaction | ||
|
||
**Returns** | ||
|
||
Object - [Transaction object](Pantheon-API-Objects.md#transaction-object), or `null` if not a participant in the private transaction. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not a I think we should specify a |
||
|
||
!!! example | ||
```bash tab="curl HTTP request" | ||
curl -X POST --data '{"jsonrpc":"2.0","method":"eea_getPrivateTransaction","params":["0xd2274e3da9ac7f7fcec531adeefdc205688e85544ccf515c4de73b0540c9b818"], "id":1}' http://127.0.0.1:8545 | ||
``` | ||
|
||
```bash tab="wscat WS request" | ||
{"jsonrpc":"2.0","method":"eea_getPrivateTransaction","params":["0xd2274e3da9ac7f7fcec531adeefdc205688e85544ccf515c4de73b0540c9b818"], "id":1} | ||
``` | ||
|
||
```json tab="JSON result" | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": { | ||
"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", | ||
"gas": "0x2dc6c0", | ||
"gasPrice": "0x0", | ||
"hash": "0xdb4ab78714c79d8ef6e93c598fd894cdafd3dde15460eaa4c9725c1e1d454971", | ||
"input": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610221806100606000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633fa4f2451461005c5780636057361d1461008757806367e404ce146100b4575b600080fd5b34801561006857600080fd5b5061007161010b565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b506100b260048036038101908080359060200190929190505050610115565b005b3480156100c057600080fd5b506100c96101cb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600254905090565b7fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f53382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a18060028190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a723058208efaf938851fb2d235f8bf9a9685f149129a30fe0f4b20a6c1885dc02f639eba0029", | ||
"nonce": "0x0", | ||
"to": null, | ||
"value": "0x0", | ||
"v": "0xfe8", | ||
"r": "0x654a6a9663ca70bb13e27cca14b3777cc92da184e19a151cdeef2ccbbd5c6405", | ||
"s": "0x5dd4667b020c8a5af7ae28d4c3126f8dcb1187f49dcf0de9d7a39b1651892eef", | ||
"privateFrom": "negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=", | ||
"privateFor": [ | ||
"g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw=" | ||
], | ||
"restriction": "restricted" | ||
} | ||
} | ||
``` | ||
|
||
### eea_sendRawTransaction | ||
|
||
Creates a private transaction from a signed transaction, generates the transaction hash and submits it | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion, maybe make this a new paragraph.
"To get the public transaction, use.."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done