Skip to main content
The Cosmos object exposes a rest(network) method that allows you to call RPC methods exposed through HTTPS. RPC endpoints are mapped directly to the REST API object structure:

Virtual Typing

The REST API is built on top of my @kiruse/restful library which leverages a “virtual typing” system. This means that even if an endpoint is not defined in the Apophis SDK, you can still call it using the same pattern as above. Simply refer to your chain’s OpenAPI specification and pass in the appropriate parameters.