mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
feat(cli): zap --with <ndebit> settles the invoice via CLINK debit
amy zap printed the invoice but never paid it. With --with <ndebit> it now settles the fetched BOLT-11 in-place through a CLINK debit pointer (kind-21002, reusing DebitCommands.settle), mirroring how the app routes a zap through its default payment source. Works for both single-recipient (zap user) and split zaps (zap event) — each recipient reports paid + preimage (or pay_error). Adds a --with validation case to the headless harness; 16/16 pass. https://claude.ai/code/session_01NM2TyJtosLdY5ycjyabSRS
This commit is contained in:
@@ -138,3 +138,11 @@ if amy_a profile edit --clink-offer "not-a-noffer" >>"$LOG_FILE" 2>&1; then
|
||||
else
|
||||
record_result profile.clinkoffer.bad pass "bad --clink-offer exits non-zero"
|
||||
fi
|
||||
|
||||
# --- zap --with: rejects a non-ndebit funding pointer (validated before any network) ---
|
||||
step "zap user rejects a non-ndebit --with"
|
||||
if amy_a zap user "$EXPECTED_PUB" 1000 --with "not-an-ndebit" >>"$LOG_FILE" 2>&1; then
|
||||
record_result zap.with.bad fail "bad --with should exit non-zero"
|
||||
else
|
||||
record_result zap.with.bad pass "bad --with exits non-zero"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user