aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-28 04:14:07 -0700
committerAdam Soltys <[email protected]>2026-06-28 04:14:07 -0700
commit76daca707a7b9cb9aafab1ceb8999ec3c708a63d (patch)
tree461014db1815482c101561a316f0df50bb957c91 /src/api.js
parenta6e6083e4c758a9c07dc7a4ea38f880c561cb365 (diff)
downloadcoinosv3-76daca707a7b9cb9aafab1ceb8999ec3c708a63d.tar.gz
coinosv3-76daca707a7b9cb9aafab1ceb8999ec3c708a63d.zip
Spend SP coins like any coin — confirmed-only, and able to fund SP payments
Two things: - Only confirmed SP coins enter the spend pool. Unconfirmed ones are excluded (the sender's tx could be replaced, invalidating our spend) — matching the spendable headline, which already counted confirmed-only. - SP→SP sending: our own silent-payment coins can now fund a payment TO an sp1 address (previously excluded). _applySilentPayments includes SP inputs with their key d = spend_priv + t_k, and silentPaymentScripts negates a taproot input's key when it gives odd Y, per BIP-352 (so the sender's A = a·G matches what the indexer reconstructs). signing was already SP-aware. Validated: BIP-352 sending vectors pass for all clean key-path-taproot-input cases (the remaining vector failures are NUMS script-path / labels / uncompressed keys — input types the wallet never spends). End-to-end on regtest: an SP coin funds a payment to another sp address, testmempoolaccept passes, and the recipient scans and finds it. Note: silentPaymentScripts derives input_hash from the eligible inputs it's given, which is correct because the wallet only ever spends all-eligible coins (P2WPKH + key-path SP); it isn't a general-purpose sender for txs with ineligible inputs. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/api.js')
0 files changed, 0 insertions, 0 deletions