Versioning

Library, relayer and prover version information

Get the Library Version

getLibraryVersion(): string

Returns

Version string as defined in the package.json file

Example

console.log(`You are using client library v${zkClient.getLibraryVersion()}`);
// output: You are using client library v5.4.0

Get the Relayer Version

async getRelayerVersion(): Promise<ServiceVersion>

Returns

Promise returns ServiceVersion: current relayer version

Example

const relayerVer = await zkClient.getRelayerVersion();
console.log(`We are communicating with relayer ${relayerVer.ref}`);
// output: We are communicating with relayer v4.3.0

Get the Delegated Prover Version

async getProverVersion(): Promise<ServiceVersion>

The method will throw an InternalError if the delegated prover isn't configured for the current pool during client initialization.

Returns

Promise returns ServiceVersion: current delegated prover version

Example

try {
    const proverVer = await zkClient.getProverVersion();
    console.log(`Delegated prover ${relayerVer.ref}`);
} catch (err) {
    console.log('Delegated prover is unavailable');
}
// output: Delegated prover v0.1.0

Last updated