Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Added privacy group methods for web3.js-eea #1761

Merged
merged 32 commits into from
Jul 27, 2019
Merged
Changes from 8 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0ed474b
WIP
MadelineMurray Jun 13, 2019
0cd240a
WIP
MadelineMurray Jun 15, 2019
0bb7329
WIP:
MadelineMurray Jun 16, 2019
8e1cc0e
WIP
MadelineMurray Jun 29, 2019
3329412
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
MadelineMurray Jun 29, 2019
d9d7716
Ready for review
MadelineMurray Jun 29, 2019
4edbf16
WIP
MadelineMurray Jul 12, 2019
3bd6f8d
WIP
MadelineMurray Jul 13, 2019
236afe8
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
MadelineMurray Jul 15, 2019
7f58702
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
MadelineMurray Jul 21, 2019
0787fe8
Added overview of privacy methods
MadelineMurray Jul 21, 2019
e99111d
Added method overviews
MadelineMurray Jul 21, 2019
c46761a
Reorganised privacy section
MadelineMurray Jul 21, 2019
e261569
Moved files
MadelineMurray Jul 22, 2019
12c3568
Rework
MadelineMurray Jul 22, 2019
a5ffe15
Merge branch 'privacyReorg' of https://github.com/MadelineMurray/pant…
MadelineMurray Jul 22, 2019
9834dde
Merge branch 'MadelineMurray-privacyReorg'
MadelineMurray Jul 22, 2019
f55ff08
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
MadelineMurray Jul 22, 2019
da054a5
Merge branch 'MadelineMurray-privacyReorg'
MadelineMurray Jul 22, 2019
1ca598f
Merge branch 'managingPrivateTransactions' of https://github.com/Made…
MadelineMurray Jul 22, 2019
7e1f705
rework
MadelineMurray Jul 22, 2019
4acf168
Merge branch 'MadelineMurray-managingPrivateTransactions'
MadelineMurray Jul 22, 2019
2058cbd
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 23, 2019
1a86c07
Merge branch 'eeajsMethods' of https://github.com/MadelineMurray/pant…
MadelineMurray Jul 24, 2019
9319b04
Merge branch 'MadelineMurray-eeajsMethods'
MadelineMurray Jul 24, 2019
fcd5f38
fix conflict
MadelineMurray Jul 24, 2019
6d4f152
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 25, 2019
7c80061
Added priv group methods
MadelineMurray Jul 25, 2019
c7d3d2a
Merge branch 'master' into privGroupweb3jsEEA
MadelineMurray Jul 25, 2019
af90e99
Merge branch 'master' into privGroupweb3jsEEA
MadelineMurray Jul 26, 2019
2a90cd1
Merge branch 'master' into privGroupweb3jsEEA
MadelineMurray Jul 27, 2019
fd30c56
Merge branch 'master' into privGroupweb3jsEEA
MadelineMurray Jul 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions docs/Privacy/How-To/Creating-Sending-Private-Transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,34 @@ description: Creating and sending private transactions

# Creating and Sending Private Transactions

To create and send private transactions use one of:
Create and send private transactions using:

* [web3.js-eea client library](eeajs.md)
* [web3.js-eea client library](eeajs.md) or [web3j client library](https://github.com/web3j/web3j)
* [`eea_sendTransaction` with EthSigner](https://docs.ethsigner.pegasys.tech/en/latest/Using-EthSigner/Using-EthSigner/)
* [`eea_sendRawTransaction`](../../Reference/Pantheon-API-Methods.md#eea_sendrawtransaction)

!!! note
Private transactions either deploy contracts or call contract functions.
Ether transfer transactions cannot be private.
Ether transfer transactions cannot be private.

## Methods for Private Transactions

A private transaction creates a [Privacy Marker Transaction](../Private-Transaction-Processing.md) in addition to the private transaction itself.
Use [`eth_getTransactionReceipt`](../../Reference/Pantheon-API-Methods.md#eth_gettransactionreceipt) to
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 [`eea_getPrivateTransacton`](../../Reference/Pantheon-API-Methods.md#eea_getprivatetransaction)
to get the private transaction with the `input` value from the Privacy Marker Transaction.

Separate private states are maintained for each [privacy group](../Privacy-Overview.md#privacy-groups) so
the account nonce for an account is specific to the privacy group. That is, the nonce for account A for
privacy group ABC is different to the account nonce for account A for privacy group AB. Use
[`eea_getTransactionCount`](../../Reference/Pantheon-API-Methods.md#eea_gettransactioncount) to get
the account nonce for an account for the specified privacy group.

!!! note
If sending a large number of private transactions, you may need to calculate the nonce for the account
and privacy group outside the client.