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

priv_createPrivacyGroup parameters updated #1796

Merged
merged 38 commits into from
Jul 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 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
eab21b9
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 27, 2019
429e753
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 29, 2019
4be67c4
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 30, 2019
cf71f1d
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 30, 2019
426399b
WIP
MadelineMurray Jul 30, 2019
3143fd0
updated parameters
MadelineMurray Jul 30, 2019
fa8064f
updated eeajs methods
MadelineMurray Jul 30, 2019
fb8306a
rework
MadelineMurray Jul 31, 2019
069a51b
Merge branch 'master' into createPrivGroupUpdate
MadelineMurray Jul 31, 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
14 changes: 6 additions & 8 deletions docs/Reference/Pantheon-API-Methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -3945,27 +3945,25 @@ Object - [Private transaction object](Pantheon-API-Objects.md#private-transactio

Creates a privacy group containing the specified members. Members are specified by their Orion public key.

**Parameters**

`data` - Orion public key of privacy group creator
**Parameters**

`string` - Privacy group name. Optional.
`array of data` - Array of members specified by Orion public keys

`string` - Privacy group description. Optional.
`string` - Privacy group name

`array of data` - Array of members specified by Orion public keys
`string` - Privacy group description

**Returns**

Privacy group ID

!!! example
```bash tab="curl HTTP request"
curl -X POST --data '{"jsonrpc":"2.0","method":"priv_createPrivacyGroup","params":["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=", "Group A", "Description Group A", ["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=","g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="]],"id":1}' http://127.0.0.1:8545
curl -X POST --data '{"jsonrpc":"2.0","method":"priv_createPrivacyGroup","params":[["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=","g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="], "Group A", "Description Group A"],"id":1}' http://127.0.0.1:8545
```

```bash tab="wscat WS request"
{"jsonrpc":"2.0","method":"priv_createPrivacyGroup","params":["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=", "Group A", "Description Group A", ["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=","g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="]],"id":1}
{"jsonrpc":"2.0","method":"priv_createPrivacyGroup","params":[["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=","g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="], "Group A", "Description Group A"],"id":1}
```

```json tab="JSON result"
Expand Down
11 changes: 7 additions & 4 deletions docs/Reference/web3js-eea-Methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Creates privacy group for Pantheon privacy.

[Transaction options](#options-parameter)

`name` : `string` - Name of the privacy group. Optional.

`description` : `string` - Name of the privacy group. Optional.

**Returns**

`string` : Privacy group ID
Expand All @@ -34,7 +38,6 @@ Creates privacy group for Pantheon privacy.
const createPrivacyGroup = () => {
const contractOptions = {
addresses: [orion.node1.publicKey, orion.node2.publicKey],
privateFrom: orion.node1.publicKey,
name: "Privacy Group A",
description: "Members of Group A"
};
Expand All @@ -61,8 +64,7 @@ Deletes privacy group.
```bash
const deletePrivacyGroup = givenPrivacyGroupId => {
const contractOptions = {
privacyGroupId: givenPrivacyGroupId,
privateFrom: orion.node1.publicKey
privacyGroupId: givenPrivacyGroupId
};
return web3.eea.deletePrivacyGroup(contractOptions).then(result => {
console.log(`The privacy group deleted is:`, result);
Expand Down Expand Up @@ -98,7 +100,8 @@ Finds privacy groups containing only the specified members.

## generatePrivacyGroup

Generates the privacy group ID for EEA privacy. The privacy group ID is the RLP-encoded `privateFor` and `privateFrom` keys.
Generates the privacy group ID for [EEA privacy](../Privacy/Explanation/Privacy-Groups.md#eea-compliant-privacy).
The privacy group ID is the RLP-encoded `privateFor` and `privateFrom` keys.

**Parameters**

Expand Down