Initializing the client
Instantiating the client object
Before interacting with the privacy pool you must instantiate the ZkBobClient
object. Use the static factory method to create a ZkBobClient
instance. Using a constructor is not supported.
Parameters
config
- the client configuration which defines available pools, associated chains and other parameters.
activePoolAlias
- the name of the pool which should be activated during instance creation. The names of the pools (aka aliases) are defined in the client configuration. The client should always have an active pool.
callback
- is an optional parameter of the type ClientStateCallback which can be helpful to monitor the current library state. You can set it anytime by setting the stateCallback
client property.
Returns
An instance of the client in a Promise
Example
The client configuration clientConfig
defined in this example.
Last updated