GithubHelp home page GithubHelp logo

perun-network / perun-stellar-backend Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 549 KB

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

Home Page: https://perun.network/

License: Apache License 2.0

Go 98.75% Dockerfile 0.26% Shell 0.99%
blockchain payment-channel perun stellar

perun-stellar-backend's Introduction

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.

perun-stellar-backend's People

Contributors

iljabvh avatar janbormet avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.