Making RPC requests
pclientd
exposes a GRPC and GRPC-web endpoint at its bind_addr
. Several
services are available.
To interactively explore requests and responses, try running GRPCUI (opens in a new tab) locally or
using Buf Studio (opens in a new tab) in the browser. Buf Studio has a nicer user
interface but does not (currently) support streaming requests. The Buf Studio
link is preconfigured to make requests against a local pclientd
instance with
the default bind_addr
, but can be aimed at any endpoint.
Accessing public chain state
pclientd
has an integrated GRPC proxy, routing requests about public chain
state to the fullnode it's connected to.
Documentation on these RPCs is available on Buf.build; follow the links in Buf Studio for more information.
Accessing private chain state
Access to a user's private state is provided by the ViewService
RPC (opens in a new tab).
In addition to ordinary queries, like
Balances
(opens in a new tab),
which gets a user's balances by account, the RPC also contains utility methods
that allow computations involving cryptography. For instance, the
AddressByIndex
(opens in a new tab)
request computes a public address from an account index, and the
IndexByAddress
(opens in a new tab)
request decrypts an address to its private index.
Finally, the view service can plan and build transactions, as described in the next section.
Requesting transaction authorization
If pclientd
was configured in custody mode, it exposes a CustodyService
(opens in a new tab).
This allows authorization of a TransactionPlan
, as described in the next section.