Zecale - Reconciling Privacy and Scalability on Smart-Contract Chains  0.5
Reference implementation of the Zecale protocol by Clearmatics
Functions | Variables
zeth_zecale.create_nested_tx Namespace Reference

Functions

None create_nested_tx (str zeth_tx_file, str prover_config_file, str output_file)
 

Variables

 default
 
 help
 

Function Documentation

◆ create_nested_tx()

None zeth_zecale.create_nested_tx.create_nested_tx ( str  zeth_tx_file,
str  prover_config_file,
str  output_file 
)
Create a Zecale nested transaction from a zeth MixParameters object

Definition at line 28 of file create_nested_tx.py.

29  zeth_tx_file: str,
30  prover_config_file: str,
31  output_file: str) -> None:
32  """
33  Create a Zecale nested transaction from a zeth MixParameters object
34  """
35 
36  # Load prover config (which is assumed to already exist)
37  with open(prover_config_file, "r") as prover_config_f:
38  prover_config = \
39  ProverConfiguration.from_json_dict(json.load(prover_config_f))
40  zksnark = zksnark = get_zksnark_provider(prover_config.zksnark_name)
41 
42  # Read the MixParameters
43  with open(zeth_tx_file, "r") as zeth_tx_f:
44  zeth_mix_params = \
45  MixParameters.from_json_dict(zksnark, json.load(zeth_tx_f))
46 
47  # Convert to a nested transaction, and write to output file
48  nested_tx = _create_zeth_nested_tx(zeth_mix_params, 0)
49  with open(output_file, "w") as output_f:
50  json.dump(nested_tx.to_json_dict(), output_f)
51 
52 

Variable Documentation

◆ default

zeth_zecale.create_nested_tx.default

Definition at line 21 of file create_nested_tx.py.

◆ help

zeth_zecale.create_nested_tx.help

Definition at line 22 of file create_nested_tx.py.

zeth_zecale.create_nested_tx.create_nested_tx
None create_nested_tx(str zeth_tx_file, str prover_config_file, str output_file)
Definition: create_nested_tx.py:28