Skip to content

Commit

Permalink
Add AcceptXMR-Server (#39)
Browse files Browse the repository at this point in the history
* Add AcceptXMR-Server

* Dockerize AcceptXMR-Server (#45)

* Make AcceptXMR-Server configurable (#49)

* Update github actions (#76)

* Implement internal and external APIs. (#77)
  • Loading branch information
busyboredom authored Jul 4, 2024
1 parent 33ae5fd commit a4f03ed
Show file tree
Hide file tree
Showing 206 changed files with 17,153 additions and 2,002 deletions.
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[registries.crates-io]
protocol = "sparse"

[build]
rustflags = ["--cfg", "tokio_unstable"]
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example .env file. You should replace these values with your own,
# or set these environment variable some other way.

PRIVATE_VIEWKEY=ad2093a5705b9f33e6f0f0c1bc1f5f639c756cdfc168c8f2ac6127ccbdab3a03
INTERNAL_API_TOKEN=supersecrettoken
55 changes: 55 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: docker-ci

on:
push:
branches:
- 'main'
tags:
- 'acceptxmr-server-v*.*.*'
pull_request:
branches:
- '*'

env:
RELEASE: |
${{
github.event.pull_request.merged == true ||
github.ref_name == 'main' ||
github.ref_type == 'tag'
}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
busyboredom/acceptxmr
tags: |
type=match,pattern=acceptxmr-server-v(\d.\d.\d),group=1
type=match,pattern=acceptxmr-server-v(\d.\d),group=1
type=match,pattern=acceptxmr-server-v(\d),group=1
type=sha
- name: Login to DockerHub
if: ${{ env.RELEASE }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ env.RELEASE }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml → .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: CI
name: rust-ci

on:
push:
branches: [ main ]
branches:
- 'main'
tags:
- '*'
pull_request:
branches: [ main ]
branches:
- '*'

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '-D warnings'
Expand All @@ -30,8 +36,7 @@ jobs:
strategy:
matrix:
rust: [
1.68.0,
stable,
1.76.0,
nightly
]

Expand All @@ -53,8 +58,7 @@ jobs:
strategy:
matrix:
rust: [
1.68.0,
stable,
1.76.0,
nightly
]

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/target
AcceptXMR_DB
Cargo.lock
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ Book](https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field)

## [Unreleased]

### Added
- A batteries-included payment gateway built around the core library.
- `get_ids()` method to invoice stores.
- `is_empty()` method to invoice stores.
- `is_paid()` method to `PaymentGateway`.
- `get_invoice_ids()` method to `PaymentGateway`.
- `build_with_mock_daemon()` method to `PaymentGateway`.

### Changed
- Update MSRV to 1.68
- Update MSRV to 1.76
- Replace invoice store `try_iter()` method with `try_for_each()`.

### Fixed
- `is_expired` returning false when invoice is awaiting configrmation despite it
being expired.

## [0.13.0] - 2023-07-23

Expand Down
Loading

0 comments on commit a4f03ed

Please sign in to comment.