Expand description
Liteserver read client for ton-net.
LiteClient speaks the liteserver query protocol over an ADNL connection and
decodes the read responses into the domain types this crate defines. Nothing here
checks anything: a read comes back as a ServerReported value, and the proof
bytes travel with it for the layer above to verify.
LiteClient::masterchain_info reads the current masterchain head,
LiteClient::account_state reads an account’s raw state at a given block, and
LiteClient::block_proof asks for the links between two blocks. The facade above
this crate wraps a LiteClient over a TCP transport and adds address parsing and a
bundled config.
This crate maps the wire types from ton-net-tl into cleaner domain types: block sequence numbers become unsigned, and a response keeps only what a reader needs. The block-proof types are the exception and are re-exported as they come off the wire, because their reader is a verifier rather than a person. It is an internal crate of the ton-net client.
Structs§
- Account
Id - An account identifier: a workchain and a 256-bit account id.
- Account
State - An account’s state as a liteserver reports it.
- Block
IdExt - A full block identifier: the id and its shard coordinates plus hashes.
- Lite
Client - A read client for one liteserver.
- Masterchain
Info - A masterchain head as a liteserver reports it.
- Partial
Block Proof - The block-proof types
LiteClient::block_proofanswers with, re-exported from ton-net-tl so a caller need not name that crate to read a chain. TheliteServer.partialBlockProofresponse: as much of a proof chain as the server chose to send at once. - Server
Reported - A value a liteserver returned without a checked proof.
- Signature
- The block-proof types
LiteClient::block_proofanswers with, re-exported from ton-net-tl so a caller need not name that crate to read a chain. One validator’s signature, in theliteServer.signaturebare form.
Enums§
- Block
Link - The block-proof types
LiteClient::block_proofanswers with, re-exported from ton-net-tl so a caller need not name that crate to read a chain. AliteServer.BlockLink: one step of a block proof chain. - Lite
Error - A failure reading from a liteserver.
- Signature
Set - The block-proof types
LiteClient::block_proofanswers with, re-exported from ton-net-tl so a caller need not name that crate to read a chain. AliteServer.SignatureSet: what a set of validator signatures covers.