This project implements a Substrate backend for our go-perun framework. It enables go-perun applications to create state-channels on Polkadot by connecting to the Perun Pallet.
channel/
channel interface implementationspallet/
Perun Pallet specific code
wallet/
wallet interface implementationssr25519/
Schnorrkel-Ristretto Ed25519 wallet
pkg/
3rd-party helpersclient/
helper functions for setting up a go-perun clientwallet/sr25519/test/accounts.json
config for testing
If you want to locally develop with this project:
- Clone the repo:
git clone https://github.com/perun-network/perun-polkadot-backend
cd perun-polkadot-backend
- Start a local Substrate node with the Perun Pallet installed. See the polkadot node repository for more details.
docker run --rm -p 9944:9944 ghcr.io/perun-network/polkadot-test-node:0.4.0
- Run the tests. This step needs a working Go distribution, see go.mod for the required version.
go test -p 1 ./...
The tests take a while but should eventually finish successfully. The long testing time results from the block-time of the node. The -p 1
flag is important, since the tests otherwise are started in parallel and mess up the account nonce.
We prepared a demo CLI node to play around with payment channels on substrate chains.
Highly recommended you to check it out 👍
The development of this project is supported by the Web3 Foundation through the Grants Program.
The development of the go-perun library is supported by the German Ministry of Education and Science (BMBF) through a Startup Secure grant.
This software is still under development. The authors take no responsibility for any loss of digital assets or other damage caused by the use of it.
Copyright 2022 PolyCrypt GmbH.
Use of the source code is governed by the Apache 2.0 license that can be found in the LICENSE file.