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

[PAN-2970] Added privacy group ID for sendRawTransaction #1773

Merged
merged 32 commits into from
Jul 29, 2019
Merged
Changes from all 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
ba57ea5
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 26, 2019
76b0b30
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 26, 2019
e86cbd4
Added privacy group ID for web3.js-eea
MadelineMurray Jul 26, 2019
c48b35c
Rework
MadelineMurray Jul 29, 2019
a37a2dd
Merge branch 'master' into privGroupIDUpdate
MadelineMurray Jul 29, 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
34 changes: 30 additions & 4 deletions docs/Reference/web3js-eea-Methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Options parameter has the following properties:

* `privateKey`: Ethereum private key with which to sign the transaction
* `privateFrom` : Orion public key of the sender
* `privateFor` : Orion public keys of recipients
* [`privateFor` : Orion public keys of recipients or `privacyGroupId`: Privacy group to receive the transaction](../Privacy/Explanation/Privacy-Groups.md)
* `nonce` : Optional. If not provided, calculated using [`eea_getTransctionCount`](../Reference/Pantheon-API-Methods.md).
* `to` : Optional. Contract address to send the transaction to. Do not specify for contract deployment transactions
* `data` : Transaction data
Expand Down Expand Up @@ -186,6 +186,8 @@ Private transaction receipt

Signs and sends a RLP-encoded private transaction to Pantheon using [`eea_sendRawTransaction`](Pantheon-API-Methods.md#eea_sendrawtransaction).

`sendRawTransaction` supports [EEA-compliant privacy](../Privacy/How-To/EEA-Compliant.md) using `privateFor`, or [Pantheon-extended privacy](../Privacy/How-To/Pantheon-Privacy.md) using `privacyGroupId`.

**Parameters**

[Transaction options](#options-parameter)
Expand All @@ -194,8 +196,32 @@ Signs and sends a RLP-encoded private transaction to Pantheon using [`eea_sendRa

`string` : Transaction hash of the [`privacy marker transaction`](../Privacy/Explanation/Private-Transaction-Processing.md)

!!! example
```bash tab="Contract Deployment"
!!! example "Pantheon-extended Privacy"
```bash tab="Contract Deployment with privacyGroupId"
const createPrivateEmitterContract = privacyGroupId => {
const contractOptions = {
data: `0x${binary}`,
privateFrom: orion.node1.publicKey,
privacyGroupId,
privateKey: pantheon.node1.privateKey
};
return web3.eea.sendRawTransaction(contractOptions);
};
```

```bash tab="Contract Invocation with privacyGroupId "
const functionCall = {
to: address,
data: functionAbi.signature,
privateFrom,
privacyGroupId,
privateKey
};
return web3.eea.sendRawTransaction(functionCall);
```

!!! example "EEA-compliant Privacy"
```bash tab="Contract Deployment with privateFor"
const createPrivateEmitterContract = () => {
const contractOptions = {
data: `0x${binary}`,
Expand All @@ -207,7 +233,7 @@ Signs and sends a RLP-encoded private transaction to Pantheon using [`eea_sendRa
};
```

```bash tab="Contract Invocation"
```bash tab="Contract Invocation with privateFor"
const functionCall = {
to: address,
data: functionAbi.signature + functionArgs,
Expand Down