Skip to content

Commit

Permalink
priv_createPrivacyGroup parameters updated (PegaSysEng#1796)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadelineMurray committed Jul 31, 2019
1 parent ddbe840 commit 1457808
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
14 changes: 6 additions & 8 deletions docs/Reference/Pantheon-API-Methods.md
Expand Up @@ -3918,27 +3918,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
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

0 comments on commit 1457808

Please sign in to comment.