A Go implementation of a light client, able to ingest Algorand state proofs and transactions.
This implementation contains both code comprising the light client itself and encoded assets needed to demonstrate the light client's functionalities.
Assets include data required to initialize the Oracle, state proof data to advance the Oracle's state and data required to verify a transaction using the Oracle's state. All assets were generated using a private Algorand network.
The code is intended to be used as a guide to building light clients.
- main.go - read in its entirety for a general overview of the light client.
- oracle.go - start from the commentary on the Oracle struct, followed by the commentary on AdvanceState. Branch out as needed.
- transactionVerifier.go - start from the commentary on verifyTransaction. Branch out as needed.
Building the light client using
go build
and running the resulting binary will cause the light client to operate on the assets in encodedassets. An Oracle will be initialized using the data in the genesis folder, its state will advance using the data in the state proof folder and a transaction will be verified using the data in the transaction verification folder.