API

Kchannels is a backend product, and so the Kchannels API is the primary way to interface with the system.

The API is designed to feel familiar to Ethereum developers. For this reason, it is built on top of JSON-RPC--the same spec used for the standard Ethereum API as implemented by software like Geth. And because, from a client perspective, the interface to a Layer2 system is usually fairly simple, there is only a small set of JSON-RPC methods that drive the backend.

Since Kchannels is non-custodial and trust-minimized, and since users control their own keys, clients are typically expected to perform important computation--such as validating API responses and signing data--in addition to driving the API. This is desirable and indeed unavoidable in the new Web3 context. Developers who write libraries wrapping the API must make sure to perform all the necessary security checks on the client side.