RPC Client
Most of the interactions with Substrate network is made through RPC interface.
Basic RPC interface is declared this way:
So, basically you can only send requests and receive them. But there are two ways:
Send some request which you can instantiate using next class:
Simply tell the method of RPC, and provide already predecoded params in JSON.
To send a request you need to run it like that:
You will receive both error and result as nullable. But at least one of them should exist unless you get a real nullable response, like if you want to get data about non-existing account. Error is combination of error code and message. And result is encoded json element. Feel free to try decoding this to your desired object.
Send the request using builder:
Last updated