Open MatthiasLohr opened 3 years ago
Hi @MatthiasLohr
Yes, it is still being actively developed. In the past couple of months, we were focusing on adding features to our core library (go-perun) used by perun-node. That is why you see less activity in this repository.
App channels are already supported by the core package (session). However, whether you want to use the App channels directly using our core library (go-perun) or using our node (perun-node) would depend on your use case.
perun-node can be used as library (Go API) or command line program (accessed via remote API like gRPC), which on top of the go-perun, provides a session for managing
Additionaly it provides the option to create app specific APIs for convenience (in Go, gRPC or any other protocol of your choice).
Adding new channel apps
To add a new app,
go-perun/apps
.An example for adding a simple tic tac toe app can be found in the go-samples repository.
Using the app with perun-node
As described above, perun-node provides a set of functionalities and the option to add convenience APIs specific to your App. Currently, there is no tutorial which describes how to add these APIs. But, you could use the payment API as an reference, because in perun-node payment API is also treated as an App.
Implementing Go API: In perun-node/app package, you will have to create a new package for your app. In that, you will have to write thin wrappers which translate the generic state channel data into your app specific data and vice verse.
Implementing gRPC API: This is just another abstraction, which makes the Go API accessible via gRPC or any other remote interface of your choice. For these, you need to add gRPC adapter for your Go API.
To add gRPC wrappers,
.proto
file. Eg: Proto file for payment API.Now, you should be able to use the gRPC API.
Note: You can also add these app specific packages in a separate repository and then use it from there.
Examples for using the gRPC API: There are multiple examples, that showcase how to use the gRPC client stubs. The shortest one is in the payment_test. You can also find a more comprehensive example in the reference implementation for using client stubs: perunnodecli.
Feel free to ask if you have more questions !
Hi,
what is the current status of this project? Is development still in progress? Any ETA, when app channels will be supported? I'm about to create an app using state channels and using an gRPC API instead of using directly the Go API would be highly desirable in my opinion.
Best regards Matthias