Integrate two-phase on-chain purchase recovery

This commit is contained in:
archipelago
2026-10-07 07:49:02 -04:00
parent 558f097fd6
commit 6547ae05fa
18 changed files with 6084 additions and 113 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ pub(crate) struct Binding {
pub price_sats: u64,
}
impl Binding {
fn validate(&self) -> Result<()> {
pub(crate) fn validate(&self) -> Result<()> {
anyhow::ensure!(
uuid::Uuid::parse_str(&self.id)?.to_string() == self.id,
"Invalid invoice operation"
@@ -61,7 +61,7 @@ pub(crate) struct RetainedFile {
pub mime_type: String,
}
impl RetainedFile {
fn validate(&self) -> Result<()> {
pub(crate) fn validate(&self) -> Result<()> {
anyhow::ensure!(
self.sha256.len() == 64
&& self.sha256.bytes().all(|b| b.is_ascii_hexdigit())