# Light Client/REST
und binary comes packaged with a full REST capable server, from which the majority of
und query ... and
und tx ... commands can also be served.
The REST server is generally useful for third party services such as
wallets (opens new window) and
block explorers (opens new window). It interacts with, and can be used
und RPC interface.
Before continuing, ensure you have gone through the following docs:
# Running a light client
The Light Client can be started by setting the configuring options in
app.toml as follows:
[api] enable = true swagger = true address = "tcp://0.0.0.0:1317"
Then running the
und start command as normal
This will start the light client on your local host listening on
localhost:1317, and use the node
126.96.36.199:26657 to source its data and interface with the
(e.g. broadcast any transactions).
setting the listen address IP to
tcp://0.0.0.0:1317 will allow any host to connect to your REST server.
Once running, you can visit http://localhost:1317/swagger/ (opens new window) to view all the REST endpoints available.
# Running an Archive RPC node
Light Clients are more effective when interfacing with full nodes running in "archive" mode. Nodes running in archive mode do not prune any sync data, and keep a complete transaction event history.
The quickest way to get up and running with an archive node is to configure the pruning option in
pruning = "nothing"
Then, start the full node as usual using:
Your light client can then be configured to connect to it via the
--node flag by passing
tcp://127.0.0.1:26657 to it.