Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sauron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This is still a WIP, so is the API C-lightning side. So not to be used for real.
### Run

You need to:
- have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed
- disable the default Bitcoin backend (`bcli`)
- register sauron
- provide the API endpoint you want to use
Expand Down
2 changes: 1 addition & 1 deletion sauron/art.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Art source: https://textart.io/art/kF4RP1GLcmBNgF2zVV3_JQeF/lord-of-the-rings-eye-of-the-sauron
sauron_eye = """
sauron_eye = r"""

Three::rings
for:::the::Elven-Kings
Expand Down
16 changes: 16 additions & 0 deletions sauron/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[project]
name = "sauron"
version = "0.1.0"
description = "A Bitcoin backend plugin relying on Esplora"
readme = "README.md"
requires-python = ">=3.9.2"

[dependency-groups]
dev = [
"pytest>=7.4,<9",
"pytest-xdist>=3.7,<4",
"pytest-timeout>=2.4,<3",
"pyln-testing>=24.11.1",
"pyln-client>=24.11.1",
"pyln-proto>=24.11.1",
]
2 changes: 0 additions & 2 deletions sauron/requirements.txt

This file was deleted.

15 changes: 12 additions & 3 deletions sauron/sauron.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env python3
#!/usr/bin/env -S uv run --script

# /// script
# requires-python = ">=3.9.2"
# dependencies = [
# "pyln-client>=24.11",
# "requests[socks]>=2.23.0",
# ]
# ///

import requests
import sys
import time
Expand Down Expand Up @@ -210,7 +219,7 @@ def estimatefees(plugin, **kwargs):
{"blocks": 2, "feerate": very_urgent},
{"blocks": 6, "feerate": urgent},
{"blocks": 12, "feerate": normal},
{"blocks": 144, "feerate": slow}
{"blocks": 144, "feerate": slow},
]

return {
Expand All @@ -223,7 +232,7 @@ def estimatefees(plugin, **kwargs):
"min_acceptable": slow // 2,
"max_acceptable": very_urgent * 10,
"feerate_floor": feerate_floor,
"feerates": feerates
"feerates": feerates,
}


Expand Down
Loading