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 locally or using Buf Studio 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.

In addition to ordinary queries, like Balances, which gets a user’s balances by account, the RPC also contains utility methods that allow computations involving cryptography. For instance, the AddressByIndex request computes a public address from an account index, and the IndexByAddress 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.

This allows authorization of a TransactionPlan, as described in the next section.