Skip to content

Peer-to-peer payment channels on the Stellar blockchain, using Soroban Smart Contracts

License

Notifications You must be signed in to change notification settings

perun-network/perun-stellar-backend

Repository files navigation

Perun

Perun Stellar backend

This repository contains the Stellar backend for the go-perun channel library. It provides the necessary components to run our secure peer-to-peer Perun Payment Channels on the Stellar blockchain, using a Soroban smart contract implementation. The payment channel implementation connects our Perun state machine with the Perun contract, which implements the Perun Payment Channel logic on the Stellar blockchain. To connect to the Stellar blockchain, we use the Horizon client service of the Stellar Go SDK, which is located here.

This project is financed through the Stellar Community Fund grants program.

In the following sections, we will describe how to run our Payment Channels on a local instance of the Stellar blockchain.

  1. Clone this repository:
git clone https://github.com/perun-network/perun-stellar-backend
cd perun-stellar-backend
  1. Running the payment channel unit tests:

To run the unit tests only, you can use the following command:

go test ./...
  1. Running the payment channel tests, including the integration tests:

The integration tests require running a local Stellar blockchain, a Horizon client and a Soroban RPC server. The binaries are packaged in a docker image.

To install the docker image, you need to download and build it first, using the build.sh script in testdata/docker:

./testdata/docker/build.sh

Now you can run the docker image with

./quickstart.sh standalone

The initialization takes a few seconds. Afterwards, you can run the tests using the following command:

go test -tags=integration ./...

Note that this backend is customized to run on a local Stellar blockchain (standalone), but can be easily adapted to run on a public blockchain.

Payment Channel Demo

A demonstrator of Perun payment channels on the Stellar blockchain can be found here.

Copyright

Copyright 2024 PolyCrypt GmbH. Use of the source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

About

Peer-to-peer payment channels on the Stellar blockchain, using Soroban Smart Contracts

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages