priv_createPrivacyGroup parameters updated (#1796)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
MadelineMurray 5 years ago committed by GitHub
parent a6cb8ad985
commit 4ebba6e1b8
  1. 12
      docs/Reference/Pantheon-API-Methods.md
  2. 11
      docs/Reference/web3js-eea-Methods.md

@ -3947,13 +3947,11 @@ Creates a privacy group containing the specified members. Members are specified
**Parameters**
`data` - Orion public key of privacy group creator
`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**
@ -3961,11 +3959,11 @@ 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"

@ -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
@ -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"
};
@ -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);
@ -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**

Loading…
Cancel
Save