Init
There are several ways to init LiteClient
:
From constructor
Provide to constructor Liteserver's ip (in string ipv4 format), port and base64-encoded public key, trust level and init_block
if trust_level
is zero. Also you can provide tl_schemas_path
if you don't want to use ones from library files.
From config
Provide to LiteClient
's from_config
method config as dictionary, liteserver index you want to use and trust level (by default its 2).
Use one of from_mainnet_config
and from_testnet_config
methods. Specify liteserver index you want to use and trust level (by default its 0).
After initialization you need to call connect
asynchronous method to initialize connection and sync blocks.
Last updated