Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Functions | Variables
zeth.cli.zeth_sync Namespace Reference

Functions

None sync (Context ctx, Optional[str] wait_tx, Optional[int] batch_size)
 

Variables

 help
 
 type
 
 int
 

Function Documentation

◆ sync()

None zeth.cli.zeth_sync.sync ( Context  ctx,
Optional[str]  wait_tx,
Optional[int batch_size 
)
Attempt to retrieve new notes for the key in <key-file>

Definition at line 16 of file zeth_sync.py.

16 def sync(ctx: Context, wait_tx: Optional[str], batch_size: Optional[int]) -> None:
17  """
18  Attempt to retrieve new notes for the key in <key-file>
19  """
20  client_ctx = ctx.obj
21  web3 = open_web3_from_ctx(client_ctx)
22  mixer_desc = load_mixer_description_from_ctx(client_ctx)
23  mixer_instance = mixer_desc.mixer.instantiate(web3)
24  js_secret = load_zeth_address_secret(client_ctx)
25  wallet = open_wallet(mixer_instance, js_secret, client_ctx)
26  prover_client = create_prover_client(client_ctx)
27  pp = prover_client.get_configuration().pairing_parameters
28  chain_block_number = do_sync(
29  web3, wallet, pp, wait_tx, zeth_note_short_print, batch_size)
30  print(f"SYNCED to {chain_block_number}")
Here is the call graph for this function:

Variable Documentation

◆ help

zeth.cli.zeth_sync.help

Definition at line 13 of file zeth_sync.py.

◆ int

zeth.cli.zeth_sync.int

Definition at line 14 of file zeth_sync.py.

◆ type

zeth.cli.zeth_sync.type

Definition at line 14 of file zeth_sync.py.

zeth.cli.utils.open_web3_from_ctx
Any open_web3_from_ctx(ClientConfig ctx)
Definition: utils.py:135
zeth.cli.utils.create_prover_client
ProverClient create_prover_client(ClientConfig ctx)
Definition: utils.py:373
zeth.cli.utils.open_wallet
Wallet open_wallet(Any mixer_instance, ZethAddressPriv js_secret, ClientConfig ctx)
Definition: utils.py:275
zeth.cli.utils.load_mixer_description_from_ctx
MixerDescription load_mixer_description_from_ctx(ClientConfig ctx)
Definition: utils.py:220
zeth.cli.utils.load_zeth_address_secret
ZethAddressPriv load_zeth_address_secret(ClientConfig ctx)
Definition: utils.py:247
zeth.cli.utils.do_sync
int do_sync(Any web3, Wallet wallet, PairingParameters pp, Optional[str] wait_tx, Optional[Callable[[ZethNoteDescription], None]] callback=None, Optional[int] batch_size=None)
Definition: utils.py:289
zeth.cli.zeth_sync.sync
None sync(Context ctx, Optional[str] wait_tx, Optional[int] batch_size)
Definition: zeth_sync.py:16