Switching Between Pools
In the multi-pool configurations
Last updated
Was this helpful?
In the multi-pool configurations
Last updated
Was this helpful?
The ZkBobClient
object always operate on the concrete pool. There are no cases when the pool is undefined. All pools are named by aliases as specified in the . To obtain the name of the current pool use the following method:
String alias of the currently activated pool (as defined in the initial config).
You also can get the list of pools specified in the client configuration.
Array of the all supported pool aliases (as defined in initial config).
If you initialized the ZkBobClient
object with a multipool configuration you can simply switch between pools using the following routine:
poolAlias
: pool's name as defined in the client configuration.
birthindex
: optional parameter only applicable in full mode (when account is attached). It equals the index within the Merkle tree when the account was created. There must be no entries belonging to the account below this index. Always use undefined
if you don't know the exact index.
Double check that birthindex is correct. If you switch to another pool with attached account and incorrect birthindex
, the input transfers sent to the account before that index can be lost without the ability to recover.
No value is returned but you must wait until the switch is completed before the next library interaction.