token: add spending-condition inspection helpers and token_secrets() (#1124)

* token: add Token::token_secrets() and spending-condition helpers

- New helpers on Token that do not require mint keysets:
  - spending_conditions()
  - p2pk_pubkeys()
  - p2pk_refund_pubkeys()
  - htlc_hashes()
  - locktimes()
- Introduce token_secrets() to unify V3/V4 proof traversal and avoid duplication
- Bypass short->long keyset-id mapping since only Secret is needed for conditions
- Use &Secret for TryFrom to fix compile error
This commit is contained in:
lollerfirst
2025-09-26 21:56:01 +02:00
committed by GitHub
parent 676463f730
commit 6d0003a4fc
8 changed files with 407 additions and 98 deletions

View File

@@ -335,10 +335,9 @@ mod test {
let db_url = format!("{db_url} schema={test_id}");
let db = MintPgDatabase::new(db_url.as_str())
MintPgDatabase::new(db_url.as_str())
.await
.expect("database");
db
.expect("database")
}
mint_db_test!(provide_db);