State channel clients need to run in trusted execution environments because they contain functionality to automatically sign on behalf of an end user. Decentralized applications then need to be able to make hooked calls to a user’s client similarly to how existing hooked Ethereum rpc calls occur.
In other words, state channel clients need to behave similarly to web3. They should be able to be instantiated both within the wallet by passing in signer functionality or instantiated within decentralized applications using a ChannelProvider.
The goal of this doc is to specify a set of RPC methods for channels which can be implemented in a standardized way by wallets.
Background
Resources
Provider Specification
Constructor
channel.constructor.name;
> 'ChannelProvider'
JSON RPC Methods
⛓ On-Chain Methods
✅ chan_deposit
✅ chan_withdraw