2.2 KiB
description: Creating and sending private transactions
Creating and Sending Private Transactions
Create and send private transactions using:
- web3.js-eea client library or web3j client library
eea_sendTransaction
with EthSignereea_sendRawTransaction
!!! note Private transactions either deploy contracts or call contract functions. Ether transfer transactions cannot be private.
Methods for Private Transactions
A private transaction creates a Privacy Marker Transaction in addition to the private transaction itself.
Use eth_getTransactionReceipt
to
get the transaction receipt for the Privacy Maker Transaction and eea_getTransactionReceipt
to get the transaction receipt for the private transaction.
Use eth_getTransactionByHash
to
get the Privacy Marker Transaction with the transaction hash returned when submitting the private transaction.
Use eea_getPrivateTransacton
to get the private transaction with the input
value from the Privacy Marker Transaction.
Separate private states are maintained for each privacy group 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
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.