add license header to files; update readme disclaimer (#368)

This commit is contained in:
noot
2023-04-04 13:12:12 -04:00
committed by GitHub
parent aa70b55a5c
commit b26228805c
205 changed files with 619 additions and 5 deletions

View File

@@ -2,10 +2,6 @@
This is a WIP implementation of ETH-XMR atomic swaps, currently in the pre-production development phase. It currently consists of `swapd` and `swapcli` binaries, the swap daemon and swap CLI tool respectively, which allow for peers to discover each other over the network, query peers for their current available offers, and the ability to make and take swap offers and perform the swap protocol. The `swapd` program has a JSON-RPC endpoint which the user can use to interact with it. `swapcli` is a command-line utility that interacts with `swapd` by performing RPC calls.
## Disclaimer
**This code is unaudited and under active development and should not be used on mainnet or any networks that hold monetary value!!!**
## Protocol
Please see the [protocol documentation](docs/protocol.md) for how it works.
@@ -32,7 +28,7 @@ The swap process comes with a HTTP JSON-RPC API as well as a Websockets API. You
## Contributions
If you'd like to contribute, feel free to fork the repo and make a pull request. Please make sure the CI is passing - you can run `make build`, `make lint`, and `make test` to make sure the checks pass locally.
If you'd like to contribute, feel free to fork the repo and make a pull request. Please make sure the CI is passing - you can run `make build`, `make lint`, and `make test` to make sure the checks pass locally. Please note that any contributions you make will be licensed under LGPLv3.
## Contact
@@ -43,3 +39,9 @@ If you'd like to contribute, feel free to fork the repo and make a pull request.
The work on this project has been funded previously by community grants. It is currently not funded; if you'd like to donate, you can do so at the following address:
- XMR `8AYdE4Tzq3rQYh7QNHfHz8HqcgT9kcTcHMcRHL1LhVtqYwah27zwPYGdesBgK5PATvGBAd4BC1t2NfrqKQqDguybQrC1tZb`
- ETH `0x39D3b8cc9D08fD83360dDaCFe054b7D6e7f2cA08`
## GPLv3 Disclaimer
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package cliutil provides utility functions intended for sharing by the main packages of multiple executables.
package cliutil

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package cliutil
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package main
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package main provides the entrypoint of swapcli, an executable for interacting with a
// local swapd instance from the command line.
package main

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package main
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package main
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package main provides the entrypoint of the swapd executable, a daemon that
// manages atomic swaps between monero and ethereum assets.
package main

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package main
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package main
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package main
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package main
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package main provides the entrypoint of swaptester, an executable used for
// automatically testing multiple swaps.
package main

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package coins provides types, conversions and exchange calculations for dealing
// with cryptocurrency coin and ERC20 token representations.
package coins

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
//go:build !prod
package coins

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package coins
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package common
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package common
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package common is for miscellaneous constants, types and interfaces used by many packages.
package common

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package common
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package common
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package common
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package rpctypes
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package rpctypes provides the serialized types for queries and responses shared by
// swapd's JSON-RPC server and client-side libraries.
package rpctypes

View File

@@ -1 +1,4 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package rpctypes

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package types
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package types
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package types
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package types
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package types
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package types is for types that are shared by multiple packages
package types

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package types
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package common
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package common
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package vjson
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package vjson or "validated JSON" provides additional validation, configured
// via annotations, on structures as they are Marshaled or Unmarshalled to/from
// JSON data.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package crypto is for cryptographic code used by both Monero and Ethereum.
// Chain specific crypto is in subpackages.
package crypto

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
// MarshalText serializes the Monero Address type with some extra validation.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package mcrypto is for types and libraries that deal with Monero keys, addresses and
// signing.
package mcrypto

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package mcrypto
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package secp256k1 contains methods and types for working with Ethereum and possibly other
// cryptocurrency keys that use the secp256k1 elliptic curve.
package secp256k1

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package secp256k1
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package daemon is responsible for assembling, running and cleanly shutting
// down the swap daemon (swapd) and its numerous subcomponents.
package daemon

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package daemon
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
//go:build !prod
package daemon

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package db implements the APIs for interacting with our disk persisted key-value store.
package db

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package db
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package db
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package db
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package db
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package dleq provides a sub-api built on top of the go-dleq package for our atomic
// swaps. The API allows you to verify that a Monero public spend key on the ed25519 curve
// have the same discrete logarithm (same shared secret) as a public key on the secp256k1

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package dleq
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package dleq
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package block
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package block
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package block
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package block contains ethereum helper methods that center around blocks, like waiting
// for a certain block timestamp, waiting for a transaction to be mined in a block, and
// extracting an error for a transaction from the block that mined it.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package block
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package extethclient provides libraries for interacting with an ethereum node
// using a specific private key.
package extethclient

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package extethclient
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
//go:build !prod
package extethclient

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package contracts is for go bindings generated from Solidity contracts as well as
// some utility functions for working with the contracts.
package contracts

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package contracts
import (

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
// Package watcher provides tools to track events emitted from ethereum contracts.
package watcher

View File

@@ -1,3 +1,6 @@
// Copyright 2023 Athanor Labs (ON)
// SPDX-License-Identifier: LGPL-3.0-only
package monero
import (

Some files were not shown because too many files have changed in this diff Show More