Updated getPrivateTx parameter (#1787)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
MadelineMurray 5 years ago committed by GitHub
parent 7ac889622f
commit 05b1750914
  1. 10
      docs/Privacy/How-To/Access-Private-Transactions.md
  2. 16
      docs/Reference/Pantheon-API-Methods.md

@ -8,7 +8,9 @@ Use [`eth_getTransactionReceipt`](../../Reference/Pantheon-API-Methods.md#eth_ge
get the transaction receipt for the Privacy Maker Transaction and [`eea_getTransactionReceipt`](../../Reference/Pantheon-API-Methods.md#eea_gettransactionreceipt)
to get the transaction receipt for the private transaction.
Use [`eth_getTransactionByHash`](../../Reference/Pantheon-API-Methods.md#eth_gettransactionbyhash) to
get the Privacy Marker Transaction with the transaction hash returned when submitting the private transaction.
Use [`priv_getPrivateTransaction`](../../Reference/Pantheon-API-Methods.md#priv_getprivatetransaction)
to get the private transaction with the `input` value from the Privacy Marker Transaction.
With the transaction hash returned when submitting the private transaction, use:
* [`eth_getTransactionByHash`](../../Reference/Pantheon-API-Methods.md#eth_gettransactionbyhash) to
get the Privacy Marker Transaction .
* [`priv_getPrivateTransaction`](../../Reference/Pantheon-API-Methods.md#priv_getprivatetransaction)
to get the private transaction.

@ -3895,14 +3895,12 @@ None
### priv_getPrivateTransaction
Returns the private transaction if you are a participant; otherwise, null. To get the public transaction,
use [`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).
Returns the private transaction if you are a participant; otherwise, null.
**Parameters**
`data` - Value of `input` from the [public transaction object](Pantheon-API-Objects.md#transaction-object). `input`
is a pointer to the transaction location in [Orion](https://docs.orion.pegasys.tech/en/stable/).
`data` - Transaction hash returned by [`eea_sendRawTransaction`](#eea_sendrawtransaction) or
[`eea_sendTransction`](https://docs.ethsigner.pegasys.tech/en/latest/Using-EthSigner/Using-EthSigner/#eea_sendtransaction). .
**Returns**
@ -3910,14 +3908,14 @@ Object - [Private transaction object](Pantheon-API-Objects.md#private-transactio
!!! example
```bash tab="curl HTTP request"
curl -X POST --data '{"jsonrpc":"2.0","method":"priv_getPrivateTransaction","params":["0xd2274e3da9ac7f7fcec531adeefdc205688e85544ccf515c4de73b0540c9b818"], "id":1}' http://127.0.0.1:8545
curl -X POST --data '{"jsonrpc":"2.0","method":"priv_getPrivateTransaction","params":["0x623c4ce5275a87b91f4f1c521012d39ca19311c787bde405490f4c0426a71498"], "id":1}' http://127.0.0.1:8545
```
```bash tab="wscat WS request"
{"jsonrpc":"2.0","method":"priv_getPrivateTransaction","params":["0xd2274e3da9ac7f7fcec531adeefdc205688e85544ccf515c4de73b0540c9b818"], "id":1}
{"jsonrpc":"2.0","method":"priv_getPrivateTransaction","params":["0x623c4ce5275a87b91f4f1c521012d39ca19311c787bde405490f4c0426a71498"], "id":1}
```
```bash tab="json tab="JSON result"
```json tab="JSON result"
{
"jsonrpc": "2.0",
"id": 1,
@ -3925,7 +3923,7 @@ Object - [Private transaction object](Pantheon-API-Objects.md#private-transactio
"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"gas": "0x2dc6c0",
"gasPrice": "0x0",
"hash": "0xdb4ab78714c79d8ef6e93c598fd894cdafd3dde15460eaa4c9725c1e1d454971",
"hash": "0x623c4ce5275a87b91f4f1c521012d39ca19311c787bde405490f4c0426a71498",
"input": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610221806100606000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633fa4f2451461005c5780636057361d1461008757806367e404ce146100b4575b600080fd5b34801561006857600080fd5b5061007161010b565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b506100b260048036038101908080359060200190929190505050610115565b005b3480156100c057600080fd5b506100c96101cb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600254905090565b7fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f53382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a18060028190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a723058208efaf938851fb2d235f8bf9a9685f149129a30fe0f4b20a6c1885dc02f639eba0029",
"nonce": "0x0",
"to": null,

Loading…
Cancel
Save