Zecale - Reconciling Privacy and Scalability on Smart-Contract Chains  0.5
Reference implementation of the Zecale protocol by Clearmatics
zecale_nested_verification_key_hash.py
Go to the documentation of this file.
1 # Copyright (c) 2015-2022 Clearmatics Technologies Ltd
2 #
3 # SPDX-License-Identifier: LGPL-3.0+
4 
5 from zecale.cli.command_context import CommandContext
6 from zecale.cli.utils import load_verification_key
7 from click import command, argument, Context, pass_context
8 
9 
10 @command()
11 @argument("verification_key_file")
12 @pass_context
14  ctx: Context,
15  verification_key_file: str) -> None:
16  """
17  Query the aggregator-server for the hash of a specific nested verification
18  key. The verification key does not have to be registered.
19  """
20  cmd_ctx: CommandContext = ctx.obj
21  snark = cmd_ctx.get_nested_snark()
22 
23  # Load key and call the GetNestedVerificationKeyHash method
24  vk = load_verification_key(snark, verification_key_file)
25  aggregator_client = cmd_ctx.get_aggregator_client()
26  vk_hash_hex = aggregator_client.get_nested_verification_key_hash(snark, vk)
27  print(vk_hash_hex)
zecale.cli.utils
Definition: utils.py:1
zecale.cli.zecale_nested_verification_key_hash.nested_verification_key_hash
None nested_verification_key_hash(Context ctx, str verification_key_file)
Definition: zecale_nested_verification_key_hash.py:13
zecale.cli.utils.load_verification_key
IVerificationKey load_verification_key(IZKSnarkProvider zksnark, str vk_file)
Definition: utils.py:11
zecale.cli.command_context
Definition: command_context.py:1