Methods
(inner) call(privacyGroupId, call, blockNumber) → {Data}
Invokes a private contract function locally and does not change the privacy group state.
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | privacy group ID |
call |
Object | transaction call object |
blockNumber |
String | integer representing a block number or one of the string tags latest, earliest, or pending |
Returns:
result return value of the executed contract
- Type
- Data
(inner) createPrivacyGroup(options) → {String}
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | request options object with the following fields: Properties
|
Returns:
privacy group ID
- Type
- String
(inner) debugGetStateRoot(privacyGroupId, blockNumber) → {String}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | 32-byte privacy Group ID |
blockNumber |
String | Number |
Returns:
32-byte state root
- Type
- String
(inner) deletePrivacyGroup(privacyGroupId) → {String}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | privacy group ID |
Returns:
deleted privacy group ID
- Type
- String
(inner) distributeRawTransaction(transaction) → {String}
Parameters:
Name | Type | Description |
---|---|---|
transaction |
String | signed RLP-encoded private transaction |
Returns:
32-byte enclave key
- Type
- String
(inner) findPrivacyGroup(members) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
members |
Array.<String> | members specified by Enclave public keys |
Returns:
privacy group objects
- Type
- Array.<Object>
(inner) generateAndDistributeRawTransaction(options) → {Promise.<T>}
Generate and distribute the Raw transaction to the Besu node using the priv_distributeRawTransaction
JSON-RPC call
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Map to send a raw transaction to besu Properties
|
Returns:
- Type
- Promise.<T>
(inner) generateAndSendRawTransaction(options) → {Promise.<T>}
Generate and send the Raw transaction to the Besu node using the eea_sendRawTransaction
JSON-RPC call
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Map to send a raw transaction to besu Properties
|
Returns:
- Type
- Promise.<T>
(inner) getCode(privacyGroupId, address, blockNumber) → {String}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | 32-byte privacy Group ID |
address |
String | 20-byte contract address |
blockNumber |
String | Number |
Returns:
code stored at the specified address
- Type
- String
(inner) getEeaTransactionCount(address, sender, recipients) → {String}
Parameters:
Name | Type | Description |
---|---|---|
address |
String | account address |
sender |
String | base64-encoded Enclave address of the sender |
recipients |
Array.<String> | base64-encoded Enclave addresses of recipients |
Returns:
integer representing the number of private transactions sent from the address to the specified group of sender and recipients
- Type
- String
(inner) getFilterChanges(privacyGroupId, filterId) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | 32-byte privacy Group ID |
filterId |
String | filter ID |
Returns:
list of log objects, or an empty list if nothing has changed since the last poll
- Type
- Array.<Object>
(inner) getFilterLogs(privacyGroupId, filterId) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | 32-byte privacy Group ID |
filterId |
String | filter ID |
Returns:
list of log objects
- Type
- Array.<Object>
(inner) getLogs(privacyGroupId, filterOptions) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | 32-byte privacy Group ID |
filterOptions |
Object | filter options object |
Returns:
list of log objects
- Type
- Array.<Object>
(inner) getPrivacyPrecompileAddress() → {String}
Returns:
address of the privacy precompile
- Type
- String
(inner) getPrivateTransaction(transaction) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
transaction |
String | transaction hash returned by eea_sendRawTransaction or eea_sendTransaction. |
Returns:
private transaction object, or null if not a participant in the private transaction
- Type
- Object
(inner) getTransactionCount(address, privacyGroupId) → {String}
Parameters:
Name | Type | Description |
---|---|---|
address |
String | account address |
privacyGroupId |
String | privacy group ID |
Returns:
integer representing the number of private transactions sent from the address to the specified privacy group
- Type
- String
(inner) getTransactionReceipt(transaction) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
transaction |
String | 32-byte hash of a transaction |
Returns:
private Transaction receipt object, or null if no receipt found
- Type
- Object
(inner) newFilter(privacyGroupId, filterOptions) → {String}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | 32-byte privacy Group ID |
filterOptions |
Object | filter options object |
Returns:
filter ID
- Type
- String
(inner) sendRawTransaction(transaction) → {String}
Parameters:
Name | Type | Description |
---|---|---|
transaction |
String | signed RLP-encoded private transaction |
Returns:
32-byte transaction hash of the Privacy Marker Transaction
- Type
- String
(inner) subscribe(privacyGroupId, type, filter) → {Sting}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | |
type |
String | |
filter |
Object |
Returns:
Subscription ID
- Type
- Sting
(inner) subscribeWithPooling(privacyGroupId, filter, callback) → {PrivateSubscription}
Subscribe to new logs matching a filter
If the provider supports subscriptions, it uses priv_subscribe
, otherwise
it uses polling and priv_getFilterChanges
to get new logs. Returns an
error to the callback if there is a problem subscribing or creating the filter.
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
string | |
filter |
* | |
callback |
function | returns the filter/subscription ID, or an error |
Returns:
a subscription object that manages the lifecycle of the filter or subscription
- Type
- PrivateSubscription
(inner) uninstallFilter(privacyGroupId, filterOptions) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | 32-byte privacy Group ID |
filterOptions |
Object | filter options object |
Returns:
indicates if the filter is successfully uninstalled
- Type
- Boolean
(inner) unsubscribe(privacyGroupId, subscriptionId) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
privacyGroupId |
String | |
subscriptionId |
String |
Returns:
true if subscription successfully unsubscribed; otherwise, returns an error.
- Type
- Boolean
(inner) waitForTransactionReceipt(txHash, retriesopt, delayopt) → {Promise.<T>}
Get the private transaction Receipt with waiting until the receipt is ready.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
txHash |
string | Transaction Hash of the marker transaction |
||
retries |
int |
<optional> |
300
|
Number of retries to be made to get the private marker transaction receipt |
delay |
int |
<optional> |
1000
|
The delay between the retries in milliseconds |
Returns:
- Type
- Promise.<T>